packages feed

gi-gtk-0.3.18.10: GI/Gtk.hs

-- Generated code.

{-# OPTIONS_GHC -fno-warn-unused-imports #-}

{-# LANGUAGE ForeignFunctionInterface, ConstraintKinds,
    TypeFamilies, MultiParamTypeClasses, KindSignatures,
    FlexibleInstances, UndecidableInstances, DataKinds,
    OverloadedStrings, NegativeLiterals, FlexibleContexts #-}

module GI.Gtk where

import Prelude ()
import Data.GI.Base.ShortPrelude
import Data.Char
import Data.Int
import Data.Word
import qualified Data.ByteString.Char8 as B
import Data.ByteString.Char8 (ByteString)
import qualified Data.Map as Map
import Foreign.C
import Foreign.Ptr
import Foreign.ForeignPtr
import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
import Foreign.Storable (peek, poke, sizeOf)
import Control.Applicative ((<$>))
import Control.Exception (onException)
import Control.Monad.IO.Class
import qualified Data.Text as T

import Data.GI.Base.Attributes hiding (get, set)
import Data.GI.Base.BasicTypes
import Data.GI.Base.BasicConversions
import Data.GI.Base.Closure
import Data.GI.Base.GError
import Data.GI.Base.GHashTable
import Data.GI.Base.GParamSpec
import Data.GI.Base.GVariant
import Data.GI.Base.GValue
import Data.GI.Base.ManagedPtr
import Data.GI.Base.Overloading
import Data.GI.Base.Properties hiding (new)
import Data.GI.Base.Signals (SignalConnectMode(..), connectSignalFunPtr, SignalHandlerId)
import Data.GI.Base.Utils

import qualified GI.Atk as Atk
import qualified GI.AtkAttributes as AtkA
import qualified GI.GLib as GLib
import qualified GI.GLibAttributes as GLibA
import qualified GI.GObject as GObject
import qualified GI.GObjectAttributes as GObjectA
import qualified GI.Gdk as Gdk
import qualified GI.GdkAttributes as GdkA
import qualified GI.GdkPixbuf as GdkPixbuf
import qualified GI.GdkPixbufAttributes as GdkPixbufA
import qualified GI.Gio as Gio
import qualified GI.GioAttributes as GioA
import qualified GI.Pango as Pango
import qualified GI.PangoAttributes as PangoA
import qualified GI.Cairo as Cairo
import qualified GI.CairoAttributes as CairoA

-- object AboutDialog 
newtype AboutDialog = AboutDialog (ForeignPtr AboutDialog)
noAboutDialog :: Maybe AboutDialog
noAboutDialog = Nothing

foreign import ccall "gtk_about_dialog_get_type"
    c_gtk_about_dialog_get_type :: IO GType

type instance ParentTypes AboutDialog = '[Dialog, Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject AboutDialog where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_about_dialog_get_type
    

class GObject o => AboutDialogK o
instance (GObject o, IsDescendantOf AboutDialog o) => AboutDialogK o

toAboutDialog :: AboutDialogK o => o -> IO AboutDialog
toAboutDialog = unsafeCastTo AboutDialog

-- method AboutDialog::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "AboutDialog"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_new" gtk_about_dialog_new :: 
    IO (Ptr AboutDialog)


aboutDialogNew ::
    (MonadIO m) =>
    m AboutDialog
aboutDialogNew  = liftIO $ do
    result <- gtk_about_dialog_new
    checkUnexpectedReturnNULL "gtk_about_dialog_new" result
    result' <- (newObject AboutDialog) result
    return result'

-- method AboutDialog::add_credit_section
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "section_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "people", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "section_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "people", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_add_credit_section" gtk_about_dialog_add_credit_section :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CString ->                              -- section_name : TBasicType TUTF8
    Ptr CString ->                          -- people : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()


aboutDialogAddCreditSection ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- section_name
    [T.Text] ->                             -- people
    m ()
aboutDialogAddCreditSection _obj section_name people = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    section_name' <- textToCString section_name
    people' <- packZeroTerminatedUTF8CArray people
    gtk_about_dialog_add_credit_section _obj' section_name' people'
    touchManagedPtr _obj
    freeMem section_name'
    mapZeroTerminatedCArray freeMem people'
    freeMem people'
    return ()

-- method AboutDialog::get_artists
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_artists" gtk_about_dialog_get_artists :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO (Ptr CString)


aboutDialogGetArtists ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m [T.Text]
aboutDialogGetArtists _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_artists _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_artists" result
    result' <- unpackZeroTerminatedUTF8CArray result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_authors
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_authors" gtk_about_dialog_get_authors :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO (Ptr CString)


aboutDialogGetAuthors ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m [T.Text]
aboutDialogGetAuthors _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_authors _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_authors" result
    result' <- unpackZeroTerminatedUTF8CArray result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_comments
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_comments" gtk_about_dialog_get_comments :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO CString


aboutDialogGetComments ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m T.Text
aboutDialogGetComments _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_comments _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_comments" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_copyright
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_copyright" gtk_about_dialog_get_copyright :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO CString


aboutDialogGetCopyright ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m T.Text
aboutDialogGetCopyright _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_copyright _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_copyright" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_documenters
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_documenters" gtk_about_dialog_get_documenters :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO (Ptr CString)


aboutDialogGetDocumenters ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m [T.Text]
aboutDialogGetDocumenters _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_documenters _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_documenters" result
    result' <- unpackZeroTerminatedUTF8CArray result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_license
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_license" gtk_about_dialog_get_license :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO CString


aboutDialogGetLicense ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m T.Text
aboutDialogGetLicense _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_license _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_license" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_license_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "License"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_license_type" gtk_about_dialog_get_license_type :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO CUInt


aboutDialogGetLicenseType ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m License
aboutDialogGetLicenseType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_license_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_logo
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_logo" gtk_about_dialog_get_logo :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO (Ptr GdkPixbuf.Pixbuf)


aboutDialogGetLogo ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m GdkPixbuf.Pixbuf
aboutDialogGetLogo _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_logo _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_logo" result
    result' <- (newObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_logo_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_logo_icon_name" gtk_about_dialog_get_logo_icon_name :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO CString


aboutDialogGetLogoIconName ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m T.Text
aboutDialogGetLogoIconName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_logo_icon_name _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_logo_icon_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_program_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_program_name" gtk_about_dialog_get_program_name :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO CString


aboutDialogGetProgramName ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m T.Text
aboutDialogGetProgramName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_program_name _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_program_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_translator_credits
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_translator_credits" gtk_about_dialog_get_translator_credits :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO CString


aboutDialogGetTranslatorCredits ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m T.Text
aboutDialogGetTranslatorCredits _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_translator_credits _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_translator_credits" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_version
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_version" gtk_about_dialog_get_version :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO CString


aboutDialogGetVersion ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m T.Text
aboutDialogGetVersion _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_version _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_version" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_website
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_website" gtk_about_dialog_get_website :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO CString


aboutDialogGetWebsite ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m T.Text
aboutDialogGetWebsite _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_website _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_website" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_website_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_website_label" gtk_about_dialog_get_website_label :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO CString


aboutDialogGetWebsiteLabel ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m T.Text
aboutDialogGetWebsiteLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_website_label _obj'
    checkUnexpectedReturnNULL "gtk_about_dialog_get_website_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::get_wrap_license
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_get_wrap_license" gtk_about_dialog_get_wrap_license :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    IO CInt


aboutDialogGetWrapLicense ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    m Bool
aboutDialogGetWrapLicense _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_about_dialog_get_wrap_license _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AboutDialog::set_artists
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "artists", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "artists", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_artists" gtk_about_dialog_set_artists :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    Ptr CString ->                          -- artists : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()


aboutDialogSetArtists ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    [T.Text] ->                             -- artists
    m ()
aboutDialogSetArtists _obj artists = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    artists' <- packZeroTerminatedUTF8CArray artists
    gtk_about_dialog_set_artists _obj' artists'
    touchManagedPtr _obj
    mapZeroTerminatedCArray freeMem artists'
    freeMem artists'
    return ()

-- method AboutDialog::set_authors
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "authors", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "authors", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_authors" gtk_about_dialog_set_authors :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    Ptr CString ->                          -- authors : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()


aboutDialogSetAuthors ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    [T.Text] ->                             -- authors
    m ()
aboutDialogSetAuthors _obj authors = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    authors' <- packZeroTerminatedUTF8CArray authors
    gtk_about_dialog_set_authors _obj' authors'
    touchManagedPtr _obj
    mapZeroTerminatedCArray freeMem authors'
    freeMem authors'
    return ()

-- method AboutDialog::set_comments
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "comments", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "comments", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_comments" gtk_about_dialog_set_comments :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CString ->                              -- comments : TBasicType TUTF8
    IO ()


aboutDialogSetComments ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- comments
    m ()
aboutDialogSetComments _obj comments = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeComments <- case comments of
        Nothing -> return nullPtr
        Just jComments -> do
            jComments' <- textToCString jComments
            return jComments'
    gtk_about_dialog_set_comments _obj' maybeComments
    touchManagedPtr _obj
    freeMem maybeComments
    return ()

-- method AboutDialog::set_copyright
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "copyright", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "copyright", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_copyright" gtk_about_dialog_set_copyright :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CString ->                              -- copyright : TBasicType TUTF8
    IO ()


aboutDialogSetCopyright ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- copyright
    m ()
aboutDialogSetCopyright _obj copyright = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCopyright <- case copyright of
        Nothing -> return nullPtr
        Just jCopyright -> do
            jCopyright' <- textToCString jCopyright
            return jCopyright'
    gtk_about_dialog_set_copyright _obj' maybeCopyright
    touchManagedPtr _obj
    freeMem maybeCopyright
    return ()

-- method AboutDialog::set_documenters
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "documenters", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "documenters", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_documenters" gtk_about_dialog_set_documenters :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    Ptr CString ->                          -- documenters : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()


aboutDialogSetDocumenters ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    [T.Text] ->                             -- documenters
    m ()
aboutDialogSetDocumenters _obj documenters = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    documenters' <- packZeroTerminatedUTF8CArray documenters
    gtk_about_dialog_set_documenters _obj' documenters'
    touchManagedPtr _obj
    mapZeroTerminatedCArray freeMem documenters'
    freeMem documenters'
    return ()

-- method AboutDialog::set_license
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "license", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "license", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_license" gtk_about_dialog_set_license :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CString ->                              -- license : TBasicType TUTF8
    IO ()


aboutDialogSetLicense ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- license
    m ()
aboutDialogSetLicense _obj license = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLicense <- case license of
        Nothing -> return nullPtr
        Just jLicense -> do
            jLicense' <- textToCString jLicense
            return jLicense'
    gtk_about_dialog_set_license _obj' maybeLicense
    touchManagedPtr _obj
    freeMem maybeLicense
    return ()

-- method AboutDialog::set_license_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "license_type", argType = TInterface "Gtk" "License", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "license_type", argType = TInterface "Gtk" "License", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_license_type" gtk_about_dialog_set_license_type :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CUInt ->                                -- license_type : TInterface "Gtk" "License"
    IO ()


aboutDialogSetLicenseType ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    License ->                              -- license_type
    m ()
aboutDialogSetLicenseType _obj license_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let license_type' = (fromIntegral . fromEnum) license_type
    gtk_about_dialog_set_license_type _obj' license_type'
    touchManagedPtr _obj
    return ()

-- method AboutDialog::set_logo
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "logo", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "logo", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_logo" gtk_about_dialog_set_logo :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    Ptr GdkPixbuf.Pixbuf ->                 -- logo : TInterface "GdkPixbuf" "Pixbuf"
    IO ()


aboutDialogSetLogo ::
    (MonadIO m, AboutDialogK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- logo
    m ()
aboutDialogSetLogo _obj logo = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLogo <- case logo of
        Nothing -> return nullPtr
        Just jLogo -> do
            let jLogo' = unsafeManagedPtrCastPtr jLogo
            return jLogo'
    gtk_about_dialog_set_logo _obj' maybeLogo
    touchManagedPtr _obj
    whenJust logo touchManagedPtr
    return ()

-- method AboutDialog::set_logo_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_logo_icon_name" gtk_about_dialog_set_logo_icon_name :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()


aboutDialogSetLogoIconName ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- icon_name
    m ()
aboutDialogSetLogoIconName _obj icon_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeIcon_name <- case icon_name of
        Nothing -> return nullPtr
        Just jIcon_name -> do
            jIcon_name' <- textToCString jIcon_name
            return jIcon_name'
    gtk_about_dialog_set_logo_icon_name _obj' maybeIcon_name
    touchManagedPtr _obj
    freeMem maybeIcon_name
    return ()

-- method AboutDialog::set_program_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_program_name" gtk_about_dialog_set_program_name :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


aboutDialogSetProgramName ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
aboutDialogSetProgramName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    gtk_about_dialog_set_program_name _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method AboutDialog::set_translator_credits
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "translator_credits", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "translator_credits", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_translator_credits" gtk_about_dialog_set_translator_credits :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CString ->                              -- translator_credits : TBasicType TUTF8
    IO ()


aboutDialogSetTranslatorCredits ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- translator_credits
    m ()
aboutDialogSetTranslatorCredits _obj translator_credits = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeTranslator_credits <- case translator_credits of
        Nothing -> return nullPtr
        Just jTranslator_credits -> do
            jTranslator_credits' <- textToCString jTranslator_credits
            return jTranslator_credits'
    gtk_about_dialog_set_translator_credits _obj' maybeTranslator_credits
    touchManagedPtr _obj
    freeMem maybeTranslator_credits
    return ()

-- method AboutDialog::set_version
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "version", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "version", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_version" gtk_about_dialog_set_version :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CString ->                              -- version : TBasicType TUTF8
    IO ()


aboutDialogSetVersion ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- version
    m ()
aboutDialogSetVersion _obj version = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeVersion <- case version of
        Nothing -> return nullPtr
        Just jVersion -> do
            jVersion' <- textToCString jVersion
            return jVersion'
    gtk_about_dialog_set_version _obj' maybeVersion
    touchManagedPtr _obj
    freeMem maybeVersion
    return ()

-- method AboutDialog::set_website
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "website", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "website", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_website" gtk_about_dialog_set_website :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CString ->                              -- website : TBasicType TUTF8
    IO ()


aboutDialogSetWebsite ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- website
    m ()
aboutDialogSetWebsite _obj website = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeWebsite <- case website of
        Nothing -> return nullPtr
        Just jWebsite -> do
            jWebsite' <- textToCString jWebsite
            return jWebsite'
    gtk_about_dialog_set_website _obj' maybeWebsite
    touchManagedPtr _obj
    freeMem maybeWebsite
    return ()

-- method AboutDialog::set_website_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "website_label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "website_label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_website_label" gtk_about_dialog_set_website_label :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CString ->                              -- website_label : TBasicType TUTF8
    IO ()


aboutDialogSetWebsiteLabel ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- website_label
    m ()
aboutDialogSetWebsiteLabel _obj website_label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    website_label' <- textToCString website_label
    gtk_about_dialog_set_website_label _obj' website_label'
    touchManagedPtr _obj
    freeMem website_label'
    return ()

-- method AboutDialog::set_wrap_license
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap_license", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AboutDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap_license", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_about_dialog_set_wrap_license" gtk_about_dialog_set_wrap_license :: 
    Ptr AboutDialog ->                      -- _obj : TInterface "Gtk" "AboutDialog"
    CInt ->                                 -- wrap_license : TBasicType TBoolean
    IO ()


aboutDialogSetWrapLicense ::
    (MonadIO m, AboutDialogK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- wrap_license
    m ()
aboutDialogSetWrapLicense _obj wrap_license = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let wrap_license' = (fromIntegral . fromEnum) wrap_license
    gtk_about_dialog_set_wrap_license _obj' wrap_license'
    touchManagedPtr _obj
    return ()

-- signal AboutDialog::activate-link
type AboutDialogActivateLinkCallback =
    T.Text ->
    IO Bool

noAboutDialogActivateLinkCallback :: Maybe AboutDialogActivateLinkCallback
noAboutDialogActivateLinkCallback = Nothing

type AboutDialogActivateLinkCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkAboutDialogActivateLinkCallback :: AboutDialogActivateLinkCallbackC -> IO (FunPtr AboutDialogActivateLinkCallbackC)

aboutDialogActivateLinkClosure :: AboutDialogActivateLinkCallback -> IO Closure
aboutDialogActivateLinkClosure cb = newCClosure =<< mkAboutDialogActivateLinkCallback wrapped
    where wrapped = aboutDialogActivateLinkCallbackWrapper cb

aboutDialogActivateLinkCallbackWrapper ::
    AboutDialogActivateLinkCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO CInt
aboutDialogActivateLinkCallbackWrapper _cb _ uri _ = do
    uri' <- cstringToText uri
    result <- _cb  uri'
    let result' = (fromIntegral . fromEnum) result
    return result'

onAboutDialogActivateLink :: (GObject a, MonadIO m) => a -> AboutDialogActivateLinkCallback -> m SignalHandlerId
onAboutDialogActivateLink obj cb = liftIO $ connectAboutDialogActivateLink obj cb SignalConnectBefore
afterAboutDialogActivateLink :: (GObject a, MonadIO m) => a -> AboutDialogActivateLinkCallback -> m SignalHandlerId
afterAboutDialogActivateLink obj cb = connectAboutDialogActivateLink obj cb SignalConnectAfter

connectAboutDialogActivateLink :: (GObject a, MonadIO m) =>
                                  a -> AboutDialogActivateLinkCallback -> SignalConnectMode -> m SignalHandlerId
connectAboutDialogActivateLink obj cb after = liftIO $ do
    cb' <- mkAboutDialogActivateLinkCallback (aboutDialogActivateLinkCallbackWrapper cb)
    connectSignalFunPtr obj "activate-link" cb' after

-- Flags AccelFlags

data AccelFlags = 
      AccelFlagsVisible
    | AccelFlagsLocked
    | AccelFlagsMask
    | AnotherAccelFlags Int
    deriving (Show, Eq)

instance Enum AccelFlags where
    fromEnum AccelFlagsVisible = 1
    fromEnum AccelFlagsLocked = 2
    fromEnum AccelFlagsMask = 7
    fromEnum (AnotherAccelFlags k) = k

    toEnum 1 = AccelFlagsVisible
    toEnum 2 = AccelFlagsLocked
    toEnum 7 = AccelFlagsMask
    toEnum k = AnotherAccelFlags k

foreign import ccall "gtk_accel_flags_get_type" c_gtk_accel_flags_get_type :: 
    IO GType

instance BoxedEnum AccelFlags where
    boxedEnumType _ = c_gtk_accel_flags_get_type

instance IsGFlag AccelFlags

-- object AccelGroup 
newtype AccelGroup = AccelGroup (ForeignPtr AccelGroup)
noAccelGroup :: Maybe AccelGroup
noAccelGroup = Nothing

foreign import ccall "gtk_accel_group_get_type"
    c_gtk_accel_group_get_type :: IO GType

type instance ParentTypes AccelGroup = '[GObject.Object]

instance GObject AccelGroup where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_accel_group_get_type
    

class GObject o => AccelGroupK o
instance (GObject o, IsDescendantOf AccelGroup o) => AccelGroupK o

toAccelGroup :: AccelGroupK o => o -> IO AccelGroup
toAccelGroup = unsafeCastTo AccelGroup

-- method AccelGroup::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "AccelGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_new" gtk_accel_group_new :: 
    IO (Ptr AccelGroup)


accelGroupNew ::
    (MonadIO m) =>
    m AccelGroup
accelGroupNew  = liftIO $ do
    result <- gtk_accel_group_new
    checkUnexpectedReturnNULL "gtk_accel_group_new" result
    result' <- (wrapObject AccelGroup) result
    return result'

-- method AccelGroup::activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_quark", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "acceleratable", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_quark", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "acceleratable", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_activate" gtk_accel_group_activate :: 
    Ptr AccelGroup ->                       -- _obj : TInterface "Gtk" "AccelGroup"
    Word32 ->                               -- accel_quark : TBasicType TUInt32
    Ptr GObject.Object ->                   -- acceleratable : TInterface "GObject" "Object"
    Word32 ->                               -- accel_key : TBasicType TUInt32
    CUInt ->                                -- accel_mods : TInterface "Gdk" "ModifierType"
    IO CInt


accelGroupActivate ::
    (MonadIO m, AccelGroupK a, GObject.ObjectK b) =>
    a ->                                    -- _obj
    Word32 ->                               -- accel_quark
    b ->                                    -- acceleratable
    Word32 ->                               -- accel_key
    [Gdk.ModifierType] ->                   -- accel_mods
    m Bool
accelGroupActivate _obj accel_quark acceleratable accel_key accel_mods = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let acceleratable' = unsafeManagedPtrCastPtr acceleratable
    let accel_mods' = gflagsToWord accel_mods
    result <- gtk_accel_group_activate _obj' accel_quark acceleratable' accel_key accel_mods'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr acceleratable
    return result'

-- method AccelGroup::connect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_flags", argType = TInterface "Gtk" "AccelFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_flags", argType = TInterface "Gtk" "AccelFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_connect" gtk_accel_group_connect :: 
    Ptr AccelGroup ->                       -- _obj : TInterface "Gtk" "AccelGroup"
    Word32 ->                               -- accel_key : TBasicType TUInt32
    CUInt ->                                -- accel_mods : TInterface "Gdk" "ModifierType"
    CUInt ->                                -- accel_flags : TInterface "Gtk" "AccelFlags"
    Ptr Closure ->                          -- closure : TInterface "GObject" "Closure"
    IO ()


accelGroupConnect ::
    (MonadIO m, AccelGroupK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- accel_key
    [Gdk.ModifierType] ->                   -- accel_mods
    [AccelFlags] ->                         -- accel_flags
    Closure ->                              -- closure
    m ()
accelGroupConnect _obj accel_key accel_mods accel_flags closure = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accel_mods' = gflagsToWord accel_mods
    let accel_flags' = gflagsToWord accel_flags
    let closure' = unsafeManagedPtrGetPtr closure
    gtk_accel_group_connect _obj' accel_key accel_mods' accel_flags' closure'
    touchManagedPtr _obj
    touchManagedPtr closure
    return ()

-- method AccelGroup::connect_by_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_connect_by_path" gtk_accel_group_connect_by_path :: 
    Ptr AccelGroup ->                       -- _obj : TInterface "Gtk" "AccelGroup"
    CString ->                              -- accel_path : TBasicType TUTF8
    Ptr Closure ->                          -- closure : TInterface "GObject" "Closure"
    IO ()


accelGroupConnectByPath ::
    (MonadIO m, AccelGroupK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- accel_path
    Closure ->                              -- closure
    m ()
accelGroupConnectByPath _obj accel_path closure = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    accel_path' <- textToCString accel_path
    let closure' = unsafeManagedPtrGetPtr closure
    gtk_accel_group_connect_by_path _obj' accel_path' closure'
    touchManagedPtr _obj
    touchManagedPtr closure
    freeMem accel_path'
    return ()

-- method AccelGroup::disconnect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_disconnect" gtk_accel_group_disconnect :: 
    Ptr AccelGroup ->                       -- _obj : TInterface "Gtk" "AccelGroup"
    Ptr Closure ->                          -- closure : TInterface "GObject" "Closure"
    IO CInt


accelGroupDisconnect ::
    (MonadIO m, AccelGroupK a) =>
    a ->                                    -- _obj
    Maybe (Closure) ->                      -- closure
    m Bool
accelGroupDisconnect _obj closure = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeClosure <- case closure of
        Nothing -> return nullPtr
        Just jClosure -> do
            let jClosure' = unsafeManagedPtrGetPtr jClosure
            return jClosure'
    result <- gtk_accel_group_disconnect _obj' maybeClosure
    let result' = (/= 0) result
    touchManagedPtr _obj
    whenJust closure touchManagedPtr
    return result'

-- method AccelGroup::disconnect_key
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_disconnect_key" gtk_accel_group_disconnect_key :: 
    Ptr AccelGroup ->                       -- _obj : TInterface "Gtk" "AccelGroup"
    Word32 ->                               -- accel_key : TBasicType TUInt32
    CUInt ->                                -- accel_mods : TInterface "Gdk" "ModifierType"
    IO CInt


accelGroupDisconnectKey ::
    (MonadIO m, AccelGroupK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- accel_key
    [Gdk.ModifierType] ->                   -- accel_mods
    m Bool
accelGroupDisconnectKey _obj accel_key accel_mods = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accel_mods' = gflagsToWord accel_mods
    result <- gtk_accel_group_disconnect_key _obj' accel_key accel_mods'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AccelGroup::find
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "find_func", argType = TInterface "Gtk" "AccelGroupFindFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "find_func", argType = TInterface "Gtk" "AccelGroupFindFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AccelKey"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_find" gtk_accel_group_find :: 
    Ptr AccelGroup ->                       -- _obj : TInterface "Gtk" "AccelGroup"
    FunPtr AccelGroupFindFuncC ->           -- find_func : TInterface "Gtk" "AccelGroupFindFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    IO (Ptr AccelKey)


accelGroupFind ::
    (MonadIO m, AccelGroupK a) =>
    a ->                                    -- _obj
    AccelGroupFindFunc ->                   -- find_func
    m AccelKey
accelGroupFind _obj find_func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    find_func' <- mkAccelGroupFindFunc (accelGroupFindFuncWrapper Nothing find_func)
    let data_ = nullPtr
    result <- gtk_accel_group_find _obj' find_func' data_
    checkUnexpectedReturnNULL "gtk_accel_group_find" result
    result' <- (newPtr 12 AccelKey) result
    safeFreeFunPtr $ castFunPtrToPtr find_func'
    touchManagedPtr _obj
    return result'

-- method AccelGroup::get_is_locked
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_get_is_locked" gtk_accel_group_get_is_locked :: 
    Ptr AccelGroup ->                       -- _obj : TInterface "Gtk" "AccelGroup"
    IO CInt


accelGroupGetIsLocked ::
    (MonadIO m, AccelGroupK a) =>
    a ->                                    -- _obj
    m Bool
accelGroupGetIsLocked _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_accel_group_get_is_locked _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AccelGroup::get_modifier_mask
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "ModifierType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_get_modifier_mask" gtk_accel_group_get_modifier_mask :: 
    Ptr AccelGroup ->                       -- _obj : TInterface "Gtk" "AccelGroup"
    IO CUInt


accelGroupGetModifierMask ::
    (MonadIO m, AccelGroupK a) =>
    a ->                                    -- _obj
    m [Gdk.ModifierType]
accelGroupGetModifierMask _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_accel_group_get_modifier_mask _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method AccelGroup::lock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_lock" gtk_accel_group_lock :: 
    Ptr AccelGroup ->                       -- _obj : TInterface "Gtk" "AccelGroup"
    IO ()


accelGroupLock ::
    (MonadIO m, AccelGroupK a) =>
    a ->                                    -- _obj
    m ()
accelGroupLock _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_accel_group_lock _obj'
    touchManagedPtr _obj
    return ()

-- method AccelGroup::query
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_entries", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_entries", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 3 (TInterface "Gtk" "AccelGroupEntry")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_query" gtk_accel_group_query :: 
    Ptr AccelGroup ->                       -- _obj : TInterface "Gtk" "AccelGroup"
    Word32 ->                               -- accel_key : TBasicType TUInt32
    CUInt ->                                -- accel_mods : TInterface "Gdk" "ModifierType"
    Ptr Word32 ->                           -- n_entries : TBasicType TUInt32
    IO (Ptr AccelGroupEntry)


accelGroupQuery ::
    (MonadIO m, AccelGroupK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- accel_key
    [Gdk.ModifierType] ->                   -- accel_mods
    m [AccelGroupEntry]
accelGroupQuery _obj accel_key accel_mods = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accel_mods' = gflagsToWord accel_mods
    n_entries <- allocMem :: IO (Ptr Word32)
    result <- gtk_accel_group_query _obj' accel_key accel_mods' n_entries
    n_entries' <- peek n_entries
    checkUnexpectedReturnNULL "gtk_accel_group_query" result
    result' <- (unpackBlockArrayWithLength 32 n_entries') result
    result'' <- mapM (newPtr 32 AccelGroupEntry) result'
    touchManagedPtr _obj
    freeMem n_entries
    return result''

-- method AccelGroup::unlock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_unlock" gtk_accel_group_unlock :: 
    Ptr AccelGroup ->                       -- _obj : TInterface "Gtk" "AccelGroup"
    IO ()


accelGroupUnlock ::
    (MonadIO m, AccelGroupK a) =>
    a ->                                    -- _obj
    m ()
accelGroupUnlock _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_accel_group_unlock _obj'
    touchManagedPtr _obj
    return ()

-- method AccelGroup::from_accel_closure
-- method type : MemberFunction
-- Args : [Arg {argName = "closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AccelGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_group_from_accel_closure" gtk_accel_group_from_accel_closure :: 
    Ptr Closure ->                          -- closure : TInterface "GObject" "Closure"
    IO (Ptr AccelGroup)


accelGroupFromAccelClosure ::
    (MonadIO m) =>
    Closure ->                              -- closure
    m AccelGroup
accelGroupFromAccelClosure closure = liftIO $ do
    let closure' = unsafeManagedPtrGetPtr closure
    result <- gtk_accel_group_from_accel_closure closure'
    checkUnexpectedReturnNULL "gtk_accel_group_from_accel_closure" result
    result' <- (newObject AccelGroup) result
    touchManagedPtr closure
    return result'

-- signal AccelGroup::accel-activate
type AccelGroupAccelActivateCallback =
    GObject.Object ->
    Word32 ->
    [Gdk.ModifierType] ->
    IO Bool

noAccelGroupAccelActivateCallback :: Maybe AccelGroupAccelActivateCallback
noAccelGroupAccelActivateCallback = Nothing

type AccelGroupAccelActivateCallbackC =
    Ptr () ->                               -- object
    Ptr GObject.Object ->
    Word32 ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkAccelGroupAccelActivateCallback :: AccelGroupAccelActivateCallbackC -> IO (FunPtr AccelGroupAccelActivateCallbackC)

accelGroupAccelActivateClosure :: AccelGroupAccelActivateCallback -> IO Closure
accelGroupAccelActivateClosure cb = newCClosure =<< mkAccelGroupAccelActivateCallback wrapped
    where wrapped = accelGroupAccelActivateCallbackWrapper cb

accelGroupAccelActivateCallbackWrapper ::
    AccelGroupAccelActivateCallback ->
    Ptr () ->
    Ptr GObject.Object ->
    Word32 ->
    CUInt ->
    Ptr () ->
    IO CInt
accelGroupAccelActivateCallbackWrapper _cb _ acceleratable keyval modifier _ = do
    acceleratable' <- (newObject GObject.Object) acceleratable
    let modifier' = wordToGFlags modifier
    result <- _cb  acceleratable' keyval modifier'
    let result' = (fromIntegral . fromEnum) result
    return result'

onAccelGroupAccelActivate :: (GObject a, MonadIO m) => a -> AccelGroupAccelActivateCallback -> m SignalHandlerId
onAccelGroupAccelActivate obj cb = liftIO $ connectAccelGroupAccelActivate obj cb SignalConnectBefore
afterAccelGroupAccelActivate :: (GObject a, MonadIO m) => a -> AccelGroupAccelActivateCallback -> m SignalHandlerId
afterAccelGroupAccelActivate obj cb = connectAccelGroupAccelActivate obj cb SignalConnectAfter

connectAccelGroupAccelActivate :: (GObject a, MonadIO m) =>
                                  a -> AccelGroupAccelActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectAccelGroupAccelActivate obj cb after = liftIO $ do
    cb' <- mkAccelGroupAccelActivateCallback (accelGroupAccelActivateCallbackWrapper cb)
    connectSignalFunPtr obj "accel-activate" cb' after

-- signal AccelGroup::accel-changed
type AccelGroupAccelChangedCallback =
    Word32 ->
    [Gdk.ModifierType] ->
    Closure ->
    IO ()

noAccelGroupAccelChangedCallback :: Maybe AccelGroupAccelChangedCallback
noAccelGroupAccelChangedCallback = Nothing

type AccelGroupAccelChangedCallbackC =
    Ptr () ->                               -- object
    Word32 ->
    CUInt ->
    Ptr Closure ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAccelGroupAccelChangedCallback :: AccelGroupAccelChangedCallbackC -> IO (FunPtr AccelGroupAccelChangedCallbackC)

accelGroupAccelChangedClosure :: AccelGroupAccelChangedCallback -> IO Closure
accelGroupAccelChangedClosure cb = newCClosure =<< mkAccelGroupAccelChangedCallback wrapped
    where wrapped = accelGroupAccelChangedCallbackWrapper cb

accelGroupAccelChangedCallbackWrapper ::
    AccelGroupAccelChangedCallback ->
    Ptr () ->
    Word32 ->
    CUInt ->
    Ptr Closure ->
    Ptr () ->
    IO ()
accelGroupAccelChangedCallbackWrapper _cb _ keyval modifier accel_closure _ = do
    let modifier' = wordToGFlags modifier
    accel_closure' <- (newBoxed Closure) accel_closure
    _cb  keyval modifier' accel_closure'

onAccelGroupAccelChanged :: (GObject a, MonadIO m) => a -> AccelGroupAccelChangedCallback -> m SignalHandlerId
onAccelGroupAccelChanged obj cb = liftIO $ connectAccelGroupAccelChanged obj cb SignalConnectBefore
afterAccelGroupAccelChanged :: (GObject a, MonadIO m) => a -> AccelGroupAccelChangedCallback -> m SignalHandlerId
afterAccelGroupAccelChanged obj cb = connectAccelGroupAccelChanged obj cb SignalConnectAfter

connectAccelGroupAccelChanged :: (GObject a, MonadIO m) =>
                                 a -> AccelGroupAccelChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectAccelGroupAccelChanged obj cb after = liftIO $ do
    cb' <- mkAccelGroupAccelChangedCallback (accelGroupAccelChangedCallbackWrapper cb)
    connectSignalFunPtr obj "accel-changed" cb' after

-- callback AccelGroupActivate
accelGroupActivateClosure :: AccelGroupActivate -> IO Closure
accelGroupActivateClosure cb = newCClosure =<< mkAccelGroupActivate wrapped
    where wrapped = accelGroupActivateWrapper Nothing cb

type AccelGroupActivateC =
    Ptr AccelGroup ->
    Ptr GObject.Object ->
    Word32 ->
    CUInt ->
    IO CInt

foreign import ccall "wrapper"
    mkAccelGroupActivate :: AccelGroupActivateC -> IO (FunPtr AccelGroupActivateC)

type AccelGroupActivate =
    AccelGroup ->
    GObject.Object ->
    Word32 ->
    [Gdk.ModifierType] ->
    IO Bool

noAccelGroupActivate :: Maybe AccelGroupActivate
noAccelGroupActivate = Nothing

accelGroupActivateWrapper ::
    Maybe (Ptr (FunPtr (AccelGroupActivateC))) ->
    AccelGroupActivate ->
    Ptr AccelGroup ->
    Ptr GObject.Object ->
    Word32 ->
    CUInt ->
    IO CInt
accelGroupActivateWrapper funptrptr _cb accel_group acceleratable keyval modifier = do
    accel_group' <- (newObject AccelGroup) accel_group
    acceleratable' <- (newObject GObject.Object) acceleratable
    let modifier' = wordToGFlags modifier
    result <- _cb  accel_group' acceleratable' keyval modifier'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- struct AccelGroupEntry
newtype AccelGroupEntry = AccelGroupEntry (ForeignPtr AccelGroupEntry)
noAccelGroupEntry :: Maybe AccelGroupEntry
noAccelGroupEntry = Nothing

accelGroupEntryReadKey :: AccelGroupEntry -> IO AccelKey
accelGroupEntryReadKey s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO (Ptr AccelKey)
    val' <- (newPtr 12 AccelKey) val
    return val'

accelGroupEntryReadClosure :: AccelGroupEntry -> IO Closure
accelGroupEntryReadClosure s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO (Ptr Closure)
    val' <- (newBoxed Closure) val
    return val'

accelGroupEntryReadAccelPathQuark :: AccelGroupEntry -> IO Word32
accelGroupEntryReadAccelPathQuark s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO Word32
    return val

-- callback AccelGroupFindFunc
accelGroupFindFuncClosure :: AccelGroupFindFunc -> IO Closure
accelGroupFindFuncClosure cb = newCClosure =<< mkAccelGroupFindFunc wrapped
    where wrapped = accelGroupFindFuncWrapper Nothing cb

type AccelGroupFindFuncC =
    Ptr AccelKey ->
    Ptr Closure ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkAccelGroupFindFunc :: AccelGroupFindFuncC -> IO (FunPtr AccelGroupFindFuncC)

type AccelGroupFindFunc =
    AccelKey ->
    Closure ->
    IO Bool

noAccelGroupFindFunc :: Maybe AccelGroupFindFunc
noAccelGroupFindFunc = Nothing

accelGroupFindFuncWrapper ::
    Maybe (Ptr (FunPtr (AccelGroupFindFuncC))) ->
    AccelGroupFindFunc ->
    Ptr AccelKey ->
    Ptr Closure ->
    Ptr () ->
    IO CInt
accelGroupFindFuncWrapper funptrptr _cb key closure _ = do
    key' <- (newPtr 12 AccelKey) key
    closure' <- (newBoxed Closure) closure
    result <- _cb  key' closure'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- struct AccelKey
newtype AccelKey = AccelKey (ForeignPtr AccelKey)
noAccelKey :: Maybe AccelKey
noAccelKey = Nothing

accelKeyReadAccelKey :: AccelKey -> IO Word32
accelKeyReadAccelKey s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Word32
    return val

accelKeyReadAccelMods :: AccelKey -> IO [Gdk.ModifierType]
accelKeyReadAccelMods s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO CUInt
    let val' = wordToGFlags val
    return val'

accelKeyReadAccelFlags :: AccelKey -> IO Word32
accelKeyReadAccelFlags s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Word32
    return val

-- object AccelLabel 
newtype AccelLabel = AccelLabel (ForeignPtr AccelLabel)
noAccelLabel :: Maybe AccelLabel
noAccelLabel = Nothing

foreign import ccall "gtk_accel_label_get_type"
    c_gtk_accel_label_get_type :: IO GType

type instance ParentTypes AccelLabel = '[Label, Misc, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject AccelLabel where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_accel_label_get_type
    

class GObject o => AccelLabelK o
instance (GObject o, IsDescendantOf AccelLabel o) => AccelLabelK o

toAccelLabel :: AccelLabelK o => o -> IO AccelLabel
toAccelLabel = unsafeCastTo AccelLabel

-- method AccelLabel::new
-- method type : Constructor
-- Args : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AccelLabel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_label_new" gtk_accel_label_new :: 
    CString ->                              -- string : TBasicType TUTF8
    IO (Ptr AccelLabel)


accelLabelNew ::
    (MonadIO m) =>
    T.Text ->                               -- string
    m AccelLabel
accelLabelNew string = liftIO $ do
    string' <- textToCString string
    result <- gtk_accel_label_new string'
    checkUnexpectedReturnNULL "gtk_accel_label_new" result
    result' <- (newObject AccelLabel) result
    freeMem string'
    return result'

-- method AccelLabel::get_accel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_label_get_accel" gtk_accel_label_get_accel :: 
    Ptr AccelLabel ->                       -- _obj : TInterface "Gtk" "AccelLabel"
    Ptr Word32 ->                           -- accelerator_key : TBasicType TUInt32
    Ptr CUInt ->                            -- accelerator_mods : TInterface "Gdk" "ModifierType"
    IO ()


accelLabelGetAccel ::
    (MonadIO m, AccelLabelK a) =>
    a ->                                    -- _obj
    m (Word32,[Gdk.ModifierType])
accelLabelGetAccel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    accelerator_key <- allocMem :: IO (Ptr Word32)
    accelerator_mods <- allocMem :: IO (Ptr CUInt)
    gtk_accel_label_get_accel _obj' accelerator_key accelerator_mods
    accelerator_key' <- peek accelerator_key
    accelerator_mods' <- peek accelerator_mods
    let accelerator_mods'' = wordToGFlags accelerator_mods'
    touchManagedPtr _obj
    freeMem accelerator_key
    freeMem accelerator_mods
    return (accelerator_key', accelerator_mods'')

-- method AccelLabel::get_accel_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_label_get_accel_widget" gtk_accel_label_get_accel_widget :: 
    Ptr AccelLabel ->                       -- _obj : TInterface "Gtk" "AccelLabel"
    IO (Ptr Widget)


accelLabelGetAccelWidget ::
    (MonadIO m, AccelLabelK a) =>
    a ->                                    -- _obj
    m Widget
accelLabelGetAccelWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_accel_label_get_accel_widget _obj'
    checkUnexpectedReturnNULL "gtk_accel_label_get_accel_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method AccelLabel::get_accel_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_label_get_accel_width" gtk_accel_label_get_accel_width :: 
    Ptr AccelLabel ->                       -- _obj : TInterface "Gtk" "AccelLabel"
    IO Word32


accelLabelGetAccelWidth ::
    (MonadIO m, AccelLabelK a) =>
    a ->                                    -- _obj
    m Word32
accelLabelGetAccelWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_accel_label_get_accel_width _obj'
    touchManagedPtr _obj
    return result

-- method AccelLabel::refetch
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_label_refetch" gtk_accel_label_refetch :: 
    Ptr AccelLabel ->                       -- _obj : TInterface "Gtk" "AccelLabel"
    IO CInt


accelLabelRefetch ::
    (MonadIO m, AccelLabelK a) =>
    a ->                                    -- _obj
    m Bool
accelLabelRefetch _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_accel_label_refetch _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AccelLabel::set_accel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_label_set_accel" gtk_accel_label_set_accel :: 
    Ptr AccelLabel ->                       -- _obj : TInterface "Gtk" "AccelLabel"
    Word32 ->                               -- accelerator_key : TBasicType TUInt32
    CUInt ->                                -- accelerator_mods : TInterface "Gdk" "ModifierType"
    IO ()


accelLabelSetAccel ::
    (MonadIO m, AccelLabelK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- accelerator_key
    [Gdk.ModifierType] ->                   -- accelerator_mods
    m ()
accelLabelSetAccel _obj accelerator_key accelerator_mods = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accelerator_mods' = gflagsToWord accelerator_mods
    gtk_accel_label_set_accel _obj' accelerator_key accelerator_mods'
    touchManagedPtr _obj
    return ()

-- method AccelLabel::set_accel_closure
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_label_set_accel_closure" gtk_accel_label_set_accel_closure :: 
    Ptr AccelLabel ->                       -- _obj : TInterface "Gtk" "AccelLabel"
    Ptr Closure ->                          -- accel_closure : TInterface "GObject" "Closure"
    IO ()


accelLabelSetAccelClosure ::
    (MonadIO m, AccelLabelK a) =>
    a ->                                    -- _obj
    Closure ->                              -- accel_closure
    m ()
accelLabelSetAccelClosure _obj accel_closure = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accel_closure' = unsafeManagedPtrGetPtr accel_closure
    gtk_accel_label_set_accel_closure _obj' accel_closure'
    touchManagedPtr _obj
    touchManagedPtr accel_closure
    return ()

-- method AccelLabel::set_accel_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AccelLabel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_label_set_accel_widget" gtk_accel_label_set_accel_widget :: 
    Ptr AccelLabel ->                       -- _obj : TInterface "Gtk" "AccelLabel"
    Ptr Widget ->                           -- accel_widget : TInterface "Gtk" "Widget"
    IO ()


accelLabelSetAccelWidget ::
    (MonadIO m, AccelLabelK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- accel_widget
    m ()
accelLabelSetAccelWidget _obj accel_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accel_widget' = unsafeManagedPtrCastPtr accel_widget
    gtk_accel_label_set_accel_widget _obj' accel_widget'
    touchManagedPtr _obj
    touchManagedPtr accel_widget
    return ()

-- object AccelMap 
newtype AccelMap = AccelMap (ForeignPtr AccelMap)
noAccelMap :: Maybe AccelMap
noAccelMap = Nothing

foreign import ccall "gtk_accel_map_get_type"
    c_gtk_accel_map_get_type :: IO GType

type instance ParentTypes AccelMap = '[GObject.Object]

instance GObject AccelMap where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_accel_map_get_type
    

class GObject o => AccelMapK o
instance (GObject o, IsDescendantOf AccelMap o) => AccelMapK o

toAccelMap :: AccelMapK o => o -> IO AccelMap
toAccelMap = unsafeCastTo AccelMap

-- method AccelMap::add_entry
-- method type : MemberFunction
-- Args : [Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_add_entry" gtk_accel_map_add_entry :: 
    CString ->                              -- accel_path : TBasicType TUTF8
    Word32 ->                               -- accel_key : TBasicType TUInt32
    CUInt ->                                -- accel_mods : TInterface "Gdk" "ModifierType"
    IO ()


accelMapAddEntry ::
    (MonadIO m) =>
    T.Text ->                               -- accel_path
    Word32 ->                               -- accel_key
    [Gdk.ModifierType] ->                   -- accel_mods
    m ()
accelMapAddEntry accel_path accel_key accel_mods = liftIO $ do
    accel_path' <- textToCString accel_path
    let accel_mods' = gflagsToWord accel_mods
    gtk_accel_map_add_entry accel_path' accel_key accel_mods'
    freeMem accel_path'
    return ()

-- method AccelMap::add_filter
-- method type : MemberFunction
-- Args : [Arg {argName = "filter_pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "filter_pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_add_filter" gtk_accel_map_add_filter :: 
    CString ->                              -- filter_pattern : TBasicType TUTF8
    IO ()


accelMapAddFilter ::
    (MonadIO m) =>
    T.Text ->                               -- filter_pattern
    m ()
accelMapAddFilter filter_pattern = liftIO $ do
    filter_pattern' <- textToCString filter_pattern
    gtk_accel_map_add_filter filter_pattern'
    freeMem filter_pattern'
    return ()

-- method AccelMap::change_entry
-- method type : MemberFunction
-- Args : [Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "replace", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "replace", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_change_entry" gtk_accel_map_change_entry :: 
    CString ->                              -- accel_path : TBasicType TUTF8
    Word32 ->                               -- accel_key : TBasicType TUInt32
    CUInt ->                                -- accel_mods : TInterface "Gdk" "ModifierType"
    CInt ->                                 -- replace : TBasicType TBoolean
    IO CInt


accelMapChangeEntry ::
    (MonadIO m) =>
    T.Text ->                               -- accel_path
    Word32 ->                               -- accel_key
    [Gdk.ModifierType] ->                   -- accel_mods
    Bool ->                                 -- replace
    m Bool
accelMapChangeEntry accel_path accel_key accel_mods replace = liftIO $ do
    accel_path' <- textToCString accel_path
    let accel_mods' = gflagsToWord accel_mods
    let replace' = (fromIntegral . fromEnum) replace
    result <- gtk_accel_map_change_entry accel_path' accel_key accel_mods' replace'
    let result' = (/= 0) result
    freeMem accel_path'
    return result'

-- method AccelMap::foreach
-- method type : MemberFunction
-- Args : [Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "foreach_func", argType = TInterface "Gtk" "AccelMapForeach", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "foreach_func", argType = TInterface "Gtk" "AccelMapForeach", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_foreach" gtk_accel_map_foreach :: 
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr AccelMapForeachC ->              -- foreach_func : TInterface "Gtk" "AccelMapForeach"
    IO ()


accelMapForeach ::
    (MonadIO m) =>
    Maybe (Ptr ()) ->                       -- data
    AccelMapForeach ->                      -- foreach_func
    m ()
accelMapForeach data_ foreach_func = liftIO $ do
    maybeData_ <- case data_ of
        Nothing -> return nullPtr
        Just jData_ -> do
            return jData_
    foreach_func' <- mkAccelMapForeach (accelMapForeachWrapper Nothing foreach_func)
    gtk_accel_map_foreach maybeData_ foreach_func'
    safeFreeFunPtr $ castFunPtrToPtr foreach_func'
    return ()

-- method AccelMap::foreach_unfiltered
-- method type : MemberFunction
-- Args : [Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "foreach_func", argType = TInterface "Gtk" "AccelMapForeach", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "foreach_func", argType = TInterface "Gtk" "AccelMapForeach", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_foreach_unfiltered" gtk_accel_map_foreach_unfiltered :: 
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr AccelMapForeachC ->              -- foreach_func : TInterface "Gtk" "AccelMapForeach"
    IO ()


accelMapForeachUnfiltered ::
    (MonadIO m) =>
    Ptr () ->                               -- data
    AccelMapForeach ->                      -- foreach_func
    m ()
accelMapForeachUnfiltered data_ foreach_func = liftIO $ do
    foreach_func' <- mkAccelMapForeach (accelMapForeachWrapper Nothing foreach_func)
    gtk_accel_map_foreach_unfiltered data_ foreach_func'
    safeFreeFunPtr $ castFunPtrToPtr foreach_func'
    return ()

-- method AccelMap::get
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "AccelMap"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_get" gtk_accel_map_get :: 
    IO (Ptr AccelMap)


accelMapGet ::
    (MonadIO m) =>
    m AccelMap
accelMapGet  = liftIO $ do
    result <- gtk_accel_map_get
    checkUnexpectedReturnNULL "gtk_accel_map_get" result
    result' <- (newObject AccelMap) result
    return result'

-- method AccelMap::load
-- method type : MemberFunction
-- Args : [Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_load" gtk_accel_map_load :: 
    CString ->                              -- file_name : TBasicType TFileName
    IO ()


accelMapLoad ::
    (MonadIO m) =>
    [Char] ->                               -- file_name
    m ()
accelMapLoad file_name = liftIO $ do
    file_name' <- stringToCString file_name
    gtk_accel_map_load file_name'
    freeMem file_name'
    return ()

-- method AccelMap::load_fd
-- method type : MemberFunction
-- Args : [Arg {argName = "fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_load_fd" gtk_accel_map_load_fd :: 
    Int32 ->                                -- fd : TBasicType TInt32
    IO ()


accelMapLoadFd ::
    (MonadIO m) =>
    Int32 ->                                -- fd
    m ()
accelMapLoadFd fd = liftIO $ do
    gtk_accel_map_load_fd fd
    return ()

-- method AccelMap::load_scanner
-- method type : MemberFunction
-- Args : [Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_load_scanner" gtk_accel_map_load_scanner :: 
    Ptr GLib.Scanner ->                     -- scanner : TInterface "GLib" "Scanner"
    IO ()


accelMapLoadScanner ::
    (MonadIO m) =>
    GLib.Scanner ->                         -- scanner
    m ()
accelMapLoadScanner scanner = liftIO $ do
    let scanner' = unsafeManagedPtrGetPtr scanner
    gtk_accel_map_load_scanner scanner'
    touchManagedPtr scanner
    return ()

-- method AccelMap::lock_path
-- method type : MemberFunction
-- Args : [Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_lock_path" gtk_accel_map_lock_path :: 
    CString ->                              -- accel_path : TBasicType TUTF8
    IO ()


accelMapLockPath ::
    (MonadIO m) =>
    T.Text ->                               -- accel_path
    m ()
accelMapLockPath accel_path = liftIO $ do
    accel_path' <- textToCString accel_path
    gtk_accel_map_lock_path accel_path'
    freeMem accel_path'
    return ()

-- method AccelMap::lookup_entry
-- method type : MemberFunction
-- Args : [Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TInterface "Gtk" "AccelKey", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_lookup_entry" gtk_accel_map_lookup_entry :: 
    CString ->                              -- accel_path : TBasicType TUTF8
    Ptr AccelKey ->                         -- key : TInterface "Gtk" "AccelKey"
    IO CInt


accelMapLookupEntry ::
    (MonadIO m) =>
    T.Text ->                               -- accel_path
    m (Bool,AccelKey)
accelMapLookupEntry accel_path = liftIO $ do
    accel_path' <- textToCString accel_path
    key <- callocBytes 12 :: IO (Ptr AccelKey)
    result <- gtk_accel_map_lookup_entry accel_path' key
    let result' = (/= 0) result
    key' <- (wrapPtr AccelKey) key
    freeMem accel_path'
    return (result', key')

-- method AccelMap::save
-- method type : MemberFunction
-- Args : [Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_save" gtk_accel_map_save :: 
    CString ->                              -- file_name : TBasicType TFileName
    IO ()


accelMapSave ::
    (MonadIO m) =>
    [Char] ->                               -- file_name
    m ()
accelMapSave file_name = liftIO $ do
    file_name' <- stringToCString file_name
    gtk_accel_map_save file_name'
    freeMem file_name'
    return ()

-- method AccelMap::save_fd
-- method type : MemberFunction
-- Args : [Arg {argName = "fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_save_fd" gtk_accel_map_save_fd :: 
    Int32 ->                                -- fd : TBasicType TInt32
    IO ()


accelMapSaveFd ::
    (MonadIO m) =>
    Int32 ->                                -- fd
    m ()
accelMapSaveFd fd = liftIO $ do
    gtk_accel_map_save_fd fd
    return ()

-- method AccelMap::unlock_path
-- method type : MemberFunction
-- Args : [Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_map_unlock_path" gtk_accel_map_unlock_path :: 
    CString ->                              -- accel_path : TBasicType TUTF8
    IO ()


accelMapUnlockPath ::
    (MonadIO m) =>
    T.Text ->                               -- accel_path
    m ()
accelMapUnlockPath accel_path = liftIO $ do
    accel_path' <- textToCString accel_path
    gtk_accel_map_unlock_path accel_path'
    freeMem accel_path'
    return ()

-- signal AccelMap::changed
type AccelMapChangedCallback =
    T.Text ->
    Word32 ->
    [Gdk.ModifierType] ->
    IO ()

noAccelMapChangedCallback :: Maybe AccelMapChangedCallback
noAccelMapChangedCallback = Nothing

type AccelMapChangedCallbackC =
    Ptr () ->                               -- object
    CString ->
    Word32 ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAccelMapChangedCallback :: AccelMapChangedCallbackC -> IO (FunPtr AccelMapChangedCallbackC)

accelMapChangedClosure :: AccelMapChangedCallback -> IO Closure
accelMapChangedClosure cb = newCClosure =<< mkAccelMapChangedCallback wrapped
    where wrapped = accelMapChangedCallbackWrapper cb

accelMapChangedCallbackWrapper ::
    AccelMapChangedCallback ->
    Ptr () ->
    CString ->
    Word32 ->
    CUInt ->
    Ptr () ->
    IO ()
accelMapChangedCallbackWrapper _cb _ accel_path accel_key accel_mods _ = do
    accel_path' <- cstringToText accel_path
    let accel_mods' = wordToGFlags accel_mods
    _cb  accel_path' accel_key accel_mods'

onAccelMapChanged :: (GObject a, MonadIO m) => a -> AccelMapChangedCallback -> m SignalHandlerId
onAccelMapChanged obj cb = liftIO $ connectAccelMapChanged obj cb SignalConnectBefore
afterAccelMapChanged :: (GObject a, MonadIO m) => a -> AccelMapChangedCallback -> m SignalHandlerId
afterAccelMapChanged obj cb = connectAccelMapChanged obj cb SignalConnectAfter

connectAccelMapChanged :: (GObject a, MonadIO m) =>
                          a -> AccelMapChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectAccelMapChanged obj cb after = liftIO $ do
    cb' <- mkAccelMapChangedCallback (accelMapChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- callback AccelMapForeach
accelMapForeachClosure :: AccelMapForeach -> IO Closure
accelMapForeachClosure cb = newCClosure =<< mkAccelMapForeach wrapped
    where wrapped = accelMapForeachWrapper Nothing cb

type AccelMapForeachC =
    Ptr () ->
    CString ->
    Word32 ->
    CUInt ->
    CInt ->
    IO ()

foreign import ccall "wrapper"
    mkAccelMapForeach :: AccelMapForeachC -> IO (FunPtr AccelMapForeachC)

type AccelMapForeach =
    Ptr () ->
    T.Text ->
    Word32 ->
    [Gdk.ModifierType] ->
    Bool ->
    IO ()

noAccelMapForeach :: Maybe AccelMapForeach
noAccelMapForeach = Nothing

accelMapForeachWrapper ::
    Maybe (Ptr (FunPtr (AccelMapForeachC))) ->
    AccelMapForeach ->
    Ptr () ->
    CString ->
    Word32 ->
    CUInt ->
    CInt ->
    IO ()
accelMapForeachWrapper funptrptr _cb data_ accel_path accel_key accel_mods changed = do
    accel_path' <- cstringToText accel_path
    let accel_mods' = wordToGFlags accel_mods
    let changed' = (/= 0) changed
    _cb  data_ accel_path' accel_key accel_mods' changed'
    maybeReleaseFunPtr funptrptr

-- object Accessible 
newtype Accessible = Accessible (ForeignPtr Accessible)
noAccessible :: Maybe Accessible
noAccessible = Nothing

foreign import ccall "gtk_accessible_get_type"
    c_gtk_accessible_get_type :: IO GType

type instance ParentTypes Accessible = '[Atk.Object, GObject.Object]

instance GObject Accessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_accessible_get_type
    

class GObject o => AccessibleK o
instance (GObject o, IsDescendantOf Accessible o) => AccessibleK o

toAccessible :: AccessibleK o => o -> IO Accessible
toAccessible = unsafeCastTo Accessible

-- method Accessible::connect_widget_destroyed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Accessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Accessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accessible_connect_widget_destroyed" gtk_accessible_connect_widget_destroyed :: 
    Ptr Accessible ->                       -- _obj : TInterface "Gtk" "Accessible"
    IO ()

{-# DEPRECATED accessibleConnectWidgetDestroyed ["(Since version 3.4)","Use gtk_accessible_set_widget() and its vfuncs."]#-}
accessibleConnectWidgetDestroyed ::
    (MonadIO m, AccessibleK a) =>
    a ->                                    -- _obj
    m ()
accessibleConnectWidgetDestroyed _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_accessible_connect_widget_destroyed _obj'
    touchManagedPtr _obj
    return ()

-- method Accessible::get_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Accessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Accessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accessible_get_widget" gtk_accessible_get_widget :: 
    Ptr Accessible ->                       -- _obj : TInterface "Gtk" "Accessible"
    IO (Ptr Widget)


accessibleGetWidget ::
    (MonadIO m, AccessibleK a) =>
    a ->                                    -- _obj
    m Widget
accessibleGetWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_accessible_get_widget _obj'
    checkUnexpectedReturnNULL "gtk_accessible_get_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Accessible::set_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Accessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Accessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accessible_set_widget" gtk_accessible_set_widget :: 
    Ptr Accessible ->                       -- _obj : TInterface "Gtk" "Accessible"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


accessibleSetWidget ::
    (MonadIO m, AccessibleK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- widget
    m ()
accessibleSetWidget _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    gtk_accessible_set_widget _obj' maybeWidget
    touchManagedPtr _obj
    whenJust widget touchManagedPtr
    return ()

-- object Action 
newtype Action = Action (ForeignPtr Action)
noAction :: Maybe Action
noAction = Nothing

foreign import ccall "gtk_action_get_type"
    c_gtk_action_get_type :: IO GType

type instance ParentTypes Action = '[GObject.Object, Buildable]

instance GObject Action where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_action_get_type
    

class GObject o => ActionK o
instance (GObject o, IsDescendantOf Action o) => ActionK o

toAction :: ActionK o => o -> IO Action
toAction = unsafeCastTo Action

-- method Action::new
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Action"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_new" gtk_action_new :: 
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- label : TBasicType TUTF8
    CString ->                              -- tooltip : TBasicType TUTF8
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr Action)

{-# DEPRECATED actionNew ["(Since version 3.10)","Use #GAction instead, associating it to a widget with","#GtkActionable or creating a #GtkMenu with gtk_menu_new_from_model()"]#-}
actionNew ::
    (MonadIO m) =>
    T.Text ->                               -- name
    Maybe (T.Text) ->                       -- label
    Maybe (T.Text) ->                       -- tooltip
    Maybe (T.Text) ->                       -- stock_id
    m Action
actionNew name label tooltip stock_id = liftIO $ do
    name' <- textToCString name
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    maybeTooltip <- case tooltip of
        Nothing -> return nullPtr
        Just jTooltip -> do
            jTooltip' <- textToCString jTooltip
            return jTooltip'
    maybeStock_id <- case stock_id of
        Nothing -> return nullPtr
        Just jStock_id -> do
            jStock_id' <- textToCString jStock_id
            return jStock_id'
    result <- gtk_action_new name' maybeLabel maybeTooltip maybeStock_id
    checkUnexpectedReturnNULL "gtk_action_new" result
    result' <- (wrapObject Action) result
    freeMem name'
    freeMem maybeLabel
    freeMem maybeTooltip
    freeMem maybeStock_id
    return result'

-- method Action::activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_activate" gtk_action_activate :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED actionActivate ["(Since version 3.10)","Use g_action_group_activate_action() on a #GAction instead"]#-}
actionActivate ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m ()
actionActivate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_action_activate _obj'
    touchManagedPtr _obj
    return ()

-- method Action::block_activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_block_activate" gtk_action_block_activate :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED actionBlockActivate ["(Since version 3.10)","Use g_simple_action_set_enabled() to disable the","#GSimpleAction instead"]#-}
actionBlockActivate ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m ()
actionBlockActivate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_action_block_activate _obj'
    touchManagedPtr _obj
    return ()

-- method Action::connect_accelerator
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_connect_accelerator" gtk_action_connect_accelerator :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED actionConnectAccelerator ["(Since version 3.10)","Use #GAction and the accelerator group on an associated","#GtkMenu instead"]#-}
actionConnectAccelerator ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m ()
actionConnectAccelerator _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_action_connect_accelerator _obj'
    touchManagedPtr _obj
    return ()

-- method Action::create_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_create_icon" gtk_action_create_icon :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    Int32 ->                                -- icon_size : TBasicType TInt32
    IO (Ptr Widget)

{-# DEPRECATED actionCreateIcon ["(Since version 3.10)","Use g_menu_item_set_icon() to set an icon on a #GMenuItem,","or gtk_container_add() to add a #GtkImage to a #GtkButton"]#-}
actionCreateIcon ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- icon_size
    m Widget
actionCreateIcon _obj icon_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_create_icon _obj' icon_size
    checkUnexpectedReturnNULL "gtk_action_create_icon" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Action::create_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_create_menu" gtk_action_create_menu :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO (Ptr Widget)

{-# DEPRECATED actionCreateMenu ["(Since version 3.10)","Use #GAction and #GMenuModel instead, and create a","#GtkMenu with gtk_menu_new_from_model()"]#-}
actionCreateMenu ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Widget
actionCreateMenu _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_create_menu _obj'
    checkUnexpectedReturnNULL "gtk_action_create_menu" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Action::create_menu_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_create_menu_item" gtk_action_create_menu_item :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO (Ptr Widget)

{-# DEPRECATED actionCreateMenuItem ["(Since version 3.10)","Use g_menu_item_new() and associate it with a #GAction","instead."]#-}
actionCreateMenuItem ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Widget
actionCreateMenuItem _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_create_menu_item _obj'
    checkUnexpectedReturnNULL "gtk_action_create_menu_item" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Action::create_tool_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_create_tool_item" gtk_action_create_tool_item :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO (Ptr Widget)

{-# DEPRECATED actionCreateToolItem ["(Since version 3.10)","Use a #GtkToolItem and associate it with a #GAction using","gtk_actionable_set_action_name() instead"]#-}
actionCreateToolItem ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Widget
actionCreateToolItem _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_create_tool_item _obj'
    checkUnexpectedReturnNULL "gtk_action_create_tool_item" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Action::disconnect_accelerator
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_disconnect_accelerator" gtk_action_disconnect_accelerator :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED actionDisconnectAccelerator ["(Since version 3.10)","Use #GAction and the accelerator group on an associated","#GtkMenu instead"]#-}
actionDisconnectAccelerator ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m ()
actionDisconnectAccelerator _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_action_disconnect_accelerator _obj'
    touchManagedPtr _obj
    return ()

-- method Action::get_accel_closure
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GObject" "Closure"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_accel_closure" gtk_action_get_accel_closure :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO (Ptr Closure)

{-# DEPRECATED actionGetAccelClosure ["(Since version 3.10)","Use #GAction and #GtkMenu instead, which have no","equivalent for getting the accel closure"]#-}
actionGetAccelClosure ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Closure
actionGetAccelClosure _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_accel_closure _obj'
    checkUnexpectedReturnNULL "gtk_action_get_accel_closure" result
    result' <- (newBoxed Closure) result
    touchManagedPtr _obj
    return result'

-- method Action::get_accel_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_accel_path" gtk_action_get_accel_path :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CString

{-# DEPRECATED actionGetAccelPath ["(Since version 3.10)","Use #GAction and the accelerator path on an associated","#GtkMenu instead"]#-}
actionGetAccelPath ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m T.Text
actionGetAccelPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_accel_path _obj'
    checkUnexpectedReturnNULL "gtk_action_get_accel_path" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Action::get_always_show_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_always_show_image" gtk_action_get_always_show_image :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CInt

{-# DEPRECATED actionGetAlwaysShowImage ["(Since version 3.10)","Use g_menu_item_get_attribute_value() on a #GMenuItem","instead"]#-}
actionGetAlwaysShowImage ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Bool
actionGetAlwaysShowImage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_always_show_image _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Action::get_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_gicon" gtk_action_get_gicon :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO (Ptr Gio.Icon)

{-# DEPRECATED actionGetGicon ["(Since version 3.10)","Use #GAction instead, and","g_menu_item_get_attribute_value() to get an icon from a #GMenuItem","associated with a #GAction"]#-}
actionGetGicon ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Gio.Icon
actionGetGicon _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_gicon _obj'
    checkUnexpectedReturnNULL "gtk_action_get_gicon" result
    result' <- (newObject Gio.Icon) result
    touchManagedPtr _obj
    return result'

-- method Action::get_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_icon_name" gtk_action_get_icon_name :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CString

{-# DEPRECATED actionGetIconName ["(Since version 3.10)","Use #GAction instead, and","g_menu_item_get_attribute_value() to get an icon from a #GMenuItem","associated with a #GAction"]#-}
actionGetIconName ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m T.Text
actionGetIconName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_icon_name _obj'
    checkUnexpectedReturnNULL "gtk_action_get_icon_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Action::get_is_important
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_is_important" gtk_action_get_is_important :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CInt

{-# DEPRECATED actionGetIsImportant ["(Since version 3.10)","Use #GAction instead, and control and monitor whether","labels are shown directly"]#-}
actionGetIsImportant ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Bool
actionGetIsImportant _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_is_important _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Action::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_label" gtk_action_get_label :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CString

{-# DEPRECATED actionGetLabel ["(Since version 3.10)","Use #GAction instead, and get a label from a menu item","with g_menu_item_get_attribute_value(). For #GtkActionable widgets, use the","widget-specific API to get a label"]#-}
actionGetLabel ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m T.Text
actionGetLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_label _obj'
    checkUnexpectedReturnNULL "gtk_action_get_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Action::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_name" gtk_action_get_name :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CString

{-# DEPRECATED actionGetName ["(Since version 3.10)","Use g_action_get_name() on a #GAction instead"]#-}
actionGetName ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m T.Text
actionGetName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_name _obj'
    checkUnexpectedReturnNULL "gtk_action_get_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Action::get_proxies
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "Widget")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_proxies" gtk_action_get_proxies :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO (Ptr (GSList (Ptr Widget)))

{-# DEPRECATED actionGetProxies ["(Since version 3.10)"]#-}
actionGetProxies ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m [Widget]
actionGetProxies _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_proxies _obj'
    checkUnexpectedReturnNULL "gtk_action_get_proxies" result
    result' <- unpackGSList result
    result'' <- mapM (newObject Widget) result'
    touchManagedPtr _obj
    return result''

-- method Action::get_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_sensitive" gtk_action_get_sensitive :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CInt

{-# DEPRECATED actionGetSensitive ["(Since version 3.10)","Use g_action_get_enabled() on a #GAction","instead"]#-}
actionGetSensitive ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Bool
actionGetSensitive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_sensitive _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Action::get_short_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_short_label" gtk_action_get_short_label :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CString

{-# DEPRECATED actionGetShortLabel ["(Since version 3.10)","Use #GAction instead, which has no equivalent of short","labels"]#-}
actionGetShortLabel ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m T.Text
actionGetShortLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_short_label _obj'
    checkUnexpectedReturnNULL "gtk_action_get_short_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Action::get_stock_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_stock_id" gtk_action_get_stock_id :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CString

{-# DEPRECATED actionGetStockId ["(Since version 3.10)","Use #GAction instead, which has no equivalent of stock","items"]#-}
actionGetStockId ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m T.Text
actionGetStockId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_stock_id _obj'
    checkUnexpectedReturnNULL "gtk_action_get_stock_id" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Action::get_tooltip
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_tooltip" gtk_action_get_tooltip :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CString

{-# DEPRECATED actionGetTooltip ["(Since version 3.10)","Use #GAction instead, and get tooltips from associated","#GtkActionable widgets with gtk_widget_get_tooltip_text()"]#-}
actionGetTooltip ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m T.Text
actionGetTooltip _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_tooltip _obj'
    checkUnexpectedReturnNULL "gtk_action_get_tooltip" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Action::get_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_visible" gtk_action_get_visible :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CInt

{-# DEPRECATED actionGetVisible ["(Since version 3.10)","Use #GAction instead, and control and monitor the state of","#GtkActionable widgets directly"]#-}
actionGetVisible ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Bool
actionGetVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Action::get_visible_horizontal
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_visible_horizontal" gtk_action_get_visible_horizontal :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CInt

{-# DEPRECATED actionGetVisibleHorizontal ["(Since version 3.10)","Use #GAction instead, and control and monitor the","visibility of associated widgets and menu items directly"]#-}
actionGetVisibleHorizontal ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Bool
actionGetVisibleHorizontal _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_visible_horizontal _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Action::get_visible_vertical
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_get_visible_vertical" gtk_action_get_visible_vertical :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CInt

{-# DEPRECATED actionGetVisibleVertical ["(Since version 3.10)","Use #GAction instead, and control and monitor the","visibility of associated widgets and menu items directly"]#-}
actionGetVisibleVertical ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Bool
actionGetVisibleVertical _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_get_visible_vertical _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Action::is_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_is_sensitive" gtk_action_is_sensitive :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CInt

{-# DEPRECATED actionIsSensitive ["(Since version 3.10)","Use g_action_get_enabled() on a #GAction","instead"]#-}
actionIsSensitive ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Bool
actionIsSensitive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_is_sensitive _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Action::is_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_is_visible" gtk_action_is_visible :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO CInt

{-# DEPRECATED actionIsVisible ["(Since version 3.10)","Use #GAction instead, and control and monitor the state of","#GtkActionable widgets directly"]#-}
actionIsVisible ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Bool
actionIsVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_is_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Action::set_accel_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_accel_group" gtk_action_set_accel_group :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    Ptr AccelGroup ->                       -- accel_group : TInterface "Gtk" "AccelGroup"
    IO ()

{-# DEPRECATED actionSetAccelGroup ["(Since version 3.10)","Use #GAction and the accelerator group on an associated","#GtkMenu instead"]#-}
actionSetAccelGroup ::
    (MonadIO m, ActionK a, AccelGroupK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- accel_group
    m ()
actionSetAccelGroup _obj accel_group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAccel_group <- case accel_group of
        Nothing -> return nullPtr
        Just jAccel_group -> do
            let jAccel_group' = unsafeManagedPtrCastPtr jAccel_group
            return jAccel_group'
    gtk_action_set_accel_group _obj' maybeAccel_group
    touchManagedPtr _obj
    whenJust accel_group touchManagedPtr
    return ()

-- method Action::set_accel_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_accel_path" gtk_action_set_accel_path :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CString ->                              -- accel_path : TBasicType TUTF8
    IO ()

{-# DEPRECATED actionSetAccelPath ["(Since version 3.10)","Use #GAction and the accelerator path on an associated","#GtkMenu instead"]#-}
actionSetAccelPath ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- accel_path
    m ()
actionSetAccelPath _obj accel_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    accel_path' <- textToCString accel_path
    gtk_action_set_accel_path _obj' accel_path'
    touchManagedPtr _obj
    freeMem accel_path'
    return ()

-- method Action::set_always_show_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "always_show", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "always_show", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_always_show_image" gtk_action_set_always_show_image :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CInt ->                                 -- always_show : TBasicType TBoolean
    IO ()

{-# DEPRECATED actionSetAlwaysShowImage ["(Since version 3.10)","Use g_menu_item_set_icon() on a #GMenuItem instead, if the","item should have an image"]#-}
actionSetAlwaysShowImage ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- always_show
    m ()
actionSetAlwaysShowImage _obj always_show = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let always_show' = (fromIntegral . fromEnum) always_show
    gtk_action_set_always_show_image _obj' always_show'
    touchManagedPtr _obj
    return ()

-- method Action::set_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_gicon" gtk_action_set_gicon :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    IO ()

{-# DEPRECATED actionSetGicon ["(Since version 3.10)","Use #GAction instead, and g_menu_item_set_icon() to set an","icon on a #GMenuItem associated with a #GAction, or gtk_container_add() to","add a #GtkImage to a #GtkButton"]#-}
actionSetGicon ::
    (MonadIO m, ActionK a, Gio.IconK b) =>
    a ->                                    -- _obj
    b ->                                    -- icon
    m ()
actionSetGicon _obj icon = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon' = unsafeManagedPtrCastPtr icon
    gtk_action_set_gicon _obj' icon'
    touchManagedPtr _obj
    touchManagedPtr icon
    return ()

-- method Action::set_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_icon_name" gtk_action_set_icon_name :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()

{-# DEPRECATED actionSetIconName ["(Since version 3.10)","Use #GAction instead, and g_menu_item_set_icon() to set an","icon on a #GMenuItem associated with a #GAction, or gtk_container_add() to","add a #GtkImage to a #GtkButton"]#-}
actionSetIconName ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- icon_name
    m ()
actionSetIconName _obj icon_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name' <- textToCString icon_name
    gtk_action_set_icon_name _obj' icon_name'
    touchManagedPtr _obj
    freeMem icon_name'
    return ()

-- method Action::set_is_important
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_important", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_important", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_is_important" gtk_action_set_is_important :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CInt ->                                 -- is_important : TBasicType TBoolean
    IO ()

{-# DEPRECATED actionSetIsImportant ["(Since version 3.10)","Use #GAction instead, and control and monitor whether","labels are shown directly"]#-}
actionSetIsImportant ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- is_important
    m ()
actionSetIsImportant _obj is_important = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let is_important' = (fromIntegral . fromEnum) is_important
    gtk_action_set_is_important _obj' is_important'
    touchManagedPtr _obj
    return ()

-- method Action::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_label" gtk_action_set_label :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CString ->                              -- label : TBasicType TUTF8
    IO ()

{-# DEPRECATED actionSetLabel ["(Since version 3.10)","Use #GAction instead, and set a label on a menu item with","g_menu_item_set_label(). For #GtkActionable widgets, use the widget-specific","API to set a label"]#-}
actionSetLabel ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- label
    m ()
actionSetLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    label' <- textToCString label
    gtk_action_set_label _obj' label'
    touchManagedPtr _obj
    freeMem label'
    return ()

-- method Action::set_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_sensitive" gtk_action_set_sensitive :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CInt ->                                 -- sensitive : TBasicType TBoolean
    IO ()

{-# DEPRECATED actionSetSensitive ["(Since version 3.10)","Use g_simple_action_set_enabled() on a #GSimpleAction","instead"]#-}
actionSetSensitive ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- sensitive
    m ()
actionSetSensitive _obj sensitive = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sensitive' = (fromIntegral . fromEnum) sensitive
    gtk_action_set_sensitive _obj' sensitive'
    touchManagedPtr _obj
    return ()

-- method Action::set_short_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "short_label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "short_label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_short_label" gtk_action_set_short_label :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CString ->                              -- short_label : TBasicType TUTF8
    IO ()

{-# DEPRECATED actionSetShortLabel ["(Since version 3.10)","Use #GAction instead, which has no equivalent of short","labels"]#-}
actionSetShortLabel ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- short_label
    m ()
actionSetShortLabel _obj short_label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    short_label' <- textToCString short_label
    gtk_action_set_short_label _obj' short_label'
    touchManagedPtr _obj
    freeMem short_label'
    return ()

-- method Action::set_stock_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_stock_id" gtk_action_set_stock_id :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CString ->                              -- stock_id : TBasicType TUTF8
    IO ()

{-# DEPRECATED actionSetStockId ["(Since version 3.10)","Use #GAction instead, which has no equivalent of stock","items"]#-}
actionSetStockId ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- stock_id
    m ()
actionSetStockId _obj stock_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    stock_id' <- textToCString stock_id
    gtk_action_set_stock_id _obj' stock_id'
    touchManagedPtr _obj
    freeMem stock_id'
    return ()

-- method Action::set_tooltip
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_tooltip" gtk_action_set_tooltip :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CString ->                              -- tooltip : TBasicType TUTF8
    IO ()

{-# DEPRECATED actionSetTooltip ["(Since version 3.10)","Use #GAction instead, and set tooltips on associated","#GtkActionable widgets with gtk_widget_set_tooltip_text()"]#-}
actionSetTooltip ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- tooltip
    m ()
actionSetTooltip _obj tooltip = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    tooltip' <- textToCString tooltip
    gtk_action_set_tooltip _obj' tooltip'
    touchManagedPtr _obj
    freeMem tooltip'
    return ()

-- method Action::set_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_visible" gtk_action_set_visible :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CInt ->                                 -- visible : TBasicType TBoolean
    IO ()

{-# DEPRECATED actionSetVisible ["(Since version 3.10)","Use #GAction instead, and control and monitor the state of","#GtkActionable widgets directly"]#-}
actionSetVisible ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible
    m ()
actionSetVisible _obj visible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible' = (fromIntegral . fromEnum) visible
    gtk_action_set_visible _obj' visible'
    touchManagedPtr _obj
    return ()

-- method Action::set_visible_horizontal
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_horizontal", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_horizontal", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_visible_horizontal" gtk_action_set_visible_horizontal :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CInt ->                                 -- visible_horizontal : TBasicType TBoolean
    IO ()

{-# DEPRECATED actionSetVisibleHorizontal ["(Since version 3.10)","Use #GAction instead, and control and monitor the","visibility of associated widgets and menu items directly"]#-}
actionSetVisibleHorizontal ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible_horizontal
    m ()
actionSetVisibleHorizontal _obj visible_horizontal = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible_horizontal' = (fromIntegral . fromEnum) visible_horizontal
    gtk_action_set_visible_horizontal _obj' visible_horizontal'
    touchManagedPtr _obj
    return ()

-- method Action::set_visible_vertical
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_vertical", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_vertical", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_set_visible_vertical" gtk_action_set_visible_vertical :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    CInt ->                                 -- visible_vertical : TBasicType TBoolean
    IO ()

{-# DEPRECATED actionSetVisibleVertical ["(Since version 3.10)","Use #GAction instead, and control and monitor the","visibility of associated widgets and menu items directly"]#-}
actionSetVisibleVertical ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible_vertical
    m ()
actionSetVisibleVertical _obj visible_vertical = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible_vertical' = (fromIntegral . fromEnum) visible_vertical
    gtk_action_set_visible_vertical _obj' visible_vertical'
    touchManagedPtr _obj
    return ()

-- method Action::unblock_activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_unblock_activate" gtk_action_unblock_activate :: 
    Ptr Action ->                           -- _obj : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED actionUnblockActivate ["(Since version 3.10)","Use g_simple_action_set_enabled() to enable the","#GSimpleAction instead"]#-}
actionUnblockActivate ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m ()
actionUnblockActivate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_action_unblock_activate _obj'
    touchManagedPtr _obj
    return ()

-- signal Action::activate
type ActionActivateCallback =
    IO ()

noActionActivateCallback :: Maybe ActionActivateCallback
noActionActivateCallback = Nothing

type ActionActivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkActionActivateCallback :: ActionActivateCallbackC -> IO (FunPtr ActionActivateCallbackC)

actionActivateClosure :: ActionActivateCallback -> IO Closure
actionActivateClosure cb = newCClosure =<< mkActionActivateCallback wrapped
    where wrapped = actionActivateCallbackWrapper cb

actionActivateCallbackWrapper ::
    ActionActivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
actionActivateCallbackWrapper _cb _ _ = do
    _cb 

onActionActivate :: (GObject a, MonadIO m) => a -> ActionActivateCallback -> m SignalHandlerId
onActionActivate obj cb = liftIO $ connectActionActivate obj cb SignalConnectBefore
afterActionActivate :: (GObject a, MonadIO m) => a -> ActionActivateCallback -> m SignalHandlerId
afterActionActivate obj cb = connectActionActivate obj cb SignalConnectAfter

connectActionActivate :: (GObject a, MonadIO m) =>
                         a -> ActionActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectActionActivate obj cb after = liftIO $ do
    cb' <- mkActionActivateCallback (actionActivateCallbackWrapper cb)
    connectSignalFunPtr obj "activate" cb' after

-- object ActionBar 
newtype ActionBar = ActionBar (ForeignPtr ActionBar)
noActionBar :: Maybe ActionBar
noActionBar = Nothing

foreign import ccall "gtk_action_bar_get_type"
    c_gtk_action_bar_get_type :: IO GType

type instance ParentTypes ActionBar = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject ActionBar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_action_bar_get_type
    

class GObject o => ActionBarK o
instance (GObject o, IsDescendantOf ActionBar o) => ActionBarK o

toActionBar :: ActionBarK o => o -> IO ActionBar
toActionBar = unsafeCastTo ActionBar

-- method ActionBar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ActionBar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_bar_new" gtk_action_bar_new :: 
    IO (Ptr ActionBar)


actionBarNew ::
    (MonadIO m) =>
    m ActionBar
actionBarNew  = liftIO $ do
    result <- gtk_action_bar_new
    checkUnexpectedReturnNULL "gtk_action_bar_new" result
    result' <- (newObject ActionBar) result
    return result'

-- method ActionBar::get_center_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_bar_get_center_widget" gtk_action_bar_get_center_widget :: 
    Ptr ActionBar ->                        -- _obj : TInterface "Gtk" "ActionBar"
    IO (Ptr Widget)


actionBarGetCenterWidget ::
    (MonadIO m, ActionBarK a) =>
    a ->                                    -- _obj
    m Widget
actionBarGetCenterWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_bar_get_center_widget _obj'
    checkUnexpectedReturnNULL "gtk_action_bar_get_center_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method ActionBar::pack_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_bar_pack_end" gtk_action_bar_pack_end :: 
    Ptr ActionBar ->                        -- _obj : TInterface "Gtk" "ActionBar"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


actionBarPackEnd ::
    (MonadIO m, ActionBarK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
actionBarPackEnd _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_action_bar_pack_end _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method ActionBar::pack_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_bar_pack_start" gtk_action_bar_pack_start :: 
    Ptr ActionBar ->                        -- _obj : TInterface "Gtk" "ActionBar"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


actionBarPackStart ::
    (MonadIO m, ActionBarK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
actionBarPackStart _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_action_bar_pack_start _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method ActionBar::set_center_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "center_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "center_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_bar_set_center_widget" gtk_action_bar_set_center_widget :: 
    Ptr ActionBar ->                        -- _obj : TInterface "Gtk" "ActionBar"
    Ptr Widget ->                           -- center_widget : TInterface "Gtk" "Widget"
    IO ()


actionBarSetCenterWidget ::
    (MonadIO m, ActionBarK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- center_widget
    m ()
actionBarSetCenterWidget _obj center_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCenter_widget <- case center_widget of
        Nothing -> return nullPtr
        Just jCenter_widget -> do
            let jCenter_widget' = unsafeManagedPtrCastPtr jCenter_widget
            return jCenter_widget'
    gtk_action_bar_set_center_widget _obj' maybeCenter_widget
    touchManagedPtr _obj
    whenJust center_widget touchManagedPtr
    return ()

-- struct ActionEntry
newtype ActionEntry = ActionEntry (ForeignPtr ActionEntry)
noActionEntry :: Maybe ActionEntry
noActionEntry = Nothing

actionEntryReadName :: ActionEntry -> IO T.Text
actionEntryReadName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

actionEntryReadStockId :: ActionEntry -> IO T.Text
actionEntryReadStockId s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

actionEntryReadLabel :: ActionEntry -> IO T.Text
actionEntryReadLabel s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO CString
    val' <- cstringToText val
    return val'

actionEntryReadAccelerator :: ActionEntry -> IO T.Text
actionEntryReadAccelerator s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO CString
    val' <- cstringToText val
    return val'

actionEntryReadTooltip :: ActionEntry -> IO T.Text
actionEntryReadTooltip s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO CString
    val' <- cstringToText val
    return val'

-- XXX Skipped getter for "ActionEntry:callback" :: Not implemented: "Wrapping foreign callbacks is not supported yet"

-- object ActionGroup 
newtype ActionGroup = ActionGroup (ForeignPtr ActionGroup)
noActionGroup :: Maybe ActionGroup
noActionGroup = Nothing

foreign import ccall "gtk_action_group_get_type"
    c_gtk_action_group_get_type :: IO GType

type instance ParentTypes ActionGroup = '[GObject.Object, Buildable]

instance GObject ActionGroup where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_action_group_get_type
    

class GObject o => ActionGroupK o
instance (GObject o, IsDescendantOf ActionGroup o) => ActionGroupK o

toActionGroup :: ActionGroupK o => o -> IO ActionGroup
toActionGroup = unsafeCastTo ActionGroup

-- method ActionGroup::new
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ActionGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_new" gtk_action_group_new :: 
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr ActionGroup)

{-# DEPRECATED actionGroupNew ["(Since version 3.10)"]#-}
actionGroupNew ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m ActionGroup
actionGroupNew name = liftIO $ do
    name' <- textToCString name
    result <- gtk_action_group_new name'
    checkUnexpectedReturnNULL "gtk_action_group_new" result
    result' <- (wrapObject ActionGroup) result
    freeMem name'
    return result'

-- method ActionGroup::add_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_add_action" gtk_action_group_add_action :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    Ptr Action ->                           -- action : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED actionGroupAddAction ["(Since version 3.10)"]#-}
actionGroupAddAction ::
    (MonadIO m, ActionGroupK a, ActionK b) =>
    a ->                                    -- _obj
    b ->                                    -- action
    m ()
actionGroupAddAction _obj action = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action' = unsafeManagedPtrCastPtr action
    gtk_action_group_add_action _obj' action'
    touchManagedPtr _obj
    touchManagedPtr action
    return ()

-- method ActionGroup::add_action_with_accel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_add_action_with_accel" gtk_action_group_add_action_with_accel :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    Ptr Action ->                           -- action : TInterface "Gtk" "Action"
    CString ->                              -- accelerator : TBasicType TUTF8
    IO ()

{-# DEPRECATED actionGroupAddActionWithAccel ["(Since version 3.10)"]#-}
actionGroupAddActionWithAccel ::
    (MonadIO m, ActionGroupK a, ActionK b) =>
    a ->                                    -- _obj
    b ->                                    -- action
    Maybe (T.Text) ->                       -- accelerator
    m ()
actionGroupAddActionWithAccel _obj action accelerator = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action' = unsafeManagedPtrCastPtr action
    maybeAccelerator <- case accelerator of
        Nothing -> return nullPtr
        Just jAccelerator -> do
            jAccelerator' <- textToCString jAccelerator
            return jAccelerator'
    gtk_action_group_add_action_with_accel _obj' action' maybeAccelerator
    touchManagedPtr _obj
    touchManagedPtr action
    freeMem maybeAccelerator
    return ()

-- method ActionGroup::get_accel_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AccelGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_get_accel_group" gtk_action_group_get_accel_group :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    IO (Ptr AccelGroup)

{-# DEPRECATED actionGroupGetAccelGroup ["(Since version 3.10)"]#-}
actionGroupGetAccelGroup ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    m AccelGroup
actionGroupGetAccelGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_group_get_accel_group _obj'
    checkUnexpectedReturnNULL "gtk_action_group_get_accel_group" result
    result' <- (newObject AccelGroup) result
    touchManagedPtr _obj
    return result'

-- method ActionGroup::get_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Action"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_get_action" gtk_action_group_get_action :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    CString ->                              -- action_name : TBasicType TUTF8
    IO (Ptr Action)

{-# DEPRECATED actionGroupGetAction ["(Since version 3.10)"]#-}
actionGroupGetAction ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- action_name
    m Action
actionGroupGetAction _obj action_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    action_name' <- textToCString action_name
    result <- gtk_action_group_get_action _obj' action_name'
    checkUnexpectedReturnNULL "gtk_action_group_get_action" result
    result' <- (newObject Action) result
    touchManagedPtr _obj
    freeMem action_name'
    return result'

-- method ActionGroup::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_get_name" gtk_action_group_get_name :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    IO CString

{-# DEPRECATED actionGroupGetName ["(Since version 3.10)"]#-}
actionGroupGetName ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    m T.Text
actionGroupGetName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_group_get_name _obj'
    checkUnexpectedReturnNULL "gtk_action_group_get_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method ActionGroup::get_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_get_sensitive" gtk_action_group_get_sensitive :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    IO CInt

{-# DEPRECATED actionGroupGetSensitive ["(Since version 3.10)"]#-}
actionGroupGetSensitive ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    m Bool
actionGroupGetSensitive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_group_get_sensitive _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ActionGroup::get_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_get_visible" gtk_action_group_get_visible :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    IO CInt

{-# DEPRECATED actionGroupGetVisible ["(Since version 3.10)"]#-}
actionGroupGetVisible ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    m Bool
actionGroupGetVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_group_get_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ActionGroup::list_actions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "Action")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_list_actions" gtk_action_group_list_actions :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    IO (Ptr (GList (Ptr Action)))

{-# DEPRECATED actionGroupListActions ["(Since version 3.10)"]#-}
actionGroupListActions ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    m [Action]
actionGroupListActions _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_action_group_list_actions _obj'
    checkUnexpectedReturnNULL "gtk_action_group_list_actions" result
    result' <- unpackGList result
    result'' <- mapM (newObject Action) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method ActionGroup::remove_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_remove_action" gtk_action_group_remove_action :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    Ptr Action ->                           -- action : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED actionGroupRemoveAction ["(Since version 3.10)"]#-}
actionGroupRemoveAction ::
    (MonadIO m, ActionGroupK a, ActionK b) =>
    a ->                                    -- _obj
    b ->                                    -- action
    m ()
actionGroupRemoveAction _obj action = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action' = unsafeManagedPtrCastPtr action
    gtk_action_group_remove_action _obj' action'
    touchManagedPtr _obj
    touchManagedPtr action
    return ()

-- method ActionGroup::set_accel_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_set_accel_group" gtk_action_group_set_accel_group :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    Ptr AccelGroup ->                       -- accel_group : TInterface "Gtk" "AccelGroup"
    IO ()

{-# DEPRECATED actionGroupSetAccelGroup ["(Since version 3.10)"]#-}
actionGroupSetAccelGroup ::
    (MonadIO m, ActionGroupK a, AccelGroupK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- accel_group
    m ()
actionGroupSetAccelGroup _obj accel_group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAccel_group <- case accel_group of
        Nothing -> return nullPtr
        Just jAccel_group -> do
            let jAccel_group' = unsafeManagedPtrCastPtr jAccel_group
            return jAccel_group'
    gtk_action_group_set_accel_group _obj' maybeAccel_group
    touchManagedPtr _obj
    whenJust accel_group touchManagedPtr
    return ()

-- method ActionGroup::set_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_set_sensitive" gtk_action_group_set_sensitive :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    CInt ->                                 -- sensitive : TBasicType TBoolean
    IO ()

{-# DEPRECATED actionGroupSetSensitive ["(Since version 3.10)"]#-}
actionGroupSetSensitive ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- sensitive
    m ()
actionGroupSetSensitive _obj sensitive = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sensitive' = (fromIntegral . fromEnum) sensitive
    gtk_action_group_set_sensitive _obj' sensitive'
    touchManagedPtr _obj
    return ()

-- method ActionGroup::set_translate_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TranslateFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TranslateFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_set_translate_func" gtk_action_group_set_translate_func :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    FunPtr TranslateFuncC ->                -- func : TInterface "Gtk" "TranslateFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- notify : TInterface "GLib" "DestroyNotify"
    IO ()

{-# DEPRECATED actionGroupSetTranslateFunc ["(Since version 3.10)"]#-}
actionGroupSetTranslateFunc ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    TranslateFunc ->                        -- func
    m ()
actionGroupSetTranslateFunc _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkTranslateFunc (translateFuncWrapper Nothing func)
    let data_ = castFunPtrToPtr func'
    let notify = safeFreeFunPtrPtr
    gtk_action_group_set_translate_func _obj' func' data_ notify
    touchManagedPtr _obj
    return ()

-- method ActionGroup::set_translation_domain
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_set_translation_domain" gtk_action_group_set_translation_domain :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    CString ->                              -- domain : TBasicType TUTF8
    IO ()

{-# DEPRECATED actionGroupSetTranslationDomain ["(Since version 3.10)"]#-}
actionGroupSetTranslationDomain ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- domain
    m ()
actionGroupSetTranslationDomain _obj domain = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeDomain <- case domain of
        Nothing -> return nullPtr
        Just jDomain -> do
            jDomain' <- textToCString jDomain
            return jDomain'
    gtk_action_group_set_translation_domain _obj' maybeDomain
    touchManagedPtr _obj
    freeMem maybeDomain
    return ()

-- method ActionGroup::set_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_set_visible" gtk_action_group_set_visible :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    CInt ->                                 -- visible : TBasicType TBoolean
    IO ()

{-# DEPRECATED actionGroupSetVisible ["(Since version 3.10)"]#-}
actionGroupSetVisible ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible
    m ()
actionGroupSetVisible _obj visible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible' = (fromIntegral . fromEnum) visible
    gtk_action_group_set_visible _obj' visible'
    touchManagedPtr _obj
    return ()

-- method ActionGroup::translate_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_action_group_translate_string" gtk_action_group_translate_string :: 
    Ptr ActionGroup ->                      -- _obj : TInterface "Gtk" "ActionGroup"
    CString ->                              -- string : TBasicType TUTF8
    IO CString

{-# DEPRECATED actionGroupTranslateString ["(Since version 3.10)"]#-}
actionGroupTranslateString ::
    (MonadIO m, ActionGroupK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- string
    m T.Text
actionGroupTranslateString _obj string = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    string' <- textToCString string
    result <- gtk_action_group_translate_string _obj' string'
    checkUnexpectedReturnNULL "gtk_action_group_translate_string" result
    result' <- cstringToText result
    touchManagedPtr _obj
    freeMem string'
    return result'

-- signal ActionGroup::connect-proxy
type ActionGroupConnectProxyCallback =
    Action ->
    Widget ->
    IO ()

noActionGroupConnectProxyCallback :: Maybe ActionGroupConnectProxyCallback
noActionGroupConnectProxyCallback = Nothing

type ActionGroupConnectProxyCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkActionGroupConnectProxyCallback :: ActionGroupConnectProxyCallbackC -> IO (FunPtr ActionGroupConnectProxyCallbackC)

actionGroupConnectProxyClosure :: ActionGroupConnectProxyCallback -> IO Closure
actionGroupConnectProxyClosure cb = newCClosure =<< mkActionGroupConnectProxyCallback wrapped
    where wrapped = actionGroupConnectProxyCallbackWrapper cb

actionGroupConnectProxyCallbackWrapper ::
    ActionGroupConnectProxyCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->
    IO ()
actionGroupConnectProxyCallbackWrapper _cb _ action proxy _ = do
    action' <- (newObject Action) action
    proxy' <- (newObject Widget) proxy
    _cb  action' proxy'

onActionGroupConnectProxy :: (GObject a, MonadIO m) => a -> ActionGroupConnectProxyCallback -> m SignalHandlerId
onActionGroupConnectProxy obj cb = liftIO $ connectActionGroupConnectProxy obj cb SignalConnectBefore
afterActionGroupConnectProxy :: (GObject a, MonadIO m) => a -> ActionGroupConnectProxyCallback -> m SignalHandlerId
afterActionGroupConnectProxy obj cb = connectActionGroupConnectProxy obj cb SignalConnectAfter

connectActionGroupConnectProxy :: (GObject a, MonadIO m) =>
                                  a -> ActionGroupConnectProxyCallback -> SignalConnectMode -> m SignalHandlerId
connectActionGroupConnectProxy obj cb after = liftIO $ do
    cb' <- mkActionGroupConnectProxyCallback (actionGroupConnectProxyCallbackWrapper cb)
    connectSignalFunPtr obj "connect-proxy" cb' after

-- signal ActionGroup::disconnect-proxy
type ActionGroupDisconnectProxyCallback =
    Action ->
    Widget ->
    IO ()

noActionGroupDisconnectProxyCallback :: Maybe ActionGroupDisconnectProxyCallback
noActionGroupDisconnectProxyCallback = Nothing

type ActionGroupDisconnectProxyCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkActionGroupDisconnectProxyCallback :: ActionGroupDisconnectProxyCallbackC -> IO (FunPtr ActionGroupDisconnectProxyCallbackC)

actionGroupDisconnectProxyClosure :: ActionGroupDisconnectProxyCallback -> IO Closure
actionGroupDisconnectProxyClosure cb = newCClosure =<< mkActionGroupDisconnectProxyCallback wrapped
    where wrapped = actionGroupDisconnectProxyCallbackWrapper cb

actionGroupDisconnectProxyCallbackWrapper ::
    ActionGroupDisconnectProxyCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->
    IO ()
actionGroupDisconnectProxyCallbackWrapper _cb _ action proxy _ = do
    action' <- (newObject Action) action
    proxy' <- (newObject Widget) proxy
    _cb  action' proxy'

onActionGroupDisconnectProxy :: (GObject a, MonadIO m) => a -> ActionGroupDisconnectProxyCallback -> m SignalHandlerId
onActionGroupDisconnectProxy obj cb = liftIO $ connectActionGroupDisconnectProxy obj cb SignalConnectBefore
afterActionGroupDisconnectProxy :: (GObject a, MonadIO m) => a -> ActionGroupDisconnectProxyCallback -> m SignalHandlerId
afterActionGroupDisconnectProxy obj cb = connectActionGroupDisconnectProxy obj cb SignalConnectAfter

connectActionGroupDisconnectProxy :: (GObject a, MonadIO m) =>
                                     a -> ActionGroupDisconnectProxyCallback -> SignalConnectMode -> m SignalHandlerId
connectActionGroupDisconnectProxy obj cb after = liftIO $ do
    cb' <- mkActionGroupDisconnectProxyCallback (actionGroupDisconnectProxyCallbackWrapper cb)
    connectSignalFunPtr obj "disconnect-proxy" cb' after

-- signal ActionGroup::post-activate
type ActionGroupPostActivateCallback =
    Action ->
    IO ()

noActionGroupPostActivateCallback :: Maybe ActionGroupPostActivateCallback
noActionGroupPostActivateCallback = Nothing

type ActionGroupPostActivateCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkActionGroupPostActivateCallback :: ActionGroupPostActivateCallbackC -> IO (FunPtr ActionGroupPostActivateCallbackC)

actionGroupPostActivateClosure :: ActionGroupPostActivateCallback -> IO Closure
actionGroupPostActivateClosure cb = newCClosure =<< mkActionGroupPostActivateCallback wrapped
    where wrapped = actionGroupPostActivateCallbackWrapper cb

actionGroupPostActivateCallbackWrapper ::
    ActionGroupPostActivateCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr () ->
    IO ()
actionGroupPostActivateCallbackWrapper _cb _ action _ = do
    action' <- (newObject Action) action
    _cb  action'

onActionGroupPostActivate :: (GObject a, MonadIO m) => a -> ActionGroupPostActivateCallback -> m SignalHandlerId
onActionGroupPostActivate obj cb = liftIO $ connectActionGroupPostActivate obj cb SignalConnectBefore
afterActionGroupPostActivate :: (GObject a, MonadIO m) => a -> ActionGroupPostActivateCallback -> m SignalHandlerId
afterActionGroupPostActivate obj cb = connectActionGroupPostActivate obj cb SignalConnectAfter

connectActionGroupPostActivate :: (GObject a, MonadIO m) =>
                                  a -> ActionGroupPostActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectActionGroupPostActivate obj cb after = liftIO $ do
    cb' <- mkActionGroupPostActivateCallback (actionGroupPostActivateCallbackWrapper cb)
    connectSignalFunPtr obj "post-activate" cb' after

-- signal ActionGroup::pre-activate
type ActionGroupPreActivateCallback =
    Action ->
    IO ()

noActionGroupPreActivateCallback :: Maybe ActionGroupPreActivateCallback
noActionGroupPreActivateCallback = Nothing

type ActionGroupPreActivateCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkActionGroupPreActivateCallback :: ActionGroupPreActivateCallbackC -> IO (FunPtr ActionGroupPreActivateCallbackC)

actionGroupPreActivateClosure :: ActionGroupPreActivateCallback -> IO Closure
actionGroupPreActivateClosure cb = newCClosure =<< mkActionGroupPreActivateCallback wrapped
    where wrapped = actionGroupPreActivateCallbackWrapper cb

actionGroupPreActivateCallbackWrapper ::
    ActionGroupPreActivateCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr () ->
    IO ()
actionGroupPreActivateCallbackWrapper _cb _ action _ = do
    action' <- (newObject Action) action
    _cb  action'

onActionGroupPreActivate :: (GObject a, MonadIO m) => a -> ActionGroupPreActivateCallback -> m SignalHandlerId
onActionGroupPreActivate obj cb = liftIO $ connectActionGroupPreActivate obj cb SignalConnectBefore
afterActionGroupPreActivate :: (GObject a, MonadIO m) => a -> ActionGroupPreActivateCallback -> m SignalHandlerId
afterActionGroupPreActivate obj cb = connectActionGroupPreActivate obj cb SignalConnectAfter

connectActionGroupPreActivate :: (GObject a, MonadIO m) =>
                                 a -> ActionGroupPreActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectActionGroupPreActivate obj cb after = liftIO $ do
    cb' <- mkActionGroupPreActivateCallback (actionGroupPreActivateCallbackWrapper cb)
    connectSignalFunPtr obj "pre-activate" cb' after

-- interface Actionable 

newtype Actionable = Actionable (ForeignPtr Actionable)
noActionable :: Maybe Actionable
noActionable = Nothing

foreign import ccall "gtk_actionable_get_type"
    c_gtk_actionable_get_type :: IO GType

type instance ParentTypes Actionable = '[Widget, GObject.Object]

instance GObject Actionable where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_actionable_get_type
    

class GObject o => ActionableK o
instance (GObject o, IsDescendantOf Actionable o) => ActionableK o

toActionable :: ActionableK o => o -> IO Actionable
toActionable = unsafeCastTo Actionable

-- method Actionable::get_action_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Actionable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Actionable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_actionable_get_action_name" gtk_actionable_get_action_name :: 
    Ptr Actionable ->                       -- _obj : TInterface "Gtk" "Actionable"
    IO CString


actionableGetActionName ::
    (MonadIO m, ActionableK a) =>
    a ->                                    -- _obj
    m T.Text
actionableGetActionName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_actionable_get_action_name _obj'
    checkUnexpectedReturnNULL "gtk_actionable_get_action_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Actionable::get_action_target_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Actionable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Actionable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TVariant
-- throws : False
-- Skip return : False

foreign import ccall "gtk_actionable_get_action_target_value" gtk_actionable_get_action_target_value :: 
    Ptr Actionable ->                       -- _obj : TInterface "Gtk" "Actionable"
    IO (Ptr GVariant)


actionableGetActionTargetValue ::
    (MonadIO m, ActionableK a) =>
    a ->                                    -- _obj
    m GVariant
actionableGetActionTargetValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_actionable_get_action_target_value _obj'
    checkUnexpectedReturnNULL "gtk_actionable_get_action_target_value" result
    result' <- newGVariantFromPtr result
    touchManagedPtr _obj
    return result'

-- method Actionable::set_action_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Actionable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Actionable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_actionable_set_action_name" gtk_actionable_set_action_name :: 
    Ptr Actionable ->                       -- _obj : TInterface "Gtk" "Actionable"
    CString ->                              -- action_name : TBasicType TUTF8
    IO ()


actionableSetActionName ::
    (MonadIO m, ActionableK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- action_name
    m ()
actionableSetActionName _obj action_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    action_name' <- textToCString action_name
    gtk_actionable_set_action_name _obj' action_name'
    touchManagedPtr _obj
    freeMem action_name'
    return ()

-- method Actionable::set_action_target_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Actionable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_value", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Actionable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_value", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_actionable_set_action_target_value" gtk_actionable_set_action_target_value :: 
    Ptr Actionable ->                       -- _obj : TInterface "Gtk" "Actionable"
    Ptr GVariant ->                         -- target_value : TVariant
    IO ()


actionableSetActionTargetValue ::
    (MonadIO m, ActionableK a) =>
    a ->                                    -- _obj
    GVariant ->                             -- target_value
    m ()
actionableSetActionTargetValue _obj target_value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let target_value' = unsafeManagedPtrGetPtr target_value
    gtk_actionable_set_action_target_value _obj' target_value'
    touchManagedPtr _obj
    return ()

-- method Actionable::set_detailed_action_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Actionable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detailed_action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Actionable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detailed_action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_actionable_set_detailed_action_name" gtk_actionable_set_detailed_action_name :: 
    Ptr Actionable ->                       -- _obj : TInterface "Gtk" "Actionable"
    CString ->                              -- detailed_action_name : TBasicType TUTF8
    IO ()


actionableSetDetailedActionName ::
    (MonadIO m, ActionableK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- detailed_action_name
    m ()
actionableSetDetailedActionName _obj detailed_action_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    detailed_action_name' <- textToCString detailed_action_name
    gtk_actionable_set_detailed_action_name _obj' detailed_action_name'
    touchManagedPtr _obj
    freeMem detailed_action_name'
    return ()

-- interface Activatable 

newtype Activatable = Activatable (ForeignPtr Activatable)
noActivatable :: Maybe Activatable
noActivatable = Nothing

foreign import ccall "gtk_activatable_get_type"
    c_gtk_activatable_get_type :: IO GType

type instance ParentTypes Activatable = '[GObject.Object]

instance GObject Activatable where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_activatable_get_type
    

class GObject o => ActivatableK o
instance (GObject o, IsDescendantOf Activatable o) => ActivatableK o

toActivatable :: ActivatableK o => o -> IO Activatable
toActivatable = unsafeCastTo Activatable

-- method Activatable::do_set_related_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_activatable_do_set_related_action" gtk_activatable_do_set_related_action :: 
    Ptr Activatable ->                      -- _obj : TInterface "Gtk" "Activatable"
    Ptr Action ->                           -- action : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED activatableDoSetRelatedAction ["(Since version 3.10)"]#-}
activatableDoSetRelatedAction ::
    (MonadIO m, ActivatableK a, ActionK b) =>
    a ->                                    -- _obj
    b ->                                    -- action
    m ()
activatableDoSetRelatedAction _obj action = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action' = unsafeManagedPtrCastPtr action
    gtk_activatable_do_set_related_action _obj' action'
    touchManagedPtr _obj
    touchManagedPtr action
    return ()

-- method Activatable::get_related_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Action"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_activatable_get_related_action" gtk_activatable_get_related_action :: 
    Ptr Activatable ->                      -- _obj : TInterface "Gtk" "Activatable"
    IO (Ptr Action)

{-# DEPRECATED activatableGetRelatedAction ["(Since version 3.10)"]#-}
activatableGetRelatedAction ::
    (MonadIO m, ActivatableK a) =>
    a ->                                    -- _obj
    m Action
activatableGetRelatedAction _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_activatable_get_related_action _obj'
    checkUnexpectedReturnNULL "gtk_activatable_get_related_action" result
    result' <- (newObject Action) result
    touchManagedPtr _obj
    return result'

-- method Activatable::get_use_action_appearance
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_activatable_get_use_action_appearance" gtk_activatable_get_use_action_appearance :: 
    Ptr Activatable ->                      -- _obj : TInterface "Gtk" "Activatable"
    IO CInt

{-# DEPRECATED activatableGetUseActionAppearance ["(Since version 3.10)"]#-}
activatableGetUseActionAppearance ::
    (MonadIO m, ActivatableK a) =>
    a ->                                    -- _obj
    m Bool
activatableGetUseActionAppearance _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_activatable_get_use_action_appearance _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Activatable::set_related_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_activatable_set_related_action" gtk_activatable_set_related_action :: 
    Ptr Activatable ->                      -- _obj : TInterface "Gtk" "Activatable"
    Ptr Action ->                           -- action : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED activatableSetRelatedAction ["(Since version 3.10)"]#-}
activatableSetRelatedAction ::
    (MonadIO m, ActivatableK a, ActionK b) =>
    a ->                                    -- _obj
    b ->                                    -- action
    m ()
activatableSetRelatedAction _obj action = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action' = unsafeManagedPtrCastPtr action
    gtk_activatable_set_related_action _obj' action'
    touchManagedPtr _obj
    touchManagedPtr action
    return ()

-- method Activatable::set_use_action_appearance
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_appearance", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_appearance", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_activatable_set_use_action_appearance" gtk_activatable_set_use_action_appearance :: 
    Ptr Activatable ->                      -- _obj : TInterface "Gtk" "Activatable"
    CInt ->                                 -- use_appearance : TBasicType TBoolean
    IO ()

{-# DEPRECATED activatableSetUseActionAppearance ["(Since version 3.10)"]#-}
activatableSetUseActionAppearance ::
    (MonadIO m, ActivatableK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_appearance
    m ()
activatableSetUseActionAppearance _obj use_appearance = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_appearance' = (fromIntegral . fromEnum) use_appearance
    gtk_activatable_set_use_action_appearance _obj' use_appearance'
    touchManagedPtr _obj
    return ()

-- method Activatable::sync_action_properties
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Activatable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_activatable_sync_action_properties" gtk_activatable_sync_action_properties :: 
    Ptr Activatable ->                      -- _obj : TInterface "Gtk" "Activatable"
    Ptr Action ->                           -- action : TInterface "Gtk" "Action"
    IO ()

{-# DEPRECATED activatableSyncActionProperties ["(Since version 3.10)"]#-}
activatableSyncActionProperties ::
    (MonadIO m, ActivatableK a, ActionK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- action
    m ()
activatableSyncActionProperties _obj action = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAction <- case action of
        Nothing -> return nullPtr
        Just jAction -> do
            let jAction' = unsafeManagedPtrCastPtr jAction
            return jAction'
    gtk_activatable_sync_action_properties _obj' maybeAction
    touchManagedPtr _obj
    whenJust action touchManagedPtr
    return ()

-- object Adjustment 
newtype Adjustment = Adjustment (ForeignPtr Adjustment)
noAdjustment :: Maybe Adjustment
noAdjustment = Nothing

foreign import ccall "gtk_adjustment_get_type"
    c_gtk_adjustment_get_type :: IO GType

type instance ParentTypes Adjustment = '[GObject.Object]

instance GObject Adjustment where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_adjustment_get_type
    

class GObject o => AdjustmentK o
instance (GObject o, IsDescendantOf Adjustment o) => AdjustmentK o

toAdjustment :: AdjustmentK o => o -> IO Adjustment
toAdjustment = unsafeCastTo Adjustment

-- method Adjustment::new
-- method type : Constructor
-- Args : [Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_new" gtk_adjustment_new :: 
    CDouble ->                              -- value : TBasicType TDouble
    CDouble ->                              -- lower : TBasicType TDouble
    CDouble ->                              -- upper : TBasicType TDouble
    CDouble ->                              -- step_increment : TBasicType TDouble
    CDouble ->                              -- page_increment : TBasicType TDouble
    CDouble ->                              -- page_size : TBasicType TDouble
    IO (Ptr Adjustment)


adjustmentNew ::
    (MonadIO m) =>
    Double ->                               -- value
    Double ->                               -- lower
    Double ->                               -- upper
    Double ->                               -- step_increment
    Double ->                               -- page_increment
    Double ->                               -- page_size
    m Adjustment
adjustmentNew value lower upper step_increment page_increment page_size = liftIO $ do
    let value' = realToFrac value
    let lower' = realToFrac lower
    let upper' = realToFrac upper
    let step_increment' = realToFrac step_increment
    let page_increment' = realToFrac page_increment
    let page_size' = realToFrac page_size
    result <- gtk_adjustment_new value' lower' upper' step_increment' page_increment' page_size'
    checkUnexpectedReturnNULL "gtk_adjustment_new" result
    result' <- (newObject Adjustment) result
    return result'

-- method Adjustment::changed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_changed" gtk_adjustment_changed :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    IO ()

{-# DEPRECATED adjustmentChanged ["(Since version 3.18)","GTK+ emits #GtkAdjustment::changed itself whenever any","   of the properties (other than value) change"]#-}
adjustmentChanged ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    m ()
adjustmentChanged _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_adjustment_changed _obj'
    touchManagedPtr _obj
    return ()

-- method Adjustment::clamp_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_clamp_page" gtk_adjustment_clamp_page :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    CDouble ->                              -- lower : TBasicType TDouble
    CDouble ->                              -- upper : TBasicType TDouble
    IO ()


adjustmentClampPage ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    Double ->                               -- lower
    Double ->                               -- upper
    m ()
adjustmentClampPage _obj lower upper = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let lower' = realToFrac lower
    let upper' = realToFrac upper
    gtk_adjustment_clamp_page _obj' lower' upper'
    touchManagedPtr _obj
    return ()

-- method Adjustment::configure
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_configure" gtk_adjustment_configure :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    CDouble ->                              -- value : TBasicType TDouble
    CDouble ->                              -- lower : TBasicType TDouble
    CDouble ->                              -- upper : TBasicType TDouble
    CDouble ->                              -- step_increment : TBasicType TDouble
    CDouble ->                              -- page_increment : TBasicType TDouble
    CDouble ->                              -- page_size : TBasicType TDouble
    IO ()


adjustmentConfigure ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    Double ->                               -- value
    Double ->                               -- lower
    Double ->                               -- upper
    Double ->                               -- step_increment
    Double ->                               -- page_increment
    Double ->                               -- page_size
    m ()
adjustmentConfigure _obj value lower upper step_increment page_increment page_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = realToFrac value
    let lower' = realToFrac lower
    let upper' = realToFrac upper
    let step_increment' = realToFrac step_increment
    let page_increment' = realToFrac page_increment
    let page_size' = realToFrac page_size
    gtk_adjustment_configure _obj' value' lower' upper' step_increment' page_increment' page_size'
    touchManagedPtr _obj
    return ()

-- method Adjustment::get_lower
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_lower" gtk_adjustment_get_lower :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    IO CDouble


adjustmentGetLower ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    m Double
adjustmentGetLower _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_adjustment_get_lower _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Adjustment::get_minimum_increment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_minimum_increment" gtk_adjustment_get_minimum_increment :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    IO CDouble


adjustmentGetMinimumIncrement ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    m Double
adjustmentGetMinimumIncrement _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_adjustment_get_minimum_increment _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Adjustment::get_page_increment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_page_increment" gtk_adjustment_get_page_increment :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    IO CDouble


adjustmentGetPageIncrement ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    m Double
adjustmentGetPageIncrement _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_adjustment_get_page_increment _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Adjustment::get_page_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_page_size" gtk_adjustment_get_page_size :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    IO CDouble


adjustmentGetPageSize ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    m Double
adjustmentGetPageSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_adjustment_get_page_size _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Adjustment::get_step_increment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_step_increment" gtk_adjustment_get_step_increment :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    IO CDouble


adjustmentGetStepIncrement ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    m Double
adjustmentGetStepIncrement _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_adjustment_get_step_increment _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Adjustment::get_upper
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_upper" gtk_adjustment_get_upper :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    IO CDouble


adjustmentGetUpper ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    m Double
adjustmentGetUpper _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_adjustment_get_upper _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Adjustment::get_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_value" gtk_adjustment_get_value :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    IO CDouble


adjustmentGetValue ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    m Double
adjustmentGetValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_adjustment_get_value _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Adjustment::set_lower
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_lower" gtk_adjustment_set_lower :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    CDouble ->                              -- lower : TBasicType TDouble
    IO ()


adjustmentSetLower ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    Double ->                               -- lower
    m ()
adjustmentSetLower _obj lower = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let lower' = realToFrac lower
    gtk_adjustment_set_lower _obj' lower'
    touchManagedPtr _obj
    return ()

-- method Adjustment::set_page_increment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_page_increment" gtk_adjustment_set_page_increment :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    CDouble ->                              -- page_increment : TBasicType TDouble
    IO ()


adjustmentSetPageIncrement ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    Double ->                               -- page_increment
    m ()
adjustmentSetPageIncrement _obj page_increment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page_increment' = realToFrac page_increment
    gtk_adjustment_set_page_increment _obj' page_increment'
    touchManagedPtr _obj
    return ()

-- method Adjustment::set_page_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_page_size" gtk_adjustment_set_page_size :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    CDouble ->                              -- page_size : TBasicType TDouble
    IO ()


adjustmentSetPageSize ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    Double ->                               -- page_size
    m ()
adjustmentSetPageSize _obj page_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page_size' = realToFrac page_size
    gtk_adjustment_set_page_size _obj' page_size'
    touchManagedPtr _obj
    return ()

-- method Adjustment::set_step_increment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_step_increment" gtk_adjustment_set_step_increment :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    CDouble ->                              -- step_increment : TBasicType TDouble
    IO ()


adjustmentSetStepIncrement ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    Double ->                               -- step_increment
    m ()
adjustmentSetStepIncrement _obj step_increment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let step_increment' = realToFrac step_increment
    gtk_adjustment_set_step_increment _obj' step_increment'
    touchManagedPtr _obj
    return ()

-- method Adjustment::set_upper
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_upper" gtk_adjustment_set_upper :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    CDouble ->                              -- upper : TBasicType TDouble
    IO ()


adjustmentSetUpper ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    Double ->                               -- upper
    m ()
adjustmentSetUpper _obj upper = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let upper' = realToFrac upper
    gtk_adjustment_set_upper _obj' upper'
    touchManagedPtr _obj
    return ()

-- method Adjustment::set_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_value" gtk_adjustment_set_value :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    CDouble ->                              -- value : TBasicType TDouble
    IO ()


adjustmentSetValue ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    Double ->                               -- value
    m ()
adjustmentSetValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = realToFrac value
    gtk_adjustment_set_value _obj' value'
    touchManagedPtr _obj
    return ()

-- method Adjustment::value_changed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_value_changed" gtk_adjustment_value_changed :: 
    Ptr Adjustment ->                       -- _obj : TInterface "Gtk" "Adjustment"
    IO ()

{-# DEPRECATED adjustmentValueChanged ["(Since version 3.18)","GTK+ emits #GtkAdjustment::value-changed itself whenever","   the value changes"]#-}
adjustmentValueChanged ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- _obj
    m ()
adjustmentValueChanged _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_adjustment_value_changed _obj'
    touchManagedPtr _obj
    return ()

-- signal Adjustment::changed
type AdjustmentChangedCallback =
    IO ()

noAdjustmentChangedCallback :: Maybe AdjustmentChangedCallback
noAdjustmentChangedCallback = Nothing

type AdjustmentChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAdjustmentChangedCallback :: AdjustmentChangedCallbackC -> IO (FunPtr AdjustmentChangedCallbackC)

adjustmentChangedClosure :: AdjustmentChangedCallback -> IO Closure
adjustmentChangedClosure cb = newCClosure =<< mkAdjustmentChangedCallback wrapped
    where wrapped = adjustmentChangedCallbackWrapper cb

adjustmentChangedCallbackWrapper ::
    AdjustmentChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
adjustmentChangedCallbackWrapper _cb _ _ = do
    _cb 

onAdjustmentChanged :: (GObject a, MonadIO m) => a -> AdjustmentChangedCallback -> m SignalHandlerId
onAdjustmentChanged obj cb = liftIO $ connectAdjustmentChanged obj cb SignalConnectBefore
afterAdjustmentChanged :: (GObject a, MonadIO m) => a -> AdjustmentChangedCallback -> m SignalHandlerId
afterAdjustmentChanged obj cb = connectAdjustmentChanged obj cb SignalConnectAfter

connectAdjustmentChanged :: (GObject a, MonadIO m) =>
                            a -> AdjustmentChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectAdjustmentChanged obj cb after = liftIO $ do
    cb' <- mkAdjustmentChangedCallback (adjustmentChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- signal Adjustment::value-changed
type AdjustmentValueChangedCallback =
    IO ()

noAdjustmentValueChangedCallback :: Maybe AdjustmentValueChangedCallback
noAdjustmentValueChangedCallback = Nothing

type AdjustmentValueChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAdjustmentValueChangedCallback :: AdjustmentValueChangedCallbackC -> IO (FunPtr AdjustmentValueChangedCallbackC)

adjustmentValueChangedClosure :: AdjustmentValueChangedCallback -> IO Closure
adjustmentValueChangedClosure cb = newCClosure =<< mkAdjustmentValueChangedCallback wrapped
    where wrapped = adjustmentValueChangedCallbackWrapper cb

adjustmentValueChangedCallbackWrapper ::
    AdjustmentValueChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
adjustmentValueChangedCallbackWrapper _cb _ _ = do
    _cb 

onAdjustmentValueChanged :: (GObject a, MonadIO m) => a -> AdjustmentValueChangedCallback -> m SignalHandlerId
onAdjustmentValueChanged obj cb = liftIO $ connectAdjustmentValueChanged obj cb SignalConnectBefore
afterAdjustmentValueChanged :: (GObject a, MonadIO m) => a -> AdjustmentValueChangedCallback -> m SignalHandlerId
afterAdjustmentValueChanged obj cb = connectAdjustmentValueChanged obj cb SignalConnectAfter

connectAdjustmentValueChanged :: (GObject a, MonadIO m) =>
                                 a -> AdjustmentValueChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectAdjustmentValueChanged obj cb after = liftIO $ do
    cb' <- mkAdjustmentValueChangedCallback (adjustmentValueChangedCallbackWrapper cb)
    connectSignalFunPtr obj "value-changed" cb' after

-- Enum Align

data Align = 
      AlignFill
    | AlignStart
    | AlignEnd
    | AlignCenter
    | AlignBaseline
    | AnotherAlign Int
    deriving (Show, Eq)

instance Enum Align where
    fromEnum AlignFill = 0
    fromEnum AlignStart = 1
    fromEnum AlignEnd = 2
    fromEnum AlignCenter = 3
    fromEnum AlignBaseline = 4
    fromEnum (AnotherAlign k) = k

    toEnum 0 = AlignFill
    toEnum 1 = AlignStart
    toEnum 2 = AlignEnd
    toEnum 3 = AlignCenter
    toEnum 4 = AlignBaseline
    toEnum k = AnotherAlign k

foreign import ccall "gtk_align_get_type" c_gtk_align_get_type :: 
    IO GType

instance BoxedEnum Align where
    boxedEnumType _ = c_gtk_align_get_type

-- object Alignment 
newtype Alignment = Alignment (ForeignPtr Alignment)
noAlignment :: Maybe Alignment
noAlignment = Nothing

foreign import ccall "gtk_alignment_get_type"
    c_gtk_alignment_get_type :: IO GType

type instance ParentTypes Alignment = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Alignment where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_alignment_get_type
    

class GObject o => AlignmentK o
instance (GObject o, IsDescendantOf Alignment o) => AlignmentK o

toAlignment :: AlignmentK o => o -> IO Alignment
toAlignment = unsafeCastTo Alignment

-- method Alignment::new
-- method type : Constructor
-- Args : [Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xscale", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yscale", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xscale", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yscale", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Alignment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_alignment_new" gtk_alignment_new :: 
    CFloat ->                               -- xalign : TBasicType TFloat
    CFloat ->                               -- yalign : TBasicType TFloat
    CFloat ->                               -- xscale : TBasicType TFloat
    CFloat ->                               -- yscale : TBasicType TFloat
    IO (Ptr Alignment)

{-# DEPRECATED alignmentNew ["(Since version 3.14)","Use #GtkWidget alignment and margin properties"]#-}
alignmentNew ::
    (MonadIO m) =>
    Float ->                                -- xalign
    Float ->                                -- yalign
    Float ->                                -- xscale
    Float ->                                -- yscale
    m Alignment
alignmentNew xalign yalign xscale yscale = liftIO $ do
    let xalign' = realToFrac xalign
    let yalign' = realToFrac yalign
    let xscale' = realToFrac xscale
    let yscale' = realToFrac yscale
    result <- gtk_alignment_new xalign' yalign' xscale' yscale'
    checkUnexpectedReturnNULL "gtk_alignment_new" result
    result' <- (newObject Alignment) result
    return result'

-- method Alignment::get_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Alignment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding_top", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "padding_bottom", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "padding_left", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "padding_right", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Alignment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_alignment_get_padding" gtk_alignment_get_padding :: 
    Ptr Alignment ->                        -- _obj : TInterface "Gtk" "Alignment"
    Ptr Word32 ->                           -- padding_top : TBasicType TUInt32
    Ptr Word32 ->                           -- padding_bottom : TBasicType TUInt32
    Ptr Word32 ->                           -- padding_left : TBasicType TUInt32
    Ptr Word32 ->                           -- padding_right : TBasicType TUInt32
    IO ()

{-# DEPRECATED alignmentGetPadding ["(Since version 3.14)","Use #GtkWidget alignment and margin properties"]#-}
alignmentGetPadding ::
    (MonadIO m, AlignmentK a) =>
    a ->                                    -- _obj
    m (Word32,Word32,Word32,Word32)
alignmentGetPadding _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    padding_top <- allocMem :: IO (Ptr Word32)
    padding_bottom <- allocMem :: IO (Ptr Word32)
    padding_left <- allocMem :: IO (Ptr Word32)
    padding_right <- allocMem :: IO (Ptr Word32)
    gtk_alignment_get_padding _obj' padding_top padding_bottom padding_left padding_right
    padding_top' <- peek padding_top
    padding_bottom' <- peek padding_bottom
    padding_left' <- peek padding_left
    padding_right' <- peek padding_right
    touchManagedPtr _obj
    freeMem padding_top
    freeMem padding_bottom
    freeMem padding_left
    freeMem padding_right
    return (padding_top', padding_bottom', padding_left', padding_right')

-- method Alignment::set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Alignment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xscale", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yscale", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Alignment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xscale", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yscale", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_alignment_set" gtk_alignment_set :: 
    Ptr Alignment ->                        -- _obj : TInterface "Gtk" "Alignment"
    CFloat ->                               -- xalign : TBasicType TFloat
    CFloat ->                               -- yalign : TBasicType TFloat
    CFloat ->                               -- xscale : TBasicType TFloat
    CFloat ->                               -- yscale : TBasicType TFloat
    IO ()

{-# DEPRECATED alignmentSet ["(Since version 3.14)","Use #GtkWidget alignment and margin properties"]#-}
alignmentSet ::
    (MonadIO m, AlignmentK a) =>
    a ->                                    -- _obj
    Float ->                                -- xalign
    Float ->                                -- yalign
    Float ->                                -- xscale
    Float ->                                -- yscale
    m ()
alignmentSet _obj xalign yalign xscale yscale = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let xalign' = realToFrac xalign
    let yalign' = realToFrac yalign
    let xscale' = realToFrac xscale
    let yscale' = realToFrac yscale
    gtk_alignment_set _obj' xalign' yalign' xscale' yscale'
    touchManagedPtr _obj
    return ()

-- method Alignment::set_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Alignment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding_top", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding_bottom", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding_left", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding_right", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Alignment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding_top", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding_bottom", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding_left", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding_right", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_alignment_set_padding" gtk_alignment_set_padding :: 
    Ptr Alignment ->                        -- _obj : TInterface "Gtk" "Alignment"
    Word32 ->                               -- padding_top : TBasicType TUInt32
    Word32 ->                               -- padding_bottom : TBasicType TUInt32
    Word32 ->                               -- padding_left : TBasicType TUInt32
    Word32 ->                               -- padding_right : TBasicType TUInt32
    IO ()

{-# DEPRECATED alignmentSetPadding ["(Since version 3.14)","Use #GtkWidget alignment and margin properties"]#-}
alignmentSetPadding ::
    (MonadIO m, AlignmentK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- padding_top
    Word32 ->                               -- padding_bottom
    Word32 ->                               -- padding_left
    Word32 ->                               -- padding_right
    m ()
alignmentSetPadding _obj padding_top padding_bottom padding_left padding_right = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_alignment_set_padding _obj' padding_top padding_bottom padding_left padding_right
    touchManagedPtr _obj
    return ()

-- interface AppChooser 

newtype AppChooser = AppChooser (ForeignPtr AppChooser)
noAppChooser :: Maybe AppChooser
noAppChooser = Nothing

foreign import ccall "gtk_app_chooser_get_type"
    c_gtk_app_chooser_get_type :: IO GType

type instance ParentTypes AppChooser = '[Widget, GObject.Object]

instance GObject AppChooser where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_app_chooser_get_type
    

class GObject o => AppChooserK o
instance (GObject o, IsDescendantOf AppChooser o) => AppChooserK o

toAppChooser :: AppChooserK o => o -> IO AppChooser
toAppChooser = unsafeCastTo AppChooser

-- method AppChooser::get_app_info
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "AppInfo"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_get_app_info" gtk_app_chooser_get_app_info :: 
    Ptr AppChooser ->                       -- _obj : TInterface "Gtk" "AppChooser"
    IO (Ptr Gio.AppInfo)


appChooserGetAppInfo ::
    (MonadIO m, AppChooserK a) =>
    a ->                                    -- _obj
    m Gio.AppInfo
appChooserGetAppInfo _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_get_app_info _obj'
    checkUnexpectedReturnNULL "gtk_app_chooser_get_app_info" result
    result' <- (wrapObject Gio.AppInfo) result
    touchManagedPtr _obj
    return result'

-- method AppChooser::get_content_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_get_content_type" gtk_app_chooser_get_content_type :: 
    Ptr AppChooser ->                       -- _obj : TInterface "Gtk" "AppChooser"
    IO CString


appChooserGetContentType ::
    (MonadIO m, AppChooserK a) =>
    a ->                                    -- _obj
    m T.Text
appChooserGetContentType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_get_content_type _obj'
    checkUnexpectedReturnNULL "gtk_app_chooser_get_content_type" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method AppChooser::refresh
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_refresh" gtk_app_chooser_refresh :: 
    Ptr AppChooser ->                       -- _obj : TInterface "Gtk" "AppChooser"
    IO ()


appChooserRefresh ::
    (MonadIO m, AppChooserK a) =>
    a ->                                    -- _obj
    m ()
appChooserRefresh _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_app_chooser_refresh _obj'
    touchManagedPtr _obj
    return ()

-- object AppChooserButton 
newtype AppChooserButton = AppChooserButton (ForeignPtr AppChooserButton)
noAppChooserButton :: Maybe AppChooserButton
noAppChooserButton = Nothing

foreign import ccall "gtk_app_chooser_button_get_type"
    c_gtk_app_chooser_button_get_type :: IO GType

type instance ParentTypes AppChooserButton = '[ComboBox, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, AppChooser, Buildable, CellEditable, CellLayout]

instance GObject AppChooserButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_app_chooser_button_get_type
    

class GObject o => AppChooserButtonK o
instance (GObject o, IsDescendantOf AppChooserButton o) => AppChooserButtonK o

toAppChooserButton :: AppChooserButtonK o => o -> IO AppChooserButton
toAppChooserButton = unsafeCastTo AppChooserButton

-- method AppChooserButton::new
-- method type : Constructor
-- Args : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AppChooserButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_button_new" gtk_app_chooser_button_new :: 
    CString ->                              -- content_type : TBasicType TUTF8
    IO (Ptr AppChooserButton)


appChooserButtonNew ::
    (MonadIO m) =>
    T.Text ->                               -- content_type
    m AppChooserButton
appChooserButtonNew content_type = liftIO $ do
    content_type' <- textToCString content_type
    result <- gtk_app_chooser_button_new content_type'
    checkUnexpectedReturnNULL "gtk_app_chooser_button_new" result
    result' <- (newObject AppChooserButton) result
    freeMem content_type'
    return result'

-- method AppChooserButton::append_custom_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_button_append_custom_item" gtk_app_chooser_button_append_custom_item :: 
    Ptr AppChooserButton ->                 -- _obj : TInterface "Gtk" "AppChooserButton"
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- label : TBasicType TUTF8
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    IO ()


appChooserButtonAppendCustomItem ::
    (MonadIO m, AppChooserButtonK a, Gio.IconK b) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    T.Text ->                               -- label
    b ->                                    -- icon
    m ()
appChooserButtonAppendCustomItem _obj name label icon = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    label' <- textToCString label
    let icon' = unsafeManagedPtrCastPtr icon
    gtk_app_chooser_button_append_custom_item _obj' name' label' icon'
    touchManagedPtr _obj
    touchManagedPtr icon
    freeMem name'
    freeMem label'
    return ()

-- method AppChooserButton::append_separator
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_button_append_separator" gtk_app_chooser_button_append_separator :: 
    Ptr AppChooserButton ->                 -- _obj : TInterface "Gtk" "AppChooserButton"
    IO ()


appChooserButtonAppendSeparator ::
    (MonadIO m, AppChooserButtonK a) =>
    a ->                                    -- _obj
    m ()
appChooserButtonAppendSeparator _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_app_chooser_button_append_separator _obj'
    touchManagedPtr _obj
    return ()

-- method AppChooserButton::get_heading
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_button_get_heading" gtk_app_chooser_button_get_heading :: 
    Ptr AppChooserButton ->                 -- _obj : TInterface "Gtk" "AppChooserButton"
    IO CString


appChooserButtonGetHeading ::
    (MonadIO m, AppChooserButtonK a) =>
    a ->                                    -- _obj
    m T.Text
appChooserButtonGetHeading _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_button_get_heading _obj'
    checkUnexpectedReturnNULL "gtk_app_chooser_button_get_heading" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AppChooserButton::get_show_default_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_button_get_show_default_item" gtk_app_chooser_button_get_show_default_item :: 
    Ptr AppChooserButton ->                 -- _obj : TInterface "Gtk" "AppChooserButton"
    IO CInt


appChooserButtonGetShowDefaultItem ::
    (MonadIO m, AppChooserButtonK a) =>
    a ->                                    -- _obj
    m Bool
appChooserButtonGetShowDefaultItem _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_button_get_show_default_item _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AppChooserButton::get_show_dialog_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_button_get_show_dialog_item" gtk_app_chooser_button_get_show_dialog_item :: 
    Ptr AppChooserButton ->                 -- _obj : TInterface "Gtk" "AppChooserButton"
    IO CInt


appChooserButtonGetShowDialogItem ::
    (MonadIO m, AppChooserButtonK a) =>
    a ->                                    -- _obj
    m Bool
appChooserButtonGetShowDialogItem _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_button_get_show_dialog_item _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AppChooserButton::set_active_custom_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_button_set_active_custom_item" gtk_app_chooser_button_set_active_custom_item :: 
    Ptr AppChooserButton ->                 -- _obj : TInterface "Gtk" "AppChooserButton"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


appChooserButtonSetActiveCustomItem ::
    (MonadIO m, AppChooserButtonK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
appChooserButtonSetActiveCustomItem _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    gtk_app_chooser_button_set_active_custom_item _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method AppChooserButton::set_heading
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "heading", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "heading", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_button_set_heading" gtk_app_chooser_button_set_heading :: 
    Ptr AppChooserButton ->                 -- _obj : TInterface "Gtk" "AppChooserButton"
    CString ->                              -- heading : TBasicType TUTF8
    IO ()


appChooserButtonSetHeading ::
    (MonadIO m, AppChooserButtonK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- heading
    m ()
appChooserButtonSetHeading _obj heading = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    heading' <- textToCString heading
    gtk_app_chooser_button_set_heading _obj' heading'
    touchManagedPtr _obj
    freeMem heading'
    return ()

-- method AppChooserButton::set_show_default_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_button_set_show_default_item" gtk_app_chooser_button_set_show_default_item :: 
    Ptr AppChooserButton ->                 -- _obj : TInterface "Gtk" "AppChooserButton"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


appChooserButtonSetShowDefaultItem ::
    (MonadIO m, AppChooserButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
appChooserButtonSetShowDefaultItem _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_app_chooser_button_set_show_default_item _obj' setting'
    touchManagedPtr _obj
    return ()

-- method AppChooserButton::set_show_dialog_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_button_set_show_dialog_item" gtk_app_chooser_button_set_show_dialog_item :: 
    Ptr AppChooserButton ->                 -- _obj : TInterface "Gtk" "AppChooserButton"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


appChooserButtonSetShowDialogItem ::
    (MonadIO m, AppChooserButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
appChooserButtonSetShowDialogItem _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_app_chooser_button_set_show_dialog_item _obj' setting'
    touchManagedPtr _obj
    return ()

-- signal AppChooserButton::custom-item-activated
type AppChooserButtonCustomItemActivatedCallback =
    T.Text ->
    IO ()

noAppChooserButtonCustomItemActivatedCallback :: Maybe AppChooserButtonCustomItemActivatedCallback
noAppChooserButtonCustomItemActivatedCallback = Nothing

type AppChooserButtonCustomItemActivatedCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAppChooserButtonCustomItemActivatedCallback :: AppChooserButtonCustomItemActivatedCallbackC -> IO (FunPtr AppChooserButtonCustomItemActivatedCallbackC)

appChooserButtonCustomItemActivatedClosure :: AppChooserButtonCustomItemActivatedCallback -> IO Closure
appChooserButtonCustomItemActivatedClosure cb = newCClosure =<< mkAppChooserButtonCustomItemActivatedCallback wrapped
    where wrapped = appChooserButtonCustomItemActivatedCallbackWrapper cb

appChooserButtonCustomItemActivatedCallbackWrapper ::
    AppChooserButtonCustomItemActivatedCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
appChooserButtonCustomItemActivatedCallbackWrapper _cb _ item_name _ = do
    item_name' <- cstringToText item_name
    _cb  item_name'

onAppChooserButtonCustomItemActivated :: (GObject a, MonadIO m) => a -> AppChooserButtonCustomItemActivatedCallback -> m SignalHandlerId
onAppChooserButtonCustomItemActivated obj cb = liftIO $ connectAppChooserButtonCustomItemActivated obj cb SignalConnectBefore
afterAppChooserButtonCustomItemActivated :: (GObject a, MonadIO m) => a -> AppChooserButtonCustomItemActivatedCallback -> m SignalHandlerId
afterAppChooserButtonCustomItemActivated obj cb = connectAppChooserButtonCustomItemActivated obj cb SignalConnectAfter

connectAppChooserButtonCustomItemActivated :: (GObject a, MonadIO m) =>
                                              a -> AppChooserButtonCustomItemActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectAppChooserButtonCustomItemActivated obj cb after = liftIO $ do
    cb' <- mkAppChooserButtonCustomItemActivatedCallback (appChooserButtonCustomItemActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "custom-item-activated" cb' after

-- object AppChooserDialog 
newtype AppChooserDialog = AppChooserDialog (ForeignPtr AppChooserDialog)
noAppChooserDialog :: Maybe AppChooserDialog
noAppChooserDialog = Nothing

foreign import ccall "gtk_app_chooser_dialog_get_type"
    c_gtk_app_chooser_dialog_get_type :: IO GType

type instance ParentTypes AppChooserDialog = '[Dialog, Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, AppChooser, Buildable]

instance GObject AppChooserDialog where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_app_chooser_dialog_get_type
    

class GObject o => AppChooserDialogK o
instance (GObject o, IsDescendantOf AppChooserDialog o) => AppChooserDialogK o

toAppChooserDialog :: AppChooserDialogK o => o -> IO AppChooserDialog
toAppChooserDialog = unsafeCastTo AppChooserDialog

-- method AppChooserDialog::new
-- method type : Constructor
-- Args : [Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "DialogFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "DialogFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AppChooserDialog"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_dialog_new" gtk_app_chooser_dialog_new :: 
    Ptr Window ->                           -- parent : TInterface "Gtk" "Window"
    CUInt ->                                -- flags : TInterface "Gtk" "DialogFlags"
    Ptr Gio.File ->                         -- file : TInterface "Gio" "File"
    IO (Ptr AppChooserDialog)


appChooserDialogNew ::
    (MonadIO m, WindowK a, Gio.FileK b) =>
    Maybe (a) ->                            -- parent
    [DialogFlags] ->                        -- flags
    b ->                                    -- file
    m AppChooserDialog
appChooserDialogNew parent flags file = liftIO $ do
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    let flags' = gflagsToWord flags
    let file' = unsafeManagedPtrCastPtr file
    result <- gtk_app_chooser_dialog_new maybeParent flags' file'
    checkUnexpectedReturnNULL "gtk_app_chooser_dialog_new" result
    result' <- (newObject AppChooserDialog) result
    whenJust parent touchManagedPtr
    touchManagedPtr file
    return result'

-- method AppChooserDialog::new_for_content_type
-- method type : Constructor
-- Args : [Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "DialogFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "DialogFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AppChooserDialog"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_dialog_new_for_content_type" gtk_app_chooser_dialog_new_for_content_type :: 
    Ptr Window ->                           -- parent : TInterface "Gtk" "Window"
    CUInt ->                                -- flags : TInterface "Gtk" "DialogFlags"
    CString ->                              -- content_type : TBasicType TUTF8
    IO (Ptr AppChooserDialog)


appChooserDialogNewForContentType ::
    (MonadIO m, WindowK a) =>
    Maybe (a) ->                            -- parent
    [DialogFlags] ->                        -- flags
    T.Text ->                               -- content_type
    m AppChooserDialog
appChooserDialogNewForContentType parent flags content_type = liftIO $ do
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    let flags' = gflagsToWord flags
    content_type' <- textToCString content_type
    result <- gtk_app_chooser_dialog_new_for_content_type maybeParent flags' content_type'
    checkUnexpectedReturnNULL "gtk_app_chooser_dialog_new_for_content_type" result
    result' <- (newObject AppChooserDialog) result
    whenJust parent touchManagedPtr
    freeMem content_type'
    return result'

-- method AppChooserDialog::get_heading
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_dialog_get_heading" gtk_app_chooser_dialog_get_heading :: 
    Ptr AppChooserDialog ->                 -- _obj : TInterface "Gtk" "AppChooserDialog"
    IO CString


appChooserDialogGetHeading ::
    (MonadIO m, AppChooserDialogK a) =>
    a ->                                    -- _obj
    m T.Text
appChooserDialogGetHeading _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_dialog_get_heading _obj'
    checkUnexpectedReturnNULL "gtk_app_chooser_dialog_get_heading" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AppChooserDialog::get_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_dialog_get_widget" gtk_app_chooser_dialog_get_widget :: 
    Ptr AppChooserDialog ->                 -- _obj : TInterface "Gtk" "AppChooserDialog"
    IO (Ptr Widget)


appChooserDialogGetWidget ::
    (MonadIO m, AppChooserDialogK a) =>
    a ->                                    -- _obj
    m Widget
appChooserDialogGetWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_dialog_get_widget _obj'
    checkUnexpectedReturnNULL "gtk_app_chooser_dialog_get_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method AppChooserDialog::set_heading
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "heading", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "heading", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_dialog_set_heading" gtk_app_chooser_dialog_set_heading :: 
    Ptr AppChooserDialog ->                 -- _obj : TInterface "Gtk" "AppChooserDialog"
    CString ->                              -- heading : TBasicType TUTF8
    IO ()


appChooserDialogSetHeading ::
    (MonadIO m, AppChooserDialogK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- heading
    m ()
appChooserDialogSetHeading _obj heading = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    heading' <- textToCString heading
    gtk_app_chooser_dialog_set_heading _obj' heading'
    touchManagedPtr _obj
    freeMem heading'
    return ()

-- object AppChooserWidget 
newtype AppChooserWidget = AppChooserWidget (ForeignPtr AppChooserWidget)
noAppChooserWidget :: Maybe AppChooserWidget
noAppChooserWidget = Nothing

foreign import ccall "gtk_app_chooser_widget_get_type"
    c_gtk_app_chooser_widget_get_type :: IO GType

type instance ParentTypes AppChooserWidget = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, AppChooser, Buildable, Orientable]

instance GObject AppChooserWidget where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_app_chooser_widget_get_type
    

class GObject o => AppChooserWidgetK o
instance (GObject o, IsDescendantOf AppChooserWidget o) => AppChooserWidgetK o

toAppChooserWidget :: AppChooserWidgetK o => o -> IO AppChooserWidget
toAppChooserWidget = unsafeCastTo AppChooserWidget

-- method AppChooserWidget::new
-- method type : Constructor
-- Args : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AppChooserWidget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_new" gtk_app_chooser_widget_new :: 
    CString ->                              -- content_type : TBasicType TUTF8
    IO (Ptr AppChooserWidget)


appChooserWidgetNew ::
    (MonadIO m) =>
    T.Text ->                               -- content_type
    m AppChooserWidget
appChooserWidgetNew content_type = liftIO $ do
    content_type' <- textToCString content_type
    result <- gtk_app_chooser_widget_new content_type'
    checkUnexpectedReturnNULL "gtk_app_chooser_widget_new" result
    result' <- (newObject AppChooserWidget) result
    freeMem content_type'
    return result'

-- method AppChooserWidget::get_default_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_get_default_text" gtk_app_chooser_widget_get_default_text :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    IO CString


appChooserWidgetGetDefaultText ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    m T.Text
appChooserWidgetGetDefaultText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_widget_get_default_text _obj'
    checkUnexpectedReturnNULL "gtk_app_chooser_widget_get_default_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AppChooserWidget::get_show_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_get_show_all" gtk_app_chooser_widget_get_show_all :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    IO CInt


appChooserWidgetGetShowAll ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    m Bool
appChooserWidgetGetShowAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_widget_get_show_all _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AppChooserWidget::get_show_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_get_show_default" gtk_app_chooser_widget_get_show_default :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    IO CInt


appChooserWidgetGetShowDefault ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    m Bool
appChooserWidgetGetShowDefault _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_widget_get_show_default _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AppChooserWidget::get_show_fallback
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_get_show_fallback" gtk_app_chooser_widget_get_show_fallback :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    IO CInt


appChooserWidgetGetShowFallback ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    m Bool
appChooserWidgetGetShowFallback _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_widget_get_show_fallback _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AppChooserWidget::get_show_other
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_get_show_other" gtk_app_chooser_widget_get_show_other :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    IO CInt


appChooserWidgetGetShowOther ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    m Bool
appChooserWidgetGetShowOther _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_widget_get_show_other _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AppChooserWidget::get_show_recommended
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_get_show_recommended" gtk_app_chooser_widget_get_show_recommended :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    IO CInt


appChooserWidgetGetShowRecommended ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    m Bool
appChooserWidgetGetShowRecommended _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_app_chooser_widget_get_show_recommended _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method AppChooserWidget::set_default_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_set_default_text" gtk_app_chooser_widget_set_default_text :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


appChooserWidgetSetDefaultText ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    m ()
appChooserWidgetSetDefaultText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_app_chooser_widget_set_default_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method AppChooserWidget::set_show_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_set_show_all" gtk_app_chooser_widget_set_show_all :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


appChooserWidgetSetShowAll ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
appChooserWidgetSetShowAll _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_app_chooser_widget_set_show_all _obj' setting'
    touchManagedPtr _obj
    return ()

-- method AppChooserWidget::set_show_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_set_show_default" gtk_app_chooser_widget_set_show_default :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


appChooserWidgetSetShowDefault ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
appChooserWidgetSetShowDefault _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_app_chooser_widget_set_show_default _obj' setting'
    touchManagedPtr _obj
    return ()

-- method AppChooserWidget::set_show_fallback
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_set_show_fallback" gtk_app_chooser_widget_set_show_fallback :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


appChooserWidgetSetShowFallback ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
appChooserWidgetSetShowFallback _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_app_chooser_widget_set_show_fallback _obj' setting'
    touchManagedPtr _obj
    return ()

-- method AppChooserWidget::set_show_other
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_set_show_other" gtk_app_chooser_widget_set_show_other :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


appChooserWidgetSetShowOther ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
appChooserWidgetSetShowOther _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_app_chooser_widget_set_show_other _obj' setting'
    touchManagedPtr _obj
    return ()

-- method AppChooserWidget::set_show_recommended
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AppChooserWidget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_app_chooser_widget_set_show_recommended" gtk_app_chooser_widget_set_show_recommended :: 
    Ptr AppChooserWidget ->                 -- _obj : TInterface "Gtk" "AppChooserWidget"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


appChooserWidgetSetShowRecommended ::
    (MonadIO m, AppChooserWidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
appChooserWidgetSetShowRecommended _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_app_chooser_widget_set_show_recommended _obj' setting'
    touchManagedPtr _obj
    return ()

-- signal AppChooserWidget::application-activated
type AppChooserWidgetApplicationActivatedCallback =
    Gio.AppInfo ->
    IO ()

noAppChooserWidgetApplicationActivatedCallback :: Maybe AppChooserWidgetApplicationActivatedCallback
noAppChooserWidgetApplicationActivatedCallback = Nothing

type AppChooserWidgetApplicationActivatedCallbackC =
    Ptr () ->                               -- object
    Ptr Gio.AppInfo ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAppChooserWidgetApplicationActivatedCallback :: AppChooserWidgetApplicationActivatedCallbackC -> IO (FunPtr AppChooserWidgetApplicationActivatedCallbackC)

appChooserWidgetApplicationActivatedClosure :: AppChooserWidgetApplicationActivatedCallback -> IO Closure
appChooserWidgetApplicationActivatedClosure cb = newCClosure =<< mkAppChooserWidgetApplicationActivatedCallback wrapped
    where wrapped = appChooserWidgetApplicationActivatedCallbackWrapper cb

appChooserWidgetApplicationActivatedCallbackWrapper ::
    AppChooserWidgetApplicationActivatedCallback ->
    Ptr () ->
    Ptr Gio.AppInfo ->
    Ptr () ->
    IO ()
appChooserWidgetApplicationActivatedCallbackWrapper _cb _ application _ = do
    application' <- (newObject Gio.AppInfo) application
    _cb  application'

onAppChooserWidgetApplicationActivated :: (GObject a, MonadIO m) => a -> AppChooserWidgetApplicationActivatedCallback -> m SignalHandlerId
onAppChooserWidgetApplicationActivated obj cb = liftIO $ connectAppChooserWidgetApplicationActivated obj cb SignalConnectBefore
afterAppChooserWidgetApplicationActivated :: (GObject a, MonadIO m) => a -> AppChooserWidgetApplicationActivatedCallback -> m SignalHandlerId
afterAppChooserWidgetApplicationActivated obj cb = connectAppChooserWidgetApplicationActivated obj cb SignalConnectAfter

connectAppChooserWidgetApplicationActivated :: (GObject a, MonadIO m) =>
                                               a -> AppChooserWidgetApplicationActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectAppChooserWidgetApplicationActivated obj cb after = liftIO $ do
    cb' <- mkAppChooserWidgetApplicationActivatedCallback (appChooserWidgetApplicationActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "application-activated" cb' after

-- signal AppChooserWidget::application-selected
type AppChooserWidgetApplicationSelectedCallback =
    Gio.AppInfo ->
    IO ()

noAppChooserWidgetApplicationSelectedCallback :: Maybe AppChooserWidgetApplicationSelectedCallback
noAppChooserWidgetApplicationSelectedCallback = Nothing

type AppChooserWidgetApplicationSelectedCallbackC =
    Ptr () ->                               -- object
    Ptr Gio.AppInfo ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAppChooserWidgetApplicationSelectedCallback :: AppChooserWidgetApplicationSelectedCallbackC -> IO (FunPtr AppChooserWidgetApplicationSelectedCallbackC)

appChooserWidgetApplicationSelectedClosure :: AppChooserWidgetApplicationSelectedCallback -> IO Closure
appChooserWidgetApplicationSelectedClosure cb = newCClosure =<< mkAppChooserWidgetApplicationSelectedCallback wrapped
    where wrapped = appChooserWidgetApplicationSelectedCallbackWrapper cb

appChooserWidgetApplicationSelectedCallbackWrapper ::
    AppChooserWidgetApplicationSelectedCallback ->
    Ptr () ->
    Ptr Gio.AppInfo ->
    Ptr () ->
    IO ()
appChooserWidgetApplicationSelectedCallbackWrapper _cb _ application _ = do
    application' <- (newObject Gio.AppInfo) application
    _cb  application'

onAppChooserWidgetApplicationSelected :: (GObject a, MonadIO m) => a -> AppChooserWidgetApplicationSelectedCallback -> m SignalHandlerId
onAppChooserWidgetApplicationSelected obj cb = liftIO $ connectAppChooserWidgetApplicationSelected obj cb SignalConnectBefore
afterAppChooserWidgetApplicationSelected :: (GObject a, MonadIO m) => a -> AppChooserWidgetApplicationSelectedCallback -> m SignalHandlerId
afterAppChooserWidgetApplicationSelected obj cb = connectAppChooserWidgetApplicationSelected obj cb SignalConnectAfter

connectAppChooserWidgetApplicationSelected :: (GObject a, MonadIO m) =>
                                              a -> AppChooserWidgetApplicationSelectedCallback -> SignalConnectMode -> m SignalHandlerId
connectAppChooserWidgetApplicationSelected obj cb after = liftIO $ do
    cb' <- mkAppChooserWidgetApplicationSelectedCallback (appChooserWidgetApplicationSelectedCallbackWrapper cb)
    connectSignalFunPtr obj "application-selected" cb' after

-- signal AppChooserWidget::populate-popup
type AppChooserWidgetPopulatePopupCallback =
    Menu ->
    Gio.AppInfo ->
    IO ()

noAppChooserWidgetPopulatePopupCallback :: Maybe AppChooserWidgetPopulatePopupCallback
noAppChooserWidgetPopulatePopupCallback = Nothing

type AppChooserWidgetPopulatePopupCallbackC =
    Ptr () ->                               -- object
    Ptr Menu ->
    Ptr Gio.AppInfo ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAppChooserWidgetPopulatePopupCallback :: AppChooserWidgetPopulatePopupCallbackC -> IO (FunPtr AppChooserWidgetPopulatePopupCallbackC)

appChooserWidgetPopulatePopupClosure :: AppChooserWidgetPopulatePopupCallback -> IO Closure
appChooserWidgetPopulatePopupClosure cb = newCClosure =<< mkAppChooserWidgetPopulatePopupCallback wrapped
    where wrapped = appChooserWidgetPopulatePopupCallbackWrapper cb

appChooserWidgetPopulatePopupCallbackWrapper ::
    AppChooserWidgetPopulatePopupCallback ->
    Ptr () ->
    Ptr Menu ->
    Ptr Gio.AppInfo ->
    Ptr () ->
    IO ()
appChooserWidgetPopulatePopupCallbackWrapper _cb _ menu application _ = do
    menu' <- (newObject Menu) menu
    application' <- (newObject Gio.AppInfo) application
    _cb  menu' application'

onAppChooserWidgetPopulatePopup :: (GObject a, MonadIO m) => a -> AppChooserWidgetPopulatePopupCallback -> m SignalHandlerId
onAppChooserWidgetPopulatePopup obj cb = liftIO $ connectAppChooserWidgetPopulatePopup obj cb SignalConnectBefore
afterAppChooserWidgetPopulatePopup :: (GObject a, MonadIO m) => a -> AppChooserWidgetPopulatePopupCallback -> m SignalHandlerId
afterAppChooserWidgetPopulatePopup obj cb = connectAppChooserWidgetPopulatePopup obj cb SignalConnectAfter

connectAppChooserWidgetPopulatePopup :: (GObject a, MonadIO m) =>
                                        a -> AppChooserWidgetPopulatePopupCallback -> SignalConnectMode -> m SignalHandlerId
connectAppChooserWidgetPopulatePopup obj cb after = liftIO $ do
    cb' <- mkAppChooserWidgetPopulatePopupCallback (appChooserWidgetPopulatePopupCallbackWrapper cb)
    connectSignalFunPtr obj "populate-popup" cb' after

-- object Application 
newtype Application = Application (ForeignPtr Application)
noApplication :: Maybe Application
noApplication = Nothing

foreign import ccall "gtk_application_get_type"
    c_gtk_application_get_type :: IO GType

type instance ParentTypes Application = '[Gio.Application, GObject.Object, Gio.ActionGroup, Gio.ActionMap]

instance GObject Application where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_application_get_type
    

class GObject o => ApplicationK o
instance (GObject o, IsDescendantOf Application o) => ApplicationK o

toApplication :: ApplicationK o => o -> IO Application
toApplication = unsafeCastTo Application

-- method Application::new
-- method type : Constructor
-- Args : [Arg {argName = "application_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "ApplicationFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "application_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "ApplicationFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Application"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_new" gtk_application_new :: 
    CString ->                              -- application_id : TBasicType TUTF8
    CUInt ->                                -- flags : TInterface "Gio" "ApplicationFlags"
    IO (Ptr Application)


applicationNew ::
    (MonadIO m) =>
    Maybe (T.Text) ->                       -- application_id
    [Gio.ApplicationFlags] ->               -- flags
    m Application
applicationNew application_id flags = liftIO $ do
    maybeApplication_id <- case application_id of
        Nothing -> return nullPtr
        Just jApplication_id -> do
            jApplication_id' <- textToCString jApplication_id
            return jApplication_id'
    let flags' = gflagsToWord flags
    result <- gtk_application_new maybeApplication_id flags'
    checkUnexpectedReturnNULL "gtk_application_new" result
    result' <- (wrapObject Application) result
    freeMem maybeApplication_id
    return result'

-- method Application::add_accelerator
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameter", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameter", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_add_accelerator" gtk_application_add_accelerator :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    CString ->                              -- accelerator : TBasicType TUTF8
    CString ->                              -- action_name : TBasicType TUTF8
    Ptr GVariant ->                         -- parameter : TVariant
    IO ()

{-# DEPRECATED applicationAddAccelerator ["(Since version 3.14)","Use gtk_application_set_accels_for_action() instead"]#-}
applicationAddAccelerator ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- accelerator
    T.Text ->                               -- action_name
    Maybe (GVariant) ->                     -- parameter
    m ()
applicationAddAccelerator _obj accelerator action_name parameter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    accelerator' <- textToCString accelerator
    action_name' <- textToCString action_name
    maybeParameter <- case parameter of
        Nothing -> return nullPtr
        Just jParameter -> do
            let jParameter' = unsafeManagedPtrGetPtr jParameter
            return jParameter'
    gtk_application_add_accelerator _obj' accelerator' action_name' maybeParameter
    touchManagedPtr _obj
    freeMem accelerator'
    freeMem action_name'
    return ()

-- method Application::add_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_add_window" gtk_application_add_window :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    Ptr Window ->                           -- window : TInterface "Gtk" "Window"
    IO ()


applicationAddWindow ::
    (MonadIO m, ApplicationK a, WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    m ()
applicationAddWindow _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window' = unsafeManagedPtrCastPtr window
    gtk_application_add_window _obj' window'
    touchManagedPtr _obj
    touchManagedPtr window
    return ()

-- method Application::get_accels_for_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detailed_action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detailed_action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_get_accels_for_action" gtk_application_get_accels_for_action :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    CString ->                              -- detailed_action_name : TBasicType TUTF8
    IO (Ptr CString)


applicationGetAccelsForAction ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- detailed_action_name
    m [T.Text]
applicationGetAccelsForAction _obj detailed_action_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    detailed_action_name' <- textToCString detailed_action_name
    result <- gtk_application_get_accels_for_action _obj' detailed_action_name'
    checkUnexpectedReturnNULL "gtk_application_get_accels_for_action" result
    result' <- unpackZeroTerminatedUTF8CArray result
    mapZeroTerminatedCArray freeMem result
    freeMem result
    touchManagedPtr _obj
    freeMem detailed_action_name'
    return result'

-- method Application::get_actions_for_accel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_get_actions_for_accel" gtk_application_get_actions_for_accel :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    CString ->                              -- accel : TBasicType TUTF8
    IO (Ptr CString)


applicationGetActionsForAccel ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- accel
    m [T.Text]
applicationGetActionsForAccel _obj accel = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    accel' <- textToCString accel
    result <- gtk_application_get_actions_for_accel _obj' accel'
    checkUnexpectedReturnNULL "gtk_application_get_actions_for_accel" result
    result' <- unpackZeroTerminatedUTF8CArray result
    mapZeroTerminatedCArray freeMem result
    freeMem result
    touchManagedPtr _obj
    freeMem accel'
    return result'

-- method Application::get_active_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_get_active_window" gtk_application_get_active_window :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    IO (Ptr Window)


applicationGetActiveWindow ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    m Window
applicationGetActiveWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_application_get_active_window _obj'
    checkUnexpectedReturnNULL "gtk_application_get_active_window" result
    result' <- (newObject Window) result
    touchManagedPtr _obj
    return result'

-- method Application::get_app_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "MenuModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_get_app_menu" gtk_application_get_app_menu :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    IO (Ptr Gio.MenuModel)


applicationGetAppMenu ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    m Gio.MenuModel
applicationGetAppMenu _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_application_get_app_menu _obj'
    checkUnexpectedReturnNULL "gtk_application_get_app_menu" result
    result' <- (newObject Gio.MenuModel) result
    touchManagedPtr _obj
    return result'

-- method Application::get_menu_by_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Menu"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_get_menu_by_id" gtk_application_get_menu_by_id :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    CString ->                              -- id : TBasicType TUTF8
    IO (Ptr Gio.Menu)


applicationGetMenuById ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- id
    m Gio.Menu
applicationGetMenuById _obj id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    id' <- textToCString id
    result <- gtk_application_get_menu_by_id _obj' id'
    checkUnexpectedReturnNULL "gtk_application_get_menu_by_id" result
    result' <- (newObject Gio.Menu) result
    touchManagedPtr _obj
    freeMem id'
    return result'

-- method Application::get_menubar
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "MenuModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_get_menubar" gtk_application_get_menubar :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    IO (Ptr Gio.MenuModel)


applicationGetMenubar ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    m Gio.MenuModel
applicationGetMenubar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_application_get_menubar _obj'
    checkUnexpectedReturnNULL "gtk_application_get_menubar" result
    result' <- (newObject Gio.MenuModel) result
    touchManagedPtr _obj
    return result'

-- method Application::get_window_by_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_get_window_by_id" gtk_application_get_window_by_id :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    Word32 ->                               -- id : TBasicType TUInt32
    IO (Ptr Window)


applicationGetWindowById ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- id
    m Window
applicationGetWindowById _obj id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_application_get_window_by_id _obj' id
    checkUnexpectedReturnNULL "gtk_application_get_window_by_id" result
    result' <- (newObject Window) result
    touchManagedPtr _obj
    return result'

-- method Application::get_windows
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "Window")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_get_windows" gtk_application_get_windows :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    IO (Ptr (GList (Ptr Window)))


applicationGetWindows ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    m [Window]
applicationGetWindows _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_application_get_windows _obj'
    checkUnexpectedReturnNULL "gtk_application_get_windows" result
    result' <- unpackGList result
    result'' <- mapM (newObject Window) result'
    touchManagedPtr _obj
    return result''

-- method Application::inhibit
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "ApplicationInhibitFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reason", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "ApplicationInhibitFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reason", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_inhibit" gtk_application_inhibit :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    Ptr Window ->                           -- window : TInterface "Gtk" "Window"
    CUInt ->                                -- flags : TInterface "Gtk" "ApplicationInhibitFlags"
    CString ->                              -- reason : TBasicType TUTF8
    IO Word32


applicationInhibit ::
    (MonadIO m, ApplicationK a, WindowK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- window
    [ApplicationInhibitFlags] ->            -- flags
    Maybe (T.Text) ->                       -- reason
    m Word32
applicationInhibit _obj window flags reason = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeWindow <- case window of
        Nothing -> return nullPtr
        Just jWindow -> do
            let jWindow' = unsafeManagedPtrCastPtr jWindow
            return jWindow'
    let flags' = gflagsToWord flags
    maybeReason <- case reason of
        Nothing -> return nullPtr
        Just jReason -> do
            jReason' <- textToCString jReason
            return jReason'
    result <- gtk_application_inhibit _obj' maybeWindow flags' maybeReason
    touchManagedPtr _obj
    whenJust window touchManagedPtr
    freeMem maybeReason
    return result

-- method Application::is_inhibited
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "ApplicationInhibitFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "ApplicationInhibitFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_is_inhibited" gtk_application_is_inhibited :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    CUInt ->                                -- flags : TInterface "Gtk" "ApplicationInhibitFlags"
    IO CInt


applicationIsInhibited ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    [ApplicationInhibitFlags] ->            -- flags
    m Bool
applicationIsInhibited _obj flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let flags' = gflagsToWord flags
    result <- gtk_application_is_inhibited _obj' flags'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Application::list_action_descriptions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_list_action_descriptions" gtk_application_list_action_descriptions :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    IO (Ptr CString)


applicationListActionDescriptions ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    m [T.Text]
applicationListActionDescriptions _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_application_list_action_descriptions _obj'
    checkUnexpectedReturnNULL "gtk_application_list_action_descriptions" result
    result' <- unpackZeroTerminatedUTF8CArray result
    mapZeroTerminatedCArray freeMem result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Application::prefers_app_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_prefers_app_menu" gtk_application_prefers_app_menu :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    IO CInt


applicationPrefersAppMenu ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    m Bool
applicationPrefersAppMenu _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_application_prefers_app_menu _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Application::remove_accelerator
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameter", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameter", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_remove_accelerator" gtk_application_remove_accelerator :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    CString ->                              -- action_name : TBasicType TUTF8
    Ptr GVariant ->                         -- parameter : TVariant
    IO ()

{-# DEPRECATED applicationRemoveAccelerator ["(Since version 3.14)","Use gtk_application_set_accels_for_action() instead"]#-}
applicationRemoveAccelerator ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- action_name
    Maybe (GVariant) ->                     -- parameter
    m ()
applicationRemoveAccelerator _obj action_name parameter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    action_name' <- textToCString action_name
    maybeParameter <- case parameter of
        Nothing -> return nullPtr
        Just jParameter -> do
            let jParameter' = unsafeManagedPtrGetPtr jParameter
            return jParameter'
    gtk_application_remove_accelerator _obj' action_name' maybeParameter
    touchManagedPtr _obj
    freeMem action_name'
    return ()

-- method Application::remove_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_remove_window" gtk_application_remove_window :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    Ptr Window ->                           -- window : TInterface "Gtk" "Window"
    IO ()


applicationRemoveWindow ::
    (MonadIO m, ApplicationK a, WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    m ()
applicationRemoveWindow _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window' = unsafeManagedPtrCastPtr window
    gtk_application_remove_window _obj' window'
    touchManagedPtr _obj
    touchManagedPtr window
    return ()

-- method Application::set_accels_for_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detailed_action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accels", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detailed_action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accels", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_set_accels_for_action" gtk_application_set_accels_for_action :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    CString ->                              -- detailed_action_name : TBasicType TUTF8
    Ptr CString ->                          -- accels : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()


applicationSetAccelsForAction ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- detailed_action_name
    [T.Text] ->                             -- accels
    m ()
applicationSetAccelsForAction _obj detailed_action_name accels = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    detailed_action_name' <- textToCString detailed_action_name
    accels' <- packZeroTerminatedUTF8CArray accels
    gtk_application_set_accels_for_action _obj' detailed_action_name' accels'
    touchManagedPtr _obj
    freeMem detailed_action_name'
    mapZeroTerminatedCArray freeMem accels'
    freeMem accels'
    return ()

-- method Application::set_app_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_menu", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_menu", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_set_app_menu" gtk_application_set_app_menu :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    Ptr Gio.MenuModel ->                    -- app_menu : TInterface "Gio" "MenuModel"
    IO ()


applicationSetAppMenu ::
    (MonadIO m, ApplicationK a, Gio.MenuModelK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- app_menu
    m ()
applicationSetAppMenu _obj app_menu = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeApp_menu <- case app_menu of
        Nothing -> return nullPtr
        Just jApp_menu -> do
            let jApp_menu' = unsafeManagedPtrCastPtr jApp_menu
            return jApp_menu'
    gtk_application_set_app_menu _obj' maybeApp_menu
    touchManagedPtr _obj
    whenJust app_menu touchManagedPtr
    return ()

-- method Application::set_menubar
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menubar", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menubar", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_set_menubar" gtk_application_set_menubar :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    Ptr Gio.MenuModel ->                    -- menubar : TInterface "Gio" "MenuModel"
    IO ()


applicationSetMenubar ::
    (MonadIO m, ApplicationK a, Gio.MenuModelK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- menubar
    m ()
applicationSetMenubar _obj menubar = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeMenubar <- case menubar of
        Nothing -> return nullPtr
        Just jMenubar -> do
            let jMenubar' = unsafeManagedPtrCastPtr jMenubar
            return jMenubar'
    gtk_application_set_menubar _obj' maybeMenubar
    touchManagedPtr _obj
    whenJust menubar touchManagedPtr
    return ()

-- method Application::uninhibit
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cookie", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cookie", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_uninhibit" gtk_application_uninhibit :: 
    Ptr Application ->                      -- _obj : TInterface "Gtk" "Application"
    Word32 ->                               -- cookie : TBasicType TUInt32
    IO ()


applicationUninhibit ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- cookie
    m ()
applicationUninhibit _obj cookie = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_application_uninhibit _obj' cookie
    touchManagedPtr _obj
    return ()

-- signal Application::window-added
type ApplicationWindowAddedCallback =
    Window ->
    IO ()

noApplicationWindowAddedCallback :: Maybe ApplicationWindowAddedCallback
noApplicationWindowAddedCallback = Nothing

type ApplicationWindowAddedCallbackC =
    Ptr () ->                               -- object
    Ptr Window ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkApplicationWindowAddedCallback :: ApplicationWindowAddedCallbackC -> IO (FunPtr ApplicationWindowAddedCallbackC)

applicationWindowAddedClosure :: ApplicationWindowAddedCallback -> IO Closure
applicationWindowAddedClosure cb = newCClosure =<< mkApplicationWindowAddedCallback wrapped
    where wrapped = applicationWindowAddedCallbackWrapper cb

applicationWindowAddedCallbackWrapper ::
    ApplicationWindowAddedCallback ->
    Ptr () ->
    Ptr Window ->
    Ptr () ->
    IO ()
applicationWindowAddedCallbackWrapper _cb _ window _ = do
    window' <- (newObject Window) window
    _cb  window'

onApplicationWindowAdded :: (GObject a, MonadIO m) => a -> ApplicationWindowAddedCallback -> m SignalHandlerId
onApplicationWindowAdded obj cb = liftIO $ connectApplicationWindowAdded obj cb SignalConnectBefore
afterApplicationWindowAdded :: (GObject a, MonadIO m) => a -> ApplicationWindowAddedCallback -> m SignalHandlerId
afterApplicationWindowAdded obj cb = connectApplicationWindowAdded obj cb SignalConnectAfter

connectApplicationWindowAdded :: (GObject a, MonadIO m) =>
                                 a -> ApplicationWindowAddedCallback -> SignalConnectMode -> m SignalHandlerId
connectApplicationWindowAdded obj cb after = liftIO $ do
    cb' <- mkApplicationWindowAddedCallback (applicationWindowAddedCallbackWrapper cb)
    connectSignalFunPtr obj "window-added" cb' after

-- signal Application::window-removed
type ApplicationWindowRemovedCallback =
    Window ->
    IO ()

noApplicationWindowRemovedCallback :: Maybe ApplicationWindowRemovedCallback
noApplicationWindowRemovedCallback = Nothing

type ApplicationWindowRemovedCallbackC =
    Ptr () ->                               -- object
    Ptr Window ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkApplicationWindowRemovedCallback :: ApplicationWindowRemovedCallbackC -> IO (FunPtr ApplicationWindowRemovedCallbackC)

applicationWindowRemovedClosure :: ApplicationWindowRemovedCallback -> IO Closure
applicationWindowRemovedClosure cb = newCClosure =<< mkApplicationWindowRemovedCallback wrapped
    where wrapped = applicationWindowRemovedCallbackWrapper cb

applicationWindowRemovedCallbackWrapper ::
    ApplicationWindowRemovedCallback ->
    Ptr () ->
    Ptr Window ->
    Ptr () ->
    IO ()
applicationWindowRemovedCallbackWrapper _cb _ window _ = do
    window' <- (newObject Window) window
    _cb  window'

onApplicationWindowRemoved :: (GObject a, MonadIO m) => a -> ApplicationWindowRemovedCallback -> m SignalHandlerId
onApplicationWindowRemoved obj cb = liftIO $ connectApplicationWindowRemoved obj cb SignalConnectBefore
afterApplicationWindowRemoved :: (GObject a, MonadIO m) => a -> ApplicationWindowRemovedCallback -> m SignalHandlerId
afterApplicationWindowRemoved obj cb = connectApplicationWindowRemoved obj cb SignalConnectAfter

connectApplicationWindowRemoved :: (GObject a, MonadIO m) =>
                                   a -> ApplicationWindowRemovedCallback -> SignalConnectMode -> m SignalHandlerId
connectApplicationWindowRemoved obj cb after = liftIO $ do
    cb' <- mkApplicationWindowRemovedCallback (applicationWindowRemovedCallbackWrapper cb)
    connectSignalFunPtr obj "window-removed" cb' after

-- Flags ApplicationInhibitFlags

data ApplicationInhibitFlags = 
      ApplicationInhibitFlagsLogout
    | ApplicationInhibitFlagsSwitch
    | ApplicationInhibitFlagsSuspend
    | ApplicationInhibitFlagsIdle
    | AnotherApplicationInhibitFlags Int
    deriving (Show, Eq)

instance Enum ApplicationInhibitFlags where
    fromEnum ApplicationInhibitFlagsLogout = 1
    fromEnum ApplicationInhibitFlagsSwitch = 2
    fromEnum ApplicationInhibitFlagsSuspend = 4
    fromEnum ApplicationInhibitFlagsIdle = 8
    fromEnum (AnotherApplicationInhibitFlags k) = k

    toEnum 1 = ApplicationInhibitFlagsLogout
    toEnum 2 = ApplicationInhibitFlagsSwitch
    toEnum 4 = ApplicationInhibitFlagsSuspend
    toEnum 8 = ApplicationInhibitFlagsIdle
    toEnum k = AnotherApplicationInhibitFlags k

foreign import ccall "gtk_application_inhibit_flags_get_type" c_gtk_application_inhibit_flags_get_type :: 
    IO GType

instance BoxedEnum ApplicationInhibitFlags where
    boxedEnumType _ = c_gtk_application_inhibit_flags_get_type

instance IsGFlag ApplicationInhibitFlags

-- object ApplicationWindow 
newtype ApplicationWindow = ApplicationWindow (ForeignPtr ApplicationWindow)
noApplicationWindow :: Maybe ApplicationWindow
noApplicationWindow = Nothing

foreign import ccall "gtk_application_window_get_type"
    c_gtk_application_window_get_type :: IO GType

type instance ParentTypes ApplicationWindow = '[Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Gio.ActionGroup, Gio.ActionMap, Buildable]

instance GObject ApplicationWindow where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_application_window_get_type
    

class GObject o => ApplicationWindowK o
instance (GObject o, IsDescendantOf ApplicationWindow o) => ApplicationWindowK o

toApplicationWindow :: ApplicationWindowK o => o -> IO ApplicationWindow
toApplicationWindow = unsafeCastTo ApplicationWindow

-- method ApplicationWindow::new
-- method type : Constructor
-- Args : [Arg {argName = "application", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "application", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ApplicationWindow"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_window_new" gtk_application_window_new :: 
    Ptr Application ->                      -- application : TInterface "Gtk" "Application"
    IO (Ptr ApplicationWindow)


applicationWindowNew ::
    (MonadIO m, ApplicationK a) =>
    a ->                                    -- application
    m ApplicationWindow
applicationWindowNew application = liftIO $ do
    let application' = unsafeManagedPtrCastPtr application
    result <- gtk_application_window_new application'
    checkUnexpectedReturnNULL "gtk_application_window_new" result
    result' <- (newObject ApplicationWindow) result
    touchManagedPtr application
    return result'

-- method ApplicationWindow::get_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ApplicationWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ApplicationWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_window_get_id" gtk_application_window_get_id :: 
    Ptr ApplicationWindow ->                -- _obj : TInterface "Gtk" "ApplicationWindow"
    IO Word32


applicationWindowGetId ::
    (MonadIO m, ApplicationWindowK a) =>
    a ->                                    -- _obj
    m Word32
applicationWindowGetId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_application_window_get_id _obj'
    touchManagedPtr _obj
    return result

-- method ApplicationWindow::get_show_menubar
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ApplicationWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ApplicationWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_window_get_show_menubar" gtk_application_window_get_show_menubar :: 
    Ptr ApplicationWindow ->                -- _obj : TInterface "Gtk" "ApplicationWindow"
    IO CInt


applicationWindowGetShowMenubar ::
    (MonadIO m, ApplicationWindowK a) =>
    a ->                                    -- _obj
    m Bool
applicationWindowGetShowMenubar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_application_window_get_show_menubar _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ApplicationWindow::set_show_menubar
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ApplicationWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_menubar", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ApplicationWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_menubar", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_application_window_set_show_menubar" gtk_application_window_set_show_menubar :: 
    Ptr ApplicationWindow ->                -- _obj : TInterface "Gtk" "ApplicationWindow"
    CInt ->                                 -- show_menubar : TBasicType TBoolean
    IO ()


applicationWindowSetShowMenubar ::
    (MonadIO m, ApplicationWindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_menubar
    m ()
applicationWindowSetShowMenubar _obj show_menubar = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_menubar' = (fromIntegral . fromEnum) show_menubar
    gtk_application_window_set_show_menubar _obj' show_menubar'
    touchManagedPtr _obj
    return ()

-- object Arrow 
newtype Arrow = Arrow (ForeignPtr Arrow)
noArrow :: Maybe Arrow
noArrow = Nothing

foreign import ccall "gtk_arrow_get_type"
    c_gtk_arrow_get_type :: IO GType

type instance ParentTypes Arrow = '[Misc, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Arrow where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_arrow_get_type
    

class GObject o => ArrowK o
instance (GObject o, IsDescendantOf Arrow o) => ArrowK o

toArrow :: ArrowK o => o -> IO Arrow
toArrow = unsafeCastTo Arrow

-- method Arrow::new
-- method type : Constructor
-- Args : [Arg {argName = "arrow_type", argType = TInterface "Gtk" "ArrowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "arrow_type", argType = TInterface "Gtk" "ArrowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Arrow"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_arrow_new" gtk_arrow_new :: 
    CUInt ->                                -- arrow_type : TInterface "Gtk" "ArrowType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    IO (Ptr Arrow)

{-# DEPRECATED arrowNew ["(Since version 3.14)","Use a #GtkImage with a suitable icon."]#-}
arrowNew ::
    (MonadIO m) =>
    ArrowType ->                            -- arrow_type
    ShadowType ->                           -- shadow_type
    m Arrow
arrowNew arrow_type shadow_type = liftIO $ do
    let arrow_type' = (fromIntegral . fromEnum) arrow_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    result <- gtk_arrow_new arrow_type' shadow_type'
    checkUnexpectedReturnNULL "gtk_arrow_new" result
    result' <- (newObject Arrow) result
    return result'

-- method Arrow::set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Arrow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "arrow_type", argType = TInterface "Gtk" "ArrowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Arrow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "arrow_type", argType = TInterface "Gtk" "ArrowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_arrow_set" gtk_arrow_set :: 
    Ptr Arrow ->                            -- _obj : TInterface "Gtk" "Arrow"
    CUInt ->                                -- arrow_type : TInterface "Gtk" "ArrowType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    IO ()

{-# DEPRECATED arrowSet ["(Since version 3.14)","Use a #GtkImage with a suitable icon."]#-}
arrowSet ::
    (MonadIO m, ArrowK a) =>
    a ->                                    -- _obj
    ArrowType ->                            -- arrow_type
    ShadowType ->                           -- shadow_type
    m ()
arrowSet _obj arrow_type shadow_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let arrow_type' = (fromIntegral . fromEnum) arrow_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    gtk_arrow_set _obj' arrow_type' shadow_type'
    touchManagedPtr _obj
    return ()

-- object ArrowAccessible 
newtype ArrowAccessible = ArrowAccessible (ForeignPtr ArrowAccessible)
noArrowAccessible :: Maybe ArrowAccessible
noArrowAccessible = Nothing

foreign import ccall "gtk_arrow_accessible_get_type"
    c_gtk_arrow_accessible_get_type :: IO GType

type instance ParentTypes ArrowAccessible = '[WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Image]

instance GObject ArrowAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_arrow_accessible_get_type
    

class GObject o => ArrowAccessibleK o
instance (GObject o, IsDescendantOf ArrowAccessible o) => ArrowAccessibleK o

toArrowAccessible :: ArrowAccessibleK o => o -> IO ArrowAccessible
toArrowAccessible = unsafeCastTo ArrowAccessible

-- Enum ArrowPlacement

data ArrowPlacement = 
      ArrowPlacementBoth
    | ArrowPlacementStart
    | ArrowPlacementEnd
    | AnotherArrowPlacement Int
    deriving (Show, Eq)

instance Enum ArrowPlacement where
    fromEnum ArrowPlacementBoth = 0
    fromEnum ArrowPlacementStart = 1
    fromEnum ArrowPlacementEnd = 2
    fromEnum (AnotherArrowPlacement k) = k

    toEnum 0 = ArrowPlacementBoth
    toEnum 1 = ArrowPlacementStart
    toEnum 2 = ArrowPlacementEnd
    toEnum k = AnotherArrowPlacement k

foreign import ccall "gtk_arrow_placement_get_type" c_gtk_arrow_placement_get_type :: 
    IO GType

instance BoxedEnum ArrowPlacement where
    boxedEnumType _ = c_gtk_arrow_placement_get_type

-- Enum ArrowType

data ArrowType = 
      ArrowTypeUp
    | ArrowTypeDown
    | ArrowTypeLeft
    | ArrowTypeRight
    | ArrowTypeNone
    | AnotherArrowType Int
    deriving (Show, Eq)

instance Enum ArrowType where
    fromEnum ArrowTypeUp = 0
    fromEnum ArrowTypeDown = 1
    fromEnum ArrowTypeLeft = 2
    fromEnum ArrowTypeRight = 3
    fromEnum ArrowTypeNone = 4
    fromEnum (AnotherArrowType k) = k

    toEnum 0 = ArrowTypeUp
    toEnum 1 = ArrowTypeDown
    toEnum 2 = ArrowTypeLeft
    toEnum 3 = ArrowTypeRight
    toEnum 4 = ArrowTypeNone
    toEnum k = AnotherArrowType k

foreign import ccall "gtk_arrow_type_get_type" c_gtk_arrow_type_get_type :: 
    IO GType

instance BoxedEnum ArrowType where
    boxedEnumType _ = c_gtk_arrow_type_get_type

-- object AspectFrame 
newtype AspectFrame = AspectFrame (ForeignPtr AspectFrame)
noAspectFrame :: Maybe AspectFrame
noAspectFrame = Nothing

foreign import ccall "gtk_aspect_frame_get_type"
    c_gtk_aspect_frame_get_type :: IO GType

type instance ParentTypes AspectFrame = '[Frame, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject AspectFrame where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_aspect_frame_get_type
    

class GObject o => AspectFrameK o
instance (GObject o, IsDescendantOf AspectFrame o) => AspectFrameK o

toAspectFrame :: AspectFrameK o => o -> IO AspectFrame
toAspectFrame = unsafeCastTo AspectFrame

-- method AspectFrame::new
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ratio", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "obey_child", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ratio", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "obey_child", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AspectFrame"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_aspect_frame_new" gtk_aspect_frame_new :: 
    CString ->                              -- label : TBasicType TUTF8
    CFloat ->                               -- xalign : TBasicType TFloat
    CFloat ->                               -- yalign : TBasicType TFloat
    CFloat ->                               -- ratio : TBasicType TFloat
    CInt ->                                 -- obey_child : TBasicType TBoolean
    IO (Ptr AspectFrame)


aspectFrameNew ::
    (MonadIO m) =>
    Maybe (T.Text) ->                       -- label
    Float ->                                -- xalign
    Float ->                                -- yalign
    Float ->                                -- ratio
    Bool ->                                 -- obey_child
    m AspectFrame
aspectFrameNew label xalign yalign ratio obey_child = liftIO $ do
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    let xalign' = realToFrac xalign
    let yalign' = realToFrac yalign
    let ratio' = realToFrac ratio
    let obey_child' = (fromIntegral . fromEnum) obey_child
    result <- gtk_aspect_frame_new maybeLabel xalign' yalign' ratio' obey_child'
    checkUnexpectedReturnNULL "gtk_aspect_frame_new" result
    result' <- (newObject AspectFrame) result
    freeMem maybeLabel
    return result'

-- method AspectFrame::set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "AspectFrame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ratio", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "obey_child", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "AspectFrame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ratio", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "obey_child", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_aspect_frame_set" gtk_aspect_frame_set :: 
    Ptr AspectFrame ->                      -- _obj : TInterface "Gtk" "AspectFrame"
    CFloat ->                               -- xalign : TBasicType TFloat
    CFloat ->                               -- yalign : TBasicType TFloat
    CFloat ->                               -- ratio : TBasicType TFloat
    CInt ->                                 -- obey_child : TBasicType TBoolean
    IO ()


aspectFrameSet ::
    (MonadIO m, AspectFrameK a) =>
    a ->                                    -- _obj
    Float ->                                -- xalign
    Float ->                                -- yalign
    Float ->                                -- ratio
    Bool ->                                 -- obey_child
    m ()
aspectFrameSet _obj xalign yalign ratio obey_child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let xalign' = realToFrac xalign
    let yalign' = realToFrac yalign
    let ratio' = realToFrac ratio
    let obey_child' = (fromIntegral . fromEnum) obey_child
    gtk_aspect_frame_set _obj' xalign' yalign' ratio' obey_child'
    touchManagedPtr _obj
    return ()

-- object Assistant 
newtype Assistant = Assistant (ForeignPtr Assistant)
noAssistant :: Maybe Assistant
noAssistant = Nothing

foreign import ccall "gtk_assistant_get_type"
    c_gtk_assistant_get_type :: IO GType

type instance ParentTypes Assistant = '[Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Assistant where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_assistant_get_type
    

class GObject o => AssistantK o
instance (GObject o, IsDescendantOf Assistant o) => AssistantK o

toAssistant :: AssistantK o => o -> IO Assistant
toAssistant = unsafeCastTo Assistant

-- method Assistant::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Assistant"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_new" gtk_assistant_new :: 
    IO (Ptr Assistant)


assistantNew ::
    (MonadIO m) =>
    m Assistant
assistantNew  = liftIO $ do
    result <- gtk_assistant_new
    checkUnexpectedReturnNULL "gtk_assistant_new" result
    result' <- (newObject Assistant) result
    return result'

-- method Assistant::add_action_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_add_action_widget" gtk_assistant_add_action_widget :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


assistantAddActionWidget ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
assistantAddActionWidget _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_assistant_add_action_widget _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Assistant::append_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_append_page" gtk_assistant_append_page :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    IO Int32


assistantAppendPage ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    m Int32
assistantAppendPage _obj page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    result <- gtk_assistant_append_page _obj' page'
    touchManagedPtr _obj
    touchManagedPtr page
    return result

-- method Assistant::commit
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_commit" gtk_assistant_commit :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    IO ()


assistantCommit ::
    (MonadIO m, AssistantK a) =>
    a ->                                    -- _obj
    m ()
assistantCommit _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_assistant_commit _obj'
    touchManagedPtr _obj
    return ()

-- method Assistant::get_current_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_get_current_page" gtk_assistant_get_current_page :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    IO Int32


assistantGetCurrentPage ::
    (MonadIO m, AssistantK a) =>
    a ->                                    -- _obj
    m Int32
assistantGetCurrentPage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_assistant_get_current_page _obj'
    touchManagedPtr _obj
    return result

-- method Assistant::get_n_pages
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_get_n_pages" gtk_assistant_get_n_pages :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    IO Int32


assistantGetNPages ::
    (MonadIO m, AssistantK a) =>
    a ->                                    -- _obj
    m Int32
assistantGetNPages _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_assistant_get_n_pages _obj'
    touchManagedPtr _obj
    return result

-- method Assistant::get_nth_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_get_nth_page" gtk_assistant_get_nth_page :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Int32 ->                                -- page_num : TBasicType TInt32
    IO (Ptr Widget)


assistantGetNthPage ::
    (MonadIO m, AssistantK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- page_num
    m Widget
assistantGetNthPage _obj page_num = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_assistant_get_nth_page _obj' page_num
    checkUnexpectedReturnNULL "gtk_assistant_get_nth_page" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Assistant::get_page_complete
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_get_page_complete" gtk_assistant_get_page_complete :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    IO CInt


assistantGetPageComplete ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    m Bool
assistantGetPageComplete _obj page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    result <- gtk_assistant_get_page_complete _obj' page'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr page
    return result'

-- method Assistant::get_page_has_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_get_page_has_padding" gtk_assistant_get_page_has_padding :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    IO CInt


assistantGetPageHasPadding ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    m Bool
assistantGetPageHasPadding _obj page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    result <- gtk_assistant_get_page_has_padding _obj' page'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr page
    return result'

-- method Assistant::get_page_header_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_get_page_header_image" gtk_assistant_get_page_header_image :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED assistantGetPageHeaderImage ["(Since version 3.2)","Since GTK+ 3.2, a header is no longer shown;","    add your header decoration to the page content instead."]#-}
assistantGetPageHeaderImage ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    m GdkPixbuf.Pixbuf
assistantGetPageHeaderImage _obj page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    result <- gtk_assistant_get_page_header_image _obj' page'
    checkUnexpectedReturnNULL "gtk_assistant_get_page_header_image" result
    result' <- (newObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    touchManagedPtr page
    return result'

-- method Assistant::get_page_side_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_get_page_side_image" gtk_assistant_get_page_side_image :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED assistantGetPageSideImage ["(Since version 3.2)","Since GTK+ 3.2, sidebar images are not","    shown anymore."]#-}
assistantGetPageSideImage ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    m GdkPixbuf.Pixbuf
assistantGetPageSideImage _obj page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    result <- gtk_assistant_get_page_side_image _obj' page'
    checkUnexpectedReturnNULL "gtk_assistant_get_page_side_image" result
    result' <- (newObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    touchManagedPtr page
    return result'

-- method Assistant::get_page_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_get_page_title" gtk_assistant_get_page_title :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    IO CString


assistantGetPageTitle ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    m T.Text
assistantGetPageTitle _obj page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    result <- gtk_assistant_get_page_title _obj' page'
    checkUnexpectedReturnNULL "gtk_assistant_get_page_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    touchManagedPtr page
    return result'

-- method Assistant::get_page_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AssistantPageType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_get_page_type" gtk_assistant_get_page_type :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    IO CUInt


assistantGetPageType ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    m AssistantPageType
assistantGetPageType _obj page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    result <- gtk_assistant_get_page_type _obj' page'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    touchManagedPtr page
    return result'

-- method Assistant::insert_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_insert_page" gtk_assistant_insert_page :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    Int32 ->                                -- position : TBasicType TInt32
    IO Int32


assistantInsertPage ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    Int32 ->                                -- position
    m Int32
assistantInsertPage _obj page position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    result <- gtk_assistant_insert_page _obj' page' position
    touchManagedPtr _obj
    touchManagedPtr page
    return result

-- method Assistant::next_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_next_page" gtk_assistant_next_page :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    IO ()


assistantNextPage ::
    (MonadIO m, AssistantK a) =>
    a ->                                    -- _obj
    m ()
assistantNextPage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_assistant_next_page _obj'
    touchManagedPtr _obj
    return ()

-- method Assistant::prepend_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_prepend_page" gtk_assistant_prepend_page :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    IO Int32


assistantPrependPage ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    m Int32
assistantPrependPage _obj page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    result <- gtk_assistant_prepend_page _obj' page'
    touchManagedPtr _obj
    touchManagedPtr page
    return result

-- method Assistant::previous_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_previous_page" gtk_assistant_previous_page :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    IO ()


assistantPreviousPage ::
    (MonadIO m, AssistantK a) =>
    a ->                                    -- _obj
    m ()
assistantPreviousPage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_assistant_previous_page _obj'
    touchManagedPtr _obj
    return ()

-- method Assistant::remove_action_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_remove_action_widget" gtk_assistant_remove_action_widget :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


assistantRemoveActionWidget ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
assistantRemoveActionWidget _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_assistant_remove_action_widget _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Assistant::remove_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_remove_page" gtk_assistant_remove_page :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Int32 ->                                -- page_num : TBasicType TInt32
    IO ()


assistantRemovePage ::
    (MonadIO m, AssistantK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- page_num
    m ()
assistantRemovePage _obj page_num = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_assistant_remove_page _obj' page_num
    touchManagedPtr _obj
    return ()

-- method Assistant::set_current_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_set_current_page" gtk_assistant_set_current_page :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Int32 ->                                -- page_num : TBasicType TInt32
    IO ()


assistantSetCurrentPage ::
    (MonadIO m, AssistantK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- page_num
    m ()
assistantSetCurrentPage _obj page_num = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_assistant_set_current_page _obj' page_num
    touchManagedPtr _obj
    return ()

-- method Assistant::set_forward_page_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_func", argType = TInterface "Gtk" "AssistantPageFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_func", argType = TInterface "Gtk" "AssistantPageFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_set_forward_page_func" gtk_assistant_set_forward_page_func :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    FunPtr AssistantPageFuncC ->            -- page_func : TInterface "Gtk" "AssistantPageFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


assistantSetForwardPageFunc ::
    (MonadIO m, AssistantK a) =>
    a ->                                    -- _obj
    Maybe (AssistantPageFunc) ->            -- page_func
    m ()
assistantSetForwardPageFunc _obj page_func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePage_func <- case page_func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jPage_func -> do
            jPage_func' <- mkAssistantPageFunc (assistantPageFuncWrapper Nothing jPage_func)
            return jPage_func'
    let data_ = castFunPtrToPtr maybePage_func
    let destroy = safeFreeFunPtrPtr
    gtk_assistant_set_forward_page_func _obj' maybePage_func data_ destroy
    touchManagedPtr _obj
    return ()

-- method Assistant::set_page_complete
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "complete", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "complete", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_set_page_complete" gtk_assistant_set_page_complete :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    CInt ->                                 -- complete : TBasicType TBoolean
    IO ()


assistantSetPageComplete ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    Bool ->                                 -- complete
    m ()
assistantSetPageComplete _obj page complete = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    let complete' = (fromIntegral . fromEnum) complete
    gtk_assistant_set_page_complete _obj' page' complete'
    touchManagedPtr _obj
    touchManagedPtr page
    return ()

-- method Assistant::set_page_has_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_padding", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_padding", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_set_page_has_padding" gtk_assistant_set_page_has_padding :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    CInt ->                                 -- has_padding : TBasicType TBoolean
    IO ()


assistantSetPageHasPadding ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    Bool ->                                 -- has_padding
    m ()
assistantSetPageHasPadding _obj page has_padding = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    let has_padding' = (fromIntegral . fromEnum) has_padding
    gtk_assistant_set_page_has_padding _obj' page' has_padding'
    touchManagedPtr _obj
    touchManagedPtr page
    return ()

-- method Assistant::set_page_header_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_set_page_header_image" gtk_assistant_set_page_header_image :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO ()

{-# DEPRECATED assistantSetPageHeaderImage ["(Since version 3.2)","Since GTK+ 3.2, a header is no longer shown;","    add your header decoration to the page content instead."]#-}
assistantSetPageHeaderImage ::
    (MonadIO m, AssistantK a, WidgetK b, GdkPixbuf.PixbufK c) =>
    a ->                                    -- _obj
    b ->                                    -- page
    Maybe (c) ->                            -- pixbuf
    m ()
assistantSetPageHeaderImage _obj page pixbuf = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    maybePixbuf <- case pixbuf of
        Nothing -> return nullPtr
        Just jPixbuf -> do
            let jPixbuf' = unsafeManagedPtrCastPtr jPixbuf
            return jPixbuf'
    gtk_assistant_set_page_header_image _obj' page' maybePixbuf
    touchManagedPtr _obj
    touchManagedPtr page
    whenJust pixbuf touchManagedPtr
    return ()

-- method Assistant::set_page_side_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_set_page_side_image" gtk_assistant_set_page_side_image :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO ()

{-# DEPRECATED assistantSetPageSideImage ["(Since version 3.2)","Since GTK+ 3.2, sidebar images are not","    shown anymore."]#-}
assistantSetPageSideImage ::
    (MonadIO m, AssistantK a, WidgetK b, GdkPixbuf.PixbufK c) =>
    a ->                                    -- _obj
    b ->                                    -- page
    Maybe (c) ->                            -- pixbuf
    m ()
assistantSetPageSideImage _obj page pixbuf = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    maybePixbuf <- case pixbuf of
        Nothing -> return nullPtr
        Just jPixbuf -> do
            let jPixbuf' = unsafeManagedPtrCastPtr jPixbuf
            return jPixbuf'
    gtk_assistant_set_page_side_image _obj' page' maybePixbuf
    touchManagedPtr _obj
    touchManagedPtr page
    whenJust pixbuf touchManagedPtr
    return ()

-- method Assistant::set_page_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_set_page_title" gtk_assistant_set_page_title :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    CString ->                              -- title : TBasicType TUTF8
    IO ()


assistantSetPageTitle ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    T.Text ->                               -- title
    m ()
assistantSetPageTitle _obj page title = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    title' <- textToCString title
    gtk_assistant_set_page_title _obj' page' title'
    touchManagedPtr _obj
    touchManagedPtr page
    freeMem title'
    return ()

-- method Assistant::set_page_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "AssistantPageType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "AssistantPageType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_set_page_type" gtk_assistant_set_page_type :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    Ptr Widget ->                           -- page : TInterface "Gtk" "Widget"
    CUInt ->                                -- type : TInterface "Gtk" "AssistantPageType"
    IO ()


assistantSetPageType ::
    (MonadIO m, AssistantK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- page
    AssistantPageType ->                    -- type
    m ()
assistantSetPageType _obj page type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page' = unsafeManagedPtrCastPtr page
    let type_' = (fromIntegral . fromEnum) type_
    gtk_assistant_set_page_type _obj' page' type_'
    touchManagedPtr _obj
    touchManagedPtr page
    return ()

-- method Assistant::update_buttons_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Assistant", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_assistant_update_buttons_state" gtk_assistant_update_buttons_state :: 
    Ptr Assistant ->                        -- _obj : TInterface "Gtk" "Assistant"
    IO ()


assistantUpdateButtonsState ::
    (MonadIO m, AssistantK a) =>
    a ->                                    -- _obj
    m ()
assistantUpdateButtonsState _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_assistant_update_buttons_state _obj'
    touchManagedPtr _obj
    return ()

-- signal Assistant::apply
type AssistantApplyCallback =
    IO ()

noAssistantApplyCallback :: Maybe AssistantApplyCallback
noAssistantApplyCallback = Nothing

type AssistantApplyCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAssistantApplyCallback :: AssistantApplyCallbackC -> IO (FunPtr AssistantApplyCallbackC)

assistantApplyClosure :: AssistantApplyCallback -> IO Closure
assistantApplyClosure cb = newCClosure =<< mkAssistantApplyCallback wrapped
    where wrapped = assistantApplyCallbackWrapper cb

assistantApplyCallbackWrapper ::
    AssistantApplyCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
assistantApplyCallbackWrapper _cb _ _ = do
    _cb 

onAssistantApply :: (GObject a, MonadIO m) => a -> AssistantApplyCallback -> m SignalHandlerId
onAssistantApply obj cb = liftIO $ connectAssistantApply obj cb SignalConnectBefore
afterAssistantApply :: (GObject a, MonadIO m) => a -> AssistantApplyCallback -> m SignalHandlerId
afterAssistantApply obj cb = connectAssistantApply obj cb SignalConnectAfter

connectAssistantApply :: (GObject a, MonadIO m) =>
                         a -> AssistantApplyCallback -> SignalConnectMode -> m SignalHandlerId
connectAssistantApply obj cb after = liftIO $ do
    cb' <- mkAssistantApplyCallback (assistantApplyCallbackWrapper cb)
    connectSignalFunPtr obj "apply" cb' after

-- signal Assistant::cancel
type AssistantCancelCallback =
    IO ()

noAssistantCancelCallback :: Maybe AssistantCancelCallback
noAssistantCancelCallback = Nothing

type AssistantCancelCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAssistantCancelCallback :: AssistantCancelCallbackC -> IO (FunPtr AssistantCancelCallbackC)

assistantCancelClosure :: AssistantCancelCallback -> IO Closure
assistantCancelClosure cb = newCClosure =<< mkAssistantCancelCallback wrapped
    where wrapped = assistantCancelCallbackWrapper cb

assistantCancelCallbackWrapper ::
    AssistantCancelCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
assistantCancelCallbackWrapper _cb _ _ = do
    _cb 

onAssistantCancel :: (GObject a, MonadIO m) => a -> AssistantCancelCallback -> m SignalHandlerId
onAssistantCancel obj cb = liftIO $ connectAssistantCancel obj cb SignalConnectBefore
afterAssistantCancel :: (GObject a, MonadIO m) => a -> AssistantCancelCallback -> m SignalHandlerId
afterAssistantCancel obj cb = connectAssistantCancel obj cb SignalConnectAfter

connectAssistantCancel :: (GObject a, MonadIO m) =>
                          a -> AssistantCancelCallback -> SignalConnectMode -> m SignalHandlerId
connectAssistantCancel obj cb after = liftIO $ do
    cb' <- mkAssistantCancelCallback (assistantCancelCallbackWrapper cb)
    connectSignalFunPtr obj "cancel" cb' after

-- signal Assistant::close
type AssistantCloseCallback =
    IO ()

noAssistantCloseCallback :: Maybe AssistantCloseCallback
noAssistantCloseCallback = Nothing

type AssistantCloseCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAssistantCloseCallback :: AssistantCloseCallbackC -> IO (FunPtr AssistantCloseCallbackC)

assistantCloseClosure :: AssistantCloseCallback -> IO Closure
assistantCloseClosure cb = newCClosure =<< mkAssistantCloseCallback wrapped
    where wrapped = assistantCloseCallbackWrapper cb

assistantCloseCallbackWrapper ::
    AssistantCloseCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
assistantCloseCallbackWrapper _cb _ _ = do
    _cb 

onAssistantClose :: (GObject a, MonadIO m) => a -> AssistantCloseCallback -> m SignalHandlerId
onAssistantClose obj cb = liftIO $ connectAssistantClose obj cb SignalConnectBefore
afterAssistantClose :: (GObject a, MonadIO m) => a -> AssistantCloseCallback -> m SignalHandlerId
afterAssistantClose obj cb = connectAssistantClose obj cb SignalConnectAfter

connectAssistantClose :: (GObject a, MonadIO m) =>
                         a -> AssistantCloseCallback -> SignalConnectMode -> m SignalHandlerId
connectAssistantClose obj cb after = liftIO $ do
    cb' <- mkAssistantCloseCallback (assistantCloseCallbackWrapper cb)
    connectSignalFunPtr obj "close" cb' after

-- signal Assistant::escape
type AssistantEscapeCallback =
    IO ()

noAssistantEscapeCallback :: Maybe AssistantEscapeCallback
noAssistantEscapeCallback = Nothing

type AssistantEscapeCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAssistantEscapeCallback :: AssistantEscapeCallbackC -> IO (FunPtr AssistantEscapeCallbackC)

assistantEscapeClosure :: AssistantEscapeCallback -> IO Closure
assistantEscapeClosure cb = newCClosure =<< mkAssistantEscapeCallback wrapped
    where wrapped = assistantEscapeCallbackWrapper cb

assistantEscapeCallbackWrapper ::
    AssistantEscapeCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
assistantEscapeCallbackWrapper _cb _ _ = do
    _cb 

onAssistantEscape :: (GObject a, MonadIO m) => a -> AssistantEscapeCallback -> m SignalHandlerId
onAssistantEscape obj cb = liftIO $ connectAssistantEscape obj cb SignalConnectBefore
afterAssistantEscape :: (GObject a, MonadIO m) => a -> AssistantEscapeCallback -> m SignalHandlerId
afterAssistantEscape obj cb = connectAssistantEscape obj cb SignalConnectAfter

connectAssistantEscape :: (GObject a, MonadIO m) =>
                          a -> AssistantEscapeCallback -> SignalConnectMode -> m SignalHandlerId
connectAssistantEscape obj cb after = liftIO $ do
    cb' <- mkAssistantEscapeCallback (assistantEscapeCallbackWrapper cb)
    connectSignalFunPtr obj "escape" cb' after

-- signal Assistant::prepare
type AssistantPrepareCallback =
    Widget ->
    IO ()

noAssistantPrepareCallback :: Maybe AssistantPrepareCallback
noAssistantPrepareCallback = Nothing

type AssistantPrepareCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAssistantPrepareCallback :: AssistantPrepareCallbackC -> IO (FunPtr AssistantPrepareCallbackC)

assistantPrepareClosure :: AssistantPrepareCallback -> IO Closure
assistantPrepareClosure cb = newCClosure =<< mkAssistantPrepareCallback wrapped
    where wrapped = assistantPrepareCallbackWrapper cb

assistantPrepareCallbackWrapper ::
    AssistantPrepareCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
assistantPrepareCallbackWrapper _cb _ page _ = do
    page' <- (newObject Widget) page
    _cb  page'

onAssistantPrepare :: (GObject a, MonadIO m) => a -> AssistantPrepareCallback -> m SignalHandlerId
onAssistantPrepare obj cb = liftIO $ connectAssistantPrepare obj cb SignalConnectBefore
afterAssistantPrepare :: (GObject a, MonadIO m) => a -> AssistantPrepareCallback -> m SignalHandlerId
afterAssistantPrepare obj cb = connectAssistantPrepare obj cb SignalConnectAfter

connectAssistantPrepare :: (GObject a, MonadIO m) =>
                           a -> AssistantPrepareCallback -> SignalConnectMode -> m SignalHandlerId
connectAssistantPrepare obj cb after = liftIO $ do
    cb' <- mkAssistantPrepareCallback (assistantPrepareCallbackWrapper cb)
    connectSignalFunPtr obj "prepare" cb' after

-- callback AssistantPageFunc
assistantPageFuncClosure :: AssistantPageFunc -> IO Closure
assistantPageFuncClosure cb = newCClosure =<< mkAssistantPageFunc wrapped
    where wrapped = assistantPageFuncWrapper Nothing cb

type AssistantPageFuncC =
    Int32 ->
    Ptr () ->
    IO Int32

foreign import ccall "wrapper"
    mkAssistantPageFunc :: AssistantPageFuncC -> IO (FunPtr AssistantPageFuncC)

type AssistantPageFunc =
    Int32 ->
    IO Int32

noAssistantPageFunc :: Maybe AssistantPageFunc
noAssistantPageFunc = Nothing

assistantPageFuncWrapper ::
    Maybe (Ptr (FunPtr (AssistantPageFuncC))) ->
    AssistantPageFunc ->
    Int32 ->
    Ptr () ->
    IO Int32
assistantPageFuncWrapper funptrptr _cb current_page _ = do
    result <- _cb  current_page
    maybeReleaseFunPtr funptrptr
    return result

-- Enum AssistantPageType

data AssistantPageType = 
      AssistantPageTypeContent
    | AssistantPageTypeIntro
    | AssistantPageTypeConfirm
    | AssistantPageTypeSummary
    | AssistantPageTypeProgress
    | AssistantPageTypeCustom
    | AnotherAssistantPageType Int
    deriving (Show, Eq)

instance Enum AssistantPageType where
    fromEnum AssistantPageTypeContent = 0
    fromEnum AssistantPageTypeIntro = 1
    fromEnum AssistantPageTypeConfirm = 2
    fromEnum AssistantPageTypeSummary = 3
    fromEnum AssistantPageTypeProgress = 4
    fromEnum AssistantPageTypeCustom = 5
    fromEnum (AnotherAssistantPageType k) = k

    toEnum 0 = AssistantPageTypeContent
    toEnum 1 = AssistantPageTypeIntro
    toEnum 2 = AssistantPageTypeConfirm
    toEnum 3 = AssistantPageTypeSummary
    toEnum 4 = AssistantPageTypeProgress
    toEnum 5 = AssistantPageTypeCustom
    toEnum k = AnotherAssistantPageType k

foreign import ccall "gtk_assistant_page_type_get_type" c_gtk_assistant_page_type_get_type :: 
    IO GType

instance BoxedEnum AssistantPageType where
    boxedEnumType _ = c_gtk_assistant_page_type_get_type

-- Flags AttachOptions

data AttachOptions = 
      AttachOptionsExpand
    | AttachOptionsShrink
    | AttachOptionsFill
    | AnotherAttachOptions Int
    deriving (Show, Eq)

instance Enum AttachOptions where
    fromEnum AttachOptionsExpand = 1
    fromEnum AttachOptionsShrink = 2
    fromEnum AttachOptionsFill = 4
    fromEnum (AnotherAttachOptions k) = k

    toEnum 1 = AttachOptionsExpand
    toEnum 2 = AttachOptionsShrink
    toEnum 4 = AttachOptionsFill
    toEnum k = AnotherAttachOptions k

foreign import ccall "gtk_attach_options_get_type" c_gtk_attach_options_get_type :: 
    IO GType

instance BoxedEnum AttachOptions where
    boxedEnumType _ = c_gtk_attach_options_get_type

instance IsGFlag AttachOptions

-- Enum BaselinePosition

data BaselinePosition = 
      BaselinePositionTop
    | BaselinePositionCenter
    | BaselinePositionBottom
    | AnotherBaselinePosition Int
    deriving (Show, Eq)

instance Enum BaselinePosition where
    fromEnum BaselinePositionTop = 0
    fromEnum BaselinePositionCenter = 1
    fromEnum BaselinePositionBottom = 2
    fromEnum (AnotherBaselinePosition k) = k

    toEnum 0 = BaselinePositionTop
    toEnum 1 = BaselinePositionCenter
    toEnum 2 = BaselinePositionBottom
    toEnum k = AnotherBaselinePosition k

foreign import ccall "gtk_baseline_position_get_type" c_gtk_baseline_position_get_type :: 
    IO GType

instance BoxedEnum BaselinePosition where
    boxedEnumType _ = c_gtk_baseline_position_get_type

-- object Bin 
newtype Bin = Bin (ForeignPtr Bin)
noBin :: Maybe Bin
noBin = Nothing

foreign import ccall "gtk_bin_get_type"
    c_gtk_bin_get_type :: IO GType

type instance ParentTypes Bin = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Bin where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_bin_get_type
    

class GObject o => BinK o
instance (GObject o, IsDescendantOf Bin o) => BinK o

toBin :: BinK o => o -> IO Bin
toBin = unsafeCastTo Bin

-- method Bin::get_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Bin", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Bin", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_bin_get_child" gtk_bin_get_child :: 
    Ptr Bin ->                              -- _obj : TInterface "Gtk" "Bin"
    IO (Ptr Widget)


binGetChild ::
    (MonadIO m, BinK a) =>
    a ->                                    -- _obj
    m Widget
binGetChild _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_bin_get_child _obj'
    checkUnexpectedReturnNULL "gtk_bin_get_child" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- struct BindingArg
newtype BindingArg = BindingArg (ForeignPtr BindingArg)
noBindingArg :: Maybe BindingArg
noBindingArg = Nothing

bindingArgReadArgType :: BindingArg -> IO GType
bindingArgReadArgType s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CGType
    let val' = GType val
    return val'

-- struct BindingEntry
newtype BindingEntry = BindingEntry (ForeignPtr BindingEntry)
noBindingEntry :: Maybe BindingEntry
noBindingEntry = Nothing

bindingEntryReadKeyval :: BindingEntry -> IO Word32
bindingEntryReadKeyval s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Word32
    return val

bindingEntryReadModifiers :: BindingEntry -> IO [Gdk.ModifierType]
bindingEntryReadModifiers s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO CUInt
    let val' = wordToGFlags val
    return val'

bindingEntryReadBindingSet :: BindingEntry -> IO BindingSet
bindingEntryReadBindingSet s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO (Ptr BindingSet)
    val' <- (newPtr 64 BindingSet) val
    return val'

bindingEntryReadDestroyed :: BindingEntry -> IO Word32
bindingEntryReadDestroyed s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO Word32
    return val

bindingEntryReadInEmission :: BindingEntry -> IO Word32
bindingEntryReadInEmission s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 20) :: IO Word32
    return val

bindingEntryReadMarksUnbound :: BindingEntry -> IO Word32
bindingEntryReadMarksUnbound s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO Word32
    return val

bindingEntryReadSetNext :: BindingEntry -> IO BindingEntry
bindingEntryReadSetNext s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO (Ptr BindingEntry)
    val' <- (newPtr 56 BindingEntry) val
    return val'

bindingEntryReadHashNext :: BindingEntry -> IO BindingEntry
bindingEntryReadHashNext s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 40) :: IO (Ptr BindingEntry)
    val' <- (newPtr 56 BindingEntry) val
    return val'

bindingEntryReadSignals :: BindingEntry -> IO BindingSignal
bindingEntryReadSignals s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 48) :: IO (Ptr BindingSignal)
    val' <- (newPtr 32 BindingSignal) val
    return val'

-- struct BindingSet
newtype BindingSet = BindingSet (ForeignPtr BindingSet)
noBindingSet :: Maybe BindingSet
noBindingSet = Nothing

bindingSetReadSetName :: BindingSet -> IO T.Text
bindingSetReadSetName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

bindingSetReadPriority :: BindingSet -> IO Int32
bindingSetReadPriority s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Int32
    return val

bindingSetReadWidgetPathPspecs :: BindingSet -> IO ([Ptr ()])
bindingSetReadWidgetPathPspecs s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO (Ptr (GSList (Ptr ())))
    val' <- unpackGSList val
    return val'

bindingSetReadWidgetClassPspecs :: BindingSet -> IO ([Ptr ()])
bindingSetReadWidgetClassPspecs s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO (Ptr (GSList (Ptr ())))
    val' <- unpackGSList val
    return val'

bindingSetReadClassBranchPspecs :: BindingSet -> IO ([Ptr ()])
bindingSetReadClassBranchPspecs s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO (Ptr (GSList (Ptr ())))
    val' <- unpackGSList val
    return val'

bindingSetReadEntries :: BindingSet -> IO BindingEntry
bindingSetReadEntries s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 40) :: IO (Ptr BindingEntry)
    val' <- (newPtr 56 BindingEntry) val
    return val'

bindingSetReadCurrent :: BindingSet -> IO BindingEntry
bindingSetReadCurrent s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 48) :: IO (Ptr BindingEntry)
    val' <- (newPtr 56 BindingEntry) val
    return val'

bindingSetReadParsed :: BindingSet -> IO Word32
bindingSetReadParsed s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 56) :: IO Word32
    return val

-- method BindingSet::activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_binding_set_activate" gtk_binding_set_activate :: 
    Ptr BindingSet ->                       -- _obj : TInterface "Gtk" "BindingSet"
    Word32 ->                               -- keyval : TBasicType TUInt32
    CUInt ->                                -- modifiers : TInterface "Gdk" "ModifierType"
    Ptr GObject.Object ->                   -- object : TInterface "GObject" "Object"
    IO CInt


bindingSetActivate ::
    (MonadIO m, GObject.ObjectK a) =>
    BindingSet ->                           -- _obj
    Word32 ->                               -- keyval
    [Gdk.ModifierType] ->                   -- modifiers
    a ->                                    -- object
    m Bool
bindingSetActivate _obj keyval modifiers object = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let modifiers' = gflagsToWord modifiers
    let object' = unsafeManagedPtrCastPtr object
    result <- gtk_binding_set_activate _obj' keyval modifiers' object'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr object
    return result'

-- method BindingSet::add_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path_type", argType = TInterface "Gtk" "PathType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path_pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TInterface "Gtk" "PathPriorityType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path_type", argType = TInterface "Gtk" "PathType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path_pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TInterface "Gtk" "PathPriorityType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_binding_set_add_path" gtk_binding_set_add_path :: 
    Ptr BindingSet ->                       -- _obj : TInterface "Gtk" "BindingSet"
    CUInt ->                                -- path_type : TInterface "Gtk" "PathType"
    CString ->                              -- path_pattern : TBasicType TUTF8
    CUInt ->                                -- priority : TInterface "Gtk" "PathPriorityType"
    IO ()

{-# DEPRECATED bindingSetAddPath ["(Since version 3.0)"]#-}
bindingSetAddPath ::
    (MonadIO m) =>
    BindingSet ->                           -- _obj
    PathType ->                             -- path_type
    T.Text ->                               -- path_pattern
    PathPriorityType ->                     -- priority
    m ()
bindingSetAddPath _obj path_type path_pattern priority = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let path_type' = (fromIntegral . fromEnum) path_type
    path_pattern' <- textToCString path_pattern
    let priority' = (fromIntegral . fromEnum) priority
    gtk_binding_set_add_path _obj' path_type' path_pattern' priority'
    touchManagedPtr _obj
    freeMem path_pattern'
    return ()

-- struct BindingSignal
newtype BindingSignal = BindingSignal (ForeignPtr BindingSignal)
noBindingSignal :: Maybe BindingSignal
noBindingSignal = Nothing

bindingSignalReadNext :: BindingSignal -> IO BindingSignal
bindingSignalReadNext s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO (Ptr BindingSignal)
    val' <- (newPtr 32 BindingSignal) val
    return val'

bindingSignalReadSignalName :: BindingSignal -> IO T.Text
bindingSignalReadSignalName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

bindingSignalReadNArgs :: BindingSignal -> IO Word32
bindingSignalReadNArgs s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO Word32
    return val

-- XXX Skipped getter for "BindingSignal:args" :: Not implemented: "Don't know how to unpack C array of type TCArray False (-1) 2 (TInterface \"Gtk\" \"BindingArg\")"

-- object BooleanCellAccessible 
newtype BooleanCellAccessible = BooleanCellAccessible (ForeignPtr BooleanCellAccessible)
noBooleanCellAccessible :: Maybe BooleanCellAccessible
noBooleanCellAccessible = Nothing

foreign import ccall "gtk_boolean_cell_accessible_get_type"
    c_gtk_boolean_cell_accessible_get_type :: IO GType

type instance ParentTypes BooleanCellAccessible = '[RendererCellAccessible, CellAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component]

instance GObject BooleanCellAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_boolean_cell_accessible_get_type
    

class GObject o => BooleanCellAccessibleK o
instance (GObject o, IsDescendantOf BooleanCellAccessible o) => BooleanCellAccessibleK o

toBooleanCellAccessible :: BooleanCellAccessibleK o => o -> IO BooleanCellAccessible
toBooleanCellAccessible = unsafeCastTo BooleanCellAccessible

-- struct Border
newtype Border = Border (ForeignPtr Border)
noBorder :: Maybe Border
noBorder = Nothing

foreign import ccall "gtk_border_get_type" c_gtk_border_get_type :: 
    IO GType

instance BoxedObject Border where
    boxedType _ = c_gtk_border_get_type

borderReadLeft :: Border -> IO Int16
borderReadLeft s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Int16
    return val

borderReadRight :: Border -> IO Int16
borderReadRight s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 2) :: IO Int16
    return val

borderReadTop :: Border -> IO Int16
borderReadTop s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO Int16
    return val

borderReadBottom :: Border -> IO Int16
borderReadBottom s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 6) :: IO Int16
    return val

-- method Border::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Border"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_border_new" gtk_border_new :: 
    IO (Ptr Border)


borderNew ::
    (MonadIO m) =>
    m Border
borderNew  = liftIO $ do
    result <- gtk_border_new
    checkUnexpectedReturnNULL "gtk_border_new" result
    result' <- (wrapBoxed Border) result
    return result'

-- method Border::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Border", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Border", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Border"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_border_copy" gtk_border_copy :: 
    Ptr Border ->                           -- _obj : TInterface "Gtk" "Border"
    IO (Ptr Border)


borderCopy ::
    (MonadIO m) =>
    Border ->                               -- _obj
    m Border
borderCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_border_copy _obj'
    checkUnexpectedReturnNULL "gtk_border_copy" result
    result' <- (wrapBoxed Border) result
    touchManagedPtr _obj
    return result'

-- method Border::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Border", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Border", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_border_free" gtk_border_free :: 
    Ptr Border ->                           -- _obj : TInterface "Gtk" "Border"
    IO ()


borderFree ::
    (MonadIO m) =>
    Border ->                               -- _obj
    m ()
borderFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_border_free _obj'
    touchManagedPtr _obj
    return ()

-- Enum BorderStyle

data BorderStyle = 
      BorderStyleNone
    | BorderStyleSolid
    | BorderStyleInset
    | BorderStyleOutset
    | BorderStyleHidden
    | BorderStyleDotted
    | BorderStyleDashed
    | BorderStyleDouble
    | BorderStyleGroove
    | BorderStyleRidge
    | AnotherBorderStyle Int
    deriving (Show, Eq)

instance Enum BorderStyle where
    fromEnum BorderStyleNone = 0
    fromEnum BorderStyleSolid = 1
    fromEnum BorderStyleInset = 2
    fromEnum BorderStyleOutset = 3
    fromEnum BorderStyleHidden = 4
    fromEnum BorderStyleDotted = 5
    fromEnum BorderStyleDashed = 6
    fromEnum BorderStyleDouble = 7
    fromEnum BorderStyleGroove = 8
    fromEnum BorderStyleRidge = 9
    fromEnum (AnotherBorderStyle k) = k

    toEnum 0 = BorderStyleNone
    toEnum 1 = BorderStyleSolid
    toEnum 2 = BorderStyleInset
    toEnum 3 = BorderStyleOutset
    toEnum 4 = BorderStyleHidden
    toEnum 5 = BorderStyleDotted
    toEnum 6 = BorderStyleDashed
    toEnum 7 = BorderStyleDouble
    toEnum 8 = BorderStyleGroove
    toEnum 9 = BorderStyleRidge
    toEnum k = AnotherBorderStyle k

foreign import ccall "gtk_border_style_get_type" c_gtk_border_style_get_type :: 
    IO GType

instance BoxedEnum BorderStyle where
    boxedEnumType _ = c_gtk_border_style_get_type

-- object Box 
newtype Box = Box (ForeignPtr Box)
noBox :: Maybe Box
noBox = Nothing

foreign import ccall "gtk_box_get_type"
    c_gtk_box_get_type :: IO GType

type instance ParentTypes Box = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject Box where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_box_get_type
    

class GObject o => BoxK o
instance (GObject o, IsDescendantOf Box o) => BoxK o

toBox :: BoxK o => o -> IO Box
toBox = unsafeCastTo Box

-- method Box::new
-- method type : Constructor
-- Args : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Box"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_new" gtk_box_new :: 
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    Int32 ->                                -- spacing : TBasicType TInt32
    IO (Ptr Box)


boxNew ::
    (MonadIO m) =>
    Orientation ->                          -- orientation
    Int32 ->                                -- spacing
    m Box
boxNew orientation spacing = liftIO $ do
    let orientation' = (fromIntegral . fromEnum) orientation
    result <- gtk_box_new orientation' spacing
    checkUnexpectedReturnNULL "gtk_box_new" result
    result' <- (newObject Box) result
    return result'

-- method Box::get_baseline_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "BaselinePosition"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_get_baseline_position" gtk_box_get_baseline_position :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    IO CUInt


boxGetBaselinePosition ::
    (MonadIO m, BoxK a) =>
    a ->                                    -- _obj
    m BaselinePosition
boxGetBaselinePosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_box_get_baseline_position _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Box::get_center_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_get_center_widget" gtk_box_get_center_widget :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    IO (Ptr Widget)


boxGetCenterWidget ::
    (MonadIO m, BoxK a) =>
    a ->                                    -- _obj
    m Widget
boxGetCenterWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_box_get_center_widget _obj'
    checkUnexpectedReturnNULL "gtk_box_get_center_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Box::get_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_get_homogeneous" gtk_box_get_homogeneous :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    IO CInt


boxGetHomogeneous ::
    (MonadIO m, BoxK a) =>
    a ->                                    -- _obj
    m Bool
boxGetHomogeneous _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_box_get_homogeneous _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Box::get_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_get_spacing" gtk_box_get_spacing :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    IO Int32


boxGetSpacing ::
    (MonadIO m, BoxK a) =>
    a ->                                    -- _obj
    m Int32
boxGetSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_box_get_spacing _obj'
    touchManagedPtr _obj
    return result

-- method Box::pack_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fill", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fill", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_pack_end" gtk_box_pack_end :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CInt ->                                 -- expand : TBasicType TBoolean
    CInt ->                                 -- fill : TBasicType TBoolean
    Word32 ->                               -- padding : TBasicType TUInt32
    IO ()


boxPackEnd ::
    (MonadIO m, BoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Bool ->                                 -- expand
    Bool ->                                 -- fill
    Word32 ->                               -- padding
    m ()
boxPackEnd _obj child expand fill padding = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let expand' = (fromIntegral . fromEnum) expand
    let fill' = (fromIntegral . fromEnum) fill
    gtk_box_pack_end _obj' child' expand' fill' padding
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Box::pack_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fill", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fill", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_pack_start" gtk_box_pack_start :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CInt ->                                 -- expand : TBasicType TBoolean
    CInt ->                                 -- fill : TBasicType TBoolean
    Word32 ->                               -- padding : TBasicType TUInt32
    IO ()


boxPackStart ::
    (MonadIO m, BoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Bool ->                                 -- expand
    Bool ->                                 -- fill
    Word32 ->                               -- padding
    m ()
boxPackStart _obj child expand fill padding = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let expand' = (fromIntegral . fromEnum) expand
    let fill' = (fromIntegral . fromEnum) fill
    gtk_box_pack_start _obj' child' expand' fill' padding
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Box::query_child_packing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "fill", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "padding", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "pack_type", argType = TInterface "Gtk" "PackType", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_query_child_packing" gtk_box_query_child_packing :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr CInt ->                             -- expand : TBasicType TBoolean
    Ptr CInt ->                             -- fill : TBasicType TBoolean
    Ptr Word32 ->                           -- padding : TBasicType TUInt32
    Ptr CUInt ->                            -- pack_type : TInterface "Gtk" "PackType"
    IO ()


boxQueryChildPacking ::
    (MonadIO m, BoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m (Bool,Bool,Word32,PackType)
boxQueryChildPacking _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    expand <- allocMem :: IO (Ptr CInt)
    fill <- allocMem :: IO (Ptr CInt)
    padding <- allocMem :: IO (Ptr Word32)
    pack_type <- allocMem :: IO (Ptr CUInt)
    gtk_box_query_child_packing _obj' child' expand fill padding pack_type
    expand' <- peek expand
    let expand'' = (/= 0) expand'
    fill' <- peek fill
    let fill'' = (/= 0) fill'
    padding' <- peek padding
    pack_type' <- peek pack_type
    let pack_type'' = (toEnum . fromIntegral) pack_type'
    touchManagedPtr _obj
    touchManagedPtr child
    freeMem expand
    freeMem fill
    freeMem padding
    freeMem pack_type
    return (expand'', fill'', padding', pack_type'')

-- method Box::reorder_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_reorder_child" gtk_box_reorder_child :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


boxReorderChild ::
    (MonadIO m, BoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Int32 ->                                -- position
    m ()
boxReorderChild _obj child position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_box_reorder_child _obj' child' position
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Box::set_baseline_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "BaselinePosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "BaselinePosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_set_baseline_position" gtk_box_set_baseline_position :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    CUInt ->                                -- position : TInterface "Gtk" "BaselinePosition"
    IO ()


boxSetBaselinePosition ::
    (MonadIO m, BoxK a) =>
    a ->                                    -- _obj
    BaselinePosition ->                     -- position
    m ()
boxSetBaselinePosition _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let position' = (fromIntegral . fromEnum) position
    gtk_box_set_baseline_position _obj' position'
    touchManagedPtr _obj
    return ()

-- method Box::set_center_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_set_center_widget" gtk_box_set_center_widget :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


boxSetCenterWidget ::
    (MonadIO m, BoxK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- widget
    m ()
boxSetCenterWidget _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    gtk_box_set_center_widget _obj' maybeWidget
    touchManagedPtr _obj
    whenJust widget touchManagedPtr
    return ()

-- method Box::set_child_packing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fill", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pack_type", argType = TInterface "Gtk" "PackType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fill", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pack_type", argType = TInterface "Gtk" "PackType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_set_child_packing" gtk_box_set_child_packing :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CInt ->                                 -- expand : TBasicType TBoolean
    CInt ->                                 -- fill : TBasicType TBoolean
    Word32 ->                               -- padding : TBasicType TUInt32
    CUInt ->                                -- pack_type : TInterface "Gtk" "PackType"
    IO ()


boxSetChildPacking ::
    (MonadIO m, BoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Bool ->                                 -- expand
    Bool ->                                 -- fill
    Word32 ->                               -- padding
    PackType ->                             -- pack_type
    m ()
boxSetChildPacking _obj child expand fill padding pack_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let expand' = (fromIntegral . fromEnum) expand
    let fill' = (fromIntegral . fromEnum) fill
    let pack_type' = (fromIntegral . fromEnum) pack_type
    gtk_box_set_child_packing _obj' child' expand' fill' padding pack_type'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Box::set_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_set_homogeneous" gtk_box_set_homogeneous :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    CInt ->                                 -- homogeneous : TBasicType TBoolean
    IO ()


boxSetHomogeneous ::
    (MonadIO m, BoxK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- homogeneous
    m ()
boxSetHomogeneous _obj homogeneous = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let homogeneous' = (fromIntegral . fromEnum) homogeneous
    gtk_box_set_homogeneous _obj' homogeneous'
    touchManagedPtr _obj
    return ()

-- method Box::set_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Box", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_box_set_spacing" gtk_box_set_spacing :: 
    Ptr Box ->                              -- _obj : TInterface "Gtk" "Box"
    Int32 ->                                -- spacing : TBasicType TInt32
    IO ()


boxSetSpacing ::
    (MonadIO m, BoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- spacing
    m ()
boxSetSpacing _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_box_set_spacing _obj' spacing
    touchManagedPtr _obj
    return ()

-- interface Buildable 

newtype Buildable = Buildable (ForeignPtr Buildable)
noBuildable :: Maybe Buildable
noBuildable = Nothing

foreign import ccall "gtk_buildable_get_type"
    c_gtk_buildable_get_type :: IO GType

type instance ParentTypes Buildable = '[GObject.Object]

instance GObject Buildable where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_buildable_get_type
    

class GObject o => BuildableK o
instance (GObject o, IsDescendantOf Buildable o) => BuildableK o

toBuildable :: BuildableK o => o -> IO Buildable
toBuildable = unsafeCastTo Buildable

-- method Buildable::add_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_buildable_add_child" gtk_buildable_add_child :: 
    Ptr Buildable ->                        -- _obj : TInterface "Gtk" "Buildable"
    Ptr Builder ->                          -- builder : TInterface "Gtk" "Builder"
    Ptr GObject.Object ->                   -- child : TInterface "GObject" "Object"
    CString ->                              -- type : TBasicType TUTF8
    IO ()


buildableAddChild ::
    (MonadIO m, BuildableK a, BuilderK b, GObject.ObjectK c) =>
    a ->                                    -- _obj
    b ->                                    -- builder
    c ->                                    -- child
    Maybe (T.Text) ->                       -- type
    m ()
buildableAddChild _obj builder child type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let builder' = unsafeManagedPtrCastPtr builder
    let child' = unsafeManagedPtrCastPtr child
    maybeType_ <- case type_ of
        Nothing -> return nullPtr
        Just jType_ -> do
            jType_' <- textToCString jType_
            return jType_'
    gtk_buildable_add_child _obj' builder' child' maybeType_
    touchManagedPtr _obj
    touchManagedPtr builder
    touchManagedPtr child
    freeMem maybeType_
    return ()

-- method Buildable::construct_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GObject" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_buildable_construct_child" gtk_buildable_construct_child :: 
    Ptr Buildable ->                        -- _obj : TInterface "Gtk" "Buildable"
    Ptr Builder ->                          -- builder : TInterface "Gtk" "Builder"
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GObject.Object)


buildableConstructChild ::
    (MonadIO m, BuildableK a, BuilderK b) =>
    a ->                                    -- _obj
    b ->                                    -- builder
    T.Text ->                               -- name
    m GObject.Object
buildableConstructChild _obj builder name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let builder' = unsafeManagedPtrCastPtr builder
    name' <- textToCString name
    result <- gtk_buildable_construct_child _obj' builder' name'
    checkUnexpectedReturnNULL "gtk_buildable_construct_child" result
    result' <- (wrapObject GObject.Object) result
    touchManagedPtr _obj
    touchManagedPtr builder
    freeMem name'
    return result'

-- method Buildable::custom_finished
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tagname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tagname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_buildable_custom_finished" gtk_buildable_custom_finished :: 
    Ptr Buildable ->                        -- _obj : TInterface "Gtk" "Buildable"
    Ptr Builder ->                          -- builder : TInterface "Gtk" "Builder"
    Ptr GObject.Object ->                   -- child : TInterface "GObject" "Object"
    CString ->                              -- tagname : TBasicType TUTF8
    Ptr () ->                               -- data : TBasicType TVoid
    IO ()


buildableCustomFinished ::
    (MonadIO m, BuildableK a, BuilderK b, GObject.ObjectK c) =>
    a ->                                    -- _obj
    b ->                                    -- builder
    Maybe (c) ->                            -- child
    T.Text ->                               -- tagname
    Ptr () ->                               -- data
    m ()
buildableCustomFinished _obj builder child tagname data_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let builder' = unsafeManagedPtrCastPtr builder
    maybeChild <- case child of
        Nothing -> return nullPtr
        Just jChild -> do
            let jChild' = unsafeManagedPtrCastPtr jChild
            return jChild'
    tagname' <- textToCString tagname
    gtk_buildable_custom_finished _obj' builder' maybeChild tagname' data_
    touchManagedPtr _obj
    touchManagedPtr builder
    whenJust child touchManagedPtr
    freeMem tagname'
    return ()

-- method Buildable::custom_tag_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tagname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tagname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_buildable_custom_tag_end" gtk_buildable_custom_tag_end :: 
    Ptr Buildable ->                        -- _obj : TInterface "Gtk" "Buildable"
    Ptr Builder ->                          -- builder : TInterface "Gtk" "Builder"
    Ptr GObject.Object ->                   -- child : TInterface "GObject" "Object"
    CString ->                              -- tagname : TBasicType TUTF8
    Ptr () ->                               -- data : TBasicType TVoid
    IO ()


buildableCustomTagEnd ::
    (MonadIO m, BuildableK a, BuilderK b, GObject.ObjectK c) =>
    a ->                                    -- _obj
    b ->                                    -- builder
    Maybe (c) ->                            -- child
    T.Text ->                               -- tagname
    Ptr () ->                               -- data
    m ()
buildableCustomTagEnd _obj builder child tagname data_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let builder' = unsafeManagedPtrCastPtr builder
    maybeChild <- case child of
        Nothing -> return nullPtr
        Just jChild -> do
            let jChild' = unsafeManagedPtrCastPtr jChild
            return jChild'
    tagname' <- textToCString tagname
    gtk_buildable_custom_tag_end _obj' builder' maybeChild tagname' data_
    touchManagedPtr _obj
    touchManagedPtr builder
    whenJust child touchManagedPtr
    freeMem tagname'
    return ()

-- method Buildable::custom_tag_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tagname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parser", argType = TInterface "GLib" "MarkupParser", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tagname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_buildable_custom_tag_start" gtk_buildable_custom_tag_start :: 
    Ptr Buildable ->                        -- _obj : TInterface "Gtk" "Buildable"
    Ptr Builder ->                          -- builder : TInterface "Gtk" "Builder"
    Ptr GObject.Object ->                   -- child : TInterface "GObject" "Object"
    CString ->                              -- tagname : TBasicType TUTF8
    Ptr GLib.MarkupParser ->                -- parser : TInterface "GLib" "MarkupParser"
    Ptr (Ptr ()) ->                         -- data : TBasicType TVoid
    IO CInt


buildableCustomTagStart ::
    (MonadIO m, BuildableK a, BuilderK b, GObject.ObjectK c) =>
    a ->                                    -- _obj
    b ->                                    -- builder
    Maybe (c) ->                            -- child
    T.Text ->                               -- tagname
    m (Bool,GLib.MarkupParser,(Ptr ()))
buildableCustomTagStart _obj builder child tagname = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let builder' = unsafeManagedPtrCastPtr builder
    maybeChild <- case child of
        Nothing -> return nullPtr
        Just jChild -> do
            let jChild' = unsafeManagedPtrCastPtr jChild
            return jChild'
    tagname' <- textToCString tagname
    parser <- callocBytes 40 :: IO (Ptr GLib.MarkupParser)
    data_ <- allocMem :: IO (Ptr (Ptr ()))
    result <- gtk_buildable_custom_tag_start _obj' builder' maybeChild tagname' parser data_
    let result' = (/= 0) result
    parser' <- (wrapPtr GLib.MarkupParser) parser
    data_' <- peek data_
    touchManagedPtr _obj
    touchManagedPtr builder
    whenJust child touchManagedPtr
    freeMem tagname'
    freeMem data_
    return (result', parser', data_')

-- method Buildable::get_internal_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "childname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "childname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GObject" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_buildable_get_internal_child" gtk_buildable_get_internal_child :: 
    Ptr Buildable ->                        -- _obj : TInterface "Gtk" "Buildable"
    Ptr Builder ->                          -- builder : TInterface "Gtk" "Builder"
    CString ->                              -- childname : TBasicType TUTF8
    IO (Ptr GObject.Object)


buildableGetInternalChild ::
    (MonadIO m, BuildableK a, BuilderK b) =>
    a ->                                    -- _obj
    b ->                                    -- builder
    T.Text ->                               -- childname
    m GObject.Object
buildableGetInternalChild _obj builder childname = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let builder' = unsafeManagedPtrCastPtr builder
    childname' <- textToCString childname
    result <- gtk_buildable_get_internal_child _obj' builder' childname'
    checkUnexpectedReturnNULL "gtk_buildable_get_internal_child" result
    result' <- (newObject GObject.Object) result
    touchManagedPtr _obj
    touchManagedPtr builder
    freeMem childname'
    return result'

-- method Buildable::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_buildable_get_name" gtk_buildable_get_name :: 
    Ptr Buildable ->                        -- _obj : TInterface "Gtk" "Buildable"
    IO CString


buildableGetName ::
    (MonadIO m, BuildableK a) =>
    a ->                                    -- _obj
    m T.Text
buildableGetName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_buildable_get_name _obj'
    checkUnexpectedReturnNULL "gtk_buildable_get_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Buildable::parser_finished
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_buildable_parser_finished" gtk_buildable_parser_finished :: 
    Ptr Buildable ->                        -- _obj : TInterface "Gtk" "Buildable"
    Ptr Builder ->                          -- builder : TInterface "Gtk" "Builder"
    IO ()


buildableParserFinished ::
    (MonadIO m, BuildableK a, BuilderK b) =>
    a ->                                    -- _obj
    b ->                                    -- builder
    m ()
buildableParserFinished _obj builder = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let builder' = unsafeManagedPtrCastPtr builder
    gtk_buildable_parser_finished _obj' builder'
    touchManagedPtr _obj
    touchManagedPtr builder
    return ()

-- method Buildable::set_buildable_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "builder", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_buildable_set_buildable_property" gtk_buildable_set_buildable_property :: 
    Ptr Buildable ->                        -- _obj : TInterface "Gtk" "Buildable"
    Ptr Builder ->                          -- builder : TInterface "Gtk" "Builder"
    CString ->                              -- name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


buildableSetBuildableProperty ::
    (MonadIO m, BuildableK a, BuilderK b) =>
    a ->                                    -- _obj
    b ->                                    -- builder
    T.Text ->                               -- name
    GValue ->                               -- value
    m ()
buildableSetBuildableProperty _obj builder name value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let builder' = unsafeManagedPtrCastPtr builder
    name' <- textToCString name
    let value' = unsafeManagedPtrGetPtr value
    gtk_buildable_set_buildable_property _obj' builder' name' value'
    touchManagedPtr _obj
    touchManagedPtr builder
    touchManagedPtr value
    freeMem name'
    return ()

-- method Buildable::set_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Buildable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_buildable_set_name" gtk_buildable_set_name :: 
    Ptr Buildable ->                        -- _obj : TInterface "Gtk" "Buildable"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


buildableSetName ::
    (MonadIO m, BuildableK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
buildableSetName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    gtk_buildable_set_name _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- object Builder 
newtype Builder = Builder (ForeignPtr Builder)
noBuilder :: Maybe Builder
noBuilder = Nothing

foreign import ccall "gtk_builder_get_type"
    c_gtk_builder_get_type :: IO GType

type instance ParentTypes Builder = '[GObject.Object]

instance GObject Builder where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_builder_get_type
    

class GObject o => BuilderK o
instance (GObject o, IsDescendantOf Builder o) => BuilderK o

toBuilder :: BuilderK o => o -> IO Builder
toBuilder = unsafeCastTo Builder

-- method Builder::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Builder"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_new" gtk_builder_new :: 
    IO (Ptr Builder)


builderNew ::
    (MonadIO m) =>
    m Builder
builderNew  = liftIO $ do
    result <- gtk_builder_new
    checkUnexpectedReturnNULL "gtk_builder_new" result
    result' <- (wrapObject Builder) result
    return result'

-- method Builder::new_from_file
-- method type : Constructor
-- Args : [Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Builder"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_new_from_file" gtk_builder_new_from_file :: 
    CString ->                              -- filename : TBasicType TUTF8
    IO (Ptr Builder)


builderNewFromFile ::
    (MonadIO m) =>
    T.Text ->                               -- filename
    m Builder
builderNewFromFile filename = liftIO $ do
    filename' <- textToCString filename
    result <- gtk_builder_new_from_file filename'
    checkUnexpectedReturnNULL "gtk_builder_new_from_file" result
    result' <- (wrapObject Builder) result
    freeMem filename'
    return result'

-- method Builder::new_from_resource
-- method type : Constructor
-- Args : [Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Builder"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_new_from_resource" gtk_builder_new_from_resource :: 
    CString ->                              -- resource_path : TBasicType TUTF8
    IO (Ptr Builder)


builderNewFromResource ::
    (MonadIO m) =>
    T.Text ->                               -- resource_path
    m Builder
builderNewFromResource resource_path = liftIO $ do
    resource_path' <- textToCString resource_path
    result <- gtk_builder_new_from_resource resource_path'
    checkUnexpectedReturnNULL "gtk_builder_new_from_resource" result
    result' <- (wrapObject Builder) result
    freeMem resource_path'
    return result'

-- method Builder::new_from_string
-- method type : Constructor
-- Args : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Builder"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_new_from_string" gtk_builder_new_from_string :: 
    CString ->                              -- string : TBasicType TUTF8
    Int64 ->                                -- length : TBasicType TInt64
    IO (Ptr Builder)


builderNewFromString ::
    (MonadIO m) =>
    T.Text ->                               -- string
    Int64 ->                                -- length
    m Builder
builderNewFromString string length_ = liftIO $ do
    string' <- textToCString string
    result <- gtk_builder_new_from_string string' length_
    checkUnexpectedReturnNULL "gtk_builder_new_from_string" result
    result' <- (wrapObject Builder) result
    freeMem string'
    return result'

-- method Builder::add_callback_symbol
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback_symbol", argType = TInterface "GObject" "Callback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback_symbol", argType = TInterface "GObject" "Callback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_add_callback_symbol" gtk_builder_add_callback_symbol :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CString ->                              -- callback_name : TBasicType TUTF8
    FunPtr GObject.CallbackC ->             -- callback_symbol : TInterface "GObject" "Callback"
    IO ()


builderAddCallbackSymbol ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- callback_name
    GObject.Callback ->                     -- callback_symbol
    m ()
builderAddCallbackSymbol _obj callback_name callback_symbol = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    callback_name' <- textToCString callback_name
    ptrcallback_symbol <- callocMem :: IO (Ptr (FunPtr GObject.CallbackC))
    callback_symbol' <- GObject.mkCallback (GObject.callbackWrapper (Just ptrcallback_symbol) callback_symbol)
    poke ptrcallback_symbol callback_symbol'
    gtk_builder_add_callback_symbol _obj' callback_name' callback_symbol'
    touchManagedPtr _obj
    freeMem callback_name'
    return ()

-- method Builder::add_from_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : True
-- Skip return : False

foreign import ccall "gtk_builder_add_from_file" gtk_builder_add_from_file :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CString ->                              -- filename : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO Word32


builderAddFromFile ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- filename
    m Word32
builderAddFromFile _obj filename = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filename' <- textToCString filename
    onException (do
        result <- propagateGError $ gtk_builder_add_from_file _obj' filename'
        touchManagedPtr _obj
        freeMem filename'
        return result
     ) (do
        freeMem filename'
     )

-- method Builder::add_from_resource
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : True
-- Skip return : False

foreign import ccall "gtk_builder_add_from_resource" gtk_builder_add_from_resource :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CString ->                              -- resource_path : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO Word32


builderAddFromResource ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- resource_path
    m Word32
builderAddFromResource _obj resource_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    resource_path' <- textToCString resource_path
    onException (do
        result <- propagateGError $ gtk_builder_add_from_resource _obj' resource_path'
        touchManagedPtr _obj
        freeMem resource_path'
        return result
     ) (do
        freeMem resource_path'
     )

-- method Builder::add_from_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : True
-- Skip return : False

foreign import ccall "gtk_builder_add_from_string" gtk_builder_add_from_string :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CString ->                              -- buffer : TBasicType TUTF8
    Word64 ->                               -- length : TBasicType TUInt64
    Ptr (Ptr GError) ->                     -- error
    IO Word32


builderAddFromString ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- buffer
    Word64 ->                               -- length
    m Word32
builderAddFromString _obj buffer length_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    buffer' <- textToCString buffer
    onException (do
        result <- propagateGError $ gtk_builder_add_from_string _obj' buffer' length_
        touchManagedPtr _obj
        freeMem buffer'
        return result
     ) (do
        freeMem buffer'
     )

-- method Builder::add_objects_from_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_ids", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_ids", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : True
-- Skip return : False

foreign import ccall "gtk_builder_add_objects_from_file" gtk_builder_add_objects_from_file :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CString ->                              -- filename : TBasicType TUTF8
    Ptr CString ->                          -- object_ids : TCArray True (-1) (-1) (TBasicType TUTF8)
    Ptr (Ptr GError) ->                     -- error
    IO Word32


builderAddObjectsFromFile ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- filename
    [T.Text] ->                             -- object_ids
    m Word32
builderAddObjectsFromFile _obj filename object_ids = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filename' <- textToCString filename
    object_ids' <- packZeroTerminatedUTF8CArray object_ids
    onException (do
        result <- propagateGError $ gtk_builder_add_objects_from_file _obj' filename' object_ids'
        touchManagedPtr _obj
        freeMem filename'
        mapZeroTerminatedCArray freeMem object_ids'
        freeMem object_ids'
        return result
     ) (do
        freeMem filename'
        mapZeroTerminatedCArray freeMem object_ids'
        freeMem object_ids'
     )

-- method Builder::add_objects_from_resource
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_ids", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_ids", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : True
-- Skip return : False

foreign import ccall "gtk_builder_add_objects_from_resource" gtk_builder_add_objects_from_resource :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CString ->                              -- resource_path : TBasicType TUTF8
    Ptr CString ->                          -- object_ids : TCArray True (-1) (-1) (TBasicType TUTF8)
    Ptr (Ptr GError) ->                     -- error
    IO Word32


builderAddObjectsFromResource ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- resource_path
    [T.Text] ->                             -- object_ids
    m Word32
builderAddObjectsFromResource _obj resource_path object_ids = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    resource_path' <- textToCString resource_path
    object_ids' <- packZeroTerminatedUTF8CArray object_ids
    onException (do
        result <- propagateGError $ gtk_builder_add_objects_from_resource _obj' resource_path' object_ids'
        touchManagedPtr _obj
        freeMem resource_path'
        mapZeroTerminatedCArray freeMem object_ids'
        freeMem object_ids'
        return result
     ) (do
        freeMem resource_path'
        mapZeroTerminatedCArray freeMem object_ids'
        freeMem object_ids'
     )

-- method Builder::add_objects_from_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_ids", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object_ids", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : True
-- Skip return : False

foreign import ccall "gtk_builder_add_objects_from_string" gtk_builder_add_objects_from_string :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CString ->                              -- buffer : TBasicType TUTF8
    Word64 ->                               -- length : TBasicType TUInt64
    Ptr CString ->                          -- object_ids : TCArray True (-1) (-1) (TBasicType TUTF8)
    Ptr (Ptr GError) ->                     -- error
    IO Word32


builderAddObjectsFromString ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- buffer
    Word64 ->                               -- length
    [T.Text] ->                             -- object_ids
    m Word32
builderAddObjectsFromString _obj buffer length_ object_ids = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    buffer' <- textToCString buffer
    object_ids' <- packZeroTerminatedUTF8CArray object_ids
    onException (do
        result <- propagateGError $ gtk_builder_add_objects_from_string _obj' buffer' length_ object_ids'
        touchManagedPtr _obj
        freeMem buffer'
        mapZeroTerminatedCArray freeMem object_ids'
        freeMem object_ids'
        return result
     ) (do
        freeMem buffer'
        mapZeroTerminatedCArray freeMem object_ids'
        freeMem object_ids'
     )

-- method Builder::connect_signals
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_connect_signals" gtk_builder_connect_signals :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


builderConnectSignals ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    Ptr () ->                               -- user_data
    m ()
builderConnectSignals _obj user_data = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_builder_connect_signals _obj' user_data
    touchManagedPtr _obj
    return ()

-- method Builder::connect_signals_full
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "BuilderConnectFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "BuilderConnectFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_connect_signals_full" gtk_builder_connect_signals_full :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    FunPtr BuilderConnectFuncC ->           -- func : TInterface "Gtk" "BuilderConnectFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


builderConnectSignalsFull ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    BuilderConnectFunc ->                   -- func
    m ()
builderConnectSignalsFull _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkBuilderConnectFunc (builderConnectFuncWrapper Nothing func)
    let user_data = nullPtr
    gtk_builder_connect_signals_full _obj' func' user_data
    safeFreeFunPtr $ castFunPtrToPtr func'
    touchManagedPtr _obj
    return ()

-- method Builder::expose_object
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_expose_object" gtk_builder_expose_object :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CString ->                              -- name : TBasicType TUTF8
    Ptr GObject.Object ->                   -- object : TInterface "GObject" "Object"
    IO ()


builderExposeObject ::
    (MonadIO m, BuilderK a, GObject.ObjectK b) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    b ->                                    -- object
    m ()
builderExposeObject _obj name object = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    let object' = unsafeManagedPtrCastPtr object
    gtk_builder_expose_object _obj' name' object'
    touchManagedPtr _obj
    touchManagedPtr object
    freeMem name'
    return ()

-- method Builder::get_application
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Application"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_get_application" gtk_builder_get_application :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    IO (Ptr Application)


builderGetApplication ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    m Application
builderGetApplication _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_builder_get_application _obj'
    checkUnexpectedReturnNULL "gtk_builder_get_application" result
    result' <- (newObject Application) result
    touchManagedPtr _obj
    return result'

-- method Builder::get_object
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GObject" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_get_object" gtk_builder_get_object :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GObject.Object)


builderGetObject ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m GObject.Object
builderGetObject _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    result <- gtk_builder_get_object _obj' name'
    checkUnexpectedReturnNULL "gtk_builder_get_object" result
    result' <- (newObject GObject.Object) result
    touchManagedPtr _obj
    freeMem name'
    return result'

-- method Builder::get_objects
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "GObject" "Object")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_get_objects" gtk_builder_get_objects :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    IO (Ptr (GSList (Ptr GObject.Object)))


builderGetObjects ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    m [GObject.Object]
builderGetObjects _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_builder_get_objects _obj'
    checkUnexpectedReturnNULL "gtk_builder_get_objects" result
    result' <- unpackGSList result
    result'' <- mapM (newObject GObject.Object) result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method Builder::get_translation_domain
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_get_translation_domain" gtk_builder_get_translation_domain :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    IO CString


builderGetTranslationDomain ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    m T.Text
builderGetTranslationDomain _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_builder_get_translation_domain _obj'
    checkUnexpectedReturnNULL "gtk_builder_get_translation_domain" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Builder::get_type_from_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TGType
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_get_type_from_name" gtk_builder_get_type_from_name :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CString ->                              -- type_name : TBasicType TUTF8
    IO CGType


builderGetTypeFromName ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- type_name
    m GType
builderGetTypeFromName _obj type_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    type_name' <- textToCString type_name
    result <- gtk_builder_get_type_from_name _obj' type_name'
    let result' = GType result
    touchManagedPtr _obj
    freeMem type_name'
    return result'

-- method Builder::set_application
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_set_application" gtk_builder_set_application :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    Ptr Application ->                      -- application : TInterface "Gtk" "Application"
    IO ()


builderSetApplication ::
    (MonadIO m, BuilderK a, ApplicationK b) =>
    a ->                                    -- _obj
    b ->                                    -- application
    m ()
builderSetApplication _obj application = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let application' = unsafeManagedPtrCastPtr application
    gtk_builder_set_application _obj' application'
    touchManagedPtr _obj
    touchManagedPtr application
    return ()

-- method Builder::set_translation_domain
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_set_translation_domain" gtk_builder_set_translation_domain :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CString ->                              -- domain : TBasicType TUTF8
    IO ()


builderSetTranslationDomain ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- domain
    m ()
builderSetTranslationDomain _obj domain = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeDomain <- case domain of
        Nothing -> return nullPtr
        Just jDomain -> do
            jDomain' <- textToCString jDomain
            return jDomain'
    gtk_builder_set_translation_domain _obj' maybeDomain
    touchManagedPtr _obj
    freeMem maybeDomain
    return ()

-- method Builder::value_from_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_builder_value_from_string" gtk_builder_value_from_string :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    CString ->                              -- string : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    Ptr (Ptr GError) ->                     -- error
    IO CInt


builderValueFromString ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    GParamSpec ->                           -- pspec
    T.Text ->                               -- string
    m (GValue)
builderValueFromString _obj pspec string = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let pspec' = unsafeManagedPtrGetPtr pspec
    string' <- textToCString string
    value <- callocBoxedBytes 24 :: IO (Ptr GValue)
    onException (do
        _ <- propagateGError $ gtk_builder_value_from_string _obj' pspec' string' value
        value' <- (wrapBoxed GValue) value
        touchManagedPtr _obj
        freeMem string'
        return value'
     ) (do
        freeMem string'
        freeMem value
     )

-- method Builder::value_from_string_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Builder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_builder_value_from_string_type" gtk_builder_value_from_string_type :: 
    Ptr Builder ->                          -- _obj : TInterface "Gtk" "Builder"
    CGType ->                               -- type : TBasicType TGType
    CString ->                              -- string : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    Ptr (Ptr GError) ->                     -- error
    IO CInt


builderValueFromStringType ::
    (MonadIO m, BuilderK a) =>
    a ->                                    -- _obj
    GType ->                                -- type
    T.Text ->                               -- string
    m (GValue)
builderValueFromStringType _obj type_ string = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = gtypeToCGType type_
    string' <- textToCString string
    value <- callocBoxedBytes 24 :: IO (Ptr GValue)
    onException (do
        _ <- propagateGError $ gtk_builder_value_from_string_type _obj' type_' string' value
        value' <- (wrapBoxed GValue) value
        touchManagedPtr _obj
        freeMem string'
        return value'
     ) (do
        freeMem string'
        freeMem value
     )

-- callback BuilderConnectFunc
builderConnectFuncClosure :: BuilderConnectFunc -> IO Closure
builderConnectFuncClosure cb = newCClosure =<< mkBuilderConnectFunc wrapped
    where wrapped = builderConnectFuncWrapper Nothing cb

type BuilderConnectFuncC =
    Ptr Builder ->
    Ptr GObject.Object ->
    CString ->
    CString ->
    Ptr GObject.Object ->
    CUInt ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkBuilderConnectFunc :: BuilderConnectFuncC -> IO (FunPtr BuilderConnectFuncC)

type BuilderConnectFunc =
    Builder ->
    GObject.Object ->
    T.Text ->
    T.Text ->
    Maybe GObject.Object ->
    [GObject.ConnectFlags] ->
    IO ()

noBuilderConnectFunc :: Maybe BuilderConnectFunc
noBuilderConnectFunc = Nothing

builderConnectFuncWrapper ::
    Maybe (Ptr (FunPtr (BuilderConnectFuncC))) ->
    BuilderConnectFunc ->
    Ptr Builder ->
    Ptr GObject.Object ->
    CString ->
    CString ->
    Ptr GObject.Object ->
    CUInt ->
    Ptr () ->
    IO ()
builderConnectFuncWrapper funptrptr _cb builder object signal_name handler_name connect_object flags _ = do
    builder' <- (newObject Builder) builder
    object' <- (newObject GObject.Object) object
    signal_name' <- cstringToText signal_name
    handler_name' <- cstringToText handler_name
    maybeConnect_object <-
        if connect_object == nullPtr
        then return Nothing
        else do
            connect_object' <- (newObject GObject.Object) connect_object
            return $ Just connect_object'
    let flags' = wordToGFlags flags
    _cb  builder' object' signal_name' handler_name' maybeConnect_object flags'
    maybeReleaseFunPtr funptrptr

-- Enum BuilderError

data BuilderError = 
      BuilderErrorInvalidTypeFunction
    | BuilderErrorUnhandledTag
    | BuilderErrorMissingAttribute
    | BuilderErrorInvalidAttribute
    | BuilderErrorInvalidTag
    | BuilderErrorMissingPropertyValue
    | BuilderErrorInvalidValue
    | BuilderErrorVersionMismatch
    | BuilderErrorDuplicateId
    | BuilderErrorObjectTypeRefused
    | BuilderErrorTemplateMismatch
    | BuilderErrorInvalidProperty
    | BuilderErrorInvalidSignal
    | BuilderErrorInvalidId
    | AnotherBuilderError Int
    deriving (Show, Eq)

instance Enum BuilderError where
    fromEnum BuilderErrorInvalidTypeFunction = 0
    fromEnum BuilderErrorUnhandledTag = 1
    fromEnum BuilderErrorMissingAttribute = 2
    fromEnum BuilderErrorInvalidAttribute = 3
    fromEnum BuilderErrorInvalidTag = 4
    fromEnum BuilderErrorMissingPropertyValue = 5
    fromEnum BuilderErrorInvalidValue = 6
    fromEnum BuilderErrorVersionMismatch = 7
    fromEnum BuilderErrorDuplicateId = 8
    fromEnum BuilderErrorObjectTypeRefused = 9
    fromEnum BuilderErrorTemplateMismatch = 10
    fromEnum BuilderErrorInvalidProperty = 11
    fromEnum BuilderErrorInvalidSignal = 12
    fromEnum BuilderErrorInvalidId = 13
    fromEnum (AnotherBuilderError k) = k

    toEnum 0 = BuilderErrorInvalidTypeFunction
    toEnum 1 = BuilderErrorUnhandledTag
    toEnum 2 = BuilderErrorMissingAttribute
    toEnum 3 = BuilderErrorInvalidAttribute
    toEnum 4 = BuilderErrorInvalidTag
    toEnum 5 = BuilderErrorMissingPropertyValue
    toEnum 6 = BuilderErrorInvalidValue
    toEnum 7 = BuilderErrorVersionMismatch
    toEnum 8 = BuilderErrorDuplicateId
    toEnum 9 = BuilderErrorObjectTypeRefused
    toEnum 10 = BuilderErrorTemplateMismatch
    toEnum 11 = BuilderErrorInvalidProperty
    toEnum 12 = BuilderErrorInvalidSignal
    toEnum 13 = BuilderErrorInvalidId
    toEnum k = AnotherBuilderError k

instance GErrorClass BuilderError where
    gerrorClassDomain _ = "gtk-builder-error-quark"

catchBuilderError ::
    IO a ->
    (BuilderError -> GErrorMessage -> IO a) ->
    IO a
catchBuilderError = catchGErrorJustDomain

handleBuilderError ::
    (BuilderError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleBuilderError = handleGErrorJustDomain

foreign import ccall "gtk_builder_error_get_type" c_gtk_builder_error_get_type :: 
    IO GType

instance BoxedEnum BuilderError where
    boxedEnumType _ = c_gtk_builder_error_get_type

-- object Button 
newtype Button = Button (ForeignPtr Button)
noButton :: Maybe Button
noButton = Nothing

foreign import ccall "gtk_button_get_type"
    c_gtk_button_get_type :: IO GType

type instance ParentTypes Button = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject Button where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_button_get_type
    

class GObject o => ButtonK o
instance (GObject o, IsDescendantOf Button o) => ButtonK o

toButton :: ButtonK o => o -> IO Button
toButton = unsafeCastTo Button

-- method Button::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Button"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_new" gtk_button_new :: 
    IO (Ptr Button)


buttonNew ::
    (MonadIO m) =>
    m Button
buttonNew  = liftIO $ do
    result <- gtk_button_new
    checkUnexpectedReturnNULL "gtk_button_new" result
    result' <- (newObject Button) result
    return result'

-- method Button::new_from_icon_name
-- method type : Constructor
-- Args : [Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Button"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_new_from_icon_name" gtk_button_new_from_icon_name :: 
    CString ->                              -- icon_name : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    IO (Ptr Button)


buttonNewFromIconName ::
    (MonadIO m) =>
    T.Text ->                               -- icon_name
    Int32 ->                                -- size
    m Button
buttonNewFromIconName icon_name size = liftIO $ do
    icon_name' <- textToCString icon_name
    result <- gtk_button_new_from_icon_name icon_name' size
    checkUnexpectedReturnNULL "gtk_button_new_from_icon_name" result
    result' <- (newObject Button) result
    freeMem icon_name'
    return result'

-- method Button::new_from_stock
-- method type : Constructor
-- Args : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Button"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_new_from_stock" gtk_button_new_from_stock :: 
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr Button)

{-# DEPRECATED buttonNewFromStock ["(Since version 3.10)","Use gtk_button_new_with_label() instead."]#-}
buttonNewFromStock ::
    (MonadIO m) =>
    T.Text ->                               -- stock_id
    m Button
buttonNewFromStock stock_id = liftIO $ do
    stock_id' <- textToCString stock_id
    result <- gtk_button_new_from_stock stock_id'
    checkUnexpectedReturnNULL "gtk_button_new_from_stock" result
    result' <- (newObject Button) result
    freeMem stock_id'
    return result'

-- method Button::new_with_label
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Button"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_new_with_label" gtk_button_new_with_label :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr Button)


buttonNewWithLabel ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m Button
buttonNewWithLabel label = liftIO $ do
    label' <- textToCString label
    result <- gtk_button_new_with_label label'
    checkUnexpectedReturnNULL "gtk_button_new_with_label" result
    result' <- (newObject Button) result
    freeMem label'
    return result'

-- method Button::new_with_mnemonic
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Button"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_new_with_mnemonic" gtk_button_new_with_mnemonic :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr Button)


buttonNewWithMnemonic ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m Button
buttonNewWithMnemonic label = liftIO $ do
    label' <- textToCString label
    result <- gtk_button_new_with_mnemonic label'
    checkUnexpectedReturnNULL "gtk_button_new_with_mnemonic" result
    result' <- (newObject Button) result
    freeMem label'
    return result'

-- method Button::clicked
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_clicked" gtk_button_clicked :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO ()


buttonClicked ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m ()
buttonClicked _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_button_clicked _obj'
    touchManagedPtr _obj
    return ()

-- method Button::enter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_enter" gtk_button_enter :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO ()

{-# DEPRECATED buttonEnter ["(Since version 2.20)","Use the #GtkWidget::enter-notify-event signal."]#-}
buttonEnter ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m ()
buttonEnter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_button_enter _obj'
    touchManagedPtr _obj
    return ()

-- method Button::get_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_get_alignment" gtk_button_get_alignment :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    Ptr CFloat ->                           -- xalign : TBasicType TFloat
    Ptr CFloat ->                           -- yalign : TBasicType TFloat
    IO ()

{-# DEPRECATED buttonGetAlignment ["(Since version 3.14)","Access the child widget directly if you need to control","its alignment."]#-}
buttonGetAlignment ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m (Float,Float)
buttonGetAlignment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    xalign <- allocMem :: IO (Ptr CFloat)
    yalign <- allocMem :: IO (Ptr CFloat)
    gtk_button_get_alignment _obj' xalign yalign
    xalign' <- peek xalign
    let xalign'' = realToFrac xalign'
    yalign' <- peek yalign
    let yalign'' = realToFrac yalign'
    touchManagedPtr _obj
    freeMem xalign
    freeMem yalign
    return (xalign'', yalign'')

-- method Button::get_always_show_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_get_always_show_image" gtk_button_get_always_show_image :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO CInt


buttonGetAlwaysShowImage ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m Bool
buttonGetAlwaysShowImage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_button_get_always_show_image _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Button::get_event_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_get_event_window" gtk_button_get_event_window :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO (Ptr Gdk.Window)


buttonGetEventWindow ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m Gdk.Window
buttonGetEventWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_button_get_event_window _obj'
    checkUnexpectedReturnNULL "gtk_button_get_event_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- method Button::get_focus_on_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_get_focus_on_click" gtk_button_get_focus_on_click :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO CInt


buttonGetFocusOnClick ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m Bool
buttonGetFocusOnClick _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_button_get_focus_on_click _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Button::get_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_get_image" gtk_button_get_image :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO (Ptr Widget)


buttonGetImage ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m Widget
buttonGetImage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_button_get_image _obj'
    checkUnexpectedReturnNULL "gtk_button_get_image" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Button::get_image_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PositionType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_get_image_position" gtk_button_get_image_position :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO CUInt


buttonGetImagePosition ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m PositionType
buttonGetImagePosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_button_get_image_position _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Button::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_get_label" gtk_button_get_label :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO CString


buttonGetLabel ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m T.Text
buttonGetLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_button_get_label _obj'
    checkUnexpectedReturnNULL "gtk_button_get_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Button::get_relief
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ReliefStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_get_relief" gtk_button_get_relief :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO CUInt


buttonGetRelief ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m ReliefStyle
buttonGetRelief _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_button_get_relief _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Button::get_use_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_get_use_stock" gtk_button_get_use_stock :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO CInt

{-# DEPRECATED buttonGetUseStock ["(Since version 3.10)"]#-}
buttonGetUseStock ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m Bool
buttonGetUseStock _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_button_get_use_stock _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Button::get_use_underline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_get_use_underline" gtk_button_get_use_underline :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO CInt


buttonGetUseUnderline ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m Bool
buttonGetUseUnderline _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_button_get_use_underline _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Button::leave
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_leave" gtk_button_leave :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO ()

{-# DEPRECATED buttonLeave ["(Since version 2.20)","Use the #GtkWidget::leave-notify-event signal."]#-}
buttonLeave ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m ()
buttonLeave _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_button_leave _obj'
    touchManagedPtr _obj
    return ()

-- method Button::pressed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_pressed" gtk_button_pressed :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO ()

{-# DEPRECATED buttonPressed ["(Since version 2.20)","Use the #GtkWidget::button-press-event signal."]#-}
buttonPressed ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m ()
buttonPressed _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_button_pressed _obj'
    touchManagedPtr _obj
    return ()

-- method Button::released
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_released" gtk_button_released :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    IO ()

{-# DEPRECATED buttonReleased ["(Since version 2.20)","Use the #GtkWidget::button-release-event signal."]#-}
buttonReleased ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    m ()
buttonReleased _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_button_released _obj'
    touchManagedPtr _obj
    return ()

-- method Button::set_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_set_alignment" gtk_button_set_alignment :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    CFloat ->                               -- xalign : TBasicType TFloat
    CFloat ->                               -- yalign : TBasicType TFloat
    IO ()

{-# DEPRECATED buttonSetAlignment ["(Since version 3.14)","Access the child widget directly if you need to control","its alignment."]#-}
buttonSetAlignment ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    Float ->                                -- xalign
    Float ->                                -- yalign
    m ()
buttonSetAlignment _obj xalign yalign = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let xalign' = realToFrac xalign
    let yalign' = realToFrac yalign
    gtk_button_set_alignment _obj' xalign' yalign'
    touchManagedPtr _obj
    return ()

-- method Button::set_always_show_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "always_show", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "always_show", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_set_always_show_image" gtk_button_set_always_show_image :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    CInt ->                                 -- always_show : TBasicType TBoolean
    IO ()


buttonSetAlwaysShowImage ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- always_show
    m ()
buttonSetAlwaysShowImage _obj always_show = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let always_show' = (fromIntegral . fromEnum) always_show
    gtk_button_set_always_show_image _obj' always_show'
    touchManagedPtr _obj
    return ()

-- method Button::set_focus_on_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_on_click", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_on_click", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_set_focus_on_click" gtk_button_set_focus_on_click :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    CInt ->                                 -- focus_on_click : TBasicType TBoolean
    IO ()


buttonSetFocusOnClick ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- focus_on_click
    m ()
buttonSetFocusOnClick _obj focus_on_click = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let focus_on_click' = (fromIntegral . fromEnum) focus_on_click
    gtk_button_set_focus_on_click _obj' focus_on_click'
    touchManagedPtr _obj
    return ()

-- method Button::set_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "image", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "image", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_set_image" gtk_button_set_image :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    Ptr Widget ->                           -- image : TInterface "Gtk" "Widget"
    IO ()


buttonSetImage ::
    (MonadIO m, ButtonK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- image
    m ()
buttonSetImage _obj image = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let image' = unsafeManagedPtrCastPtr image
    gtk_button_set_image _obj' image'
    touchManagedPtr _obj
    touchManagedPtr image
    return ()

-- method Button::set_image_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_set_image_position" gtk_button_set_image_position :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    CUInt ->                                -- position : TInterface "Gtk" "PositionType"
    IO ()


buttonSetImagePosition ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    PositionType ->                         -- position
    m ()
buttonSetImagePosition _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let position' = (fromIntegral . fromEnum) position
    gtk_button_set_image_position _obj' position'
    touchManagedPtr _obj
    return ()

-- method Button::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_set_label" gtk_button_set_label :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    CString ->                              -- label : TBasicType TUTF8
    IO ()


buttonSetLabel ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- label
    m ()
buttonSetLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    label' <- textToCString label
    gtk_button_set_label _obj' label'
    touchManagedPtr _obj
    freeMem label'
    return ()

-- method Button::set_relief
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relief", argType = TInterface "Gtk" "ReliefStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relief", argType = TInterface "Gtk" "ReliefStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_set_relief" gtk_button_set_relief :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    CUInt ->                                -- relief : TInterface "Gtk" "ReliefStyle"
    IO ()


buttonSetRelief ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    ReliefStyle ->                          -- relief
    m ()
buttonSetRelief _obj relief = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let relief' = (fromIntegral . fromEnum) relief
    gtk_button_set_relief _obj' relief'
    touchManagedPtr _obj
    return ()

-- method Button::set_use_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_stock", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_stock", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_set_use_stock" gtk_button_set_use_stock :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    CInt ->                                 -- use_stock : TBasicType TBoolean
    IO ()

{-# DEPRECATED buttonSetUseStock ["(Since version 3.10)"]#-}
buttonSetUseStock ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_stock
    m ()
buttonSetUseStock _obj use_stock = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_stock' = (fromIntegral . fromEnum) use_stock
    gtk_button_set_use_stock _obj' use_stock'
    touchManagedPtr _obj
    return ()

-- method Button::set_use_underline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_underline", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Button", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_underline", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_set_use_underline" gtk_button_set_use_underline :: 
    Ptr Button ->                           -- _obj : TInterface "Gtk" "Button"
    CInt ->                                 -- use_underline : TBasicType TBoolean
    IO ()


buttonSetUseUnderline ::
    (MonadIO m, ButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_underline
    m ()
buttonSetUseUnderline _obj use_underline = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_underline' = (fromIntegral . fromEnum) use_underline
    gtk_button_set_use_underline _obj' use_underline'
    touchManagedPtr _obj
    return ()

-- signal Button::activate
type ButtonActivateCallback =
    IO ()

noButtonActivateCallback :: Maybe ButtonActivateCallback
noButtonActivateCallback = Nothing

type ButtonActivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkButtonActivateCallback :: ButtonActivateCallbackC -> IO (FunPtr ButtonActivateCallbackC)

buttonActivateClosure :: ButtonActivateCallback -> IO Closure
buttonActivateClosure cb = newCClosure =<< mkButtonActivateCallback wrapped
    where wrapped = buttonActivateCallbackWrapper cb

buttonActivateCallbackWrapper ::
    ButtonActivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
buttonActivateCallbackWrapper _cb _ _ = do
    _cb 

onButtonActivate :: (GObject a, MonadIO m) => a -> ButtonActivateCallback -> m SignalHandlerId
onButtonActivate obj cb = liftIO $ connectButtonActivate obj cb SignalConnectBefore
afterButtonActivate :: (GObject a, MonadIO m) => a -> ButtonActivateCallback -> m SignalHandlerId
afterButtonActivate obj cb = connectButtonActivate obj cb SignalConnectAfter

connectButtonActivate :: (GObject a, MonadIO m) =>
                         a -> ButtonActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectButtonActivate obj cb after = liftIO $ do
    cb' <- mkButtonActivateCallback (buttonActivateCallbackWrapper cb)
    connectSignalFunPtr obj "activate" cb' after

-- signal Button::clicked
type ButtonClickedCallback =
    IO ()

noButtonClickedCallback :: Maybe ButtonClickedCallback
noButtonClickedCallback = Nothing

type ButtonClickedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkButtonClickedCallback :: ButtonClickedCallbackC -> IO (FunPtr ButtonClickedCallbackC)

buttonClickedClosure :: ButtonClickedCallback -> IO Closure
buttonClickedClosure cb = newCClosure =<< mkButtonClickedCallback wrapped
    where wrapped = buttonClickedCallbackWrapper cb

buttonClickedCallbackWrapper ::
    ButtonClickedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
buttonClickedCallbackWrapper _cb _ _ = do
    _cb 

onButtonClicked :: (GObject a, MonadIO m) => a -> ButtonClickedCallback -> m SignalHandlerId
onButtonClicked obj cb = liftIO $ connectButtonClicked obj cb SignalConnectBefore
afterButtonClicked :: (GObject a, MonadIO m) => a -> ButtonClickedCallback -> m SignalHandlerId
afterButtonClicked obj cb = connectButtonClicked obj cb SignalConnectAfter

connectButtonClicked :: (GObject a, MonadIO m) =>
                        a -> ButtonClickedCallback -> SignalConnectMode -> m SignalHandlerId
connectButtonClicked obj cb after = liftIO $ do
    cb' <- mkButtonClickedCallback (buttonClickedCallbackWrapper cb)
    connectSignalFunPtr obj "clicked" cb' after

-- signal Button::enter
type ButtonEnterCallback =
    IO ()

noButtonEnterCallback :: Maybe ButtonEnterCallback
noButtonEnterCallback = Nothing

type ButtonEnterCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkButtonEnterCallback :: ButtonEnterCallbackC -> IO (FunPtr ButtonEnterCallbackC)

buttonEnterClosure :: ButtonEnterCallback -> IO Closure
buttonEnterClosure cb = newCClosure =<< mkButtonEnterCallback wrapped
    where wrapped = buttonEnterCallbackWrapper cb

buttonEnterCallbackWrapper ::
    ButtonEnterCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
buttonEnterCallbackWrapper _cb _ _ = do
    _cb 

onButtonEnter :: (GObject a, MonadIO m) => a -> ButtonEnterCallback -> m SignalHandlerId
onButtonEnter obj cb = liftIO $ connectButtonEnter obj cb SignalConnectBefore
afterButtonEnter :: (GObject a, MonadIO m) => a -> ButtonEnterCallback -> m SignalHandlerId
afterButtonEnter obj cb = connectButtonEnter obj cb SignalConnectAfter

connectButtonEnter :: (GObject a, MonadIO m) =>
                      a -> ButtonEnterCallback -> SignalConnectMode -> m SignalHandlerId
connectButtonEnter obj cb after = liftIO $ do
    cb' <- mkButtonEnterCallback (buttonEnterCallbackWrapper cb)
    connectSignalFunPtr obj "enter" cb' after

-- signal Button::leave
type ButtonLeaveCallback =
    IO ()

noButtonLeaveCallback :: Maybe ButtonLeaveCallback
noButtonLeaveCallback = Nothing

type ButtonLeaveCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkButtonLeaveCallback :: ButtonLeaveCallbackC -> IO (FunPtr ButtonLeaveCallbackC)

buttonLeaveClosure :: ButtonLeaveCallback -> IO Closure
buttonLeaveClosure cb = newCClosure =<< mkButtonLeaveCallback wrapped
    where wrapped = buttonLeaveCallbackWrapper cb

buttonLeaveCallbackWrapper ::
    ButtonLeaveCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
buttonLeaveCallbackWrapper _cb _ _ = do
    _cb 

onButtonLeave :: (GObject a, MonadIO m) => a -> ButtonLeaveCallback -> m SignalHandlerId
onButtonLeave obj cb = liftIO $ connectButtonLeave obj cb SignalConnectBefore
afterButtonLeave :: (GObject a, MonadIO m) => a -> ButtonLeaveCallback -> m SignalHandlerId
afterButtonLeave obj cb = connectButtonLeave obj cb SignalConnectAfter

connectButtonLeave :: (GObject a, MonadIO m) =>
                      a -> ButtonLeaveCallback -> SignalConnectMode -> m SignalHandlerId
connectButtonLeave obj cb after = liftIO $ do
    cb' <- mkButtonLeaveCallback (buttonLeaveCallbackWrapper cb)
    connectSignalFunPtr obj "leave" cb' after

-- signal Button::pressed
type ButtonPressedCallback =
    IO ()

noButtonPressedCallback :: Maybe ButtonPressedCallback
noButtonPressedCallback = Nothing

type ButtonPressedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkButtonPressedCallback :: ButtonPressedCallbackC -> IO (FunPtr ButtonPressedCallbackC)

buttonPressedClosure :: ButtonPressedCallback -> IO Closure
buttonPressedClosure cb = newCClosure =<< mkButtonPressedCallback wrapped
    where wrapped = buttonPressedCallbackWrapper cb

buttonPressedCallbackWrapper ::
    ButtonPressedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
buttonPressedCallbackWrapper _cb _ _ = do
    _cb 

onButtonPressed :: (GObject a, MonadIO m) => a -> ButtonPressedCallback -> m SignalHandlerId
onButtonPressed obj cb = liftIO $ connectButtonPressed obj cb SignalConnectBefore
afterButtonPressed :: (GObject a, MonadIO m) => a -> ButtonPressedCallback -> m SignalHandlerId
afterButtonPressed obj cb = connectButtonPressed obj cb SignalConnectAfter

connectButtonPressed :: (GObject a, MonadIO m) =>
                        a -> ButtonPressedCallback -> SignalConnectMode -> m SignalHandlerId
connectButtonPressed obj cb after = liftIO $ do
    cb' <- mkButtonPressedCallback (buttonPressedCallbackWrapper cb)
    connectSignalFunPtr obj "pressed" cb' after

-- signal Button::released
type ButtonReleasedCallback =
    IO ()

noButtonReleasedCallback :: Maybe ButtonReleasedCallback
noButtonReleasedCallback = Nothing

type ButtonReleasedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkButtonReleasedCallback :: ButtonReleasedCallbackC -> IO (FunPtr ButtonReleasedCallbackC)

buttonReleasedClosure :: ButtonReleasedCallback -> IO Closure
buttonReleasedClosure cb = newCClosure =<< mkButtonReleasedCallback wrapped
    where wrapped = buttonReleasedCallbackWrapper cb

buttonReleasedCallbackWrapper ::
    ButtonReleasedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
buttonReleasedCallbackWrapper _cb _ _ = do
    _cb 

onButtonReleased :: (GObject a, MonadIO m) => a -> ButtonReleasedCallback -> m SignalHandlerId
onButtonReleased obj cb = liftIO $ connectButtonReleased obj cb SignalConnectBefore
afterButtonReleased :: (GObject a, MonadIO m) => a -> ButtonReleasedCallback -> m SignalHandlerId
afterButtonReleased obj cb = connectButtonReleased obj cb SignalConnectAfter

connectButtonReleased :: (GObject a, MonadIO m) =>
                         a -> ButtonReleasedCallback -> SignalConnectMode -> m SignalHandlerId
connectButtonReleased obj cb after = liftIO $ do
    cb' <- mkButtonReleasedCallback (buttonReleasedCallbackWrapper cb)
    connectSignalFunPtr obj "released" cb' after

-- object ButtonAccessible 
newtype ButtonAccessible = ButtonAccessible (ForeignPtr ButtonAccessible)
noButtonAccessible :: Maybe ButtonAccessible
noButtonAccessible = Nothing

foreign import ccall "gtk_button_accessible_get_type"
    c_gtk_button_accessible_get_type :: IO GType

type instance ParentTypes ButtonAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Image]

instance GObject ButtonAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_button_accessible_get_type
    

class GObject o => ButtonAccessibleK o
instance (GObject o, IsDescendantOf ButtonAccessible o) => ButtonAccessibleK o

toButtonAccessible :: ButtonAccessibleK o => o -> IO ButtonAccessible
toButtonAccessible = unsafeCastTo ButtonAccessible

-- object ButtonBox 
newtype ButtonBox = ButtonBox (ForeignPtr ButtonBox)
noButtonBox :: Maybe ButtonBox
noButtonBox = Nothing

foreign import ccall "gtk_button_box_get_type"
    c_gtk_button_box_get_type :: IO GType

type instance ParentTypes ButtonBox = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject ButtonBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_button_box_get_type
    

class GObject o => ButtonBoxK o
instance (GObject o, IsDescendantOf ButtonBox o) => ButtonBoxK o

toButtonBox :: ButtonBoxK o => o -> IO ButtonBox
toButtonBox = unsafeCastTo ButtonBox

-- method ButtonBox::new
-- method type : Constructor
-- Args : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ButtonBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_box_new" gtk_button_box_new :: 
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    IO (Ptr ButtonBox)


buttonBoxNew ::
    (MonadIO m) =>
    Orientation ->                          -- orientation
    m ButtonBox
buttonBoxNew orientation = liftIO $ do
    let orientation' = (fromIntegral . fromEnum) orientation
    result <- gtk_button_box_new orientation'
    checkUnexpectedReturnNULL "gtk_button_box_new" result
    result' <- (newObject ButtonBox) result
    return result'

-- method ButtonBox::get_child_non_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_box_get_child_non_homogeneous" gtk_button_box_get_child_non_homogeneous :: 
    Ptr ButtonBox ->                        -- _obj : TInterface "Gtk" "ButtonBox"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO CInt


buttonBoxGetChildNonHomogeneous ::
    (MonadIO m, ButtonBoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m Bool
buttonBoxGetChildNonHomogeneous _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    result <- gtk_button_box_get_child_non_homogeneous _obj' child'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr child
    return result'

-- method ButtonBox::get_child_secondary
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_box_get_child_secondary" gtk_button_box_get_child_secondary :: 
    Ptr ButtonBox ->                        -- _obj : TInterface "Gtk" "ButtonBox"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO CInt


buttonBoxGetChildSecondary ::
    (MonadIO m, ButtonBoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m Bool
buttonBoxGetChildSecondary _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    result <- gtk_button_box_get_child_secondary _obj' child'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr child
    return result'

-- method ButtonBox::get_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ButtonBoxStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_box_get_layout" gtk_button_box_get_layout :: 
    Ptr ButtonBox ->                        -- _obj : TInterface "Gtk" "ButtonBox"
    IO CUInt


buttonBoxGetLayout ::
    (MonadIO m, ButtonBoxK a) =>
    a ->                                    -- _obj
    m ButtonBoxStyle
buttonBoxGetLayout _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_button_box_get_layout _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ButtonBox::set_child_non_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "non_homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "non_homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_box_set_child_non_homogeneous" gtk_button_box_set_child_non_homogeneous :: 
    Ptr ButtonBox ->                        -- _obj : TInterface "Gtk" "ButtonBox"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CInt ->                                 -- non_homogeneous : TBasicType TBoolean
    IO ()


buttonBoxSetChildNonHomogeneous ::
    (MonadIO m, ButtonBoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Bool ->                                 -- non_homogeneous
    m ()
buttonBoxSetChildNonHomogeneous _obj child non_homogeneous = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let non_homogeneous' = (fromIntegral . fromEnum) non_homogeneous
    gtk_button_box_set_child_non_homogeneous _obj' child' non_homogeneous'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method ButtonBox::set_child_secondary
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_secondary", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_secondary", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_box_set_child_secondary" gtk_button_box_set_child_secondary :: 
    Ptr ButtonBox ->                        -- _obj : TInterface "Gtk" "ButtonBox"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CInt ->                                 -- is_secondary : TBasicType TBoolean
    IO ()


buttonBoxSetChildSecondary ::
    (MonadIO m, ButtonBoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Bool ->                                 -- is_secondary
    m ()
buttonBoxSetChildSecondary _obj child is_secondary = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let is_secondary' = (fromIntegral . fromEnum) is_secondary
    gtk_button_box_set_child_secondary _obj' child' is_secondary'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method ButtonBox::set_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout_style", argType = TInterface "Gtk" "ButtonBoxStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ButtonBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout_style", argType = TInterface "Gtk" "ButtonBoxStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_button_box_set_layout" gtk_button_box_set_layout :: 
    Ptr ButtonBox ->                        -- _obj : TInterface "Gtk" "ButtonBox"
    CUInt ->                                -- layout_style : TInterface "Gtk" "ButtonBoxStyle"
    IO ()


buttonBoxSetLayout ::
    (MonadIO m, ButtonBoxK a) =>
    a ->                                    -- _obj
    ButtonBoxStyle ->                       -- layout_style
    m ()
buttonBoxSetLayout _obj layout_style = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let layout_style' = (fromIntegral . fromEnum) layout_style
    gtk_button_box_set_layout _obj' layout_style'
    touchManagedPtr _obj
    return ()

-- Enum ButtonBoxStyle

data ButtonBoxStyle = 
      ButtonBoxStyleSpread
    | ButtonBoxStyleEdge
    | ButtonBoxStyleStart
    | ButtonBoxStyleEnd
    | ButtonBoxStyleCenter
    | ButtonBoxStyleExpand
    | AnotherButtonBoxStyle Int
    deriving (Show, Eq)

instance Enum ButtonBoxStyle where
    fromEnum ButtonBoxStyleSpread = 1
    fromEnum ButtonBoxStyleEdge = 2
    fromEnum ButtonBoxStyleStart = 3
    fromEnum ButtonBoxStyleEnd = 4
    fromEnum ButtonBoxStyleCenter = 5
    fromEnum ButtonBoxStyleExpand = 6
    fromEnum (AnotherButtonBoxStyle k) = k

    toEnum 1 = ButtonBoxStyleSpread
    toEnum 2 = ButtonBoxStyleEdge
    toEnum 3 = ButtonBoxStyleStart
    toEnum 4 = ButtonBoxStyleEnd
    toEnum 5 = ButtonBoxStyleCenter
    toEnum 6 = ButtonBoxStyleExpand
    toEnum k = AnotherButtonBoxStyle k

foreign import ccall "gtk_button_box_style_get_type" c_gtk_button_box_style_get_type :: 
    IO GType

instance BoxedEnum ButtonBoxStyle where
    boxedEnumType _ = c_gtk_button_box_style_get_type

-- Enum ButtonRole

data ButtonRole = 
      ButtonRoleNormal
    | ButtonRoleCheck
    | ButtonRoleRadio
    | AnotherButtonRole Int
    deriving (Show, Eq)

instance Enum ButtonRole where
    fromEnum ButtonRoleNormal = 0
    fromEnum ButtonRoleCheck = 1
    fromEnum ButtonRoleRadio = 2
    fromEnum (AnotherButtonRole k) = k

    toEnum 0 = ButtonRoleNormal
    toEnum 1 = ButtonRoleCheck
    toEnum 2 = ButtonRoleRadio
    toEnum k = AnotherButtonRole k

foreign import ccall "gtk_button_role_get_type" c_gtk_button_role_get_type :: 
    IO GType

instance BoxedEnum ButtonRole where
    boxedEnumType _ = c_gtk_button_role_get_type

-- Enum ButtonsType

data ButtonsType = 
      ButtonsTypeNone
    | ButtonsTypeOk
    | ButtonsTypeClose
    | ButtonsTypeCancel
    | ButtonsTypeYesNo
    | ButtonsTypeOkCancel
    | AnotherButtonsType Int
    deriving (Show, Eq)

instance Enum ButtonsType where
    fromEnum ButtonsTypeNone = 0
    fromEnum ButtonsTypeOk = 1
    fromEnum ButtonsTypeClose = 2
    fromEnum ButtonsTypeCancel = 3
    fromEnum ButtonsTypeYesNo = 4
    fromEnum ButtonsTypeOkCancel = 5
    fromEnum (AnotherButtonsType k) = k

    toEnum 0 = ButtonsTypeNone
    toEnum 1 = ButtonsTypeOk
    toEnum 2 = ButtonsTypeClose
    toEnum 3 = ButtonsTypeCancel
    toEnum 4 = ButtonsTypeYesNo
    toEnum 5 = ButtonsTypeOkCancel
    toEnum k = AnotherButtonsType k

foreign import ccall "gtk_buttons_type_get_type" c_gtk_buttons_type_get_type :: 
    IO GType

instance BoxedEnum ButtonsType where
    boxedEnumType _ = c_gtk_buttons_type_get_type

-- object Calendar 
newtype Calendar = Calendar (ForeignPtr Calendar)
noCalendar :: Maybe Calendar
noCalendar = Nothing

foreign import ccall "gtk_calendar_get_type"
    c_gtk_calendar_get_type :: IO GType

type instance ParentTypes Calendar = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Calendar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_calendar_get_type
    

class GObject o => CalendarK o
instance (GObject o, IsDescendantOf Calendar o) => CalendarK o

toCalendar :: CalendarK o => o -> IO Calendar
toCalendar = unsafeCastTo Calendar

-- method Calendar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Calendar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_new" gtk_calendar_new :: 
    IO (Ptr Calendar)


calendarNew ::
    (MonadIO m) =>
    m Calendar
calendarNew  = liftIO $ do
    result <- gtk_calendar_new
    checkUnexpectedReturnNULL "gtk_calendar_new" result
    result' <- (newObject Calendar) result
    return result'

-- method Calendar::clear_marks
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_clear_marks" gtk_calendar_clear_marks :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    IO ()


calendarClearMarks ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    m ()
calendarClearMarks _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_calendar_clear_marks _obj'
    touchManagedPtr _obj
    return ()

-- method Calendar::get_date
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "year", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "month", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "day", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_get_date" gtk_calendar_get_date :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    Ptr Word32 ->                           -- year : TBasicType TUInt32
    Ptr Word32 ->                           -- month : TBasicType TUInt32
    Ptr Word32 ->                           -- day : TBasicType TUInt32
    IO ()


calendarGetDate ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    m (Word32,Word32,Word32)
calendarGetDate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    year <- allocMem :: IO (Ptr Word32)
    month <- allocMem :: IO (Ptr Word32)
    day <- allocMem :: IO (Ptr Word32)
    gtk_calendar_get_date _obj' year month day
    year' <- peek year
    month' <- peek month
    day' <- peek day
    touchManagedPtr _obj
    freeMem year
    freeMem month
    freeMem day
    return (year', month', day')

-- method Calendar::get_day_is_marked
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "day", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "day", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_get_day_is_marked" gtk_calendar_get_day_is_marked :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    Word32 ->                               -- day : TBasicType TUInt32
    IO CInt


calendarGetDayIsMarked ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- day
    m Bool
calendarGetDayIsMarked _obj day = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_calendar_get_day_is_marked _obj' day
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Calendar::get_detail_height_rows
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_get_detail_height_rows" gtk_calendar_get_detail_height_rows :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    IO Int32


calendarGetDetailHeightRows ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    m Int32
calendarGetDetailHeightRows _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_calendar_get_detail_height_rows _obj'
    touchManagedPtr _obj
    return result

-- method Calendar::get_detail_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_get_detail_width_chars" gtk_calendar_get_detail_width_chars :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    IO Int32


calendarGetDetailWidthChars ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    m Int32
calendarGetDetailWidthChars _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_calendar_get_detail_width_chars _obj'
    touchManagedPtr _obj
    return result

-- method Calendar::get_display_options
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CalendarDisplayOptions"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_get_display_options" gtk_calendar_get_display_options :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    IO CUInt


calendarGetDisplayOptions ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    m [CalendarDisplayOptions]
calendarGetDisplayOptions _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_calendar_get_display_options _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method Calendar::mark_day
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "day", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "day", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_mark_day" gtk_calendar_mark_day :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    Word32 ->                               -- day : TBasicType TUInt32
    IO ()


calendarMarkDay ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- day
    m ()
calendarMarkDay _obj day = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_calendar_mark_day _obj' day
    touchManagedPtr _obj
    return ()

-- method Calendar::select_day
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "day", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "day", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_select_day" gtk_calendar_select_day :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    Word32 ->                               -- day : TBasicType TUInt32
    IO ()


calendarSelectDay ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- day
    m ()
calendarSelectDay _obj day = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_calendar_select_day _obj' day
    touchManagedPtr _obj
    return ()

-- method Calendar::select_month
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "month", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "year", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "month", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "year", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_select_month" gtk_calendar_select_month :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    Word32 ->                               -- month : TBasicType TUInt32
    Word32 ->                               -- year : TBasicType TUInt32
    IO ()


calendarSelectMonth ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- month
    Word32 ->                               -- year
    m ()
calendarSelectMonth _obj month year = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_calendar_select_month _obj' month year
    touchManagedPtr _obj
    return ()

-- method Calendar::set_detail_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "CalendarDetailFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "CalendarDetailFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_set_detail_func" gtk_calendar_set_detail_func :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    FunPtr CalendarDetailFuncC ->           -- func : TInterface "Gtk" "CalendarDetailFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


calendarSetDetailFunc ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    CalendarDetailFunc ->                   -- func
    m ()
calendarSetDetailFunc _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkCalendarDetailFunc (calendarDetailFuncWrapper Nothing func)
    let data_ = castFunPtrToPtr func'
    let destroy = safeFreeFunPtrPtr
    gtk_calendar_set_detail_func _obj' func' data_ destroy
    touchManagedPtr _obj
    return ()

-- method Calendar::set_detail_height_rows
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rows", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rows", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_set_detail_height_rows" gtk_calendar_set_detail_height_rows :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    Int32 ->                                -- rows : TBasicType TInt32
    IO ()


calendarSetDetailHeightRows ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- rows
    m ()
calendarSetDetailHeightRows _obj rows = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_calendar_set_detail_height_rows _obj' rows
    touchManagedPtr _obj
    return ()

-- method Calendar::set_detail_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_set_detail_width_chars" gtk_calendar_set_detail_width_chars :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    Int32 ->                                -- chars : TBasicType TInt32
    IO ()


calendarSetDetailWidthChars ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- chars
    m ()
calendarSetDetailWidthChars _obj chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_calendar_set_detail_width_chars _obj' chars
    touchManagedPtr _obj
    return ()

-- method Calendar::set_display_options
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CalendarDisplayOptions", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CalendarDisplayOptions", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_set_display_options" gtk_calendar_set_display_options :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    CUInt ->                                -- flags : TInterface "Gtk" "CalendarDisplayOptions"
    IO ()


calendarSetDisplayOptions ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    [CalendarDisplayOptions] ->             -- flags
    m ()
calendarSetDisplayOptions _obj flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let flags' = gflagsToWord flags
    gtk_calendar_set_display_options _obj' flags'
    touchManagedPtr _obj
    return ()

-- method Calendar::unmark_day
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "day", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Calendar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "day", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_unmark_day" gtk_calendar_unmark_day :: 
    Ptr Calendar ->                         -- _obj : TInterface "Gtk" "Calendar"
    Word32 ->                               -- day : TBasicType TUInt32
    IO ()


calendarUnmarkDay ::
    (MonadIO m, CalendarK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- day
    m ()
calendarUnmarkDay _obj day = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_calendar_unmark_day _obj' day
    touchManagedPtr _obj
    return ()

-- signal Calendar::day-selected
type CalendarDaySelectedCallback =
    IO ()

noCalendarDaySelectedCallback :: Maybe CalendarDaySelectedCallback
noCalendarDaySelectedCallback = Nothing

type CalendarDaySelectedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCalendarDaySelectedCallback :: CalendarDaySelectedCallbackC -> IO (FunPtr CalendarDaySelectedCallbackC)

calendarDaySelectedClosure :: CalendarDaySelectedCallback -> IO Closure
calendarDaySelectedClosure cb = newCClosure =<< mkCalendarDaySelectedCallback wrapped
    where wrapped = calendarDaySelectedCallbackWrapper cb

calendarDaySelectedCallbackWrapper ::
    CalendarDaySelectedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
calendarDaySelectedCallbackWrapper _cb _ _ = do
    _cb 

onCalendarDaySelected :: (GObject a, MonadIO m) => a -> CalendarDaySelectedCallback -> m SignalHandlerId
onCalendarDaySelected obj cb = liftIO $ connectCalendarDaySelected obj cb SignalConnectBefore
afterCalendarDaySelected :: (GObject a, MonadIO m) => a -> CalendarDaySelectedCallback -> m SignalHandlerId
afterCalendarDaySelected obj cb = connectCalendarDaySelected obj cb SignalConnectAfter

connectCalendarDaySelected :: (GObject a, MonadIO m) =>
                              a -> CalendarDaySelectedCallback -> SignalConnectMode -> m SignalHandlerId
connectCalendarDaySelected obj cb after = liftIO $ do
    cb' <- mkCalendarDaySelectedCallback (calendarDaySelectedCallbackWrapper cb)
    connectSignalFunPtr obj "day-selected" cb' after

-- signal Calendar::day-selected-double-click
type CalendarDaySelectedDoubleClickCallback =
    IO ()

noCalendarDaySelectedDoubleClickCallback :: Maybe CalendarDaySelectedDoubleClickCallback
noCalendarDaySelectedDoubleClickCallback = Nothing

type CalendarDaySelectedDoubleClickCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCalendarDaySelectedDoubleClickCallback :: CalendarDaySelectedDoubleClickCallbackC -> IO (FunPtr CalendarDaySelectedDoubleClickCallbackC)

calendarDaySelectedDoubleClickClosure :: CalendarDaySelectedDoubleClickCallback -> IO Closure
calendarDaySelectedDoubleClickClosure cb = newCClosure =<< mkCalendarDaySelectedDoubleClickCallback wrapped
    where wrapped = calendarDaySelectedDoubleClickCallbackWrapper cb

calendarDaySelectedDoubleClickCallbackWrapper ::
    CalendarDaySelectedDoubleClickCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
calendarDaySelectedDoubleClickCallbackWrapper _cb _ _ = do
    _cb 

onCalendarDaySelectedDoubleClick :: (GObject a, MonadIO m) => a -> CalendarDaySelectedDoubleClickCallback -> m SignalHandlerId
onCalendarDaySelectedDoubleClick obj cb = liftIO $ connectCalendarDaySelectedDoubleClick obj cb SignalConnectBefore
afterCalendarDaySelectedDoubleClick :: (GObject a, MonadIO m) => a -> CalendarDaySelectedDoubleClickCallback -> m SignalHandlerId
afterCalendarDaySelectedDoubleClick obj cb = connectCalendarDaySelectedDoubleClick obj cb SignalConnectAfter

connectCalendarDaySelectedDoubleClick :: (GObject a, MonadIO m) =>
                                         a -> CalendarDaySelectedDoubleClickCallback -> SignalConnectMode -> m SignalHandlerId
connectCalendarDaySelectedDoubleClick obj cb after = liftIO $ do
    cb' <- mkCalendarDaySelectedDoubleClickCallback (calendarDaySelectedDoubleClickCallbackWrapper cb)
    connectSignalFunPtr obj "day-selected-double-click" cb' after

-- signal Calendar::month-changed
type CalendarMonthChangedCallback =
    IO ()

noCalendarMonthChangedCallback :: Maybe CalendarMonthChangedCallback
noCalendarMonthChangedCallback = Nothing

type CalendarMonthChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCalendarMonthChangedCallback :: CalendarMonthChangedCallbackC -> IO (FunPtr CalendarMonthChangedCallbackC)

calendarMonthChangedClosure :: CalendarMonthChangedCallback -> IO Closure
calendarMonthChangedClosure cb = newCClosure =<< mkCalendarMonthChangedCallback wrapped
    where wrapped = calendarMonthChangedCallbackWrapper cb

calendarMonthChangedCallbackWrapper ::
    CalendarMonthChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
calendarMonthChangedCallbackWrapper _cb _ _ = do
    _cb 

onCalendarMonthChanged :: (GObject a, MonadIO m) => a -> CalendarMonthChangedCallback -> m SignalHandlerId
onCalendarMonthChanged obj cb = liftIO $ connectCalendarMonthChanged obj cb SignalConnectBefore
afterCalendarMonthChanged :: (GObject a, MonadIO m) => a -> CalendarMonthChangedCallback -> m SignalHandlerId
afterCalendarMonthChanged obj cb = connectCalendarMonthChanged obj cb SignalConnectAfter

connectCalendarMonthChanged :: (GObject a, MonadIO m) =>
                               a -> CalendarMonthChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectCalendarMonthChanged obj cb after = liftIO $ do
    cb' <- mkCalendarMonthChangedCallback (calendarMonthChangedCallbackWrapper cb)
    connectSignalFunPtr obj "month-changed" cb' after

-- signal Calendar::next-month
type CalendarNextMonthCallback =
    IO ()

noCalendarNextMonthCallback :: Maybe CalendarNextMonthCallback
noCalendarNextMonthCallback = Nothing

type CalendarNextMonthCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCalendarNextMonthCallback :: CalendarNextMonthCallbackC -> IO (FunPtr CalendarNextMonthCallbackC)

calendarNextMonthClosure :: CalendarNextMonthCallback -> IO Closure
calendarNextMonthClosure cb = newCClosure =<< mkCalendarNextMonthCallback wrapped
    where wrapped = calendarNextMonthCallbackWrapper cb

calendarNextMonthCallbackWrapper ::
    CalendarNextMonthCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
calendarNextMonthCallbackWrapper _cb _ _ = do
    _cb 

onCalendarNextMonth :: (GObject a, MonadIO m) => a -> CalendarNextMonthCallback -> m SignalHandlerId
onCalendarNextMonth obj cb = liftIO $ connectCalendarNextMonth obj cb SignalConnectBefore
afterCalendarNextMonth :: (GObject a, MonadIO m) => a -> CalendarNextMonthCallback -> m SignalHandlerId
afterCalendarNextMonth obj cb = connectCalendarNextMonth obj cb SignalConnectAfter

connectCalendarNextMonth :: (GObject a, MonadIO m) =>
                            a -> CalendarNextMonthCallback -> SignalConnectMode -> m SignalHandlerId
connectCalendarNextMonth obj cb after = liftIO $ do
    cb' <- mkCalendarNextMonthCallback (calendarNextMonthCallbackWrapper cb)
    connectSignalFunPtr obj "next-month" cb' after

-- signal Calendar::next-year
type CalendarNextYearCallback =
    IO ()

noCalendarNextYearCallback :: Maybe CalendarNextYearCallback
noCalendarNextYearCallback = Nothing

type CalendarNextYearCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCalendarNextYearCallback :: CalendarNextYearCallbackC -> IO (FunPtr CalendarNextYearCallbackC)

calendarNextYearClosure :: CalendarNextYearCallback -> IO Closure
calendarNextYearClosure cb = newCClosure =<< mkCalendarNextYearCallback wrapped
    where wrapped = calendarNextYearCallbackWrapper cb

calendarNextYearCallbackWrapper ::
    CalendarNextYearCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
calendarNextYearCallbackWrapper _cb _ _ = do
    _cb 

onCalendarNextYear :: (GObject a, MonadIO m) => a -> CalendarNextYearCallback -> m SignalHandlerId
onCalendarNextYear obj cb = liftIO $ connectCalendarNextYear obj cb SignalConnectBefore
afterCalendarNextYear :: (GObject a, MonadIO m) => a -> CalendarNextYearCallback -> m SignalHandlerId
afterCalendarNextYear obj cb = connectCalendarNextYear obj cb SignalConnectAfter

connectCalendarNextYear :: (GObject a, MonadIO m) =>
                           a -> CalendarNextYearCallback -> SignalConnectMode -> m SignalHandlerId
connectCalendarNextYear obj cb after = liftIO $ do
    cb' <- mkCalendarNextYearCallback (calendarNextYearCallbackWrapper cb)
    connectSignalFunPtr obj "next-year" cb' after

-- signal Calendar::prev-month
type CalendarPrevMonthCallback =
    IO ()

noCalendarPrevMonthCallback :: Maybe CalendarPrevMonthCallback
noCalendarPrevMonthCallback = Nothing

type CalendarPrevMonthCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCalendarPrevMonthCallback :: CalendarPrevMonthCallbackC -> IO (FunPtr CalendarPrevMonthCallbackC)

calendarPrevMonthClosure :: CalendarPrevMonthCallback -> IO Closure
calendarPrevMonthClosure cb = newCClosure =<< mkCalendarPrevMonthCallback wrapped
    where wrapped = calendarPrevMonthCallbackWrapper cb

calendarPrevMonthCallbackWrapper ::
    CalendarPrevMonthCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
calendarPrevMonthCallbackWrapper _cb _ _ = do
    _cb 

onCalendarPrevMonth :: (GObject a, MonadIO m) => a -> CalendarPrevMonthCallback -> m SignalHandlerId
onCalendarPrevMonth obj cb = liftIO $ connectCalendarPrevMonth obj cb SignalConnectBefore
afterCalendarPrevMonth :: (GObject a, MonadIO m) => a -> CalendarPrevMonthCallback -> m SignalHandlerId
afterCalendarPrevMonth obj cb = connectCalendarPrevMonth obj cb SignalConnectAfter

connectCalendarPrevMonth :: (GObject a, MonadIO m) =>
                            a -> CalendarPrevMonthCallback -> SignalConnectMode -> m SignalHandlerId
connectCalendarPrevMonth obj cb after = liftIO $ do
    cb' <- mkCalendarPrevMonthCallback (calendarPrevMonthCallbackWrapper cb)
    connectSignalFunPtr obj "prev-month" cb' after

-- signal Calendar::prev-year
type CalendarPrevYearCallback =
    IO ()

noCalendarPrevYearCallback :: Maybe CalendarPrevYearCallback
noCalendarPrevYearCallback = Nothing

type CalendarPrevYearCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCalendarPrevYearCallback :: CalendarPrevYearCallbackC -> IO (FunPtr CalendarPrevYearCallbackC)

calendarPrevYearClosure :: CalendarPrevYearCallback -> IO Closure
calendarPrevYearClosure cb = newCClosure =<< mkCalendarPrevYearCallback wrapped
    where wrapped = calendarPrevYearCallbackWrapper cb

calendarPrevYearCallbackWrapper ::
    CalendarPrevYearCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
calendarPrevYearCallbackWrapper _cb _ _ = do
    _cb 

onCalendarPrevYear :: (GObject a, MonadIO m) => a -> CalendarPrevYearCallback -> m SignalHandlerId
onCalendarPrevYear obj cb = liftIO $ connectCalendarPrevYear obj cb SignalConnectBefore
afterCalendarPrevYear :: (GObject a, MonadIO m) => a -> CalendarPrevYearCallback -> m SignalHandlerId
afterCalendarPrevYear obj cb = connectCalendarPrevYear obj cb SignalConnectAfter

connectCalendarPrevYear :: (GObject a, MonadIO m) =>
                           a -> CalendarPrevYearCallback -> SignalConnectMode -> m SignalHandlerId
connectCalendarPrevYear obj cb after = liftIO $ do
    cb' <- mkCalendarPrevYearCallback (calendarPrevYearCallbackWrapper cb)
    connectSignalFunPtr obj "prev-year" cb' after

-- callback CalendarDetailFunc
calendarDetailFuncClosure :: CalendarDetailFunc -> IO Closure
calendarDetailFuncClosure cb = newCClosure =<< mkCalendarDetailFunc wrapped
    where wrapped = calendarDetailFuncWrapper Nothing cb

type CalendarDetailFuncC =
    Ptr Calendar ->
    Word32 ->
    Word32 ->
    Word32 ->
    Ptr () ->
    IO CString

foreign import ccall "wrapper"
    mkCalendarDetailFunc :: CalendarDetailFuncC -> IO (FunPtr CalendarDetailFuncC)

type CalendarDetailFunc =
    Calendar ->
    Word32 ->
    Word32 ->
    Word32 ->
    IO T.Text

noCalendarDetailFunc :: Maybe CalendarDetailFunc
noCalendarDetailFunc = Nothing

calendarDetailFuncWrapper ::
    Maybe (Ptr (FunPtr (CalendarDetailFuncC))) ->
    CalendarDetailFunc ->
    Ptr Calendar ->
    Word32 ->
    Word32 ->
    Word32 ->
    Ptr () ->
    IO CString
calendarDetailFuncWrapper funptrptr _cb calendar year month day _ = do
    calendar' <- (newObject Calendar) calendar
    result <- _cb  calendar' year month day
    maybeReleaseFunPtr funptrptr
    result' <- textToCString result
    return result'

-- Flags CalendarDisplayOptions

data CalendarDisplayOptions = 
      CalendarDisplayOptionsShowHeading
    | CalendarDisplayOptionsShowDayNames
    | CalendarDisplayOptionsNoMonthChange
    | CalendarDisplayOptionsShowWeekNumbers
    | CalendarDisplayOptionsShowDetails
    | AnotherCalendarDisplayOptions Int
    deriving (Show, Eq)

instance Enum CalendarDisplayOptions where
    fromEnum CalendarDisplayOptionsShowHeading = 1
    fromEnum CalendarDisplayOptionsShowDayNames = 2
    fromEnum CalendarDisplayOptionsNoMonthChange = 4
    fromEnum CalendarDisplayOptionsShowWeekNumbers = 8
    fromEnum CalendarDisplayOptionsShowDetails = 32
    fromEnum (AnotherCalendarDisplayOptions k) = k

    toEnum 1 = CalendarDisplayOptionsShowHeading
    toEnum 2 = CalendarDisplayOptionsShowDayNames
    toEnum 4 = CalendarDisplayOptionsNoMonthChange
    toEnum 8 = CalendarDisplayOptionsShowWeekNumbers
    toEnum 32 = CalendarDisplayOptionsShowDetails
    toEnum k = AnotherCalendarDisplayOptions k

foreign import ccall "gtk_calendar_display_options_get_type" c_gtk_calendar_display_options_get_type :: 
    IO GType

instance BoxedEnum CalendarDisplayOptions where
    boxedEnumType _ = c_gtk_calendar_display_options_get_type

instance IsGFlag CalendarDisplayOptions

-- callback Callback
callbackClosure :: Callback -> IO Closure
callbackClosure cb = newCClosure =<< mkCallback wrapped
    where wrapped = callbackWrapper Nothing cb

type CallbackC =
    Ptr Widget ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkCallback :: CallbackC -> IO (FunPtr CallbackC)

type Callback =
    Widget ->
    IO ()

noCallback :: Maybe Callback
noCallback = Nothing

callbackWrapper ::
    Maybe (Ptr (FunPtr (CallbackC))) ->
    Callback ->
    Ptr Widget ->
    Ptr () ->
    IO ()
callbackWrapper funptrptr _cb widget _ = do
    widget' <- (newObject Widget) widget
    _cb  widget'
    maybeReleaseFunPtr funptrptr

-- object CellAccessible 
newtype CellAccessible = CellAccessible (ForeignPtr CellAccessible)
noCellAccessible :: Maybe CellAccessible
noCellAccessible = Nothing

foreign import ccall "gtk_cell_accessible_get_type"
    c_gtk_cell_accessible_get_type :: IO GType

type instance ParentTypes CellAccessible = '[Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component]

instance GObject CellAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_cell_accessible_get_type
    

class GObject o => CellAccessibleK o
instance (GObject o, IsDescendantOf CellAccessible o) => CellAccessibleK o

toCellAccessible :: CellAccessibleK o => o -> IO CellAccessible
toCellAccessible = unsafeCastTo CellAccessible

-- interface CellAccessibleParent 

newtype CellAccessibleParent = CellAccessibleParent (ForeignPtr CellAccessibleParent)
noCellAccessibleParent :: Maybe CellAccessibleParent
noCellAccessibleParent = Nothing

class ForeignPtrNewtype a => CellAccessibleParentK a
instance (ForeignPtrNewtype o, IsDescendantOf CellAccessibleParent o) => CellAccessibleParentK o
type instance ParentTypes CellAccessibleParent = '[]

-- method CellAccessibleParent::activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_accessible_parent_activate" gtk_cell_accessible_parent_activate :: 
    Ptr CellAccessibleParent ->             -- _obj : TInterface "Gtk" "CellAccessibleParent"
    Ptr CellAccessible ->                   -- cell : TInterface "Gtk" "CellAccessible"
    IO ()


cellAccessibleParentActivate ::
    (MonadIO m, CellAccessibleParentK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    m ()
cellAccessibleParentActivate _obj cell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    gtk_cell_accessible_parent_activate _obj' cell'
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- method CellAccessibleParent::edit
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_accessible_parent_edit" gtk_cell_accessible_parent_edit :: 
    Ptr CellAccessibleParent ->             -- _obj : TInterface "Gtk" "CellAccessibleParent"
    Ptr CellAccessible ->                   -- cell : TInterface "Gtk" "CellAccessible"
    IO ()


cellAccessibleParentEdit ::
    (MonadIO m, CellAccessibleParentK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    m ()
cellAccessibleParentEdit _obj cell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    gtk_cell_accessible_parent_edit _obj' cell'
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- method CellAccessibleParent::expand_collapse
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_accessible_parent_expand_collapse" gtk_cell_accessible_parent_expand_collapse :: 
    Ptr CellAccessibleParent ->             -- _obj : TInterface "Gtk" "CellAccessibleParent"
    Ptr CellAccessible ->                   -- cell : TInterface "Gtk" "CellAccessible"
    IO ()


cellAccessibleParentExpandCollapse ::
    (MonadIO m, CellAccessibleParentK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    m ()
cellAccessibleParentExpandCollapse _obj cell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    gtk_cell_accessible_parent_expand_collapse _obj' cell'
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- method CellAccessibleParent::get_cell_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_accessible_parent_get_cell_area" gtk_cell_accessible_parent_get_cell_area :: 
    Ptr CellAccessibleParent ->             -- _obj : TInterface "Gtk" "CellAccessibleParent"
    Ptr CellAccessible ->                   -- cell : TInterface "Gtk" "CellAccessible"
    Ptr Gdk.Rectangle ->                    -- cell_rect : TInterface "Gdk" "Rectangle"
    IO ()


cellAccessibleParentGetCellArea ::
    (MonadIO m, CellAccessibleParentK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    Gdk.Rectangle ->                        -- cell_rect
    m ()
cellAccessibleParentGetCellArea _obj cell cell_rect = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    let cell_rect' = unsafeManagedPtrGetPtr cell_rect
    gtk_cell_accessible_parent_get_cell_area _obj' cell' cell_rect'
    touchManagedPtr _obj
    touchManagedPtr cell
    touchManagedPtr cell_rect
    return ()

-- method CellAccessibleParent::get_cell_extents
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_accessible_parent_get_cell_extents" gtk_cell_accessible_parent_get_cell_extents :: 
    Ptr CellAccessibleParent ->             -- _obj : TInterface "Gtk" "CellAccessibleParent"
    Ptr CellAccessible ->                   -- cell : TInterface "Gtk" "CellAccessible"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    CUInt ->                                -- coord_type : TInterface "Atk" "CoordType"
    IO ()


cellAccessibleParentGetCellExtents ::
    (MonadIO m, CellAccessibleParentK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    Atk.CoordType ->                        -- coord_type
    m ()
cellAccessibleParentGetCellExtents _obj cell x y width height coord_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    let coord_type' = (fromIntegral . fromEnum) coord_type
    gtk_cell_accessible_parent_get_cell_extents _obj' cell' x y width height coord_type'
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- method CellAccessibleParent::get_child_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_accessible_parent_get_child_index" gtk_cell_accessible_parent_get_child_index :: 
    Ptr CellAccessibleParent ->             -- _obj : TInterface "Gtk" "CellAccessibleParent"
    Ptr CellAccessible ->                   -- cell : TInterface "Gtk" "CellAccessible"
    IO Int32


cellAccessibleParentGetChildIndex ::
    (MonadIO m, CellAccessibleParentK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    m Int32
cellAccessibleParentGetChildIndex _obj cell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    result <- gtk_cell_accessible_parent_get_child_index _obj' cell'
    touchManagedPtr _obj
    touchManagedPtr cell
    return result

-- method CellAccessibleParent::get_renderer_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellRendererState"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_accessible_parent_get_renderer_state" gtk_cell_accessible_parent_get_renderer_state :: 
    Ptr CellAccessibleParent ->             -- _obj : TInterface "Gtk" "CellAccessibleParent"
    Ptr CellAccessible ->                   -- cell : TInterface "Gtk" "CellAccessible"
    IO CUInt


cellAccessibleParentGetRendererState ::
    (MonadIO m, CellAccessibleParentK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    m [CellRendererState]
cellAccessibleParentGetRendererState _obj cell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    result <- gtk_cell_accessible_parent_get_renderer_state _obj' cell'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    touchManagedPtr cell
    return result'

-- method CellAccessibleParent::grab_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_accessible_parent_grab_focus" gtk_cell_accessible_parent_grab_focus :: 
    Ptr CellAccessibleParent ->             -- _obj : TInterface "Gtk" "CellAccessibleParent"
    Ptr CellAccessible ->                   -- cell : TInterface "Gtk" "CellAccessible"
    IO CInt


cellAccessibleParentGrabFocus ::
    (MonadIO m, CellAccessibleParentK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    m Bool
cellAccessibleParentGrabFocus _obj cell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    result <- gtk_cell_accessible_parent_grab_focus _obj' cell'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr cell
    return result'

-- method CellAccessibleParent::update_relationset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relationset", argType = TInterface "Atk" "RelationSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAccessibleParent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relationset", argType = TInterface "Atk" "RelationSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_accessible_parent_update_relationset" gtk_cell_accessible_parent_update_relationset :: 
    Ptr CellAccessibleParent ->             -- _obj : TInterface "Gtk" "CellAccessibleParent"
    Ptr CellAccessible ->                   -- cell : TInterface "Gtk" "CellAccessible"
    Ptr Atk.RelationSet ->                  -- relationset : TInterface "Atk" "RelationSet"
    IO ()


cellAccessibleParentUpdateRelationset ::
    (MonadIO m, CellAccessibleParentK a, CellAccessibleK b, Atk.RelationSetK c) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    c ->                                    -- relationset
    m ()
cellAccessibleParentUpdateRelationset _obj cell relationset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    let relationset' = unsafeManagedPtrCastPtr relationset
    gtk_cell_accessible_parent_update_relationset _obj' cell' relationset'
    touchManagedPtr _obj
    touchManagedPtr cell
    touchManagedPtr relationset
    return ()

-- callback CellAllocCallback
cellAllocCallbackClosure :: CellAllocCallback -> IO Closure
cellAllocCallbackClosure cb = newCClosure =<< mkCellAllocCallback wrapped
    where wrapped = cellAllocCallbackWrapper Nothing cb

type CellAllocCallbackC =
    Ptr CellRenderer ->
    Ptr Gdk.Rectangle ->
    Ptr Gdk.Rectangle ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkCellAllocCallback :: CellAllocCallbackC -> IO (FunPtr CellAllocCallbackC)

type CellAllocCallback =
    CellRenderer ->
    Gdk.Rectangle ->
    Gdk.Rectangle ->
    IO Bool

noCellAllocCallback :: Maybe CellAllocCallback
noCellAllocCallback = Nothing

cellAllocCallbackWrapper ::
    Maybe (Ptr (FunPtr (CellAllocCallbackC))) ->
    CellAllocCallback ->
    Ptr CellRenderer ->
    Ptr Gdk.Rectangle ->
    Ptr Gdk.Rectangle ->
    Ptr () ->
    IO CInt
cellAllocCallbackWrapper funptrptr _cb renderer cell_area cell_background _ = do
    renderer' <- (newObject CellRenderer) renderer
    cell_area' <- (newBoxed Gdk.Rectangle) cell_area
    cell_background' <- (newBoxed Gdk.Rectangle) cell_background
    result <- _cb  renderer' cell_area' cell_background'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- object CellArea 
newtype CellArea = CellArea (ForeignPtr CellArea)
noCellArea :: Maybe CellArea
noCellArea = Nothing

foreign import ccall "gtk_cell_area_get_type"
    c_gtk_cell_area_get_type :: IO GType

type instance ParentTypes CellArea = '[GObject.Object, Buildable, CellLayout]

instance GObject CellArea where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_area_get_type
    

class GObject o => CellAreaK o
instance (GObject o, IsDescendantOf CellArea o) => CellAreaK o

toCellArea :: CellAreaK o => o -> IO CellArea
toCellArea = unsafeCastTo CellArea

-- method CellArea::activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "edit_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "edit_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_activate" gtk_cell_area_activate :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    CUInt ->                                -- flags : TInterface "Gtk" "CellRendererState"
    CInt ->                                 -- edit_only : TBasicType TBoolean
    IO CInt


cellAreaActivate ::
    (MonadIO m, CellAreaK a, CellAreaContextK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- context
    c ->                                    -- widget
    Gdk.Rectangle ->                        -- cell_area
    [CellRendererState] ->                  -- flags
    Bool ->                                 -- edit_only
    m Bool
cellAreaActivate _obj context widget cell_area flags edit_only = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    let widget' = unsafeManagedPtrCastPtr widget
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    let flags' = gflagsToWord flags
    let edit_only' = (fromIntegral . fromEnum) edit_only
    result <- gtk_cell_area_activate _obj' context' widget' cell_area' flags' edit_only'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr cell_area
    return result'

-- method CellArea::activate_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_activate_cell" gtk_cell_area_activate_cell :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    CUInt ->                                -- flags : TInterface "Gtk" "CellRendererState"
    IO CInt


cellAreaActivateCell ::
    (MonadIO m, CellAreaK a, WidgetK b, CellRendererK c) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    c ->                                    -- renderer
    Gdk.Event ->                            -- event
    Gdk.Rectangle ->                        -- cell_area
    [CellRendererState] ->                  -- flags
    m Bool
cellAreaActivateCell _obj widget renderer event cell_area flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    let renderer' = unsafeManagedPtrCastPtr renderer
    let event' = unsafeManagedPtrGetPtr event
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    let flags' = gflagsToWord flags
    result <- gtk_cell_area_activate_cell _obj' widget' renderer' event' cell_area' flags'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr widget
    touchManagedPtr renderer
    touchManagedPtr event
    touchManagedPtr cell_area
    return result'

-- method CellArea::add
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_add" gtk_cell_area_add :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    IO ()


cellAreaAdd ::
    (MonadIO m, CellAreaK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    m ()
cellAreaAdd _obj renderer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    gtk_cell_area_add _obj' renderer'
    touchManagedPtr _obj
    touchManagedPtr renderer
    return ()

-- method CellArea::add_focus_sibling
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_add_focus_sibling" gtk_cell_area_add_focus_sibling :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    Ptr CellRenderer ->                     -- sibling : TInterface "Gtk" "CellRenderer"
    IO ()


cellAreaAddFocusSibling ::
    (MonadIO m, CellAreaK a, CellRendererK b, CellRendererK c) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    c ->                                    -- sibling
    m ()
cellAreaAddFocusSibling _obj renderer sibling = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    let sibling' = unsafeManagedPtrCastPtr sibling
    gtk_cell_area_add_focus_sibling _obj' renderer' sibling'
    touchManagedPtr _obj
    touchManagedPtr renderer
    touchManagedPtr sibling
    return ()

-- method CellArea::apply_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tree_model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_expander", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_expanded", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tree_model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_expander", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_expanded", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_apply_attributes" gtk_cell_area_apply_attributes :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr TreeModel ->                        -- tree_model : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    CInt ->                                 -- is_expander : TBasicType TBoolean
    CInt ->                                 -- is_expanded : TBasicType TBoolean
    IO ()


cellAreaApplyAttributes ::
    (MonadIO m, CellAreaK a, TreeModelK b) =>
    a ->                                    -- _obj
    b ->                                    -- tree_model
    TreeIter ->                             -- iter
    Bool ->                                 -- is_expander
    Bool ->                                 -- is_expanded
    m ()
cellAreaApplyAttributes _obj tree_model iter is_expander is_expanded = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tree_model' = unsafeManagedPtrCastPtr tree_model
    let iter' = unsafeManagedPtrGetPtr iter
    let is_expander' = (fromIntegral . fromEnum) is_expander
    let is_expanded' = (fromIntegral . fromEnum) is_expanded
    gtk_cell_area_apply_attributes _obj' tree_model' iter' is_expander' is_expanded'
    touchManagedPtr _obj
    touchManagedPtr tree_model
    touchManagedPtr iter
    return ()

-- method CellArea::attribute_connect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_attribute_connect" gtk_cell_area_attribute_connect :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    CString ->                              -- attribute : TBasicType TUTF8
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


cellAreaAttributeConnect ::
    (MonadIO m, CellAreaK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    T.Text ->                               -- attribute
    Int32 ->                                -- column
    m ()
cellAreaAttributeConnect _obj renderer attribute column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    attribute' <- textToCString attribute
    gtk_cell_area_attribute_connect _obj' renderer' attribute' column
    touchManagedPtr _obj
    touchManagedPtr renderer
    freeMem attribute'
    return ()

-- method CellArea::attribute_disconnect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_attribute_disconnect" gtk_cell_area_attribute_disconnect :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    CString ->                              -- attribute : TBasicType TUTF8
    IO ()


cellAreaAttributeDisconnect ::
    (MonadIO m, CellAreaK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    T.Text ->                               -- attribute
    m ()
cellAreaAttributeDisconnect _obj renderer attribute = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    attribute' <- textToCString attribute
    gtk_cell_area_attribute_disconnect _obj' renderer' attribute'
    touchManagedPtr _obj
    touchManagedPtr renderer
    freeMem attribute'
    return ()

-- method CellArea::attribute_get_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_attribute_get_column" gtk_cell_area_attribute_get_column :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    CString ->                              -- attribute : TBasicType TUTF8
    IO Int32


cellAreaAttributeGetColumn ::
    (MonadIO m, CellAreaK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    T.Text ->                               -- attribute
    m Int32
cellAreaAttributeGetColumn _obj renderer attribute = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    attribute' <- textToCString attribute
    result <- gtk_cell_area_attribute_get_column _obj' renderer' attribute'
    touchManagedPtr _obj
    touchManagedPtr renderer
    freeMem attribute'
    return result

-- method CellArea::cell_get_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_cell_get_property" gtk_cell_area_cell_get_property :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


cellAreaCellGetProperty ::
    (MonadIO m, CellAreaK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    T.Text ->                               -- property_name
    GValue ->                               -- value
    m ()
cellAreaCellGetProperty _obj renderer property_name value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    property_name' <- textToCString property_name
    let value' = unsafeManagedPtrGetPtr value
    gtk_cell_area_cell_get_property _obj' renderer' property_name' value'
    touchManagedPtr _obj
    touchManagedPtr renderer
    touchManagedPtr value
    freeMem property_name'
    return ()

-- method CellArea::cell_set_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_cell_set_property" gtk_cell_area_cell_set_property :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


cellAreaCellSetProperty ::
    (MonadIO m, CellAreaK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    T.Text ->                               -- property_name
    GValue ->                               -- value
    m ()
cellAreaCellSetProperty _obj renderer property_name value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    property_name' <- textToCString property_name
    let value' = unsafeManagedPtrGetPtr value
    gtk_cell_area_cell_set_property _obj' renderer' property_name' value'
    touchManagedPtr _obj
    touchManagedPtr renderer
    touchManagedPtr value
    freeMem property_name'
    return ()

-- method CellArea::copy_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellAreaContext"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_copy_context" gtk_cell_area_copy_context :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    IO (Ptr CellAreaContext)


cellAreaCopyContext ::
    (MonadIO m, CellAreaK a, CellAreaContextK b) =>
    a ->                                    -- _obj
    b ->                                    -- context
    m CellAreaContext
cellAreaCopyContext _obj context = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    result <- gtk_cell_area_copy_context _obj' context'
    checkUnexpectedReturnNULL "gtk_cell_area_copy_context" result
    result' <- (wrapObject CellAreaContext) result
    touchManagedPtr _obj
    touchManagedPtr context
    return result'

-- method CellArea::create_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellAreaContext"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_create_context" gtk_cell_area_create_context :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    IO (Ptr CellAreaContext)


cellAreaCreateContext ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- _obj
    m CellAreaContext
cellAreaCreateContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_area_create_context _obj'
    checkUnexpectedReturnNULL "gtk_cell_area_create_context" result
    result' <- (wrapObject CellAreaContext) result
    touchManagedPtr _obj
    return result'

-- method CellArea::event
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_event" gtk_cell_area_event :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    CUInt ->                                -- flags : TInterface "Gtk" "CellRendererState"
    IO Int32


cellAreaEvent ::
    (MonadIO m, CellAreaK a, CellAreaContextK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- context
    c ->                                    -- widget
    Gdk.Event ->                            -- event
    Gdk.Rectangle ->                        -- cell_area
    [CellRendererState] ->                  -- flags
    m Int32
cellAreaEvent _obj context widget event cell_area flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    let widget' = unsafeManagedPtrCastPtr widget
    let event' = unsafeManagedPtrGetPtr event
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    let flags' = gflagsToWord flags
    result <- gtk_cell_area_event _obj' context' widget' event' cell_area' flags'
    touchManagedPtr _obj
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr event
    touchManagedPtr cell_area
    return result

-- method CellArea::focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "DirectionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "DirectionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_focus" gtk_cell_area_focus :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    CUInt ->                                -- direction : TInterface "Gtk" "DirectionType"
    IO CInt


cellAreaFocus ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- _obj
    DirectionType ->                        -- direction
    m Bool
cellAreaFocus _obj direction = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let direction' = (fromIntegral . fromEnum) direction
    result <- gtk_cell_area_focus _obj' direction'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CellArea::foreach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "CellCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "CellCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_foreach" gtk_cell_area_foreach :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    FunPtr CellCallbackC ->                 -- callback : TInterface "Gtk" "CellCallback"
    Ptr () ->                               -- callback_data : TBasicType TVoid
    IO ()


cellAreaForeach ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- _obj
    CellCallback ->                         -- callback
    m ()
cellAreaForeach _obj callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    callback' <- mkCellCallback (cellCallbackWrapper Nothing callback)
    let callback_data = nullPtr
    gtk_cell_area_foreach _obj' callback' callback_data
    safeFreeFunPtr $ castFunPtrToPtr callback'
    touchManagedPtr _obj
    return ()

-- method CellArea::foreach_alloc
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "background_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "CellAllocCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 6, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "background_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "CellAllocCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 6, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_foreach_alloc" gtk_cell_area_foreach_alloc :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    Ptr Gdk.Rectangle ->                    -- background_area : TInterface "Gdk" "Rectangle"
    FunPtr CellAllocCallbackC ->            -- callback : TInterface "Gtk" "CellAllocCallback"
    Ptr () ->                               -- callback_data : TBasicType TVoid
    IO ()


cellAreaForeachAlloc ::
    (MonadIO m, CellAreaK a, CellAreaContextK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- context
    c ->                                    -- widget
    Gdk.Rectangle ->                        -- cell_area
    Gdk.Rectangle ->                        -- background_area
    CellAllocCallback ->                    -- callback
    m ()
cellAreaForeachAlloc _obj context widget cell_area background_area callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    let widget' = unsafeManagedPtrCastPtr widget
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    let background_area' = unsafeManagedPtrGetPtr background_area
    callback' <- mkCellAllocCallback (cellAllocCallbackWrapper Nothing callback)
    let callback_data = nullPtr
    gtk_cell_area_foreach_alloc _obj' context' widget' cell_area' background_area' callback' callback_data
    safeFreeFunPtr $ castFunPtrToPtr callback'
    touchManagedPtr _obj
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr cell_area
    touchManagedPtr background_area
    return ()

-- method CellArea::get_cell_allocation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allocation", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_cell_allocation" gtk_cell_area_get_cell_allocation :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    Ptr Gdk.Rectangle ->                    -- allocation : TInterface "Gdk" "Rectangle"
    IO ()


cellAreaGetCellAllocation ::
    (MonadIO m, CellAreaK a, CellAreaContextK b, WidgetK c, CellRendererK d) =>
    a ->                                    -- _obj
    b ->                                    -- context
    c ->                                    -- widget
    d ->                                    -- renderer
    Gdk.Rectangle ->                        -- cell_area
    m (Gdk.Rectangle)
cellAreaGetCellAllocation _obj context widget renderer cell_area = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    let widget' = unsafeManagedPtrCastPtr widget
    let renderer' = unsafeManagedPtrCastPtr renderer
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    allocation <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_cell_area_get_cell_allocation _obj' context' widget' renderer' cell_area' allocation
    allocation' <- (wrapBoxed Gdk.Rectangle) allocation
    touchManagedPtr _obj
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr renderer
    touchManagedPtr cell_area
    return allocation'

-- method CellArea::get_cell_at_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "alloc_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "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 ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Ptr Gdk.Rectangle ->                    -- alloc_area : TInterface "Gdk" "Rectangle"
    IO (Ptr CellRenderer)


cellAreaGetCellAtPosition ::
    (MonadIO m, CellAreaK a, CellAreaContextK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- context
    c ->                                    -- widget
    Gdk.Rectangle ->                        -- cell_area
    Int32 ->                                -- x
    Int32 ->                                -- y
    m (CellRenderer,Gdk.Rectangle)
cellAreaGetCellAtPosition _obj context widget cell_area x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    let widget' = unsafeManagedPtrCastPtr widget
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    alloc_area <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    result <- gtk_cell_area_get_cell_at_position _obj' context' widget' cell_area' x y alloc_area
    checkUnexpectedReturnNULL "gtk_cell_area_get_cell_at_position" result
    result' <- (newObject CellRenderer) result
    alloc_area' <- (wrapBoxed Gdk.Rectangle) alloc_area
    touchManagedPtr _obj
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr cell_area
    return (result', alloc_area')

-- method CellArea::get_current_path_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : 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 ->                         -- _obj : TInterface "Gtk" "CellArea"
    IO CString


cellAreaGetCurrentPathString ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- _obj
    m T.Text
cellAreaGetCurrentPathString _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_area_get_current_path_string _obj'
    checkUnexpectedReturnNULL "gtk_cell_area_get_current_path_string" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method CellArea::get_edit_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellEditable"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_edit_widget" gtk_cell_area_get_edit_widget :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    IO (Ptr CellEditable)


cellAreaGetEditWidget ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- _obj
    m CellEditable
cellAreaGetEditWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_area_get_edit_widget _obj'
    checkUnexpectedReturnNULL "gtk_cell_area_get_edit_widget" result
    result' <- (newObject CellEditable) result
    touchManagedPtr _obj
    return result'

-- method CellArea::get_edited_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellRenderer"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_edited_cell" gtk_cell_area_get_edited_cell :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    IO (Ptr CellRenderer)


cellAreaGetEditedCell ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- _obj
    m CellRenderer
cellAreaGetEditedCell _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_area_get_edited_cell _obj'
    checkUnexpectedReturnNULL "gtk_cell_area_get_edited_cell" result
    result' <- (newObject CellRenderer) result
    touchManagedPtr _obj
    return result'

-- method CellArea::get_focus_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellRenderer"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_focus_cell" gtk_cell_area_get_focus_cell :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    IO (Ptr CellRenderer)


cellAreaGetFocusCell ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- _obj
    m CellRenderer
cellAreaGetFocusCell _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_area_get_focus_cell _obj'
    checkUnexpectedReturnNULL "gtk_cell_area_get_focus_cell" result
    result' <- (newObject CellRenderer) result
    touchManagedPtr _obj
    return result'

-- method CellArea::get_focus_from_sibling
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "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 ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    IO (Ptr CellRenderer)


cellAreaGetFocusFromSibling ::
    (MonadIO m, CellAreaK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    m CellRenderer
cellAreaGetFocusFromSibling _obj renderer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    result <- gtk_cell_area_get_focus_from_sibling _obj' renderer'
    checkUnexpectedReturnNULL "gtk_cell_area_get_focus_from_sibling" result
    result' <- (newObject CellRenderer) result
    touchManagedPtr _obj
    touchManagedPtr renderer
    return result'

-- method CellArea::get_focus_siblings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "CellRenderer")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_focus_siblings" gtk_cell_area_get_focus_siblings :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    IO (Ptr (GList (Ptr CellRenderer)))


cellAreaGetFocusSiblings ::
    (MonadIO m, CellAreaK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    m [CellRenderer]
cellAreaGetFocusSiblings _obj renderer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    result <- gtk_cell_area_get_focus_siblings _obj' renderer'
    checkUnexpectedReturnNULL "gtk_cell_area_get_focus_siblings" result
    result' <- unpackGList result
    result'' <- mapM (newObject CellRenderer) result'
    touchManagedPtr _obj
    touchManagedPtr renderer
    return result''

-- method CellArea::get_preferred_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_preferred_height" gtk_cell_area_get_preferred_height :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt32
    Ptr Int32 ->                            -- natural_height : TBasicType TInt32
    IO ()


cellAreaGetPreferredHeight ::
    (MonadIO m, CellAreaK a, CellAreaContextK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- context
    c ->                                    -- widget
    m (Int32,Int32)
cellAreaGetPreferredHeight _obj context widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    let widget' = unsafeManagedPtrCastPtr widget
    minimum_height <- allocMem :: IO (Ptr Int32)
    natural_height <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_get_preferred_height _obj' context' widget' minimum_height natural_height
    minimum_height' <- peek minimum_height
    natural_height' <- peek natural_height
    touchManagedPtr _obj
    touchManagedPtr context
    touchManagedPtr widget
    freeMem minimum_height
    freeMem natural_height
    return (minimum_height', natural_height')

-- method CellArea::get_preferred_height_for_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- 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 ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- width : TBasicType TInt32
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt32
    Ptr Int32 ->                            -- natural_height : TBasicType TInt32
    IO ()


cellAreaGetPreferredHeightForWidth ::
    (MonadIO m, CellAreaK a, CellAreaContextK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- context
    c ->                                    -- widget
    Int32 ->                                -- width
    m (Int32,Int32)
cellAreaGetPreferredHeightForWidth _obj context widget width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    let widget' = unsafeManagedPtrCastPtr widget
    minimum_height <- allocMem :: IO (Ptr Int32)
    natural_height <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_get_preferred_height_for_width _obj' context' widget' width minimum_height natural_height
    minimum_height' <- peek minimum_height
    natural_height' <- peek natural_height
    touchManagedPtr _obj
    touchManagedPtr context
    touchManagedPtr widget
    freeMem minimum_height
    freeMem natural_height
    return (minimum_height', natural_height')

-- method CellArea::get_preferred_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_preferred_width" gtk_cell_area_get_preferred_width :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Int32 ->                            -- minimum_width : TBasicType TInt32
    Ptr Int32 ->                            -- natural_width : TBasicType TInt32
    IO ()


cellAreaGetPreferredWidth ::
    (MonadIO m, CellAreaK a, CellAreaContextK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- context
    c ->                                    -- widget
    m (Int32,Int32)
cellAreaGetPreferredWidth _obj context widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    let widget' = unsafeManagedPtrCastPtr widget
    minimum_width <- allocMem :: IO (Ptr Int32)
    natural_width <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_get_preferred_width _obj' context' widget' minimum_width natural_width
    minimum_width' <- peek minimum_width
    natural_width' <- peek natural_width
    touchManagedPtr _obj
    touchManagedPtr context
    touchManagedPtr widget
    freeMem minimum_width
    freeMem natural_width
    return (minimum_width', natural_width')

-- method CellArea::get_preferred_width_for_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- 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 ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- height : TBasicType TInt32
    Ptr Int32 ->                            -- minimum_width : TBasicType TInt32
    Ptr Int32 ->                            -- natural_width : TBasicType TInt32
    IO ()


cellAreaGetPreferredWidthForHeight ::
    (MonadIO m, CellAreaK a, CellAreaContextK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- context
    c ->                                    -- widget
    Int32 ->                                -- height
    m (Int32,Int32)
cellAreaGetPreferredWidthForHeight _obj context widget height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    let widget' = unsafeManagedPtrCastPtr widget
    minimum_width <- allocMem :: IO (Ptr Int32)
    natural_width <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_get_preferred_width_for_height _obj' context' widget' height minimum_width natural_width
    minimum_width' <- peek minimum_width
    natural_width' <- peek natural_width
    touchManagedPtr _obj
    touchManagedPtr context
    touchManagedPtr widget
    freeMem minimum_width
    freeMem natural_width
    return (minimum_width', natural_width')

-- method CellArea::get_request_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SizeRequestMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_request_mode" gtk_cell_area_get_request_mode :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    IO CUInt


cellAreaGetRequestMode ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- _obj
    m SizeRequestMode
cellAreaGetRequestMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_area_get_request_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method CellArea::has_renderer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_has_renderer" gtk_cell_area_has_renderer :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    IO CInt


cellAreaHasRenderer ::
    (MonadIO m, CellAreaK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    m Bool
cellAreaHasRenderer _obj renderer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    result <- gtk_cell_area_has_renderer _obj' renderer'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr renderer
    return result'

-- method CellArea::inner_cell_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "inner_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_inner_cell_area" gtk_cell_area_inner_cell_area :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    Ptr Gdk.Rectangle ->                    -- inner_area : TInterface "Gdk" "Rectangle"
    IO ()


cellAreaInnerCellArea ::
    (MonadIO m, CellAreaK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    Gdk.Rectangle ->                        -- cell_area
    m (Gdk.Rectangle)
cellAreaInnerCellArea _obj widget cell_area = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    inner_area <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_cell_area_inner_cell_area _obj' widget' cell_area' inner_area
    inner_area' <- (wrapBoxed Gdk.Rectangle) inner_area
    touchManagedPtr _obj
    touchManagedPtr widget
    touchManagedPtr cell_area
    return inner_area'

-- method CellArea::is_activatable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_is_activatable" gtk_cell_area_is_activatable :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    IO CInt


cellAreaIsActivatable ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- _obj
    m Bool
cellAreaIsActivatable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_area_is_activatable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CellArea::is_focus_sibling
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_is_focus_sibling" gtk_cell_area_is_focus_sibling :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    Ptr CellRenderer ->                     -- sibling : TInterface "Gtk" "CellRenderer"
    IO CInt


cellAreaIsFocusSibling ::
    (MonadIO m, CellAreaK a, CellRendererK b, CellRendererK c) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    c ->                                    -- sibling
    m Bool
cellAreaIsFocusSibling _obj renderer sibling = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    let sibling' = unsafeManagedPtrCastPtr sibling
    result <- gtk_cell_area_is_focus_sibling _obj' renderer' sibling'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr renderer
    touchManagedPtr sibling
    return result'

-- method CellArea::remove
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_remove" gtk_cell_area_remove :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    IO ()


cellAreaRemove ::
    (MonadIO m, CellAreaK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    m ()
cellAreaRemove _obj renderer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    gtk_cell_area_remove _obj' renderer'
    touchManagedPtr _obj
    touchManagedPtr renderer
    return ()

-- method CellArea::remove_focus_sibling
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_remove_focus_sibling" gtk_cell_area_remove_focus_sibling :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    Ptr CellRenderer ->                     -- sibling : TInterface "Gtk" "CellRenderer"
    IO ()


cellAreaRemoveFocusSibling ::
    (MonadIO m, CellAreaK a, CellRendererK b, CellRendererK c) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    c ->                                    -- sibling
    m ()
cellAreaRemoveFocusSibling _obj renderer sibling = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    let sibling' = unsafeManagedPtrCastPtr sibling
    gtk_cell_area_remove_focus_sibling _obj' renderer' sibling'
    touchManagedPtr _obj
    touchManagedPtr renderer
    touchManagedPtr sibling
    return ()

-- method CellArea::render
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "background_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "paint_focus", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "background_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "paint_focus", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_render" gtk_cell_area_render :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    Ptr Gdk.Rectangle ->                    -- background_area : TInterface "Gdk" "Rectangle"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    CUInt ->                                -- flags : TInterface "Gtk" "CellRendererState"
    CInt ->                                 -- paint_focus : TBasicType TBoolean
    IO ()


cellAreaRender ::
    (MonadIO m, CellAreaK a, CellAreaContextK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- context
    c ->                                    -- widget
    Cairo.Context ->                        -- cr
    Gdk.Rectangle ->                        -- background_area
    Gdk.Rectangle ->                        -- cell_area
    [CellRendererState] ->                  -- flags
    Bool ->                                 -- paint_focus
    m ()
cellAreaRender _obj context widget cr background_area cell_area flags paint_focus = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    let widget' = unsafeManagedPtrCastPtr widget
    let cr' = unsafeManagedPtrGetPtr cr
    let background_area' = unsafeManagedPtrGetPtr background_area
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    let flags' = gflagsToWord flags
    let paint_focus' = (fromIntegral . fromEnum) paint_focus
    gtk_cell_area_render _obj' context' widget' cr' background_area' cell_area' flags' paint_focus'
    touchManagedPtr _obj
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr cr
    touchManagedPtr background_area
    touchManagedPtr cell_area
    return ()

-- method CellArea::request_renderer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "for_size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_size", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_size", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "for_size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_request_renderer" gtk_cell_area_request_renderer :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- for_size : TBasicType TInt32
    Ptr Int32 ->                            -- minimum_size : TBasicType TInt32
    Ptr Int32 ->                            -- natural_size : TBasicType TInt32
    IO ()


cellAreaRequestRenderer ::
    (MonadIO m, CellAreaK a, CellRendererK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    Orientation ->                          -- orientation
    c ->                                    -- widget
    Int32 ->                                -- for_size
    m (Int32,Int32)
cellAreaRequestRenderer _obj renderer orientation widget for_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    let orientation' = (fromIntegral . fromEnum) orientation
    let widget' = unsafeManagedPtrCastPtr widget
    minimum_size <- allocMem :: IO (Ptr Int32)
    natural_size <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_request_renderer _obj' renderer' orientation' widget' for_size minimum_size natural_size
    minimum_size' <- peek minimum_size
    natural_size' <- peek natural_size
    touchManagedPtr _obj
    touchManagedPtr renderer
    touchManagedPtr widget
    freeMem minimum_size
    freeMem natural_size
    return (minimum_size', natural_size')

-- method CellArea::set_focus_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_set_focus_cell" gtk_cell_area_set_focus_cell :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    IO ()


cellAreaSetFocusCell ::
    (MonadIO m, CellAreaK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    m ()
cellAreaSetFocusCell _obj renderer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    gtk_cell_area_set_focus_cell _obj' renderer'
    touchManagedPtr _obj
    touchManagedPtr renderer
    return ()

-- method CellArea::stop_editing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "canceled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "canceled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_stop_editing" gtk_cell_area_stop_editing :: 
    Ptr CellArea ->                         -- _obj : TInterface "Gtk" "CellArea"
    CInt ->                                 -- canceled : TBasicType TBoolean
    IO ()


cellAreaStopEditing ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- canceled
    m ()
cellAreaStopEditing _obj canceled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let canceled' = (fromIntegral . fromEnum) canceled
    gtk_cell_area_stop_editing _obj' canceled'
    touchManagedPtr _obj
    return ()

-- signal CellArea::add-editable
type CellAreaAddEditableCallback =
    CellRenderer ->
    CellEditable ->
    Gdk.Rectangle ->
    T.Text ->
    IO ()

noCellAreaAddEditableCallback :: Maybe CellAreaAddEditableCallback
noCellAreaAddEditableCallback = Nothing

type CellAreaAddEditableCallbackC =
    Ptr () ->                               -- object
    Ptr CellRenderer ->
    Ptr CellEditable ->
    Ptr Gdk.Rectangle ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellAreaAddEditableCallback :: CellAreaAddEditableCallbackC -> IO (FunPtr CellAreaAddEditableCallbackC)

cellAreaAddEditableClosure :: CellAreaAddEditableCallback -> IO Closure
cellAreaAddEditableClosure cb = newCClosure =<< mkCellAreaAddEditableCallback wrapped
    where wrapped = cellAreaAddEditableCallbackWrapper cb

cellAreaAddEditableCallbackWrapper ::
    CellAreaAddEditableCallback ->
    Ptr () ->
    Ptr CellRenderer ->
    Ptr CellEditable ->
    Ptr Gdk.Rectangle ->
    CString ->
    Ptr () ->
    IO ()
cellAreaAddEditableCallbackWrapper _cb _ renderer editable cell_area path _ = do
    renderer' <- (newObject CellRenderer) renderer
    editable' <- (newObject CellEditable) editable
    cell_area' <- (newBoxed Gdk.Rectangle) cell_area
    path' <- cstringToText path
    _cb  renderer' editable' cell_area' path'

onCellAreaAddEditable :: (GObject a, MonadIO m) => a -> CellAreaAddEditableCallback -> m SignalHandlerId
onCellAreaAddEditable obj cb = liftIO $ connectCellAreaAddEditable obj cb SignalConnectBefore
afterCellAreaAddEditable :: (GObject a, MonadIO m) => a -> CellAreaAddEditableCallback -> m SignalHandlerId
afterCellAreaAddEditable obj cb = connectCellAreaAddEditable obj cb SignalConnectAfter

connectCellAreaAddEditable :: (GObject a, MonadIO m) =>
                              a -> CellAreaAddEditableCallback -> SignalConnectMode -> m SignalHandlerId
connectCellAreaAddEditable obj cb after = liftIO $ do
    cb' <- mkCellAreaAddEditableCallback (cellAreaAddEditableCallbackWrapper cb)
    connectSignalFunPtr obj "add-editable" cb' after

-- signal CellArea::apply-attributes
type CellAreaApplyAttributesCallback =
    TreeModel ->
    TreeIter ->
    Bool ->
    Bool ->
    IO ()

noCellAreaApplyAttributesCallback :: Maybe CellAreaApplyAttributesCallback
noCellAreaApplyAttributesCallback = Nothing

type CellAreaApplyAttributesCallbackC =
    Ptr () ->                               -- object
    Ptr TreeModel ->
    Ptr TreeIter ->
    CInt ->
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellAreaApplyAttributesCallback :: CellAreaApplyAttributesCallbackC -> IO (FunPtr CellAreaApplyAttributesCallbackC)

cellAreaApplyAttributesClosure :: CellAreaApplyAttributesCallback -> IO Closure
cellAreaApplyAttributesClosure cb = newCClosure =<< mkCellAreaApplyAttributesCallback wrapped
    where wrapped = cellAreaApplyAttributesCallbackWrapper cb

cellAreaApplyAttributesCallbackWrapper ::
    CellAreaApplyAttributesCallback ->
    Ptr () ->
    Ptr TreeModel ->
    Ptr TreeIter ->
    CInt ->
    CInt ->
    Ptr () ->
    IO ()
cellAreaApplyAttributesCallbackWrapper _cb _ model iter is_expander is_expanded _ = do
    model' <- (newObject TreeModel) model
    iter' <- (newBoxed TreeIter) iter
    let is_expander' = (/= 0) is_expander
    let is_expanded' = (/= 0) is_expanded
    _cb  model' iter' is_expander' is_expanded'

onCellAreaApplyAttributes :: (GObject a, MonadIO m) => a -> CellAreaApplyAttributesCallback -> m SignalHandlerId
onCellAreaApplyAttributes obj cb = liftIO $ connectCellAreaApplyAttributes obj cb SignalConnectBefore
afterCellAreaApplyAttributes :: (GObject a, MonadIO m) => a -> CellAreaApplyAttributesCallback -> m SignalHandlerId
afterCellAreaApplyAttributes obj cb = connectCellAreaApplyAttributes obj cb SignalConnectAfter

connectCellAreaApplyAttributes :: (GObject a, MonadIO m) =>
                                  a -> CellAreaApplyAttributesCallback -> SignalConnectMode -> m SignalHandlerId
connectCellAreaApplyAttributes obj cb after = liftIO $ do
    cb' <- mkCellAreaApplyAttributesCallback (cellAreaApplyAttributesCallbackWrapper cb)
    connectSignalFunPtr obj "apply-attributes" cb' after

-- signal CellArea::focus-changed
type CellAreaFocusChangedCallback =
    CellRenderer ->
    T.Text ->
    IO ()

noCellAreaFocusChangedCallback :: Maybe CellAreaFocusChangedCallback
noCellAreaFocusChangedCallback = Nothing

type CellAreaFocusChangedCallbackC =
    Ptr () ->                               -- object
    Ptr CellRenderer ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellAreaFocusChangedCallback :: CellAreaFocusChangedCallbackC -> IO (FunPtr CellAreaFocusChangedCallbackC)

cellAreaFocusChangedClosure :: CellAreaFocusChangedCallback -> IO Closure
cellAreaFocusChangedClosure cb = newCClosure =<< mkCellAreaFocusChangedCallback wrapped
    where wrapped = cellAreaFocusChangedCallbackWrapper cb

cellAreaFocusChangedCallbackWrapper ::
    CellAreaFocusChangedCallback ->
    Ptr () ->
    Ptr CellRenderer ->
    CString ->
    Ptr () ->
    IO ()
cellAreaFocusChangedCallbackWrapper _cb _ renderer path _ = do
    renderer' <- (newObject CellRenderer) renderer
    path' <- cstringToText path
    _cb  renderer' path'

onCellAreaFocusChanged :: (GObject a, MonadIO m) => a -> CellAreaFocusChangedCallback -> m SignalHandlerId
onCellAreaFocusChanged obj cb = liftIO $ connectCellAreaFocusChanged obj cb SignalConnectBefore
afterCellAreaFocusChanged :: (GObject a, MonadIO m) => a -> CellAreaFocusChangedCallback -> m SignalHandlerId
afterCellAreaFocusChanged obj cb = connectCellAreaFocusChanged obj cb SignalConnectAfter

connectCellAreaFocusChanged :: (GObject a, MonadIO m) =>
                               a -> CellAreaFocusChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectCellAreaFocusChanged obj cb after = liftIO $ do
    cb' <- mkCellAreaFocusChangedCallback (cellAreaFocusChangedCallbackWrapper cb)
    connectSignalFunPtr obj "focus-changed" cb' after

-- signal CellArea::remove-editable
type CellAreaRemoveEditableCallback =
    CellRenderer ->
    CellEditable ->
    IO ()

noCellAreaRemoveEditableCallback :: Maybe CellAreaRemoveEditableCallback
noCellAreaRemoveEditableCallback = Nothing

type CellAreaRemoveEditableCallbackC =
    Ptr () ->                               -- object
    Ptr CellRenderer ->
    Ptr CellEditable ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellAreaRemoveEditableCallback :: CellAreaRemoveEditableCallbackC -> IO (FunPtr CellAreaRemoveEditableCallbackC)

cellAreaRemoveEditableClosure :: CellAreaRemoveEditableCallback -> IO Closure
cellAreaRemoveEditableClosure cb = newCClosure =<< mkCellAreaRemoveEditableCallback wrapped
    where wrapped = cellAreaRemoveEditableCallbackWrapper cb

cellAreaRemoveEditableCallbackWrapper ::
    CellAreaRemoveEditableCallback ->
    Ptr () ->
    Ptr CellRenderer ->
    Ptr CellEditable ->
    Ptr () ->
    IO ()
cellAreaRemoveEditableCallbackWrapper _cb _ renderer editable _ = do
    renderer' <- (newObject CellRenderer) renderer
    editable' <- (newObject CellEditable) editable
    _cb  renderer' editable'

onCellAreaRemoveEditable :: (GObject a, MonadIO m) => a -> CellAreaRemoveEditableCallback -> m SignalHandlerId
onCellAreaRemoveEditable obj cb = liftIO $ connectCellAreaRemoveEditable obj cb SignalConnectBefore
afterCellAreaRemoveEditable :: (GObject a, MonadIO m) => a -> CellAreaRemoveEditableCallback -> m SignalHandlerId
afterCellAreaRemoveEditable obj cb = connectCellAreaRemoveEditable obj cb SignalConnectAfter

connectCellAreaRemoveEditable :: (GObject a, MonadIO m) =>
                                 a -> CellAreaRemoveEditableCallback -> SignalConnectMode -> m SignalHandlerId
connectCellAreaRemoveEditable obj cb after = liftIO $ do
    cb' <- mkCellAreaRemoveEditableCallback (cellAreaRemoveEditableCallbackWrapper cb)
    connectSignalFunPtr obj "remove-editable" cb' after

-- object CellAreaBox 
newtype CellAreaBox = CellAreaBox (ForeignPtr CellAreaBox)
noCellAreaBox :: Maybe CellAreaBox
noCellAreaBox = Nothing

foreign import ccall "gtk_cell_area_box_get_type"
    c_gtk_cell_area_box_get_type :: IO GType

type instance ParentTypes CellAreaBox = '[CellArea, GObject.Object, Buildable, CellLayout, Orientable]

instance GObject CellAreaBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_area_box_get_type
    

class GObject o => CellAreaBoxK o
instance (GObject o, IsDescendantOf CellAreaBox o) => CellAreaBoxK o

toCellAreaBox :: CellAreaBoxK o => o -> IO CellAreaBox
toCellAreaBox = unsafeCastTo CellAreaBox

-- method CellAreaBox::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CellAreaBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_box_new" gtk_cell_area_box_new :: 
    IO (Ptr CellAreaBox)


cellAreaBoxNew ::
    (MonadIO m) =>
    m CellAreaBox
cellAreaBoxNew  = liftIO $ do
    result <- gtk_cell_area_box_new
    checkUnexpectedReturnNULL "gtk_cell_area_box_new" result
    result' <- (newObject CellAreaBox) result
    return result'

-- method CellAreaBox::get_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_box_get_spacing" gtk_cell_area_box_get_spacing :: 
    Ptr CellAreaBox ->                      -- _obj : TInterface "Gtk" "CellAreaBox"
    IO Int32


cellAreaBoxGetSpacing ::
    (MonadIO m, CellAreaBoxK a) =>
    a ->                                    -- _obj
    m Int32
cellAreaBoxGetSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_area_box_get_spacing _obj'
    touchManagedPtr _obj
    return result

-- method CellAreaBox::pack_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_box_pack_end" gtk_cell_area_box_pack_end :: 
    Ptr CellAreaBox ->                      -- _obj : TInterface "Gtk" "CellAreaBox"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- expand : TBasicType TBoolean
    CInt ->                                 -- align : TBasicType TBoolean
    CInt ->                                 -- fixed : TBasicType TBoolean
    IO ()


cellAreaBoxPackEnd ::
    (MonadIO m, CellAreaBoxK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    Bool ->                                 -- expand
    Bool ->                                 -- align
    Bool ->                                 -- fixed
    m ()
cellAreaBoxPackEnd _obj renderer expand align fixed = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    let expand' = (fromIntegral . fromEnum) expand
    let align' = (fromIntegral . fromEnum) align
    let fixed' = (fromIntegral . fromEnum) fixed
    gtk_cell_area_box_pack_end _obj' renderer' expand' align' fixed'
    touchManagedPtr _obj
    touchManagedPtr renderer
    return ()

-- method CellAreaBox::pack_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_box_pack_start" gtk_cell_area_box_pack_start :: 
    Ptr CellAreaBox ->                      -- _obj : TInterface "Gtk" "CellAreaBox"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- expand : TBasicType TBoolean
    CInt ->                                 -- align : TBasicType TBoolean
    CInt ->                                 -- fixed : TBasicType TBoolean
    IO ()


cellAreaBoxPackStart ::
    (MonadIO m, CellAreaBoxK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    Bool ->                                 -- expand
    Bool ->                                 -- align
    Bool ->                                 -- fixed
    m ()
cellAreaBoxPackStart _obj renderer expand align fixed = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    let expand' = (fromIntegral . fromEnum) expand
    let align' = (fromIntegral . fromEnum) align
    let fixed' = (fromIntegral . fromEnum) fixed
    gtk_cell_area_box_pack_start _obj' renderer' expand' align' fixed'
    touchManagedPtr _obj
    touchManagedPtr renderer
    return ()

-- method CellAreaBox::set_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_box_set_spacing" gtk_cell_area_box_set_spacing :: 
    Ptr CellAreaBox ->                      -- _obj : TInterface "Gtk" "CellAreaBox"
    Int32 ->                                -- spacing : TBasicType TInt32
    IO ()


cellAreaBoxSetSpacing ::
    (MonadIO m, CellAreaBoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- spacing
    m ()
cellAreaBoxSetSpacing _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_area_box_set_spacing _obj' spacing
    touchManagedPtr _obj
    return ()

-- object CellAreaContext 
newtype CellAreaContext = CellAreaContext (ForeignPtr CellAreaContext)
noCellAreaContext :: Maybe CellAreaContext
noCellAreaContext = Nothing

foreign import ccall "gtk_cell_area_context_get_type"
    c_gtk_cell_area_context_get_type :: IO GType

type instance ParentTypes CellAreaContext = '[GObject.Object]

instance GObject CellAreaContext where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_cell_area_context_get_type
    

class GObject o => CellAreaContextK o
instance (GObject o, IsDescendantOf CellAreaContext o) => CellAreaContextK o

toCellAreaContext :: CellAreaContextK o => o -> IO CellAreaContext
toCellAreaContext = unsafeCastTo CellAreaContext

-- method CellAreaContext::allocate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_context_allocate" gtk_cell_area_context_allocate :: 
    Ptr CellAreaContext ->                  -- _obj : TInterface "Gtk" "CellAreaContext"
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


cellAreaContextAllocate ::
    (MonadIO m, CellAreaContextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
cellAreaContextAllocate _obj width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_area_context_allocate _obj' width height
    touchManagedPtr _obj
    return ()

-- method CellAreaContext::get_allocation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_context_get_allocation" gtk_cell_area_context_get_allocation :: 
    Ptr CellAreaContext ->                  -- _obj : TInterface "Gtk" "CellAreaContext"
    Ptr Int32 ->                            -- width : TBasicType TInt32
    Ptr Int32 ->                            -- height : TBasicType TInt32
    IO ()


cellAreaContextGetAllocation ::
    (MonadIO m, CellAreaContextK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
cellAreaContextGetAllocation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    width <- allocMem :: IO (Ptr Int32)
    height <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_context_get_allocation _obj' width height
    width' <- peek width
    height' <- peek height
    touchManagedPtr _obj
    freeMem width
    freeMem height
    return (width', height')

-- method CellAreaContext::get_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellArea"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_context_get_area" gtk_cell_area_context_get_area :: 
    Ptr CellAreaContext ->                  -- _obj : TInterface "Gtk" "CellAreaContext"
    IO (Ptr CellArea)


cellAreaContextGetArea ::
    (MonadIO m, CellAreaContextK a) =>
    a ->                                    -- _obj
    m CellArea
cellAreaContextGetArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_area_context_get_area _obj'
    checkUnexpectedReturnNULL "gtk_cell_area_context_get_area" result
    result' <- (newObject CellArea) result
    touchManagedPtr _obj
    return result'

-- method CellAreaContext::get_preferred_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_context_get_preferred_height" gtk_cell_area_context_get_preferred_height :: 
    Ptr CellAreaContext ->                  -- _obj : TInterface "Gtk" "CellAreaContext"
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt32
    Ptr Int32 ->                            -- natural_height : TBasicType TInt32
    IO ()


cellAreaContextGetPreferredHeight ::
    (MonadIO m, CellAreaContextK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
cellAreaContextGetPreferredHeight _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    minimum_height <- allocMem :: IO (Ptr Int32)
    natural_height <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_context_get_preferred_height _obj' minimum_height natural_height
    minimum_height' <- peek minimum_height
    natural_height' <- peek natural_height
    touchManagedPtr _obj
    freeMem minimum_height
    freeMem natural_height
    return (minimum_height', natural_height')

-- method CellAreaContext::get_preferred_height_for_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_context_get_preferred_height_for_width" gtk_cell_area_context_get_preferred_height_for_width :: 
    Ptr CellAreaContext ->                  -- _obj : TInterface "Gtk" "CellAreaContext"
    Int32 ->                                -- width : TBasicType TInt32
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt32
    Ptr Int32 ->                            -- natural_height : TBasicType TInt32
    IO ()


cellAreaContextGetPreferredHeightForWidth ::
    (MonadIO m, CellAreaContextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    m (Int32,Int32)
cellAreaContextGetPreferredHeightForWidth _obj width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    minimum_height <- allocMem :: IO (Ptr Int32)
    natural_height <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_context_get_preferred_height_for_width _obj' width minimum_height natural_height
    minimum_height' <- peek minimum_height
    natural_height' <- peek natural_height
    touchManagedPtr _obj
    freeMem minimum_height
    freeMem natural_height
    return (minimum_height', natural_height')

-- method CellAreaContext::get_preferred_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_context_get_preferred_width" gtk_cell_area_context_get_preferred_width :: 
    Ptr CellAreaContext ->                  -- _obj : TInterface "Gtk" "CellAreaContext"
    Ptr Int32 ->                            -- minimum_width : TBasicType TInt32
    Ptr Int32 ->                            -- natural_width : TBasicType TInt32
    IO ()


cellAreaContextGetPreferredWidth ::
    (MonadIO m, CellAreaContextK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
cellAreaContextGetPreferredWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    minimum_width <- allocMem :: IO (Ptr Int32)
    natural_width <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_context_get_preferred_width _obj' minimum_width natural_width
    minimum_width' <- peek minimum_width
    natural_width' <- peek natural_width
    touchManagedPtr _obj
    freeMem minimum_width
    freeMem natural_width
    return (minimum_width', natural_width')

-- method CellAreaContext::get_preferred_width_for_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_context_get_preferred_width_for_height" gtk_cell_area_context_get_preferred_width_for_height :: 
    Ptr CellAreaContext ->                  -- _obj : TInterface "Gtk" "CellAreaContext"
    Int32 ->                                -- height : TBasicType TInt32
    Ptr Int32 ->                            -- minimum_width : TBasicType TInt32
    Ptr Int32 ->                            -- natural_width : TBasicType TInt32
    IO ()


cellAreaContextGetPreferredWidthForHeight ::
    (MonadIO m, CellAreaContextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- height
    m (Int32,Int32)
cellAreaContextGetPreferredWidthForHeight _obj height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    minimum_width <- allocMem :: IO (Ptr Int32)
    natural_width <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_context_get_preferred_width_for_height _obj' height minimum_width natural_width
    minimum_width' <- peek minimum_width
    natural_width' <- peek natural_width
    touchManagedPtr _obj
    freeMem minimum_width
    freeMem natural_width
    return (minimum_width', natural_width')

-- method CellAreaContext::push_preferred_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "natural_height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "natural_height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_context_push_preferred_height" gtk_cell_area_context_push_preferred_height :: 
    Ptr CellAreaContext ->                  -- _obj : TInterface "Gtk" "CellAreaContext"
    Int32 ->                                -- minimum_height : TBasicType TInt32
    Int32 ->                                -- natural_height : TBasicType TInt32
    IO ()


cellAreaContextPushPreferredHeight ::
    (MonadIO m, CellAreaContextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- minimum_height
    Int32 ->                                -- natural_height
    m ()
cellAreaContextPushPreferredHeight _obj minimum_height natural_height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_area_context_push_preferred_height _obj' minimum_height natural_height
    touchManagedPtr _obj
    return ()

-- method CellAreaContext::push_preferred_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "natural_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "natural_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_context_push_preferred_width" gtk_cell_area_context_push_preferred_width :: 
    Ptr CellAreaContext ->                  -- _obj : TInterface "Gtk" "CellAreaContext"
    Int32 ->                                -- minimum_width : TBasicType TInt32
    Int32 ->                                -- natural_width : TBasicType TInt32
    IO ()


cellAreaContextPushPreferredWidth ::
    (MonadIO m, CellAreaContextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- minimum_width
    Int32 ->                                -- natural_width
    m ()
cellAreaContextPushPreferredWidth _obj minimum_width natural_width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_area_context_push_preferred_width _obj' minimum_width natural_width
    touchManagedPtr _obj
    return ()

-- method CellAreaContext::reset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_context_reset" gtk_cell_area_context_reset :: 
    Ptr CellAreaContext ->                  -- _obj : TInterface "Gtk" "CellAreaContext"
    IO ()


cellAreaContextReset ::
    (MonadIO m, CellAreaContextK a) =>
    a ->                                    -- _obj
    m ()
cellAreaContextReset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_area_context_reset _obj'
    touchManagedPtr _obj
    return ()

-- callback CellCallback
cellCallbackClosure :: CellCallback -> IO Closure
cellCallbackClosure cb = newCClosure =<< mkCellCallback wrapped
    where wrapped = cellCallbackWrapper Nothing cb

type CellCallbackC =
    Ptr CellRenderer ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkCellCallback :: CellCallbackC -> IO (FunPtr CellCallbackC)

type CellCallback =
    CellRenderer ->
    IO Bool

noCellCallback :: Maybe CellCallback
noCellCallback = Nothing

cellCallbackWrapper ::
    Maybe (Ptr (FunPtr (CellCallbackC))) ->
    CellCallback ->
    Ptr CellRenderer ->
    Ptr () ->
    IO CInt
cellCallbackWrapper funptrptr _cb renderer _ = do
    renderer' <- (newObject CellRenderer) renderer
    result <- _cb  renderer'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- interface CellEditable 

newtype CellEditable = CellEditable (ForeignPtr CellEditable)
noCellEditable :: Maybe CellEditable
noCellEditable = Nothing

foreign import ccall "gtk_cell_editable_get_type"
    c_gtk_cell_editable_get_type :: IO GType

type instance ParentTypes CellEditable = '[Widget, GObject.Object]

instance GObject CellEditable where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_editable_get_type
    

class GObject o => CellEditableK o
instance (GObject o, IsDescendantOf CellEditable o) => CellEditableK o

toCellEditable :: CellEditableK o => o -> IO CellEditable
toCellEditable = unsafeCastTo CellEditable

-- method CellEditable::editing_done
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellEditable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellEditable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_editable_editing_done" gtk_cell_editable_editing_done :: 
    Ptr CellEditable ->                     -- _obj : TInterface "Gtk" "CellEditable"
    IO ()


cellEditableEditingDone ::
    (MonadIO m, CellEditableK a) =>
    a ->                                    -- _obj
    m ()
cellEditableEditingDone _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_editable_editing_done _obj'
    touchManagedPtr _obj
    return ()

-- method CellEditable::remove_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellEditable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellEditable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_editable_remove_widget" gtk_cell_editable_remove_widget :: 
    Ptr CellEditable ->                     -- _obj : TInterface "Gtk" "CellEditable"
    IO ()


cellEditableRemoveWidget ::
    (MonadIO m, CellEditableK a) =>
    a ->                                    -- _obj
    m ()
cellEditableRemoveWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_editable_remove_widget _obj'
    touchManagedPtr _obj
    return ()

-- method CellEditable::start_editing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellEditable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellEditable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_editable_start_editing" gtk_cell_editable_start_editing :: 
    Ptr CellEditable ->                     -- _obj : TInterface "Gtk" "CellEditable"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    IO ()


cellEditableStartEditing ::
    (MonadIO m, CellEditableK a) =>
    a ->                                    -- _obj
    Maybe (Gdk.Event) ->                    -- event
    m ()
cellEditableStartEditing _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeEvent <- case event of
        Nothing -> return nullPtr
        Just jEvent -> do
            let jEvent' = unsafeManagedPtrGetPtr jEvent
            return jEvent'
    gtk_cell_editable_start_editing _obj' maybeEvent
    touchManagedPtr _obj
    whenJust event touchManagedPtr
    return ()

-- signal CellEditable::editing-done
type CellEditableEditingDoneCallback =
    IO ()

noCellEditableEditingDoneCallback :: Maybe CellEditableEditingDoneCallback
noCellEditableEditingDoneCallback = Nothing

type CellEditableEditingDoneCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellEditableEditingDoneCallback :: CellEditableEditingDoneCallbackC -> IO (FunPtr CellEditableEditingDoneCallbackC)

cellEditableEditingDoneClosure :: CellEditableEditingDoneCallback -> IO Closure
cellEditableEditingDoneClosure cb = newCClosure =<< mkCellEditableEditingDoneCallback wrapped
    where wrapped = cellEditableEditingDoneCallbackWrapper cb

cellEditableEditingDoneCallbackWrapper ::
    CellEditableEditingDoneCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
cellEditableEditingDoneCallbackWrapper _cb _ _ = do
    _cb 

onCellEditableEditingDone :: (GObject a, MonadIO m) => a -> CellEditableEditingDoneCallback -> m SignalHandlerId
onCellEditableEditingDone obj cb = liftIO $ connectCellEditableEditingDone obj cb SignalConnectBefore
afterCellEditableEditingDone :: (GObject a, MonadIO m) => a -> CellEditableEditingDoneCallback -> m SignalHandlerId
afterCellEditableEditingDone obj cb = connectCellEditableEditingDone obj cb SignalConnectAfter

connectCellEditableEditingDone :: (GObject a, MonadIO m) =>
                                  a -> CellEditableEditingDoneCallback -> SignalConnectMode -> m SignalHandlerId
connectCellEditableEditingDone obj cb after = liftIO $ do
    cb' <- mkCellEditableEditingDoneCallback (cellEditableEditingDoneCallbackWrapper cb)
    connectSignalFunPtr obj "editing-done" cb' after

-- signal CellEditable::remove-widget
type CellEditableRemoveWidgetCallback =
    IO ()

noCellEditableRemoveWidgetCallback :: Maybe CellEditableRemoveWidgetCallback
noCellEditableRemoveWidgetCallback = Nothing

type CellEditableRemoveWidgetCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellEditableRemoveWidgetCallback :: CellEditableRemoveWidgetCallbackC -> IO (FunPtr CellEditableRemoveWidgetCallbackC)

cellEditableRemoveWidgetClosure :: CellEditableRemoveWidgetCallback -> IO Closure
cellEditableRemoveWidgetClosure cb = newCClosure =<< mkCellEditableRemoveWidgetCallback wrapped
    where wrapped = cellEditableRemoveWidgetCallbackWrapper cb

cellEditableRemoveWidgetCallbackWrapper ::
    CellEditableRemoveWidgetCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
cellEditableRemoveWidgetCallbackWrapper _cb _ _ = do
    _cb 

onCellEditableRemoveWidget :: (GObject a, MonadIO m) => a -> CellEditableRemoveWidgetCallback -> m SignalHandlerId
onCellEditableRemoveWidget obj cb = liftIO $ connectCellEditableRemoveWidget obj cb SignalConnectBefore
afterCellEditableRemoveWidget :: (GObject a, MonadIO m) => a -> CellEditableRemoveWidgetCallback -> m SignalHandlerId
afterCellEditableRemoveWidget obj cb = connectCellEditableRemoveWidget obj cb SignalConnectAfter

connectCellEditableRemoveWidget :: (GObject a, MonadIO m) =>
                                   a -> CellEditableRemoveWidgetCallback -> SignalConnectMode -> m SignalHandlerId
connectCellEditableRemoveWidget obj cb after = liftIO $ do
    cb' <- mkCellEditableRemoveWidgetCallback (cellEditableRemoveWidgetCallbackWrapper cb)
    connectSignalFunPtr obj "remove-widget" cb' after

-- interface CellLayout 

newtype CellLayout = CellLayout (ForeignPtr CellLayout)
noCellLayout :: Maybe CellLayout
noCellLayout = Nothing

foreign import ccall "gtk_cell_layout_get_type"
    c_gtk_cell_layout_get_type :: IO GType

type instance ParentTypes CellLayout = '[GObject.Object]

instance GObject CellLayout where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_cell_layout_get_type
    

class GObject o => CellLayoutK o
instance (GObject o, IsDescendantOf CellLayout o) => CellLayoutK o

toCellLayout :: CellLayoutK o => o -> IO CellLayout
toCellLayout = unsafeCastTo CellLayout

-- method CellLayout::add_attribute
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_layout_add_attribute" gtk_cell_layout_add_attribute :: 
    Ptr CellLayout ->                       -- _obj : TInterface "Gtk" "CellLayout"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    CString ->                              -- attribute : TBasicType TUTF8
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


cellLayoutAddAttribute ::
    (MonadIO m, CellLayoutK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    T.Text ->                               -- attribute
    Int32 ->                                -- column
    m ()
cellLayoutAddAttribute _obj cell attribute column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    attribute' <- textToCString attribute
    gtk_cell_layout_add_attribute _obj' cell' attribute' column
    touchManagedPtr _obj
    touchManagedPtr cell
    freeMem attribute'
    return ()

-- method CellLayout::clear
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_layout_clear" gtk_cell_layout_clear :: 
    Ptr CellLayout ->                       -- _obj : TInterface "Gtk" "CellLayout"
    IO ()


cellLayoutClear ::
    (MonadIO m, CellLayoutK a) =>
    a ->                                    -- _obj
    m ()
cellLayoutClear _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_layout_clear _obj'
    touchManagedPtr _obj
    return ()

-- method CellLayout::clear_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_layout_clear_attributes" gtk_cell_layout_clear_attributes :: 
    Ptr CellLayout ->                       -- _obj : TInterface "Gtk" "CellLayout"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    IO ()


cellLayoutClearAttributes ::
    (MonadIO m, CellLayoutK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    m ()
cellLayoutClearAttributes _obj cell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    gtk_cell_layout_clear_attributes _obj' cell'
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- method CellLayout::get_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellArea"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_layout_get_area" gtk_cell_layout_get_area :: 
    Ptr CellLayout ->                       -- _obj : TInterface "Gtk" "CellLayout"
    IO (Ptr CellArea)


cellLayoutGetArea ::
    (MonadIO m, CellLayoutK a) =>
    a ->                                    -- _obj
    m CellArea
cellLayoutGetArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_layout_get_area _obj'
    checkUnexpectedReturnNULL "gtk_cell_layout_get_area" result
    result' <- (newObject CellArea) result
    touchManagedPtr _obj
    return result'

-- method CellLayout::get_cells
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "CellRenderer")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_layout_get_cells" gtk_cell_layout_get_cells :: 
    Ptr CellLayout ->                       -- _obj : TInterface "Gtk" "CellLayout"
    IO (Ptr (GList (Ptr CellRenderer)))


cellLayoutGetCells ::
    (MonadIO m, CellLayoutK a) =>
    a ->                                    -- _obj
    m [CellRenderer]
cellLayoutGetCells _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_layout_get_cells _obj'
    checkUnexpectedReturnNULL "gtk_cell_layout_get_cells" result
    result' <- unpackGList result
    result'' <- mapM (newObject CellRenderer) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method CellLayout::pack_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_layout_pack_end" gtk_cell_layout_pack_end :: 
    Ptr CellLayout ->                       -- _obj : TInterface "Gtk" "CellLayout"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()


cellLayoutPackEnd ::
    (MonadIO m, CellLayoutK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    Bool ->                                 -- expand
    m ()
cellLayoutPackEnd _obj cell expand = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    let expand' = (fromIntegral . fromEnum) expand
    gtk_cell_layout_pack_end _obj' cell' expand'
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- method CellLayout::pack_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_layout_pack_start" gtk_cell_layout_pack_start :: 
    Ptr CellLayout ->                       -- _obj : TInterface "Gtk" "CellLayout"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()


cellLayoutPackStart ::
    (MonadIO m, CellLayoutK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    Bool ->                                 -- expand
    m ()
cellLayoutPackStart _obj cell expand = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    let expand' = (fromIntegral . fromEnum) expand
    gtk_cell_layout_pack_start _obj' cell' expand'
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- method CellLayout::reorder
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_layout_reorder" gtk_cell_layout_reorder :: 
    Ptr CellLayout ->                       -- _obj : TInterface "Gtk" "CellLayout"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


cellLayoutReorder ::
    (MonadIO m, CellLayoutK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    Int32 ->                                -- position
    m ()
cellLayoutReorder _obj cell position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    gtk_cell_layout_reorder _obj' cell' position
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- method CellLayout::set_cell_data_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "CellLayoutDataFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing},Arg {argName = "func_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "CellLayoutDataFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_layout_set_cell_data_func" gtk_cell_layout_set_cell_data_func :: 
    Ptr CellLayout ->                       -- _obj : TInterface "Gtk" "CellLayout"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    FunPtr CellLayoutDataFuncC ->           -- func : TInterface "Gtk" "CellLayoutDataFunc"
    Ptr () ->                               -- func_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


cellLayoutSetCellDataFunc ::
    (MonadIO m, CellLayoutK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    Maybe (CellLayoutDataFunc) ->           -- func
    m ()
cellLayoutSetCellDataFunc _obj cell func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    maybeFunc <- case func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jFunc -> do
            jFunc' <- mkCellLayoutDataFunc (cellLayoutDataFuncWrapper Nothing jFunc)
            return jFunc'
    let func_data = castFunPtrToPtr maybeFunc
    let destroy = safeFreeFunPtrPtr
    gtk_cell_layout_set_cell_data_func _obj' cell' maybeFunc func_data destroy
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- callback CellLayoutDataFunc
cellLayoutDataFuncClosure :: CellLayoutDataFunc -> IO Closure
cellLayoutDataFuncClosure cb = newCClosure =<< mkCellLayoutDataFunc wrapped
    where wrapped = cellLayoutDataFuncWrapper Nothing cb

type CellLayoutDataFuncC =
    Ptr CellLayout ->
    Ptr CellRenderer ->
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkCellLayoutDataFunc :: CellLayoutDataFuncC -> IO (FunPtr CellLayoutDataFuncC)

type CellLayoutDataFunc =
    CellLayout ->
    CellRenderer ->
    TreeModel ->
    TreeIter ->
    IO ()

noCellLayoutDataFunc :: Maybe CellLayoutDataFunc
noCellLayoutDataFunc = Nothing

cellLayoutDataFuncWrapper ::
    Maybe (Ptr (FunPtr (CellLayoutDataFuncC))) ->
    CellLayoutDataFunc ->
    Ptr CellLayout ->
    Ptr CellRenderer ->
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->
    IO ()
cellLayoutDataFuncWrapper funptrptr _cb cell_layout cell tree_model iter _ = do
    cell_layout' <- (newObject CellLayout) cell_layout
    cell' <- (newObject CellRenderer) cell
    tree_model' <- (newObject TreeModel) tree_model
    iter' <- (newBoxed TreeIter) iter
    _cb  cell_layout' cell' tree_model' iter'
    maybeReleaseFunPtr funptrptr

-- object CellRenderer 
newtype CellRenderer = CellRenderer (ForeignPtr CellRenderer)
noCellRenderer :: Maybe CellRenderer
noCellRenderer = Nothing

foreign import ccall "gtk_cell_renderer_get_type"
    c_gtk_cell_renderer_get_type :: IO GType

type instance ParentTypes CellRenderer = '[GObject.Object]

instance GObject CellRenderer where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_renderer_get_type
    

class GObject o => CellRendererK o
instance (GObject o, IsDescendantOf CellRenderer o) => CellRendererK o

toCellRenderer :: CellRendererK o => o -> IO CellRenderer
toCellRenderer = unsafeCastTo CellRenderer

-- method CellRenderer::activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "background_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "background_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_activate" gtk_cell_renderer_activate :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- path : TBasicType TUTF8
    Ptr Gdk.Rectangle ->                    -- background_area : TInterface "Gdk" "Rectangle"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    CUInt ->                                -- flags : TInterface "Gtk" "CellRendererState"
    IO CInt


cellRendererActivate ::
    (MonadIO m, CellRendererK a, WidgetK b) =>
    a ->                                    -- _obj
    Gdk.Event ->                            -- event
    b ->                                    -- widget
    T.Text ->                               -- path
    Gdk.Rectangle ->                        -- background_area
    Gdk.Rectangle ->                        -- cell_area
    [CellRendererState] ->                  -- flags
    m Bool
cellRendererActivate _obj event widget path background_area cell_area flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    let widget' = unsafeManagedPtrCastPtr widget
    path' <- textToCString path
    let background_area' = unsafeManagedPtrGetPtr background_area
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    let flags' = gflagsToWord flags
    result <- gtk_cell_renderer_activate _obj' event' widget' path' background_area' cell_area' flags'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event
    touchManagedPtr widget
    touchManagedPtr background_area
    touchManagedPtr cell_area
    freeMem path'
    return result'

-- method CellRenderer::get_aligned_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "aligned_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_aligned_area" gtk_cell_renderer_get_aligned_area :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CUInt ->                                -- flags : TInterface "Gtk" "CellRendererState"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    Ptr Gdk.Rectangle ->                    -- aligned_area : TInterface "Gdk" "Rectangle"
    IO ()


cellRendererGetAlignedArea ::
    (MonadIO m, CellRendererK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    [CellRendererState] ->                  -- flags
    Gdk.Rectangle ->                        -- cell_area
    m (Gdk.Rectangle)
cellRendererGetAlignedArea _obj widget flags cell_area = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    let flags' = gflagsToWord flags
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    aligned_area <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_cell_renderer_get_aligned_area _obj' widget' flags' cell_area' aligned_area
    aligned_area' <- (wrapBoxed Gdk.Rectangle) aligned_area
    touchManagedPtr _obj
    touchManagedPtr widget
    touchManagedPtr cell_area
    return aligned_area'

-- method CellRenderer::get_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_alignment" gtk_cell_renderer_get_alignment :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr CFloat ->                           -- xalign : TBasicType TFloat
    Ptr CFloat ->                           -- yalign : TBasicType TFloat
    IO ()


cellRendererGetAlignment ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    m (Float,Float)
cellRendererGetAlignment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    xalign <- allocMem :: IO (Ptr CFloat)
    yalign <- allocMem :: IO (Ptr CFloat)
    gtk_cell_renderer_get_alignment _obj' xalign yalign
    xalign' <- peek xalign
    let xalign'' = realToFrac xalign'
    yalign' <- peek yalign
    let yalign'' = realToFrac yalign'
    touchManagedPtr _obj
    freeMem xalign
    freeMem yalign
    return (xalign'', yalign'')

-- method CellRenderer::get_fixed_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_fixed_size" gtk_cell_renderer_get_fixed_size :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Int32 ->                            -- width : TBasicType TInt32
    Ptr Int32 ->                            -- height : TBasicType TInt32
    IO ()


cellRendererGetFixedSize ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
cellRendererGetFixedSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    width <- allocMem :: IO (Ptr Int32)
    height <- allocMem :: IO (Ptr Int32)
    gtk_cell_renderer_get_fixed_size _obj' width height
    width' <- peek width
    height' <- peek height
    touchManagedPtr _obj
    freeMem width
    freeMem height
    return (width', height')

-- method CellRenderer::get_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpad", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "ypad", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_padding" gtk_cell_renderer_get_padding :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Int32 ->                            -- xpad : TBasicType TInt32
    Ptr Int32 ->                            -- ypad : TBasicType TInt32
    IO ()


cellRendererGetPadding ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
cellRendererGetPadding _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    xpad <- allocMem :: IO (Ptr Int32)
    ypad <- allocMem :: IO (Ptr Int32)
    gtk_cell_renderer_get_padding _obj' xpad ypad
    xpad' <- peek xpad
    ypad' <- peek ypad
    touchManagedPtr _obj
    freeMem xpad
    freeMem ypad
    return (xpad', ypad')

-- method CellRenderer::get_preferred_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_size", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_size", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_preferred_height" gtk_cell_renderer_get_preferred_height :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Int32 ->                            -- minimum_size : TBasicType TInt32
    Ptr Int32 ->                            -- natural_size : TBasicType TInt32
    IO ()


cellRendererGetPreferredHeight ::
    (MonadIO m, CellRendererK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    m (Int32,Int32)
cellRendererGetPreferredHeight _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    minimum_size <- allocMem :: IO (Ptr Int32)
    natural_size <- allocMem :: IO (Ptr Int32)
    gtk_cell_renderer_get_preferred_height _obj' widget' minimum_size natural_size
    minimum_size' <- peek minimum_size
    natural_size' <- peek natural_size
    touchManagedPtr _obj
    touchManagedPtr widget
    freeMem minimum_size
    freeMem natural_size
    return (minimum_size', natural_size')

-- method CellRenderer::get_preferred_height_for_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_preferred_height_for_width" gtk_cell_renderer_get_preferred_height_for_width :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- width : TBasicType TInt32
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt32
    Ptr Int32 ->                            -- natural_height : TBasicType TInt32
    IO ()


cellRendererGetPreferredHeightForWidth ::
    (MonadIO m, CellRendererK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    Int32 ->                                -- width
    m (Int32,Int32)
cellRendererGetPreferredHeightForWidth _obj widget width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    minimum_height <- allocMem :: IO (Ptr Int32)
    natural_height <- allocMem :: IO (Ptr Int32)
    gtk_cell_renderer_get_preferred_height_for_width _obj' widget' width minimum_height natural_height
    minimum_height' <- peek minimum_height
    natural_height' <- peek natural_height
    touchManagedPtr _obj
    touchManagedPtr widget
    freeMem minimum_height
    freeMem natural_height
    return (minimum_height', natural_height')

-- method CellRenderer::get_preferred_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_size", argType = TInterface "Gtk" "Requisition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "natural_size", argType = TInterface "Gtk" "Requisition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_preferred_size" gtk_cell_renderer_get_preferred_size :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Requisition ->                      -- minimum_size : TInterface "Gtk" "Requisition"
    Ptr Requisition ->                      -- natural_size : TInterface "Gtk" "Requisition"
    IO ()


cellRendererGetPreferredSize ::
    (MonadIO m, CellRendererK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    m (Requisition,Requisition)
cellRendererGetPreferredSize _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    minimum_size <- callocBoxedBytes 8 :: IO (Ptr Requisition)
    natural_size <- callocBoxedBytes 8 :: IO (Ptr Requisition)
    gtk_cell_renderer_get_preferred_size _obj' widget' minimum_size natural_size
    minimum_size' <- (wrapBoxed Requisition) minimum_size
    natural_size' <- (wrapBoxed Requisition) natural_size
    touchManagedPtr _obj
    touchManagedPtr widget
    return (minimum_size', natural_size')

-- method CellRenderer::get_preferred_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_size", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_size", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_preferred_width" gtk_cell_renderer_get_preferred_width :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Int32 ->                            -- minimum_size : TBasicType TInt32
    Ptr Int32 ->                            -- natural_size : TBasicType TInt32
    IO ()


cellRendererGetPreferredWidth ::
    (MonadIO m, CellRendererK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    m (Int32,Int32)
cellRendererGetPreferredWidth _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    minimum_size <- allocMem :: IO (Ptr Int32)
    natural_size <- allocMem :: IO (Ptr Int32)
    gtk_cell_renderer_get_preferred_width _obj' widget' minimum_size natural_size
    minimum_size' <- peek minimum_size
    natural_size' <- peek natural_size
    touchManagedPtr _obj
    touchManagedPtr widget
    freeMem minimum_size
    freeMem natural_size
    return (minimum_size', natural_size')

-- method CellRenderer::get_preferred_width_for_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_preferred_width_for_height" gtk_cell_renderer_get_preferred_width_for_height :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- height : TBasicType TInt32
    Ptr Int32 ->                            -- minimum_width : TBasicType TInt32
    Ptr Int32 ->                            -- natural_width : TBasicType TInt32
    IO ()


cellRendererGetPreferredWidthForHeight ::
    (MonadIO m, CellRendererK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    Int32 ->                                -- height
    m (Int32,Int32)
cellRendererGetPreferredWidthForHeight _obj widget height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    minimum_width <- allocMem :: IO (Ptr Int32)
    natural_width <- allocMem :: IO (Ptr Int32)
    gtk_cell_renderer_get_preferred_width_for_height _obj' widget' height minimum_width natural_width
    minimum_width' <- peek minimum_width
    natural_width' <- peek natural_width
    touchManagedPtr _obj
    touchManagedPtr widget
    freeMem minimum_width
    freeMem natural_width
    return (minimum_width', natural_width')

-- method CellRenderer::get_request_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SizeRequestMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_request_mode" gtk_cell_renderer_get_request_mode :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    IO CUInt


cellRendererGetRequestMode ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    m SizeRequestMode
cellRendererGetRequestMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_renderer_get_request_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method CellRenderer::get_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_sensitive" gtk_cell_renderer_get_sensitive :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    IO CInt


cellRendererGetSensitive ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    m Bool
cellRendererGetSensitive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_renderer_get_sensitive _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CellRenderer::get_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_size" gtk_cell_renderer_get_size :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    Ptr Int32 ->                            -- x_offset : TBasicType TInt32
    Ptr Int32 ->                            -- y_offset : TBasicType TInt32
    Ptr Int32 ->                            -- width : TBasicType TInt32
    Ptr Int32 ->                            -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED cellRendererGetSize ["(Since version 3.0)","Use gtk_cell_renderer_get_preferred_size() instead."]#-}
cellRendererGetSize ::
    (MonadIO m, CellRendererK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    Maybe (Gdk.Rectangle) ->                -- cell_area
    m (Int32,Int32,Int32,Int32)
cellRendererGetSize _obj widget cell_area = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    maybeCell_area <- case cell_area of
        Nothing -> return nullPtr
        Just jCell_area -> do
            let jCell_area' = unsafeManagedPtrGetPtr jCell_area
            return jCell_area'
    x_offset <- allocMem :: IO (Ptr Int32)
    y_offset <- allocMem :: IO (Ptr Int32)
    width <- allocMem :: IO (Ptr Int32)
    height <- allocMem :: IO (Ptr Int32)
    gtk_cell_renderer_get_size _obj' widget' maybeCell_area x_offset y_offset width height
    x_offset' <- peek x_offset
    y_offset' <- peek y_offset
    width' <- peek width
    height' <- peek height
    touchManagedPtr _obj
    touchManagedPtr widget
    whenJust cell_area touchManagedPtr
    freeMem x_offset
    freeMem y_offset
    freeMem width
    freeMem height
    return (x_offset', y_offset', width', height')

-- method CellRenderer::get_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_state", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_state", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StateFlags"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_state" gtk_cell_renderer_get_state :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CUInt ->                                -- cell_state : TInterface "Gtk" "CellRendererState"
    IO CUInt


cellRendererGetState ::
    (MonadIO m, CellRendererK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    [CellRendererState] ->                  -- cell_state
    m [StateFlags]
cellRendererGetState _obj widget cell_state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    let cell_state' = gflagsToWord cell_state
    result <- gtk_cell_renderer_get_state _obj' widget' cell_state'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    touchManagedPtr widget
    return result'

-- method CellRenderer::get_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_get_visible" gtk_cell_renderer_get_visible :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    IO CInt


cellRendererGetVisible ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    m Bool
cellRendererGetVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_renderer_get_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CellRenderer::is_activatable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_is_activatable" gtk_cell_renderer_is_activatable :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    IO CInt


cellRendererIsActivatable ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    m Bool
cellRendererIsActivatable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_renderer_is_activatable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CellRenderer::render
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "background_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "background_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_render" gtk_cell_renderer_render :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- background_area : TInterface "Gdk" "Rectangle"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    CUInt ->                                -- flags : TInterface "Gtk" "CellRendererState"
    IO ()


cellRendererRender ::
    (MonadIO m, CellRendererK a, WidgetK b) =>
    a ->                                    -- _obj
    Cairo.Context ->                        -- cr
    b ->                                    -- widget
    Gdk.Rectangle ->                        -- background_area
    Gdk.Rectangle ->                        -- cell_area
    [CellRendererState] ->                  -- flags
    m ()
cellRendererRender _obj cr widget background_area cell_area flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cr' = unsafeManagedPtrGetPtr cr
    let widget' = unsafeManagedPtrCastPtr widget
    let background_area' = unsafeManagedPtrGetPtr background_area
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    let flags' = gflagsToWord flags
    gtk_cell_renderer_render _obj' cr' widget' background_area' cell_area' flags'
    touchManagedPtr _obj
    touchManagedPtr cr
    touchManagedPtr widget
    touchManagedPtr background_area
    touchManagedPtr cell_area
    return ()

-- method CellRenderer::set_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_set_alignment" gtk_cell_renderer_set_alignment :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    CFloat ->                               -- xalign : TBasicType TFloat
    CFloat ->                               -- yalign : TBasicType TFloat
    IO ()


cellRendererSetAlignment ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    Float ->                                -- xalign
    Float ->                                -- yalign
    m ()
cellRendererSetAlignment _obj xalign yalign = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let xalign' = realToFrac xalign
    let yalign' = realToFrac yalign
    gtk_cell_renderer_set_alignment _obj' xalign' yalign'
    touchManagedPtr _obj
    return ()

-- method CellRenderer::set_fixed_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_set_fixed_size" gtk_cell_renderer_set_fixed_size :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


cellRendererSetFixedSize ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
cellRendererSetFixedSize _obj width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_renderer_set_fixed_size _obj' width height
    touchManagedPtr _obj
    return ()

-- method CellRenderer::set_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpad", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ypad", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpad", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ypad", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_set_padding" gtk_cell_renderer_set_padding :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Int32 ->                                -- xpad : TBasicType TInt32
    Int32 ->                                -- ypad : TBasicType TInt32
    IO ()


cellRendererSetPadding ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- xpad
    Int32 ->                                -- ypad
    m ()
cellRendererSetPadding _obj xpad ypad = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_renderer_set_padding _obj' xpad ypad
    touchManagedPtr _obj
    return ()

-- method CellRenderer::set_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_set_sensitive" gtk_cell_renderer_set_sensitive :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- sensitive : TBasicType TBoolean
    IO ()


cellRendererSetSensitive ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- sensitive
    m ()
cellRendererSetSensitive _obj sensitive = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sensitive' = (fromIntegral . fromEnum) sensitive
    gtk_cell_renderer_set_sensitive _obj' sensitive'
    touchManagedPtr _obj
    return ()

-- method CellRenderer::set_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_set_visible" gtk_cell_renderer_set_visible :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- visible : TBasicType TBoolean
    IO ()


cellRendererSetVisible ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible
    m ()
cellRendererSetVisible _obj visible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible' = (fromIntegral . fromEnum) visible
    gtk_cell_renderer_set_visible _obj' visible'
    touchManagedPtr _obj
    return ()

-- method CellRenderer::start_editing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "background_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "background_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "CellRendererState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellEditable"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_start_editing" gtk_cell_renderer_start_editing :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- path : TBasicType TUTF8
    Ptr Gdk.Rectangle ->                    -- background_area : TInterface "Gdk" "Rectangle"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    CUInt ->                                -- flags : TInterface "Gtk" "CellRendererState"
    IO (Ptr CellEditable)


cellRendererStartEditing ::
    (MonadIO m, CellRendererK a, WidgetK b) =>
    a ->                                    -- _obj
    Gdk.Event ->                            -- event
    b ->                                    -- widget
    T.Text ->                               -- path
    Gdk.Rectangle ->                        -- background_area
    Gdk.Rectangle ->                        -- cell_area
    [CellRendererState] ->                  -- flags
    m CellEditable
cellRendererStartEditing _obj event widget path background_area cell_area flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    let widget' = unsafeManagedPtrCastPtr widget
    path' <- textToCString path
    let background_area' = unsafeManagedPtrGetPtr background_area
    let cell_area' = unsafeManagedPtrGetPtr cell_area
    let flags' = gflagsToWord flags
    result <- gtk_cell_renderer_start_editing _obj' event' widget' path' background_area' cell_area' flags'
    checkUnexpectedReturnNULL "gtk_cell_renderer_start_editing" result
    result' <- (newObject CellEditable) result
    touchManagedPtr _obj
    touchManagedPtr event
    touchManagedPtr widget
    touchManagedPtr background_area
    touchManagedPtr cell_area
    freeMem path'
    return result'

-- method CellRenderer::stop_editing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "canceled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "canceled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_stop_editing" gtk_cell_renderer_stop_editing :: 
    Ptr CellRenderer ->                     -- _obj : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- canceled : TBasicType TBoolean
    IO ()


cellRendererStopEditing ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- canceled
    m ()
cellRendererStopEditing _obj canceled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let canceled' = (fromIntegral . fromEnum) canceled
    gtk_cell_renderer_stop_editing _obj' canceled'
    touchManagedPtr _obj
    return ()

-- signal CellRenderer::editing-canceled
type CellRendererEditingCanceledCallback =
    IO ()

noCellRendererEditingCanceledCallback :: Maybe CellRendererEditingCanceledCallback
noCellRendererEditingCanceledCallback = Nothing

type CellRendererEditingCanceledCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellRendererEditingCanceledCallback :: CellRendererEditingCanceledCallbackC -> IO (FunPtr CellRendererEditingCanceledCallbackC)

cellRendererEditingCanceledClosure :: CellRendererEditingCanceledCallback -> IO Closure
cellRendererEditingCanceledClosure cb = newCClosure =<< mkCellRendererEditingCanceledCallback wrapped
    where wrapped = cellRendererEditingCanceledCallbackWrapper cb

cellRendererEditingCanceledCallbackWrapper ::
    CellRendererEditingCanceledCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
cellRendererEditingCanceledCallbackWrapper _cb _ _ = do
    _cb 

onCellRendererEditingCanceled :: (GObject a, MonadIO m) => a -> CellRendererEditingCanceledCallback -> m SignalHandlerId
onCellRendererEditingCanceled obj cb = liftIO $ connectCellRendererEditingCanceled obj cb SignalConnectBefore
afterCellRendererEditingCanceled :: (GObject a, MonadIO m) => a -> CellRendererEditingCanceledCallback -> m SignalHandlerId
afterCellRendererEditingCanceled obj cb = connectCellRendererEditingCanceled obj cb SignalConnectAfter

connectCellRendererEditingCanceled :: (GObject a, MonadIO m) =>
                                      a -> CellRendererEditingCanceledCallback -> SignalConnectMode -> m SignalHandlerId
connectCellRendererEditingCanceled obj cb after = liftIO $ do
    cb' <- mkCellRendererEditingCanceledCallback (cellRendererEditingCanceledCallbackWrapper cb)
    connectSignalFunPtr obj "editing-canceled" cb' after

-- signal CellRenderer::editing-started
type CellRendererEditingStartedCallback =
    CellEditable ->
    T.Text ->
    IO ()

noCellRendererEditingStartedCallback :: Maybe CellRendererEditingStartedCallback
noCellRendererEditingStartedCallback = Nothing

type CellRendererEditingStartedCallbackC =
    Ptr () ->                               -- object
    Ptr CellEditable ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellRendererEditingStartedCallback :: CellRendererEditingStartedCallbackC -> IO (FunPtr CellRendererEditingStartedCallbackC)

cellRendererEditingStartedClosure :: CellRendererEditingStartedCallback -> IO Closure
cellRendererEditingStartedClosure cb = newCClosure =<< mkCellRendererEditingStartedCallback wrapped
    where wrapped = cellRendererEditingStartedCallbackWrapper cb

cellRendererEditingStartedCallbackWrapper ::
    CellRendererEditingStartedCallback ->
    Ptr () ->
    Ptr CellEditable ->
    CString ->
    Ptr () ->
    IO ()
cellRendererEditingStartedCallbackWrapper _cb _ editable path _ = do
    editable' <- (newObject CellEditable) editable
    path' <- cstringToText path
    _cb  editable' path'

onCellRendererEditingStarted :: (GObject a, MonadIO m) => a -> CellRendererEditingStartedCallback -> m SignalHandlerId
onCellRendererEditingStarted obj cb = liftIO $ connectCellRendererEditingStarted obj cb SignalConnectBefore
afterCellRendererEditingStarted :: (GObject a, MonadIO m) => a -> CellRendererEditingStartedCallback -> m SignalHandlerId
afterCellRendererEditingStarted obj cb = connectCellRendererEditingStarted obj cb SignalConnectAfter

connectCellRendererEditingStarted :: (GObject a, MonadIO m) =>
                                     a -> CellRendererEditingStartedCallback -> SignalConnectMode -> m SignalHandlerId
connectCellRendererEditingStarted obj cb after = liftIO $ do
    cb' <- mkCellRendererEditingStartedCallback (cellRendererEditingStartedCallbackWrapper cb)
    connectSignalFunPtr obj "editing-started" cb' after

-- object CellRendererAccel 
newtype CellRendererAccel = CellRendererAccel (ForeignPtr CellRendererAccel)
noCellRendererAccel :: Maybe CellRendererAccel
noCellRendererAccel = Nothing

foreign import ccall "gtk_cell_renderer_accel_get_type"
    c_gtk_cell_renderer_accel_get_type :: IO GType

type instance ParentTypes CellRendererAccel = '[CellRendererText, CellRenderer, GObject.Object]

instance GObject CellRendererAccel where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_renderer_accel_get_type
    

class GObject o => CellRendererAccelK o
instance (GObject o, IsDescendantOf CellRendererAccel o) => CellRendererAccelK o

toCellRendererAccel :: CellRendererAccelK o => o -> IO CellRendererAccel
toCellRendererAccel = unsafeCastTo CellRendererAccel

-- method CellRendererAccel::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CellRendererAccel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_accel_new" gtk_cell_renderer_accel_new :: 
    IO (Ptr CellRendererAccel)


cellRendererAccelNew ::
    (MonadIO m) =>
    m CellRendererAccel
cellRendererAccelNew  = liftIO $ do
    result <- gtk_cell_renderer_accel_new
    checkUnexpectedReturnNULL "gtk_cell_renderer_accel_new" result
    result' <- (newObject CellRendererAccel) result
    return result'

-- signal CellRendererAccel::accel-cleared
type CellRendererAccelAccelClearedCallback =
    T.Text ->
    IO ()

noCellRendererAccelAccelClearedCallback :: Maybe CellRendererAccelAccelClearedCallback
noCellRendererAccelAccelClearedCallback = Nothing

type CellRendererAccelAccelClearedCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellRendererAccelAccelClearedCallback :: CellRendererAccelAccelClearedCallbackC -> IO (FunPtr CellRendererAccelAccelClearedCallbackC)

cellRendererAccelAccelClearedClosure :: CellRendererAccelAccelClearedCallback -> IO Closure
cellRendererAccelAccelClearedClosure cb = newCClosure =<< mkCellRendererAccelAccelClearedCallback wrapped
    where wrapped = cellRendererAccelAccelClearedCallbackWrapper cb

cellRendererAccelAccelClearedCallbackWrapper ::
    CellRendererAccelAccelClearedCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
cellRendererAccelAccelClearedCallbackWrapper _cb _ path_string _ = do
    path_string' <- cstringToText path_string
    _cb  path_string'

onCellRendererAccelAccelCleared :: (GObject a, MonadIO m) => a -> CellRendererAccelAccelClearedCallback -> m SignalHandlerId
onCellRendererAccelAccelCleared obj cb = liftIO $ connectCellRendererAccelAccelCleared obj cb SignalConnectBefore
afterCellRendererAccelAccelCleared :: (GObject a, MonadIO m) => a -> CellRendererAccelAccelClearedCallback -> m SignalHandlerId
afterCellRendererAccelAccelCleared obj cb = connectCellRendererAccelAccelCleared obj cb SignalConnectAfter

connectCellRendererAccelAccelCleared :: (GObject a, MonadIO m) =>
                                        a -> CellRendererAccelAccelClearedCallback -> SignalConnectMode -> m SignalHandlerId
connectCellRendererAccelAccelCleared obj cb after = liftIO $ do
    cb' <- mkCellRendererAccelAccelClearedCallback (cellRendererAccelAccelClearedCallbackWrapper cb)
    connectSignalFunPtr obj "accel-cleared" cb' after

-- signal CellRendererAccel::accel-edited
type CellRendererAccelAccelEditedCallback =
    T.Text ->
    Word32 ->
    [Gdk.ModifierType] ->
    Word32 ->
    IO ()

noCellRendererAccelAccelEditedCallback :: Maybe CellRendererAccelAccelEditedCallback
noCellRendererAccelAccelEditedCallback = Nothing

type CellRendererAccelAccelEditedCallbackC =
    Ptr () ->                               -- object
    CString ->
    Word32 ->
    CUInt ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellRendererAccelAccelEditedCallback :: CellRendererAccelAccelEditedCallbackC -> IO (FunPtr CellRendererAccelAccelEditedCallbackC)

cellRendererAccelAccelEditedClosure :: CellRendererAccelAccelEditedCallback -> IO Closure
cellRendererAccelAccelEditedClosure cb = newCClosure =<< mkCellRendererAccelAccelEditedCallback wrapped
    where wrapped = cellRendererAccelAccelEditedCallbackWrapper cb

cellRendererAccelAccelEditedCallbackWrapper ::
    CellRendererAccelAccelEditedCallback ->
    Ptr () ->
    CString ->
    Word32 ->
    CUInt ->
    Word32 ->
    Ptr () ->
    IO ()
cellRendererAccelAccelEditedCallbackWrapper _cb _ path_string accel_key accel_mods hardware_keycode _ = do
    path_string' <- cstringToText path_string
    let accel_mods' = wordToGFlags accel_mods
    _cb  path_string' accel_key accel_mods' hardware_keycode

onCellRendererAccelAccelEdited :: (GObject a, MonadIO m) => a -> CellRendererAccelAccelEditedCallback -> m SignalHandlerId
onCellRendererAccelAccelEdited obj cb = liftIO $ connectCellRendererAccelAccelEdited obj cb SignalConnectBefore
afterCellRendererAccelAccelEdited :: (GObject a, MonadIO m) => a -> CellRendererAccelAccelEditedCallback -> m SignalHandlerId
afterCellRendererAccelAccelEdited obj cb = connectCellRendererAccelAccelEdited obj cb SignalConnectAfter

connectCellRendererAccelAccelEdited :: (GObject a, MonadIO m) =>
                                       a -> CellRendererAccelAccelEditedCallback -> SignalConnectMode -> m SignalHandlerId
connectCellRendererAccelAccelEdited obj cb after = liftIO $ do
    cb' <- mkCellRendererAccelAccelEditedCallback (cellRendererAccelAccelEditedCallbackWrapper cb)
    connectSignalFunPtr obj "accel-edited" cb' after

-- Enum CellRendererAccelMode

data CellRendererAccelMode = 
      CellRendererAccelModeGtk
    | CellRendererAccelModeOther
    | AnotherCellRendererAccelMode Int
    deriving (Show, Eq)

instance Enum CellRendererAccelMode where
    fromEnum CellRendererAccelModeGtk = 0
    fromEnum CellRendererAccelModeOther = 1
    fromEnum (AnotherCellRendererAccelMode k) = k

    toEnum 0 = CellRendererAccelModeGtk
    toEnum 1 = CellRendererAccelModeOther
    toEnum k = AnotherCellRendererAccelMode k

foreign import ccall "gtk_cell_renderer_accel_mode_get_type" c_gtk_cell_renderer_accel_mode_get_type :: 
    IO GType

instance BoxedEnum CellRendererAccelMode where
    boxedEnumType _ = c_gtk_cell_renderer_accel_mode_get_type

-- object CellRendererCombo 
newtype CellRendererCombo = CellRendererCombo (ForeignPtr CellRendererCombo)
noCellRendererCombo :: Maybe CellRendererCombo
noCellRendererCombo = Nothing

foreign import ccall "gtk_cell_renderer_combo_get_type"
    c_gtk_cell_renderer_combo_get_type :: IO GType

type instance ParentTypes CellRendererCombo = '[CellRendererText, CellRenderer, GObject.Object]

instance GObject CellRendererCombo where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_renderer_combo_get_type
    

class GObject o => CellRendererComboK o
instance (GObject o, IsDescendantOf CellRendererCombo o) => CellRendererComboK o

toCellRendererCombo :: CellRendererComboK o => o -> IO CellRendererCombo
toCellRendererCombo = unsafeCastTo CellRendererCombo

-- method CellRendererCombo::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CellRendererCombo"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_combo_new" gtk_cell_renderer_combo_new :: 
    IO (Ptr CellRendererCombo)


cellRendererComboNew ::
    (MonadIO m) =>
    m CellRendererCombo
cellRendererComboNew  = liftIO $ do
    result <- gtk_cell_renderer_combo_new
    checkUnexpectedReturnNULL "gtk_cell_renderer_combo_new" result
    result' <- (newObject CellRendererCombo) result
    return result'

-- signal CellRendererCombo::changed
type CellRendererComboChangedCallback =
    T.Text ->
    TreeIter ->
    IO ()

noCellRendererComboChangedCallback :: Maybe CellRendererComboChangedCallback
noCellRendererComboChangedCallback = Nothing

type CellRendererComboChangedCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr TreeIter ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellRendererComboChangedCallback :: CellRendererComboChangedCallbackC -> IO (FunPtr CellRendererComboChangedCallbackC)

cellRendererComboChangedClosure :: CellRendererComboChangedCallback -> IO Closure
cellRendererComboChangedClosure cb = newCClosure =<< mkCellRendererComboChangedCallback wrapped
    where wrapped = cellRendererComboChangedCallbackWrapper cb

cellRendererComboChangedCallbackWrapper ::
    CellRendererComboChangedCallback ->
    Ptr () ->
    CString ->
    Ptr TreeIter ->
    Ptr () ->
    IO ()
cellRendererComboChangedCallbackWrapper _cb _ path_string new_iter _ = do
    path_string' <- cstringToText path_string
    new_iter' <- (newBoxed TreeIter) new_iter
    _cb  path_string' new_iter'

onCellRendererComboChanged :: (GObject a, MonadIO m) => a -> CellRendererComboChangedCallback -> m SignalHandlerId
onCellRendererComboChanged obj cb = liftIO $ connectCellRendererComboChanged obj cb SignalConnectBefore
afterCellRendererComboChanged :: (GObject a, MonadIO m) => a -> CellRendererComboChangedCallback -> m SignalHandlerId
afterCellRendererComboChanged obj cb = connectCellRendererComboChanged obj cb SignalConnectAfter

connectCellRendererComboChanged :: (GObject a, MonadIO m) =>
                                   a -> CellRendererComboChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectCellRendererComboChanged obj cb after = liftIO $ do
    cb' <- mkCellRendererComboChangedCallback (cellRendererComboChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- Enum CellRendererMode

data CellRendererMode = 
      CellRendererModeInert
    | CellRendererModeActivatable
    | CellRendererModeEditable
    | AnotherCellRendererMode Int
    deriving (Show, Eq)

instance Enum CellRendererMode where
    fromEnum CellRendererModeInert = 0
    fromEnum CellRendererModeActivatable = 1
    fromEnum CellRendererModeEditable = 2
    fromEnum (AnotherCellRendererMode k) = k

    toEnum 0 = CellRendererModeInert
    toEnum 1 = CellRendererModeActivatable
    toEnum 2 = CellRendererModeEditable
    toEnum k = AnotherCellRendererMode k

foreign import ccall "gtk_cell_renderer_mode_get_type" c_gtk_cell_renderer_mode_get_type :: 
    IO GType

instance BoxedEnum CellRendererMode where
    boxedEnumType _ = c_gtk_cell_renderer_mode_get_type

-- object CellRendererPixbuf 
newtype CellRendererPixbuf = CellRendererPixbuf (ForeignPtr CellRendererPixbuf)
noCellRendererPixbuf :: Maybe CellRendererPixbuf
noCellRendererPixbuf = Nothing

foreign import ccall "gtk_cell_renderer_pixbuf_get_type"
    c_gtk_cell_renderer_pixbuf_get_type :: IO GType

type instance ParentTypes CellRendererPixbuf = '[CellRenderer, GObject.Object]

instance GObject CellRendererPixbuf where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_renderer_pixbuf_get_type
    

class GObject o => CellRendererPixbufK o
instance (GObject o, IsDescendantOf CellRendererPixbuf o) => CellRendererPixbufK o

toCellRendererPixbuf :: CellRendererPixbufK o => o -> IO CellRendererPixbuf
toCellRendererPixbuf = unsafeCastTo CellRendererPixbuf

-- method CellRendererPixbuf::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CellRendererPixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_pixbuf_new" gtk_cell_renderer_pixbuf_new :: 
    IO (Ptr CellRendererPixbuf)


cellRendererPixbufNew ::
    (MonadIO m) =>
    m CellRendererPixbuf
cellRendererPixbufNew  = liftIO $ do
    result <- gtk_cell_renderer_pixbuf_new
    checkUnexpectedReturnNULL "gtk_cell_renderer_pixbuf_new" result
    result' <- (newObject CellRendererPixbuf) result
    return result'

-- object CellRendererProgress 
newtype CellRendererProgress = CellRendererProgress (ForeignPtr CellRendererProgress)
noCellRendererProgress :: Maybe CellRendererProgress
noCellRendererProgress = Nothing

foreign import ccall "gtk_cell_renderer_progress_get_type"
    c_gtk_cell_renderer_progress_get_type :: IO GType

type instance ParentTypes CellRendererProgress = '[CellRenderer, GObject.Object, Orientable]

instance GObject CellRendererProgress where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_renderer_progress_get_type
    

class GObject o => CellRendererProgressK o
instance (GObject o, IsDescendantOf CellRendererProgress o) => CellRendererProgressK o

toCellRendererProgress :: CellRendererProgressK o => o -> IO CellRendererProgress
toCellRendererProgress = unsafeCastTo CellRendererProgress

-- method CellRendererProgress::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CellRendererProgress"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_progress_new" gtk_cell_renderer_progress_new :: 
    IO (Ptr CellRendererProgress)


cellRendererProgressNew ::
    (MonadIO m) =>
    m CellRendererProgress
cellRendererProgressNew  = liftIO $ do
    result <- gtk_cell_renderer_progress_new
    checkUnexpectedReturnNULL "gtk_cell_renderer_progress_new" result
    result' <- (newObject CellRendererProgress) result
    return result'

-- object CellRendererSpin 
newtype CellRendererSpin = CellRendererSpin (ForeignPtr CellRendererSpin)
noCellRendererSpin :: Maybe CellRendererSpin
noCellRendererSpin = Nothing

foreign import ccall "gtk_cell_renderer_spin_get_type"
    c_gtk_cell_renderer_spin_get_type :: IO GType

type instance ParentTypes CellRendererSpin = '[CellRendererText, CellRenderer, GObject.Object]

instance GObject CellRendererSpin where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_renderer_spin_get_type
    

class GObject o => CellRendererSpinK o
instance (GObject o, IsDescendantOf CellRendererSpin o) => CellRendererSpinK o

toCellRendererSpin :: CellRendererSpinK o => o -> IO CellRendererSpin
toCellRendererSpin = unsafeCastTo CellRendererSpin

-- method CellRendererSpin::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CellRendererSpin"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_spin_new" gtk_cell_renderer_spin_new :: 
    IO (Ptr CellRendererSpin)


cellRendererSpinNew ::
    (MonadIO m) =>
    m CellRendererSpin
cellRendererSpinNew  = liftIO $ do
    result <- gtk_cell_renderer_spin_new
    checkUnexpectedReturnNULL "gtk_cell_renderer_spin_new" result
    result' <- (newObject CellRendererSpin) result
    return result'

-- object CellRendererSpinner 
newtype CellRendererSpinner = CellRendererSpinner (ForeignPtr CellRendererSpinner)
noCellRendererSpinner :: Maybe CellRendererSpinner
noCellRendererSpinner = Nothing

foreign import ccall "gtk_cell_renderer_spinner_get_type"
    c_gtk_cell_renderer_spinner_get_type :: IO GType

type instance ParentTypes CellRendererSpinner = '[CellRenderer, GObject.Object]

instance GObject CellRendererSpinner where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_renderer_spinner_get_type
    

class GObject o => CellRendererSpinnerK o
instance (GObject o, IsDescendantOf CellRendererSpinner o) => CellRendererSpinnerK o

toCellRendererSpinner :: CellRendererSpinnerK o => o -> IO CellRendererSpinner
toCellRendererSpinner = unsafeCastTo CellRendererSpinner

-- method CellRendererSpinner::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CellRendererSpinner"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_spinner_new" gtk_cell_renderer_spinner_new :: 
    IO (Ptr CellRendererSpinner)


cellRendererSpinnerNew ::
    (MonadIO m) =>
    m CellRendererSpinner
cellRendererSpinnerNew  = liftIO $ do
    result <- gtk_cell_renderer_spinner_new
    checkUnexpectedReturnNULL "gtk_cell_renderer_spinner_new" result
    result' <- (newObject CellRendererSpinner) result
    return result'

-- Flags CellRendererState

data CellRendererState = 
      CellRendererStateSelected
    | CellRendererStatePrelit
    | CellRendererStateInsensitive
    | CellRendererStateSorted
    | CellRendererStateFocused
    | CellRendererStateExpandable
    | CellRendererStateExpanded
    | AnotherCellRendererState Int
    deriving (Show, Eq)

instance Enum CellRendererState where
    fromEnum CellRendererStateSelected = 1
    fromEnum CellRendererStatePrelit = 2
    fromEnum CellRendererStateInsensitive = 4
    fromEnum CellRendererStateSorted = 8
    fromEnum CellRendererStateFocused = 16
    fromEnum CellRendererStateExpandable = 32
    fromEnum CellRendererStateExpanded = 64
    fromEnum (AnotherCellRendererState k) = k

    toEnum 1 = CellRendererStateSelected
    toEnum 2 = CellRendererStatePrelit
    toEnum 4 = CellRendererStateInsensitive
    toEnum 8 = CellRendererStateSorted
    toEnum 16 = CellRendererStateFocused
    toEnum 32 = CellRendererStateExpandable
    toEnum 64 = CellRendererStateExpanded
    toEnum k = AnotherCellRendererState k

foreign import ccall "gtk_cell_renderer_state_get_type" c_gtk_cell_renderer_state_get_type :: 
    IO GType

instance BoxedEnum CellRendererState where
    boxedEnumType _ = c_gtk_cell_renderer_state_get_type

instance IsGFlag CellRendererState

-- object CellRendererText 
newtype CellRendererText = CellRendererText (ForeignPtr CellRendererText)
noCellRendererText :: Maybe CellRendererText
noCellRendererText = Nothing

foreign import ccall "gtk_cell_renderer_text_get_type"
    c_gtk_cell_renderer_text_get_type :: IO GType

type instance ParentTypes CellRendererText = '[CellRenderer, GObject.Object]

instance GObject CellRendererText where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_renderer_text_get_type
    

class GObject o => CellRendererTextK o
instance (GObject o, IsDescendantOf CellRendererText o) => CellRendererTextK o

toCellRendererText :: CellRendererTextK o => o -> IO CellRendererText
toCellRendererText = unsafeCastTo CellRendererText

-- method CellRendererText::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CellRendererText"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_text_new" gtk_cell_renderer_text_new :: 
    IO (Ptr CellRendererText)


cellRendererTextNew ::
    (MonadIO m) =>
    m CellRendererText
cellRendererTextNew  = liftIO $ do
    result <- gtk_cell_renderer_text_new
    checkUnexpectedReturnNULL "gtk_cell_renderer_text_new" result
    result' <- (newObject CellRendererText) result
    return result'

-- method CellRendererText::set_fixed_height_from_font
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "number_of_rows", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "number_of_rows", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_text_set_fixed_height_from_font" gtk_cell_renderer_text_set_fixed_height_from_font :: 
    Ptr CellRendererText ->                 -- _obj : TInterface "Gtk" "CellRendererText"
    Int32 ->                                -- number_of_rows : TBasicType TInt32
    IO ()


cellRendererTextSetFixedHeightFromFont ::
    (MonadIO m, CellRendererTextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- number_of_rows
    m ()
cellRendererTextSetFixedHeightFromFont _obj number_of_rows = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_renderer_text_set_fixed_height_from_font _obj' number_of_rows
    touchManagedPtr _obj
    return ()

-- signal CellRendererText::edited
type CellRendererTextEditedCallback =
    T.Text ->
    T.Text ->
    IO ()

noCellRendererTextEditedCallback :: Maybe CellRendererTextEditedCallback
noCellRendererTextEditedCallback = Nothing

type CellRendererTextEditedCallbackC =
    Ptr () ->                               -- object
    CString ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellRendererTextEditedCallback :: CellRendererTextEditedCallbackC -> IO (FunPtr CellRendererTextEditedCallbackC)

cellRendererTextEditedClosure :: CellRendererTextEditedCallback -> IO Closure
cellRendererTextEditedClosure cb = newCClosure =<< mkCellRendererTextEditedCallback wrapped
    where wrapped = cellRendererTextEditedCallbackWrapper cb

cellRendererTextEditedCallbackWrapper ::
    CellRendererTextEditedCallback ->
    Ptr () ->
    CString ->
    CString ->
    Ptr () ->
    IO ()
cellRendererTextEditedCallbackWrapper _cb _ path new_text _ = do
    path' <- cstringToText path
    new_text' <- cstringToText new_text
    _cb  path' new_text'

onCellRendererTextEdited :: (GObject a, MonadIO m) => a -> CellRendererTextEditedCallback -> m SignalHandlerId
onCellRendererTextEdited obj cb = liftIO $ connectCellRendererTextEdited obj cb SignalConnectBefore
afterCellRendererTextEdited :: (GObject a, MonadIO m) => a -> CellRendererTextEditedCallback -> m SignalHandlerId
afterCellRendererTextEdited obj cb = connectCellRendererTextEdited obj cb SignalConnectAfter

connectCellRendererTextEdited :: (GObject a, MonadIO m) =>
                                 a -> CellRendererTextEditedCallback -> SignalConnectMode -> m SignalHandlerId
connectCellRendererTextEdited obj cb after = liftIO $ do
    cb' <- mkCellRendererTextEditedCallback (cellRendererTextEditedCallbackWrapper cb)
    connectSignalFunPtr obj "edited" cb' after

-- object CellRendererToggle 
newtype CellRendererToggle = CellRendererToggle (ForeignPtr CellRendererToggle)
noCellRendererToggle :: Maybe CellRendererToggle
noCellRendererToggle = Nothing

foreign import ccall "gtk_cell_renderer_toggle_get_type"
    c_gtk_cell_renderer_toggle_get_type :: IO GType

type instance ParentTypes CellRendererToggle = '[CellRenderer, GObject.Object]

instance GObject CellRendererToggle where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_renderer_toggle_get_type
    

class GObject o => CellRendererToggleK o
instance (GObject o, IsDescendantOf CellRendererToggle o) => CellRendererToggleK o

toCellRendererToggle :: CellRendererToggleK o => o -> IO CellRendererToggle
toCellRendererToggle = unsafeCastTo CellRendererToggle

-- method CellRendererToggle::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CellRendererToggle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_toggle_new" gtk_cell_renderer_toggle_new :: 
    IO (Ptr CellRendererToggle)


cellRendererToggleNew ::
    (MonadIO m) =>
    m CellRendererToggle
cellRendererToggleNew  = liftIO $ do
    result <- gtk_cell_renderer_toggle_new
    checkUnexpectedReturnNULL "gtk_cell_renderer_toggle_new" result
    result' <- (newObject CellRendererToggle) result
    return result'

-- method CellRendererToggle::get_activatable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_toggle_get_activatable" gtk_cell_renderer_toggle_get_activatable :: 
    Ptr CellRendererToggle ->               -- _obj : TInterface "Gtk" "CellRendererToggle"
    IO CInt


cellRendererToggleGetActivatable ::
    (MonadIO m, CellRendererToggleK a) =>
    a ->                                    -- _obj
    m Bool
cellRendererToggleGetActivatable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_renderer_toggle_get_activatable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CellRendererToggle::get_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_toggle_get_active" gtk_cell_renderer_toggle_get_active :: 
    Ptr CellRendererToggle ->               -- _obj : TInterface "Gtk" "CellRendererToggle"
    IO CInt


cellRendererToggleGetActive ::
    (MonadIO m, CellRendererToggleK a) =>
    a ->                                    -- _obj
    m Bool
cellRendererToggleGetActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_renderer_toggle_get_active _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CellRendererToggle::get_radio
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_toggle_get_radio" gtk_cell_renderer_toggle_get_radio :: 
    Ptr CellRendererToggle ->               -- _obj : TInterface "Gtk" "CellRendererToggle"
    IO CInt


cellRendererToggleGetRadio ::
    (MonadIO m, CellRendererToggleK a) =>
    a ->                                    -- _obj
    m Bool
cellRendererToggleGetRadio _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_renderer_toggle_get_radio _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CellRendererToggle::set_activatable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_toggle_set_activatable" gtk_cell_renderer_toggle_set_activatable :: 
    Ptr CellRendererToggle ->               -- _obj : TInterface "Gtk" "CellRendererToggle"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


cellRendererToggleSetActivatable ::
    (MonadIO m, CellRendererToggleK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
cellRendererToggleSetActivatable _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_cell_renderer_toggle_set_activatable _obj' setting'
    touchManagedPtr _obj
    return ()

-- method CellRendererToggle::set_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_toggle_set_active" gtk_cell_renderer_toggle_set_active :: 
    Ptr CellRendererToggle ->               -- _obj : TInterface "Gtk" "CellRendererToggle"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


cellRendererToggleSetActive ::
    (MonadIO m, CellRendererToggleK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
cellRendererToggleSetActive _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_cell_renderer_toggle_set_active _obj' setting'
    touchManagedPtr _obj
    return ()

-- method CellRendererToggle::set_radio
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "radio", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellRendererToggle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "radio", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_renderer_toggle_set_radio" gtk_cell_renderer_toggle_set_radio :: 
    Ptr CellRendererToggle ->               -- _obj : TInterface "Gtk" "CellRendererToggle"
    CInt ->                                 -- radio : TBasicType TBoolean
    IO ()


cellRendererToggleSetRadio ::
    (MonadIO m, CellRendererToggleK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- radio
    m ()
cellRendererToggleSetRadio _obj radio = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let radio' = (fromIntegral . fromEnum) radio
    gtk_cell_renderer_toggle_set_radio _obj' radio'
    touchManagedPtr _obj
    return ()

-- signal CellRendererToggle::toggled
type CellRendererToggleToggledCallback =
    T.Text ->
    IO ()

noCellRendererToggleToggledCallback :: Maybe CellRendererToggleToggledCallback
noCellRendererToggleToggledCallback = Nothing

type CellRendererToggleToggledCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCellRendererToggleToggledCallback :: CellRendererToggleToggledCallbackC -> IO (FunPtr CellRendererToggleToggledCallbackC)

cellRendererToggleToggledClosure :: CellRendererToggleToggledCallback -> IO Closure
cellRendererToggleToggledClosure cb = newCClosure =<< mkCellRendererToggleToggledCallback wrapped
    where wrapped = cellRendererToggleToggledCallbackWrapper cb

cellRendererToggleToggledCallbackWrapper ::
    CellRendererToggleToggledCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
cellRendererToggleToggledCallbackWrapper _cb _ path _ = do
    path' <- cstringToText path
    _cb  path'

onCellRendererToggleToggled :: (GObject a, MonadIO m) => a -> CellRendererToggleToggledCallback -> m SignalHandlerId
onCellRendererToggleToggled obj cb = liftIO $ connectCellRendererToggleToggled obj cb SignalConnectBefore
afterCellRendererToggleToggled :: (GObject a, MonadIO m) => a -> CellRendererToggleToggledCallback -> m SignalHandlerId
afterCellRendererToggleToggled obj cb = connectCellRendererToggleToggled obj cb SignalConnectAfter

connectCellRendererToggleToggled :: (GObject a, MonadIO m) =>
                                    a -> CellRendererToggleToggledCallback -> SignalConnectMode -> m SignalHandlerId
connectCellRendererToggleToggled obj cb after = liftIO $ do
    cb' <- mkCellRendererToggleToggledCallback (cellRendererToggleToggledCallbackWrapper cb)
    connectSignalFunPtr obj "toggled" cb' after

-- object CellView 
newtype CellView = CellView (ForeignPtr CellView)
noCellView :: Maybe CellView
noCellView = Nothing

foreign import ccall "gtk_cell_view_get_type"
    c_gtk_cell_view_get_type :: IO GType

type instance ParentTypes CellView = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable, CellLayout, Orientable]

instance GObject CellView where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_view_get_type
    

class GObject o => CellViewK o
instance (GObject o, IsDescendantOf CellView o) => CellViewK o

toCellView :: CellViewK o => o -> IO CellView
toCellView = unsafeCastTo CellView

-- method CellView::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CellView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_new" gtk_cell_view_new :: 
    IO (Ptr CellView)


cellViewNew ::
    (MonadIO m) =>
    m CellView
cellViewNew  = liftIO $ do
    result <- gtk_cell_view_new
    checkUnexpectedReturnNULL "gtk_cell_view_new" result
    result' <- (newObject CellView) result
    return result'

-- method CellView::new_with_context
-- method type : Constructor
-- Args : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "CellAreaContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_new_with_context" gtk_cell_view_new_with_context :: 
    Ptr CellArea ->                         -- area : TInterface "Gtk" "CellArea"
    Ptr CellAreaContext ->                  -- context : TInterface "Gtk" "CellAreaContext"
    IO (Ptr CellView)


cellViewNewWithContext ::
    (MonadIO m, CellAreaK a, CellAreaContextK b) =>
    a ->                                    -- area
    b ->                                    -- context
    m CellView
cellViewNewWithContext area context = liftIO $ do
    let area' = unsafeManagedPtrCastPtr area
    let context' = unsafeManagedPtrCastPtr context
    result <- gtk_cell_view_new_with_context area' context'
    checkUnexpectedReturnNULL "gtk_cell_view_new_with_context" result
    result' <- (newObject CellView) result
    touchManagedPtr area
    touchManagedPtr context
    return result'

-- method CellView::new_with_markup
-- method type : Constructor
-- Args : [Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_new_with_markup" gtk_cell_view_new_with_markup :: 
    CString ->                              -- markup : TBasicType TUTF8
    IO (Ptr CellView)


cellViewNewWithMarkup ::
    (MonadIO m) =>
    T.Text ->                               -- markup
    m CellView
cellViewNewWithMarkup markup = liftIO $ do
    markup' <- textToCString markup
    result <- gtk_cell_view_new_with_markup markup'
    checkUnexpectedReturnNULL "gtk_cell_view_new_with_markup" result
    result' <- (newObject CellView) result
    freeMem markup'
    return result'

-- method CellView::new_with_pixbuf
-- method type : Constructor
-- Args : [Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_new_with_pixbuf" gtk_cell_view_new_with_pixbuf :: 
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO (Ptr CellView)


cellViewNewWithPixbuf ::
    (MonadIO m, GdkPixbuf.PixbufK a) =>
    a ->                                    -- pixbuf
    m CellView
cellViewNewWithPixbuf pixbuf = liftIO $ do
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    result <- gtk_cell_view_new_with_pixbuf pixbuf'
    checkUnexpectedReturnNULL "gtk_cell_view_new_with_pixbuf" result
    result' <- (newObject CellView) result
    touchManagedPtr pixbuf
    return result'

-- method CellView::new_with_text
-- method type : Constructor
-- Args : [Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CellView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_new_with_text" gtk_cell_view_new_with_text :: 
    CString ->                              -- text : TBasicType TUTF8
    IO (Ptr CellView)


cellViewNewWithText ::
    (MonadIO m) =>
    T.Text ->                               -- text
    m CellView
cellViewNewWithText text = liftIO $ do
    text' <- textToCString text
    result <- gtk_cell_view_new_with_text text'
    checkUnexpectedReturnNULL "gtk_cell_view_new_with_text" result
    result' <- (newObject CellView) result
    freeMem text'
    return result'

-- method CellView::get_displayed_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_get_displayed_row" gtk_cell_view_get_displayed_row :: 
    Ptr CellView ->                         -- _obj : TInterface "Gtk" "CellView"
    IO (Ptr TreePath)


cellViewGetDisplayedRow ::
    (MonadIO m, CellViewK a) =>
    a ->                                    -- _obj
    m TreePath
cellViewGetDisplayedRow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_view_get_displayed_row _obj'
    checkUnexpectedReturnNULL "gtk_cell_view_get_displayed_row" result
    result' <- (wrapBoxed TreePath) result
    touchManagedPtr _obj
    return result'

-- method CellView::get_draw_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_get_draw_sensitive" gtk_cell_view_get_draw_sensitive :: 
    Ptr CellView ->                         -- _obj : TInterface "Gtk" "CellView"
    IO CInt


cellViewGetDrawSensitive ::
    (MonadIO m, CellViewK a) =>
    a ->                                    -- _obj
    m Bool
cellViewGetDrawSensitive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_view_get_draw_sensitive _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CellView::get_fit_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_get_fit_model" gtk_cell_view_get_fit_model :: 
    Ptr CellView ->                         -- _obj : TInterface "Gtk" "CellView"
    IO CInt


cellViewGetFitModel ::
    (MonadIO m, CellViewK a) =>
    a ->                                    -- _obj
    m Bool
cellViewGetFitModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_view_get_fit_model _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CellView::get_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_get_model" gtk_cell_view_get_model :: 
    Ptr CellView ->                         -- _obj : TInterface "Gtk" "CellView"
    IO (Ptr TreeModel)


cellViewGetModel ::
    (MonadIO m, CellViewK a) =>
    a ->                                    -- _obj
    m TreeModel
cellViewGetModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_view_get_model _obj'
    checkUnexpectedReturnNULL "gtk_cell_view_get_model" result
    result' <- (newObject TreeModel) result
    touchManagedPtr _obj
    return result'

-- method CellView::get_size_of_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "requisition", argType = TInterface "Gtk" "Requisition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_get_size_of_row" gtk_cell_view_get_size_of_row :: 
    Ptr CellView ->                         -- _obj : TInterface "Gtk" "CellView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr Requisition ->                      -- requisition : TInterface "Gtk" "Requisition"
    IO CInt

{-# DEPRECATED cellViewGetSizeOfRow ["(Since version 3.0)","Combo box formerly used this to calculate the","sizes for cellviews, now you can achieve this by either using","the #GtkCellView:fit-model property or by setting the currently","displayed row of the #GtkCellView and using gtk_widget_get_preferred_size()."]#-}
cellViewGetSizeOfRow ::
    (MonadIO m, CellViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m (Bool,Requisition)
cellViewGetSizeOfRow _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    requisition <- callocBoxedBytes 8 :: IO (Ptr Requisition)
    result <- gtk_cell_view_get_size_of_row _obj' path' requisition
    let result' = (/= 0) result
    requisition' <- (wrapBoxed Requisition) requisition
    touchManagedPtr _obj
    touchManagedPtr path
    return (result', requisition')

-- method CellView::set_background_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_set_background_color" gtk_cell_view_set_background_color :: 
    Ptr CellView ->                         -- _obj : TInterface "Gtk" "CellView"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED cellViewSetBackgroundColor ["(Since version 3.4)","Use gtk_cell_view_set_background_rgba() instead."]#-}
cellViewSetBackgroundColor ::
    (MonadIO m, CellViewK a) =>
    a ->                                    -- _obj
    Gdk.Color ->                            -- color
    m ()
cellViewSetBackgroundColor _obj color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let color' = unsafeManagedPtrGetPtr color
    gtk_cell_view_set_background_color _obj' color'
    touchManagedPtr _obj
    touchManagedPtr color
    return ()

-- method CellView::set_background_rgba
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_set_background_rgba" gtk_cell_view_set_background_rgba :: 
    Ptr CellView ->                         -- _obj : TInterface "Gtk" "CellView"
    Ptr Gdk.RGBA ->                         -- rgba : TInterface "Gdk" "RGBA"
    IO ()


cellViewSetBackgroundRgba ::
    (MonadIO m, CellViewK a) =>
    a ->                                    -- _obj
    Gdk.RGBA ->                             -- rgba
    m ()
cellViewSetBackgroundRgba _obj rgba = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let rgba' = unsafeManagedPtrGetPtr rgba
    gtk_cell_view_set_background_rgba _obj' rgba'
    touchManagedPtr _obj
    touchManagedPtr rgba
    return ()

-- method CellView::set_displayed_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_set_displayed_row" gtk_cell_view_set_displayed_row :: 
    Ptr CellView ->                         -- _obj : TInterface "Gtk" "CellView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


cellViewSetDisplayedRow ::
    (MonadIO m, CellViewK a) =>
    a ->                                    -- _obj
    Maybe (TreePath) ->                     -- path
    m ()
cellViewSetDisplayedRow _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePath <- case path of
        Nothing -> return nullPtr
        Just jPath -> do
            let jPath' = unsafeManagedPtrGetPtr jPath
            return jPath'
    gtk_cell_view_set_displayed_row _obj' maybePath
    touchManagedPtr _obj
    whenJust path touchManagedPtr
    return ()

-- method CellView::set_draw_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_set_draw_sensitive" gtk_cell_view_set_draw_sensitive :: 
    Ptr CellView ->                         -- _obj : TInterface "Gtk" "CellView"
    CInt ->                                 -- draw_sensitive : TBasicType TBoolean
    IO ()


cellViewSetDrawSensitive ::
    (MonadIO m, CellViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- draw_sensitive
    m ()
cellViewSetDrawSensitive _obj draw_sensitive = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let draw_sensitive' = (fromIntegral . fromEnum) draw_sensitive
    gtk_cell_view_set_draw_sensitive _obj' draw_sensitive'
    touchManagedPtr _obj
    return ()

-- method CellView::set_fit_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fit_model", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fit_model", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_set_fit_model" gtk_cell_view_set_fit_model :: 
    Ptr CellView ->                         -- _obj : TInterface "Gtk" "CellView"
    CInt ->                                 -- fit_model : TBasicType TBoolean
    IO ()


cellViewSetFitModel ::
    (MonadIO m, CellViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- fit_model
    m ()
cellViewSetFitModel _obj fit_model = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let fit_model' = (fromIntegral . fromEnum) fit_model
    gtk_cell_view_set_fit_model _obj' fit_model'
    touchManagedPtr _obj
    return ()

-- method CellView::set_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_view_set_model" gtk_cell_view_set_model :: 
    Ptr CellView ->                         -- _obj : TInterface "Gtk" "CellView"
    Ptr TreeModel ->                        -- model : TInterface "Gtk" "TreeModel"
    IO ()


cellViewSetModel ::
    (MonadIO m, CellViewK a, TreeModelK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- model
    m ()
cellViewSetModel _obj model = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeModel <- case model of
        Nothing -> return nullPtr
        Just jModel -> do
            let jModel' = unsafeManagedPtrCastPtr jModel
            return jModel'
    gtk_cell_view_set_model _obj' maybeModel
    touchManagedPtr _obj
    whenJust model touchManagedPtr
    return ()

-- object CheckButton 
newtype CheckButton = CheckButton (ForeignPtr CheckButton)
noCheckButton :: Maybe CheckButton
noCheckButton = Nothing

foreign import ccall "gtk_check_button_get_type"
    c_gtk_check_button_get_type :: IO GType

type instance ParentTypes CheckButton = '[ToggleButton, Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject CheckButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_check_button_get_type
    

class GObject o => CheckButtonK o
instance (GObject o, IsDescendantOf CheckButton o) => CheckButtonK o

toCheckButton :: CheckButtonK o => o -> IO CheckButton
toCheckButton = unsafeCastTo CheckButton

-- method CheckButton::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CheckButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_button_new" gtk_check_button_new :: 
    IO (Ptr CheckButton)


checkButtonNew ::
    (MonadIO m) =>
    m CheckButton
checkButtonNew  = liftIO $ do
    result <- gtk_check_button_new
    checkUnexpectedReturnNULL "gtk_check_button_new" result
    result' <- (newObject CheckButton) result
    return result'

-- method CheckButton::new_with_label
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CheckButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_button_new_with_label" gtk_check_button_new_with_label :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr CheckButton)


checkButtonNewWithLabel ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m CheckButton
checkButtonNewWithLabel label = liftIO $ do
    label' <- textToCString label
    result <- gtk_check_button_new_with_label label'
    checkUnexpectedReturnNULL "gtk_check_button_new_with_label" result
    result' <- (newObject CheckButton) result
    freeMem label'
    return result'

-- method CheckButton::new_with_mnemonic
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CheckButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_button_new_with_mnemonic" gtk_check_button_new_with_mnemonic :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr CheckButton)


checkButtonNewWithMnemonic ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m CheckButton
checkButtonNewWithMnemonic label = liftIO $ do
    label' <- textToCString label
    result <- gtk_check_button_new_with_mnemonic label'
    checkUnexpectedReturnNULL "gtk_check_button_new_with_mnemonic" result
    result' <- (newObject CheckButton) result
    freeMem label'
    return result'

-- object CheckMenuItem 
newtype CheckMenuItem = CheckMenuItem (ForeignPtr CheckMenuItem)
noCheckMenuItem :: Maybe CheckMenuItem
noCheckMenuItem = Nothing

foreign import ccall "gtk_check_menu_item_get_type"
    c_gtk_check_menu_item_get_type :: IO GType

type instance ParentTypes CheckMenuItem = '[MenuItem, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject CheckMenuItem where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_check_menu_item_get_type
    

class GObject o => CheckMenuItemK o
instance (GObject o, IsDescendantOf CheckMenuItem o) => CheckMenuItemK o

toCheckMenuItem :: CheckMenuItemK o => o -> IO CheckMenuItem
toCheckMenuItem = unsafeCastTo CheckMenuItem

-- method CheckMenuItem::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CheckMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_menu_item_new" gtk_check_menu_item_new :: 
    IO (Ptr CheckMenuItem)


checkMenuItemNew ::
    (MonadIO m) =>
    m CheckMenuItem
checkMenuItemNew  = liftIO $ do
    result <- gtk_check_menu_item_new
    checkUnexpectedReturnNULL "gtk_check_menu_item_new" result
    result' <- (newObject CheckMenuItem) result
    return result'

-- method CheckMenuItem::new_with_label
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CheckMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_menu_item_new_with_label" gtk_check_menu_item_new_with_label :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr CheckMenuItem)


checkMenuItemNewWithLabel ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m CheckMenuItem
checkMenuItemNewWithLabel label = liftIO $ do
    label' <- textToCString label
    result <- gtk_check_menu_item_new_with_label label'
    checkUnexpectedReturnNULL "gtk_check_menu_item_new_with_label" result
    result' <- (newObject CheckMenuItem) result
    freeMem label'
    return result'

-- method CheckMenuItem::new_with_mnemonic
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CheckMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_menu_item_new_with_mnemonic" gtk_check_menu_item_new_with_mnemonic :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr CheckMenuItem)


checkMenuItemNewWithMnemonic ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m CheckMenuItem
checkMenuItemNewWithMnemonic label = liftIO $ do
    label' <- textToCString label
    result <- gtk_check_menu_item_new_with_mnemonic label'
    checkUnexpectedReturnNULL "gtk_check_menu_item_new_with_mnemonic" result
    result' <- (newObject CheckMenuItem) result
    freeMem label'
    return result'

-- method CheckMenuItem::get_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_menu_item_get_active" gtk_check_menu_item_get_active :: 
    Ptr CheckMenuItem ->                    -- _obj : TInterface "Gtk" "CheckMenuItem"
    IO CInt


checkMenuItemGetActive ::
    (MonadIO m, CheckMenuItemK a) =>
    a ->                                    -- _obj
    m Bool
checkMenuItemGetActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_check_menu_item_get_active _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CheckMenuItem::get_draw_as_radio
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_menu_item_get_draw_as_radio" gtk_check_menu_item_get_draw_as_radio :: 
    Ptr CheckMenuItem ->                    -- _obj : TInterface "Gtk" "CheckMenuItem"
    IO CInt


checkMenuItemGetDrawAsRadio ::
    (MonadIO m, CheckMenuItemK a) =>
    a ->                                    -- _obj
    m Bool
checkMenuItemGetDrawAsRadio _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_check_menu_item_get_draw_as_radio _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CheckMenuItem::get_inconsistent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_menu_item_get_inconsistent" gtk_check_menu_item_get_inconsistent :: 
    Ptr CheckMenuItem ->                    -- _obj : TInterface "Gtk" "CheckMenuItem"
    IO CInt


checkMenuItemGetInconsistent ::
    (MonadIO m, CheckMenuItemK a) =>
    a ->                                    -- _obj
    m Bool
checkMenuItemGetInconsistent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_check_menu_item_get_inconsistent _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method CheckMenuItem::set_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_menu_item_set_active" gtk_check_menu_item_set_active :: 
    Ptr CheckMenuItem ->                    -- _obj : TInterface "Gtk" "CheckMenuItem"
    CInt ->                                 -- is_active : TBasicType TBoolean
    IO ()


checkMenuItemSetActive ::
    (MonadIO m, CheckMenuItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- is_active
    m ()
checkMenuItemSetActive _obj is_active = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let is_active' = (fromIntegral . fromEnum) is_active
    gtk_check_menu_item_set_active _obj' is_active'
    touchManagedPtr _obj
    return ()

-- method CheckMenuItem::set_draw_as_radio
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_as_radio", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_as_radio", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_menu_item_set_draw_as_radio" gtk_check_menu_item_set_draw_as_radio :: 
    Ptr CheckMenuItem ->                    -- _obj : TInterface "Gtk" "CheckMenuItem"
    CInt ->                                 -- draw_as_radio : TBasicType TBoolean
    IO ()


checkMenuItemSetDrawAsRadio ::
    (MonadIO m, CheckMenuItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- draw_as_radio
    m ()
checkMenuItemSetDrawAsRadio _obj draw_as_radio = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let draw_as_radio' = (fromIntegral . fromEnum) draw_as_radio
    gtk_check_menu_item_set_draw_as_radio _obj' draw_as_radio'
    touchManagedPtr _obj
    return ()

-- method CheckMenuItem::set_inconsistent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_menu_item_set_inconsistent" gtk_check_menu_item_set_inconsistent :: 
    Ptr CheckMenuItem ->                    -- _obj : TInterface "Gtk" "CheckMenuItem"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


checkMenuItemSetInconsistent ::
    (MonadIO m, CheckMenuItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
checkMenuItemSetInconsistent _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_check_menu_item_set_inconsistent _obj' setting'
    touchManagedPtr _obj
    return ()

-- method CheckMenuItem::toggled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CheckMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_menu_item_toggled" gtk_check_menu_item_toggled :: 
    Ptr CheckMenuItem ->                    -- _obj : TInterface "Gtk" "CheckMenuItem"
    IO ()


checkMenuItemToggled ::
    (MonadIO m, CheckMenuItemK a) =>
    a ->                                    -- _obj
    m ()
checkMenuItemToggled _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_check_menu_item_toggled _obj'
    touchManagedPtr _obj
    return ()

-- signal CheckMenuItem::toggled
type CheckMenuItemToggledCallback =
    IO ()

noCheckMenuItemToggledCallback :: Maybe CheckMenuItemToggledCallback
noCheckMenuItemToggledCallback = Nothing

type CheckMenuItemToggledCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCheckMenuItemToggledCallback :: CheckMenuItemToggledCallbackC -> IO (FunPtr CheckMenuItemToggledCallbackC)

checkMenuItemToggledClosure :: CheckMenuItemToggledCallback -> IO Closure
checkMenuItemToggledClosure cb = newCClosure =<< mkCheckMenuItemToggledCallback wrapped
    where wrapped = checkMenuItemToggledCallbackWrapper cb

checkMenuItemToggledCallbackWrapper ::
    CheckMenuItemToggledCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
checkMenuItemToggledCallbackWrapper _cb _ _ = do
    _cb 

onCheckMenuItemToggled :: (GObject a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId
onCheckMenuItemToggled obj cb = liftIO $ connectCheckMenuItemToggled obj cb SignalConnectBefore
afterCheckMenuItemToggled :: (GObject a, MonadIO m) => a -> CheckMenuItemToggledCallback -> m SignalHandlerId
afterCheckMenuItemToggled obj cb = connectCheckMenuItemToggled obj cb SignalConnectAfter

connectCheckMenuItemToggled :: (GObject a, MonadIO m) =>
                               a -> CheckMenuItemToggledCallback -> SignalConnectMode -> m SignalHandlerId
connectCheckMenuItemToggled obj cb after = liftIO $ do
    cb' <- mkCheckMenuItemToggledCallback (checkMenuItemToggledCallbackWrapper cb)
    connectSignalFunPtr obj "toggled" cb' after

-- object CheckMenuItemAccessible 
newtype CheckMenuItemAccessible = CheckMenuItemAccessible (ForeignPtr CheckMenuItemAccessible)
noCheckMenuItemAccessible :: Maybe CheckMenuItemAccessible
noCheckMenuItemAccessible = Nothing

foreign import ccall "gtk_check_menu_item_accessible_get_type"
    c_gtk_check_menu_item_accessible_get_type :: IO GType

type instance ParentTypes CheckMenuItemAccessible = '[MenuItemAccessible, ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Selection]

instance GObject CheckMenuItemAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_check_menu_item_accessible_get_type
    

class GObject o => CheckMenuItemAccessibleK o
instance (GObject o, IsDescendantOf CheckMenuItemAccessible o) => CheckMenuItemAccessibleK o

toCheckMenuItemAccessible :: CheckMenuItemAccessibleK o => o -> IO CheckMenuItemAccessible
toCheckMenuItemAccessible = unsafeCastTo CheckMenuItemAccessible

-- object Clipboard 
newtype Clipboard = Clipboard (ForeignPtr Clipboard)
noClipboard :: Maybe Clipboard
noClipboard = Nothing

foreign import ccall "gtk_clipboard_get_type"
    c_gtk_clipboard_get_type :: IO GType

type instance ParentTypes Clipboard = '[GObject.Object]

instance GObject Clipboard where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_clipboard_get_type
    

class GObject o => ClipboardK o
instance (GObject o, IsDescendantOf Clipboard o) => ClipboardK o

toClipboard :: ClipboardK o => o -> IO Clipboard
toClipboard = unsafeCastTo Clipboard

-- method Clipboard::clear
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_clear" gtk_clipboard_clear :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    IO ()


clipboardClear ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    m ()
clipboardClear _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_clipboard_clear _obj'
    touchManagedPtr _obj
    return ()

-- method Clipboard::get_display
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Display"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_get_display" gtk_clipboard_get_display :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    IO (Ptr Gdk.Display)


clipboardGetDisplay ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    m Gdk.Display
clipboardGetDisplay _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_clipboard_get_display _obj'
    checkUnexpectedReturnNULL "gtk_clipboard_get_display" result
    result' <- (newObject Gdk.Display) result
    touchManagedPtr _obj
    return result'

-- method Clipboard::get_owner
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GObject" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_get_owner" gtk_clipboard_get_owner :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    IO (Ptr GObject.Object)


clipboardGetOwner ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    m GObject.Object
clipboardGetOwner _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_clipboard_get_owner _obj'
    checkUnexpectedReturnNULL "gtk_clipboard_get_owner" result
    result' <- (newObject GObject.Object) result
    touchManagedPtr _obj
    return result'

-- method Clipboard::request_contents
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_request_contents" gtk_clipboard_request_contents :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    Ptr Gdk.Atom ->                         -- target : TInterface "Gdk" "Atom"
    FunPtr ClipboardReceivedFuncC ->        -- callback : TInterface "Gtk" "ClipboardReceivedFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


clipboardRequestContents ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    Gdk.Atom ->                             -- target
    ClipboardReceivedFunc ->                -- callback
    m ()
clipboardRequestContents _obj target callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let target' = unsafeManagedPtrGetPtr target
    ptrcallback <- callocMem :: IO (Ptr (FunPtr ClipboardReceivedFuncC))
    callback' <- mkClipboardReceivedFunc (clipboardReceivedFuncWrapper (Just ptrcallback) callback)
    poke ptrcallback callback'
    let user_data = nullPtr
    gtk_clipboard_request_contents _obj' target' callback' user_data
    touchManagedPtr _obj
    touchManagedPtr target
    return ()

-- method Clipboard::request_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardImageReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardImageReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_request_image" gtk_clipboard_request_image :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    FunPtr ClipboardImageReceivedFuncC ->   -- callback : TInterface "Gtk" "ClipboardImageReceivedFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


clipboardRequestImage ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    ClipboardImageReceivedFunc ->           -- callback
    m ()
clipboardRequestImage _obj callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    ptrcallback <- callocMem :: IO (Ptr (FunPtr ClipboardImageReceivedFuncC))
    callback' <- mkClipboardImageReceivedFunc (clipboardImageReceivedFuncWrapper (Just ptrcallback) callback)
    poke ptrcallback callback'
    let user_data = nullPtr
    gtk_clipboard_request_image _obj' callback' user_data
    touchManagedPtr _obj
    return ()

-- method Clipboard::request_rich_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardRichTextReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardRichTextReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_request_rich_text" gtk_clipboard_request_rich_text :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    Ptr TextBuffer ->                       -- buffer : TInterface "Gtk" "TextBuffer"
    FunPtr ClipboardRichTextReceivedFuncC -> -- callback : TInterface "Gtk" "ClipboardRichTextReceivedFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


clipboardRequestRichText ::
    (MonadIO m, ClipboardK a, TextBufferK b) =>
    a ->                                    -- _obj
    b ->                                    -- buffer
    ClipboardRichTextReceivedFunc ->        -- callback
    m ()
clipboardRequestRichText _obj buffer callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let buffer' = unsafeManagedPtrCastPtr buffer
    ptrcallback <- callocMem :: IO (Ptr (FunPtr ClipboardRichTextReceivedFuncC))
    callback' <- mkClipboardRichTextReceivedFunc (clipboardRichTextReceivedFuncWrapper (Just ptrcallback) callback)
    poke ptrcallback callback'
    let user_data = nullPtr
    gtk_clipboard_request_rich_text _obj' buffer' callback' user_data
    touchManagedPtr _obj
    touchManagedPtr buffer
    return ()

-- method Clipboard::request_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardTargetsReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardTargetsReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_request_targets" gtk_clipboard_request_targets :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    FunPtr ClipboardTargetsReceivedFuncC -> -- callback : TInterface "Gtk" "ClipboardTargetsReceivedFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


clipboardRequestTargets ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    ClipboardTargetsReceivedFunc ->         -- callback
    m ()
clipboardRequestTargets _obj callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    ptrcallback <- callocMem :: IO (Ptr (FunPtr ClipboardTargetsReceivedFuncC))
    callback' <- mkClipboardTargetsReceivedFunc (clipboardTargetsReceivedFuncWrapper (Just ptrcallback) callback)
    poke ptrcallback callback'
    let user_data = nullPtr
    gtk_clipboard_request_targets _obj' callback' user_data
    touchManagedPtr _obj
    return ()

-- method Clipboard::request_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardTextReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardTextReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_request_text" gtk_clipboard_request_text :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    FunPtr ClipboardTextReceivedFuncC ->    -- callback : TInterface "Gtk" "ClipboardTextReceivedFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


clipboardRequestText ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    ClipboardTextReceivedFunc ->            -- callback
    m ()
clipboardRequestText _obj callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    ptrcallback <- callocMem :: IO (Ptr (FunPtr ClipboardTextReceivedFuncC))
    callback' <- mkClipboardTextReceivedFunc (clipboardTextReceivedFuncWrapper (Just ptrcallback) callback)
    poke ptrcallback callback'
    let user_data = nullPtr
    gtk_clipboard_request_text _obj' callback' user_data
    touchManagedPtr _obj
    return ()

-- method Clipboard::request_uris
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardURIReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "ClipboardURIReceivedFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_request_uris" gtk_clipboard_request_uris :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    FunPtr ClipboardURIReceivedFuncC ->     -- callback : TInterface "Gtk" "ClipboardURIReceivedFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


clipboardRequestUris ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    ClipboardURIReceivedFunc ->             -- callback
    m ()
clipboardRequestUris _obj callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    ptrcallback <- callocMem :: IO (Ptr (FunPtr ClipboardURIReceivedFuncC))
    callback' <- mkClipboardURIReceivedFunc (clipboardURIReceivedFuncWrapper (Just ptrcallback) callback)
    poke ptrcallback callback'
    let user_data = nullPtr
    gtk_clipboard_request_uris _obj' callback' user_data
    touchManagedPtr _obj
    return ()

-- method Clipboard::set_can_store
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_set_can_store" gtk_clipboard_set_can_store :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    Ptr TargetEntry ->                      -- targets : TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry")
    Int32 ->                                -- n_targets : TBasicType TInt32
    IO ()


clipboardSetCanStore ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    Maybe ([TargetEntry]) ->                -- targets
    m ()
clipboardSetCanStore _obj targets = liftIO $ do
    let n_targets = case targets of
            Nothing -> 0
            Just jTargets -> fromIntegral $ length jTargets
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeTargets <- case targets of
        Nothing -> return nullPtr
        Just jTargets -> do
            let jTargets' = map unsafeManagedPtrGetPtr jTargets
            jTargets'' <- packBlockArray 16 jTargets'
            return jTargets''
    gtk_clipboard_set_can_store _obj' maybeTargets n_targets
    touchManagedPtr _obj
    whenJust targets (mapM_ touchManagedPtr)
    freeMem maybeTargets
    return ()

-- method Clipboard::set_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_set_image" gtk_clipboard_set_image :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO ()


clipboardSetImage ::
    (MonadIO m, ClipboardK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- _obj
    b ->                                    -- pixbuf
    m ()
clipboardSetImage _obj pixbuf = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    gtk_clipboard_set_image _obj' pixbuf'
    touchManagedPtr _obj
    touchManagedPtr pixbuf
    return ()

-- method Clipboard::set_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_set_text" gtk_clipboard_set_text :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    CString ->                              -- text : TBasicType TUTF8
    Int32 ->                                -- len : TBasicType TInt32
    IO ()


clipboardSetText ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    Int32 ->                                -- len
    m ()
clipboardSetText _obj text len = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_clipboard_set_text _obj' text' len
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method Clipboard::store
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_store" gtk_clipboard_store :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    IO ()


clipboardStore ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    m ()
clipboardStore _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_clipboard_store _obj'
    touchManagedPtr _obj
    return ()

-- method Clipboard::wait_for_contents
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SelectionData"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_wait_for_contents" gtk_clipboard_wait_for_contents :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    Ptr Gdk.Atom ->                         -- target : TInterface "Gdk" "Atom"
    IO (Ptr SelectionData)


clipboardWaitForContents ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    Gdk.Atom ->                             -- target
    m SelectionData
clipboardWaitForContents _obj target = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let target' = unsafeManagedPtrGetPtr target
    result <- gtk_clipboard_wait_for_contents _obj' target'
    checkUnexpectedReturnNULL "gtk_clipboard_wait_for_contents" result
    result' <- (wrapBoxed SelectionData) result
    touchManagedPtr _obj
    touchManagedPtr target
    return result'

-- method Clipboard::wait_for_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_wait_for_image" gtk_clipboard_wait_for_image :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    IO (Ptr GdkPixbuf.Pixbuf)


clipboardWaitForImage ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    m GdkPixbuf.Pixbuf
clipboardWaitForImage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_clipboard_wait_for_image _obj'
    checkUnexpectedReturnNULL "gtk_clipboard_wait_for_image" result
    result' <- (wrapObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method Clipboard::wait_for_rich_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 3 (TBasicType TUInt8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_wait_for_rich_text" gtk_clipboard_wait_for_rich_text :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    Ptr TextBuffer ->                       -- buffer : TInterface "Gtk" "TextBuffer"
    Ptr (Ptr Gdk.Atom) ->                   -- format : TInterface "Gdk" "Atom"
    Ptr Word64 ->                           -- length : TBasicType TUInt64
    IO (Ptr Word8)


clipboardWaitForRichText ::
    (MonadIO m, ClipboardK a, TextBufferK b) =>
    a ->                                    -- _obj
    b ->                                    -- buffer
    m (ByteString,Gdk.Atom)
clipboardWaitForRichText _obj buffer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let buffer' = unsafeManagedPtrCastPtr buffer
    format <- allocMem :: IO (Ptr (Ptr Gdk.Atom))
    length_ <- allocMem :: IO (Ptr Word64)
    result <- gtk_clipboard_wait_for_rich_text _obj' buffer' format length_
    length_' <- peek length_
    checkUnexpectedReturnNULL "gtk_clipboard_wait_for_rich_text" result
    result' <- (unpackByteStringWithLength length_') result
    freeMem result
    format' <- peek format
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    format'' <- (\x -> Gdk.Atom <$> newForeignPtr_ x) format'
    touchManagedPtr _obj
    touchManagedPtr buffer
    freeMem format
    freeMem length_
    return (result', format'')

-- method Clipboard::wait_for_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 2 (TInterface "Gdk" "Atom"), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferContainer},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_wait_for_targets" gtk_clipboard_wait_for_targets :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    Ptr (Ptr (Ptr Gdk.Atom)) ->             -- targets : TCArray False (-1) 2 (TInterface "Gdk" "Atom")
    Ptr Int32 ->                            -- n_targets : TBasicType TInt32
    IO CInt


clipboardWaitForTargets ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    m (Bool,[Gdk.Atom])
clipboardWaitForTargets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    targets <- allocMem :: IO (Ptr (Ptr (Ptr Gdk.Atom)))
    n_targets <- allocMem :: IO (Ptr Int32)
    result <- gtk_clipboard_wait_for_targets _obj' targets n_targets
    n_targets' <- peek n_targets
    let result' = (/= 0) result
    targets' <- peek targets
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    targets'' <- (unpackPtrArrayWithLength n_targets') targets'
    targets''' <- mapM (\x -> Gdk.Atom <$> newForeignPtr_ x) targets''
    freeMem targets'
    touchManagedPtr _obj
    freeMem targets
    freeMem n_targets
    return (result', targets''')

-- method Clipboard::wait_for_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_wait_for_text" gtk_clipboard_wait_for_text :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    IO CString


clipboardWaitForText ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    m T.Text
clipboardWaitForText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_clipboard_wait_for_text _obj'
    checkUnexpectedReturnNULL "gtk_clipboard_wait_for_text" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Clipboard::wait_for_uris
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_wait_for_uris" gtk_clipboard_wait_for_uris :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    IO (Ptr CString)


clipboardWaitForUris ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    m [T.Text]
clipboardWaitForUris _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_clipboard_wait_for_uris _obj'
    checkUnexpectedReturnNULL "gtk_clipboard_wait_for_uris" result
    result' <- unpackZeroTerminatedUTF8CArray result
    mapZeroTerminatedCArray freeMem result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Clipboard::wait_is_image_available
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_wait_is_image_available" gtk_clipboard_wait_is_image_available :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    IO CInt


clipboardWaitIsImageAvailable ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    m Bool
clipboardWaitIsImageAvailable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_clipboard_wait_is_image_available _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Clipboard::wait_is_rich_text_available
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_wait_is_rich_text_available" gtk_clipboard_wait_is_rich_text_available :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    Ptr TextBuffer ->                       -- buffer : TInterface "Gtk" "TextBuffer"
    IO CInt


clipboardWaitIsRichTextAvailable ::
    (MonadIO m, ClipboardK a, TextBufferK b) =>
    a ->                                    -- _obj
    b ->                                    -- buffer
    m Bool
clipboardWaitIsRichTextAvailable _obj buffer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let buffer' = unsafeManagedPtrCastPtr buffer
    result <- gtk_clipboard_wait_is_rich_text_available _obj' buffer'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr buffer
    return result'

-- method Clipboard::wait_is_target_available
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_wait_is_target_available" gtk_clipboard_wait_is_target_available :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    Ptr Gdk.Atom ->                         -- target : TInterface "Gdk" "Atom"
    IO CInt


clipboardWaitIsTargetAvailable ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    Gdk.Atom ->                             -- target
    m Bool
clipboardWaitIsTargetAvailable _obj target = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let target' = unsafeManagedPtrGetPtr target
    result <- gtk_clipboard_wait_is_target_available _obj' target'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr target
    return result'

-- method Clipboard::wait_is_text_available
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_wait_is_text_available" gtk_clipboard_wait_is_text_available :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    IO CInt


clipboardWaitIsTextAvailable ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    m Bool
clipboardWaitIsTextAvailable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_clipboard_wait_is_text_available _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Clipboard::wait_is_uris_available
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_wait_is_uris_available" gtk_clipboard_wait_is_uris_available :: 
    Ptr Clipboard ->                        -- _obj : TInterface "Gtk" "Clipboard"
    IO CInt


clipboardWaitIsUrisAvailable ::
    (MonadIO m, ClipboardK a) =>
    a ->                                    -- _obj
    m Bool
clipboardWaitIsUrisAvailable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_clipboard_wait_is_uris_available _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Clipboard::get
-- method type : MemberFunction
-- Args : [Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Clipboard"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_get" gtk_clipboard_get :: 
    Ptr Gdk.Atom ->                         -- selection : TInterface "Gdk" "Atom"
    IO (Ptr Clipboard)


clipboardGet ::
    (MonadIO m) =>
    Gdk.Atom ->                             -- selection
    m Clipboard
clipboardGet selection = liftIO $ do
    let selection' = unsafeManagedPtrGetPtr selection
    result <- gtk_clipboard_get selection'
    checkUnexpectedReturnNULL "gtk_clipboard_get" result
    result' <- (newObject Clipboard) result
    touchManagedPtr selection
    return result'

-- method Clipboard::get_default
-- method type : MemberFunction
-- Args : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Clipboard"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_get_default" gtk_clipboard_get_default :: 
    Ptr Gdk.Display ->                      -- display : TInterface "Gdk" "Display"
    IO (Ptr Clipboard)


clipboardGetDefault ::
    (MonadIO m, Gdk.DisplayK a) =>
    a ->                                    -- display
    m Clipboard
clipboardGetDefault display = liftIO $ do
    let display' = unsafeManagedPtrCastPtr display
    result <- gtk_clipboard_get_default display'
    checkUnexpectedReturnNULL "gtk_clipboard_get_default" result
    result' <- (newObject Clipboard) result
    touchManagedPtr display
    return result'

-- method Clipboard::get_for_display
-- method type : MemberFunction
-- Args : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Clipboard"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_clipboard_get_for_display" gtk_clipboard_get_for_display :: 
    Ptr Gdk.Display ->                      -- display : TInterface "Gdk" "Display"
    Ptr Gdk.Atom ->                         -- selection : TInterface "Gdk" "Atom"
    IO (Ptr Clipboard)


clipboardGetForDisplay ::
    (MonadIO m, Gdk.DisplayK a) =>
    a ->                                    -- display
    Gdk.Atom ->                             -- selection
    m Clipboard
clipboardGetForDisplay display selection = liftIO $ do
    let display' = unsafeManagedPtrCastPtr display
    let selection' = unsafeManagedPtrGetPtr selection
    result <- gtk_clipboard_get_for_display display' selection'
    checkUnexpectedReturnNULL "gtk_clipboard_get_for_display" result
    result' <- (newObject Clipboard) result
    touchManagedPtr display
    touchManagedPtr selection
    return result'

-- signal Clipboard::owner-change
type ClipboardOwnerChangeCallback =
    Gdk.EventOwnerChange ->
    IO ()

noClipboardOwnerChangeCallback :: Maybe ClipboardOwnerChangeCallback
noClipboardOwnerChangeCallback = Nothing

type ClipboardOwnerChangeCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventOwnerChange ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkClipboardOwnerChangeCallback :: ClipboardOwnerChangeCallbackC -> IO (FunPtr ClipboardOwnerChangeCallbackC)

clipboardOwnerChangeClosure :: ClipboardOwnerChangeCallback -> IO Closure
clipboardOwnerChangeClosure cb = newCClosure =<< mkClipboardOwnerChangeCallback wrapped
    where wrapped = clipboardOwnerChangeCallbackWrapper cb

clipboardOwnerChangeCallbackWrapper ::
    ClipboardOwnerChangeCallback ->
    Ptr () ->
    Ptr Gdk.EventOwnerChange ->
    Ptr () ->
    IO ()
clipboardOwnerChangeCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 56 Gdk.EventOwnerChange) event
    _cb  event'

onClipboardOwnerChange :: (GObject a, MonadIO m) => a -> ClipboardOwnerChangeCallback -> m SignalHandlerId
onClipboardOwnerChange obj cb = liftIO $ connectClipboardOwnerChange obj cb SignalConnectBefore
afterClipboardOwnerChange :: (GObject a, MonadIO m) => a -> ClipboardOwnerChangeCallback -> m SignalHandlerId
afterClipboardOwnerChange obj cb = connectClipboardOwnerChange obj cb SignalConnectAfter

connectClipboardOwnerChange :: (GObject a, MonadIO m) =>
                               a -> ClipboardOwnerChangeCallback -> SignalConnectMode -> m SignalHandlerId
connectClipboardOwnerChange obj cb after = liftIO $ do
    cb' <- mkClipboardOwnerChangeCallback (clipboardOwnerChangeCallbackWrapper cb)
    connectSignalFunPtr obj "owner-change" cb' after

-- callback ClipboardClearFunc
clipboardClearFuncClosure :: ClipboardClearFunc -> IO Closure
clipboardClearFuncClosure cb = newCClosure =<< mkClipboardClearFunc wrapped
    where wrapped = clipboardClearFuncWrapper Nothing cb

type ClipboardClearFuncC =
    Ptr Clipboard ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkClipboardClearFunc :: ClipboardClearFuncC -> IO (FunPtr ClipboardClearFuncC)

type ClipboardClearFunc =
    Clipboard ->
    Ptr () ->
    IO ()

noClipboardClearFunc :: Maybe ClipboardClearFunc
noClipboardClearFunc = Nothing

clipboardClearFuncWrapper ::
    Maybe (Ptr (FunPtr (ClipboardClearFuncC))) ->
    ClipboardClearFunc ->
    Ptr Clipboard ->
    Ptr () ->
    IO ()
clipboardClearFuncWrapper funptrptr _cb clipboard user_data_or_owner = do
    clipboard' <- (newObject Clipboard) clipboard
    _cb  clipboard' user_data_or_owner
    maybeReleaseFunPtr funptrptr

-- callback ClipboardGetFunc
clipboardGetFuncClosure :: ClipboardGetFunc -> IO Closure
clipboardGetFuncClosure cb = newCClosure =<< mkClipboardGetFunc wrapped
    where wrapped = clipboardGetFuncWrapper Nothing cb

type ClipboardGetFuncC =
    Ptr Clipboard ->
    Ptr SelectionData ->
    Word32 ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkClipboardGetFunc :: ClipboardGetFuncC -> IO (FunPtr ClipboardGetFuncC)

type ClipboardGetFunc =
    Clipboard ->
    SelectionData ->
    Word32 ->
    Ptr () ->
    IO ()

noClipboardGetFunc :: Maybe ClipboardGetFunc
noClipboardGetFunc = Nothing

clipboardGetFuncWrapper ::
    Maybe (Ptr (FunPtr (ClipboardGetFuncC))) ->
    ClipboardGetFunc ->
    Ptr Clipboard ->
    Ptr SelectionData ->
    Word32 ->
    Ptr () ->
    IO ()
clipboardGetFuncWrapper funptrptr _cb clipboard selection_data info user_data_or_owner = do
    clipboard' <- (newObject Clipboard) clipboard
    selection_data' <- (newBoxed SelectionData) selection_data
    _cb  clipboard' selection_data' info user_data_or_owner
    maybeReleaseFunPtr funptrptr

-- callback ClipboardImageReceivedFunc
clipboardImageReceivedFuncClosure :: ClipboardImageReceivedFunc -> IO Closure
clipboardImageReceivedFuncClosure cb = newCClosure =<< mkClipboardImageReceivedFunc wrapped
    where wrapped = clipboardImageReceivedFuncWrapper Nothing cb

type ClipboardImageReceivedFuncC =
    Ptr Clipboard ->
    Ptr GdkPixbuf.Pixbuf ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkClipboardImageReceivedFunc :: ClipboardImageReceivedFuncC -> IO (FunPtr ClipboardImageReceivedFuncC)

type ClipboardImageReceivedFunc =
    Clipboard ->
    GdkPixbuf.Pixbuf ->
    IO ()

noClipboardImageReceivedFunc :: Maybe ClipboardImageReceivedFunc
noClipboardImageReceivedFunc = Nothing

clipboardImageReceivedFuncWrapper ::
    Maybe (Ptr (FunPtr (ClipboardImageReceivedFuncC))) ->
    ClipboardImageReceivedFunc ->
    Ptr Clipboard ->
    Ptr GdkPixbuf.Pixbuf ->
    Ptr () ->
    IO ()
clipboardImageReceivedFuncWrapper funptrptr _cb clipboard pixbuf _ = do
    clipboard' <- (newObject Clipboard) clipboard
    pixbuf' <- (newObject GdkPixbuf.Pixbuf) pixbuf
    _cb  clipboard' pixbuf'
    maybeReleaseFunPtr funptrptr

-- callback ClipboardReceivedFunc
clipboardReceivedFuncClosure :: ClipboardReceivedFunc -> IO Closure
clipboardReceivedFuncClosure cb = newCClosure =<< mkClipboardReceivedFunc wrapped
    where wrapped = clipboardReceivedFuncWrapper Nothing cb

type ClipboardReceivedFuncC =
    Ptr Clipboard ->
    Ptr SelectionData ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkClipboardReceivedFunc :: ClipboardReceivedFuncC -> IO (FunPtr ClipboardReceivedFuncC)

type ClipboardReceivedFunc =
    Clipboard ->
    SelectionData ->
    IO ()

noClipboardReceivedFunc :: Maybe ClipboardReceivedFunc
noClipboardReceivedFunc = Nothing

clipboardReceivedFuncWrapper ::
    Maybe (Ptr (FunPtr (ClipboardReceivedFuncC))) ->
    ClipboardReceivedFunc ->
    Ptr Clipboard ->
    Ptr SelectionData ->
    Ptr () ->
    IO ()
clipboardReceivedFuncWrapper funptrptr _cb clipboard selection_data _ = do
    clipboard' <- (newObject Clipboard) clipboard
    selection_data' <- (newBoxed SelectionData) selection_data
    _cb  clipboard' selection_data'
    maybeReleaseFunPtr funptrptr

-- callback ClipboardRichTextReceivedFunc
clipboardRichTextReceivedFuncClosure :: ClipboardRichTextReceivedFunc -> IO Closure
clipboardRichTextReceivedFuncClosure cb = newCClosure =<< mkClipboardRichTextReceivedFunc wrapped
    where wrapped = clipboardRichTextReceivedFuncWrapper Nothing cb

type ClipboardRichTextReceivedFuncC =
    Ptr Clipboard ->
    Ptr Gdk.Atom ->
    CString ->
    Word64 ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkClipboardRichTextReceivedFunc :: ClipboardRichTextReceivedFuncC -> IO (FunPtr ClipboardRichTextReceivedFuncC)

type ClipboardRichTextReceivedFunc =
    Clipboard ->
    Gdk.Atom ->
    Maybe T.Text ->
    Word64 ->
    IO ()

noClipboardRichTextReceivedFunc :: Maybe ClipboardRichTextReceivedFunc
noClipboardRichTextReceivedFunc = Nothing

clipboardRichTextReceivedFuncWrapper ::
    Maybe (Ptr (FunPtr (ClipboardRichTextReceivedFuncC))) ->
    ClipboardRichTextReceivedFunc ->
    Ptr Clipboard ->
    Ptr Gdk.Atom ->
    CString ->
    Word64 ->
    Ptr () ->
    IO ()
clipboardRichTextReceivedFuncWrapper funptrptr _cb clipboard format text length_ _ = do
    clipboard' <- (newObject Clipboard) clipboard
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    format' <- (\x -> Gdk.Atom <$> newForeignPtr_ x) format
    maybeText <-
        if text == nullPtr
        then return Nothing
        else do
            text' <- cstringToText text
            return $ Just text'
    _cb  clipboard' format' maybeText length_
    maybeReleaseFunPtr funptrptr

-- callback ClipboardTargetsReceivedFunc
clipboardTargetsReceivedFuncClosure :: ClipboardTargetsReceivedFunc -> IO Closure
clipboardTargetsReceivedFuncClosure cb = newCClosure =<< mkClipboardTargetsReceivedFunc wrapped
    where wrapped = clipboardTargetsReceivedFuncWrapper Nothing cb

type ClipboardTargetsReceivedFuncC =
    Ptr Clipboard ->
    Ptr (Ptr Gdk.Atom) ->
    Int32 ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkClipboardTargetsReceivedFunc :: ClipboardTargetsReceivedFuncC -> IO (FunPtr ClipboardTargetsReceivedFuncC)

type ClipboardTargetsReceivedFunc =
    Clipboard ->
    Maybe [Gdk.Atom] ->
    IO ()

noClipboardTargetsReceivedFunc :: Maybe ClipboardTargetsReceivedFunc
noClipboardTargetsReceivedFunc = Nothing

clipboardTargetsReceivedFuncWrapper ::
    Maybe (Ptr (FunPtr (ClipboardTargetsReceivedFuncC))) ->
    ClipboardTargetsReceivedFunc ->
    Ptr Clipboard ->
    Ptr (Ptr Gdk.Atom) ->
    Int32 ->
    Ptr () ->
    IO ()
clipboardTargetsReceivedFuncWrapper funptrptr _cb clipboard atoms n_atoms _ = do
    clipboard' <- (newObject Clipboard) clipboard
    maybeAtoms <-
        if atoms == nullPtr
        then return Nothing
        else do
            -- XXX Wrapping a foreign struct/union with no known destructor, leak?
            atoms' <- (unpackPtrArrayWithLength n_atoms) atoms
            atoms'' <- mapM (\x -> Gdk.Atom <$> newForeignPtr_ x) atoms'
            return $ Just atoms''
    _cb  clipboard' maybeAtoms
    maybeReleaseFunPtr funptrptr

-- callback ClipboardTextReceivedFunc
clipboardTextReceivedFuncClosure :: ClipboardTextReceivedFunc -> IO Closure
clipboardTextReceivedFuncClosure cb = newCClosure =<< mkClipboardTextReceivedFunc wrapped
    where wrapped = clipboardTextReceivedFuncWrapper Nothing cb

type ClipboardTextReceivedFuncC =
    Ptr Clipboard ->
    CString ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkClipboardTextReceivedFunc :: ClipboardTextReceivedFuncC -> IO (FunPtr ClipboardTextReceivedFuncC)

type ClipboardTextReceivedFunc =
    Clipboard ->
    Maybe T.Text ->
    IO ()

noClipboardTextReceivedFunc :: Maybe ClipboardTextReceivedFunc
noClipboardTextReceivedFunc = Nothing

clipboardTextReceivedFuncWrapper ::
    Maybe (Ptr (FunPtr (ClipboardTextReceivedFuncC))) ->
    ClipboardTextReceivedFunc ->
    Ptr Clipboard ->
    CString ->
    Ptr () ->
    IO ()
clipboardTextReceivedFuncWrapper funptrptr _cb clipboard text _ = do
    clipboard' <- (newObject Clipboard) clipboard
    maybeText <-
        if text == nullPtr
        then return Nothing
        else do
            text' <- cstringToText text
            return $ Just text'
    _cb  clipboard' maybeText
    maybeReleaseFunPtr funptrptr

-- callback ClipboardURIReceivedFunc
clipboardURIReceivedFuncClosure :: ClipboardURIReceivedFunc -> IO Closure
clipboardURIReceivedFuncClosure cb = newCClosure =<< mkClipboardURIReceivedFunc wrapped
    where wrapped = clipboardURIReceivedFuncWrapper Nothing cb

type ClipboardURIReceivedFuncC =
    Ptr Clipboard ->
    Ptr CString ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkClipboardURIReceivedFunc :: ClipboardURIReceivedFuncC -> IO (FunPtr ClipboardURIReceivedFuncC)

type ClipboardURIReceivedFunc =
    Clipboard ->
    [T.Text] ->
    IO ()

noClipboardURIReceivedFunc :: Maybe ClipboardURIReceivedFunc
noClipboardURIReceivedFunc = Nothing

clipboardURIReceivedFuncWrapper ::
    Maybe (Ptr (FunPtr (ClipboardURIReceivedFuncC))) ->
    ClipboardURIReceivedFunc ->
    Ptr Clipboard ->
    Ptr CString ->
    Ptr () ->
    IO ()
clipboardURIReceivedFuncWrapper funptrptr _cb clipboard uris _ = do
    clipboard' <- (newObject Clipboard) clipboard
    uris' <- unpackZeroTerminatedUTF8CArray uris
    _cb  clipboard' uris'
    maybeReleaseFunPtr funptrptr

-- object ColorButton 
newtype ColorButton = ColorButton (ForeignPtr ColorButton)
noColorButton :: Maybe ColorButton
noColorButton = Nothing

foreign import ccall "gtk_color_button_get_type"
    c_gtk_color_button_get_type :: IO GType

type instance ParentTypes ColorButton = '[Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable, ColorChooser]

instance GObject ColorButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_color_button_get_type
    

class GObject o => ColorButtonK o
instance (GObject o, IsDescendantOf ColorButton o) => ColorButtonK o

toColorButton :: ColorButtonK o => o -> IO ColorButton
toColorButton = unsafeCastTo ColorButton

-- method ColorButton::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ColorButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_button_new" gtk_color_button_new :: 
    IO (Ptr ColorButton)


colorButtonNew ::
    (MonadIO m) =>
    m ColorButton
colorButtonNew  = liftIO $ do
    result <- gtk_color_button_new
    checkUnexpectedReturnNULL "gtk_color_button_new" result
    result' <- (newObject ColorButton) result
    return result'

-- method ColorButton::new_with_color
-- method type : Constructor
-- Args : [Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ColorButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_button_new_with_color" gtk_color_button_new_with_color :: 
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO (Ptr ColorButton)

{-# DEPRECATED colorButtonNewWithColor ["(Since version 3.4)","Use gtk_color_button_new_with_rgba() instead."]#-}
colorButtonNewWithColor ::
    (MonadIO m) =>
    Gdk.Color ->                            -- color
    m ColorButton
colorButtonNewWithColor color = liftIO $ do
    let color' = unsafeManagedPtrGetPtr color
    result <- gtk_color_button_new_with_color color'
    checkUnexpectedReturnNULL "gtk_color_button_new_with_color" result
    result' <- (newObject ColorButton) result
    touchManagedPtr color
    return result'

-- method ColorButton::new_with_rgba
-- method type : Constructor
-- Args : [Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ColorButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_button_new_with_rgba" gtk_color_button_new_with_rgba :: 
    Ptr Gdk.RGBA ->                         -- rgba : TInterface "Gdk" "RGBA"
    IO (Ptr ColorButton)


colorButtonNewWithRgba ::
    (MonadIO m) =>
    Gdk.RGBA ->                             -- rgba
    m ColorButton
colorButtonNewWithRgba rgba = liftIO $ do
    let rgba' = unsafeManagedPtrGetPtr rgba
    result <- gtk_color_button_new_with_rgba rgba'
    checkUnexpectedReturnNULL "gtk_color_button_new_with_rgba" result
    result' <- (newObject ColorButton) result
    touchManagedPtr rgba
    return result'

-- method ColorButton::get_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt16
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_button_get_alpha" gtk_color_button_get_alpha :: 
    Ptr ColorButton ->                      -- _obj : TInterface "Gtk" "ColorButton"
    IO Word16

{-# DEPRECATED colorButtonGetAlpha ["(Since version 3.4)","Use gtk_color_chooser_get_rgba() instead."]#-}
colorButtonGetAlpha ::
    (MonadIO m, ColorButtonK a) =>
    a ->                                    -- _obj
    m Word16
colorButtonGetAlpha _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_color_button_get_alpha _obj'
    touchManagedPtr _obj
    return result

-- method ColorButton::get_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_button_get_color" gtk_color_button_get_color :: 
    Ptr ColorButton ->                      -- _obj : TInterface "Gtk" "ColorButton"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED colorButtonGetColor ["(Since version 3.4)","Use gtk_color_chooser_get_rgba() instead."]#-}
colorButtonGetColor ::
    (MonadIO m, ColorButtonK a) =>
    a ->                                    -- _obj
    m (Gdk.Color)
colorButtonGetColor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    color <- callocBoxedBytes 12 :: IO (Ptr Gdk.Color)
    gtk_color_button_get_color _obj' color
    color' <- (wrapBoxed Gdk.Color) color
    touchManagedPtr _obj
    return color'

-- method ColorButton::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_button_get_title" gtk_color_button_get_title :: 
    Ptr ColorButton ->                      -- _obj : TInterface "Gtk" "ColorButton"
    IO CString


colorButtonGetTitle ::
    (MonadIO m, ColorButtonK a) =>
    a ->                                    -- _obj
    m T.Text
colorButtonGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_color_button_get_title _obj'
    checkUnexpectedReturnNULL "gtk_color_button_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method ColorButton::get_use_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_button_get_use_alpha" gtk_color_button_get_use_alpha :: 
    Ptr ColorButton ->                      -- _obj : TInterface "Gtk" "ColorButton"
    IO CInt

{-# DEPRECATED colorButtonGetUseAlpha ["(Since version 3.4)","Use gtk_color_chooser_get_use_alpha() instead."]#-}
colorButtonGetUseAlpha ::
    (MonadIO m, ColorButtonK a) =>
    a ->                                    -- _obj
    m Bool
colorButtonGetUseAlpha _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_color_button_get_use_alpha _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ColorButton::set_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "alpha", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "alpha", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_button_set_alpha" gtk_color_button_set_alpha :: 
    Ptr ColorButton ->                      -- _obj : TInterface "Gtk" "ColorButton"
    Word16 ->                               -- alpha : TBasicType TUInt16
    IO ()

{-# DEPRECATED colorButtonSetAlpha ["(Since version 3.4)","Use gtk_color_chooser_set_rgba() instead."]#-}
colorButtonSetAlpha ::
    (MonadIO m, ColorButtonK a) =>
    a ->                                    -- _obj
    Word16 ->                               -- alpha
    m ()
colorButtonSetAlpha _obj alpha = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_color_button_set_alpha _obj' alpha
    touchManagedPtr _obj
    return ()

-- method ColorButton::set_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_button_set_color" gtk_color_button_set_color :: 
    Ptr ColorButton ->                      -- _obj : TInterface "Gtk" "ColorButton"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED colorButtonSetColor ["Use gtk_color_chooser_set_rgba() instead."]#-}
colorButtonSetColor ::
    (MonadIO m, ColorButtonK a) =>
    a ->                                    -- _obj
    Gdk.Color ->                            -- color
    m ()
colorButtonSetColor _obj color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let color' = unsafeManagedPtrGetPtr color
    gtk_color_button_set_color _obj' color'
    touchManagedPtr _obj
    touchManagedPtr color
    return ()

-- method ColorButton::set_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_button_set_title" gtk_color_button_set_title :: 
    Ptr ColorButton ->                      -- _obj : TInterface "Gtk" "ColorButton"
    CString ->                              -- title : TBasicType TUTF8
    IO ()


colorButtonSetTitle ::
    (MonadIO m, ColorButtonK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- title
    m ()
colorButtonSetTitle _obj title = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    title' <- textToCString title
    gtk_color_button_set_title _obj' title'
    touchManagedPtr _obj
    freeMem title'
    return ()

-- method ColorButton::set_use_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_alpha", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_alpha", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_button_set_use_alpha" gtk_color_button_set_use_alpha :: 
    Ptr ColorButton ->                      -- _obj : TInterface "Gtk" "ColorButton"
    CInt ->                                 -- use_alpha : TBasicType TBoolean
    IO ()

{-# DEPRECATED colorButtonSetUseAlpha ["(Since version 3.4)","Use gtk_color_chooser_set_use_alpha() instead."]#-}
colorButtonSetUseAlpha ::
    (MonadIO m, ColorButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_alpha
    m ()
colorButtonSetUseAlpha _obj use_alpha = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_alpha' = (fromIntegral . fromEnum) use_alpha
    gtk_color_button_set_use_alpha _obj' use_alpha'
    touchManagedPtr _obj
    return ()

-- signal ColorButton::color-set
type ColorButtonColorSetCallback =
    IO ()

noColorButtonColorSetCallback :: Maybe ColorButtonColorSetCallback
noColorButtonColorSetCallback = Nothing

type ColorButtonColorSetCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkColorButtonColorSetCallback :: ColorButtonColorSetCallbackC -> IO (FunPtr ColorButtonColorSetCallbackC)

colorButtonColorSetClosure :: ColorButtonColorSetCallback -> IO Closure
colorButtonColorSetClosure cb = newCClosure =<< mkColorButtonColorSetCallback wrapped
    where wrapped = colorButtonColorSetCallbackWrapper cb

colorButtonColorSetCallbackWrapper ::
    ColorButtonColorSetCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
colorButtonColorSetCallbackWrapper _cb _ _ = do
    _cb 

onColorButtonColorSet :: (GObject a, MonadIO m) => a -> ColorButtonColorSetCallback -> m SignalHandlerId
onColorButtonColorSet obj cb = liftIO $ connectColorButtonColorSet obj cb SignalConnectBefore
afterColorButtonColorSet :: (GObject a, MonadIO m) => a -> ColorButtonColorSetCallback -> m SignalHandlerId
afterColorButtonColorSet obj cb = connectColorButtonColorSet obj cb SignalConnectAfter

connectColorButtonColorSet :: (GObject a, MonadIO m) =>
                              a -> ColorButtonColorSetCallback -> SignalConnectMode -> m SignalHandlerId
connectColorButtonColorSet obj cb after = liftIO $ do
    cb' <- mkColorButtonColorSetCallback (colorButtonColorSetCallbackWrapper cb)
    connectSignalFunPtr obj "color-set" cb' after

-- interface ColorChooser 

newtype ColorChooser = ColorChooser (ForeignPtr ColorChooser)
noColorChooser :: Maybe ColorChooser
noColorChooser = Nothing

foreign import ccall "gtk_color_chooser_get_type"
    c_gtk_color_chooser_get_type :: IO GType

type instance ParentTypes ColorChooser = '[GObject.Object]

instance GObject ColorChooser where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_color_chooser_get_type
    

class GObject o => ColorChooserK o
instance (GObject o, IsDescendantOf ColorChooser o) => ColorChooserK o

toColorChooser :: ColorChooserK o => o -> IO ColorChooser
toColorChooser = unsafeCastTo ColorChooser

-- method ColorChooser::add_palette
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "colors_per_line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_colors", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "colors", argType = TCArray False (-1) 3 (TInterface "Gdk" "RGBA"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_colors", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "colors_per_line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "colors", argType = TCArray False (-1) 3 (TInterface "Gdk" "RGBA"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_chooser_add_palette" gtk_color_chooser_add_palette :: 
    Ptr ColorChooser ->                     -- _obj : TInterface "Gtk" "ColorChooser"
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    Int32 ->                                -- colors_per_line : TBasicType TInt32
    Int32 ->                                -- n_colors : TBasicType TInt32
    Ptr Gdk.RGBA ->                         -- colors : TCArray False (-1) 3 (TInterface "Gdk" "RGBA")
    IO ()


colorChooserAddPalette ::
    (MonadIO m, ColorChooserK a) =>
    a ->                                    -- _obj
    Orientation ->                          -- orientation
    Int32 ->                                -- colors_per_line
    Maybe ([Gdk.RGBA]) ->                   -- colors
    m ()
colorChooserAddPalette _obj orientation colors_per_line colors = liftIO $ do
    let n_colors = case colors of
            Nothing -> 0
            Just jColors -> fromIntegral $ length jColors
    let _obj' = unsafeManagedPtrCastPtr _obj
    let orientation' = (fromIntegral . fromEnum) orientation
    maybeColors <- case colors of
        Nothing -> return nullPtr
        Just jColors -> do
            let jColors' = map unsafeManagedPtrGetPtr jColors
            jColors'' <- packBlockArray 32 jColors'
            return jColors''
    gtk_color_chooser_add_palette _obj' orientation' colors_per_line n_colors maybeColors
    touchManagedPtr _obj
    whenJust colors (mapM_ touchManagedPtr)
    freeMem maybeColors
    return ()

-- method ColorChooser::get_rgba
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_chooser_get_rgba" gtk_color_chooser_get_rgba :: 
    Ptr ColorChooser ->                     -- _obj : TInterface "Gtk" "ColorChooser"
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO ()


colorChooserGetRgba ::
    (MonadIO m, ColorChooserK a) =>
    a ->                                    -- _obj
    m (Gdk.RGBA)
colorChooserGetRgba _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    gtk_color_chooser_get_rgba _obj' color
    color' <- (wrapBoxed Gdk.RGBA) color
    touchManagedPtr _obj
    return color'

-- method ColorChooser::get_use_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_chooser_get_use_alpha" gtk_color_chooser_get_use_alpha :: 
    Ptr ColorChooser ->                     -- _obj : TInterface "Gtk" "ColorChooser"
    IO CInt


colorChooserGetUseAlpha ::
    (MonadIO m, ColorChooserK a) =>
    a ->                                    -- _obj
    m Bool
colorChooserGetUseAlpha _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_color_chooser_get_use_alpha _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ColorChooser::set_rgba
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_chooser_set_rgba" gtk_color_chooser_set_rgba :: 
    Ptr ColorChooser ->                     -- _obj : TInterface "Gtk" "ColorChooser"
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO ()


colorChooserSetRgba ::
    (MonadIO m, ColorChooserK a) =>
    a ->                                    -- _obj
    Gdk.RGBA ->                             -- color
    m ()
colorChooserSetRgba _obj color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let color' = unsafeManagedPtrGetPtr color
    gtk_color_chooser_set_rgba _obj' color'
    touchManagedPtr _obj
    touchManagedPtr color
    return ()

-- method ColorChooser::set_use_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_alpha", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_alpha", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_chooser_set_use_alpha" gtk_color_chooser_set_use_alpha :: 
    Ptr ColorChooser ->                     -- _obj : TInterface "Gtk" "ColorChooser"
    CInt ->                                 -- use_alpha : TBasicType TBoolean
    IO ()


colorChooserSetUseAlpha ::
    (MonadIO m, ColorChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_alpha
    m ()
colorChooserSetUseAlpha _obj use_alpha = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_alpha' = (fromIntegral . fromEnum) use_alpha
    gtk_color_chooser_set_use_alpha _obj' use_alpha'
    touchManagedPtr _obj
    return ()

-- signal ColorChooser::color-activated
type ColorChooserColorActivatedCallback =
    Gdk.RGBA ->
    IO ()

noColorChooserColorActivatedCallback :: Maybe ColorChooserColorActivatedCallback
noColorChooserColorActivatedCallback = Nothing

type ColorChooserColorActivatedCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.RGBA ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkColorChooserColorActivatedCallback :: ColorChooserColorActivatedCallbackC -> IO (FunPtr ColorChooserColorActivatedCallbackC)

colorChooserColorActivatedClosure :: ColorChooserColorActivatedCallback -> IO Closure
colorChooserColorActivatedClosure cb = newCClosure =<< mkColorChooserColorActivatedCallback wrapped
    where wrapped = colorChooserColorActivatedCallbackWrapper cb

colorChooserColorActivatedCallbackWrapper ::
    ColorChooserColorActivatedCallback ->
    Ptr () ->
    Ptr Gdk.RGBA ->
    Ptr () ->
    IO ()
colorChooserColorActivatedCallbackWrapper _cb _ color _ = do
    color' <- (newBoxed Gdk.RGBA) color
    _cb  color'

onColorChooserColorActivated :: (GObject a, MonadIO m) => a -> ColorChooserColorActivatedCallback -> m SignalHandlerId
onColorChooserColorActivated obj cb = liftIO $ connectColorChooserColorActivated obj cb SignalConnectBefore
afterColorChooserColorActivated :: (GObject a, MonadIO m) => a -> ColorChooserColorActivatedCallback -> m SignalHandlerId
afterColorChooserColorActivated obj cb = connectColorChooserColorActivated obj cb SignalConnectAfter

connectColorChooserColorActivated :: (GObject a, MonadIO m) =>
                                     a -> ColorChooserColorActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectColorChooserColorActivated obj cb after = liftIO $ do
    cb' <- mkColorChooserColorActivatedCallback (colorChooserColorActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "color-activated" cb' after

-- object ColorChooserDialog 
newtype ColorChooserDialog = ColorChooserDialog (ForeignPtr ColorChooserDialog)
noColorChooserDialog :: Maybe ColorChooserDialog
noColorChooserDialog = Nothing

foreign import ccall "gtk_color_chooser_dialog_get_type"
    c_gtk_color_chooser_dialog_get_type :: IO GType

type instance ParentTypes ColorChooserDialog = '[Dialog, Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, ColorChooser]

instance GObject ColorChooserDialog where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_color_chooser_dialog_get_type
    

class GObject o => ColorChooserDialogK o
instance (GObject o, IsDescendantOf ColorChooserDialog o) => ColorChooserDialogK o

toColorChooserDialog :: ColorChooserDialogK o => o -> IO ColorChooserDialog
toColorChooserDialog = unsafeCastTo ColorChooserDialog

-- method ColorChooserDialog::new
-- method type : Constructor
-- Args : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ColorChooserDialog"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_chooser_dialog_new" gtk_color_chooser_dialog_new :: 
    CString ->                              -- title : TBasicType TUTF8
    Ptr Window ->                           -- parent : TInterface "Gtk" "Window"
    IO (Ptr ColorChooserDialog)


colorChooserDialogNew ::
    (MonadIO m, WindowK a) =>
    Maybe (T.Text) ->                       -- title
    Maybe (a) ->                            -- parent
    m ColorChooserDialog
colorChooserDialogNew title parent = liftIO $ do
    maybeTitle <- case title of
        Nothing -> return nullPtr
        Just jTitle -> do
            jTitle' <- textToCString jTitle
            return jTitle'
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    result <- gtk_color_chooser_dialog_new maybeTitle maybeParent
    checkUnexpectedReturnNULL "gtk_color_chooser_dialog_new" result
    result' <- (newObject ColorChooserDialog) result
    whenJust parent touchManagedPtr
    freeMem maybeTitle
    return result'

-- object ColorChooserWidget 
newtype ColorChooserWidget = ColorChooserWidget (ForeignPtr ColorChooserWidget)
noColorChooserWidget :: Maybe ColorChooserWidget
noColorChooserWidget = Nothing

foreign import ccall "gtk_color_chooser_widget_get_type"
    c_gtk_color_chooser_widget_get_type :: IO GType

type instance ParentTypes ColorChooserWidget = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, ColorChooser, Orientable]

instance GObject ColorChooserWidget where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_color_chooser_widget_get_type
    

class GObject o => ColorChooserWidgetK o
instance (GObject o, IsDescendantOf ColorChooserWidget o) => ColorChooserWidgetK o

toColorChooserWidget :: ColorChooserWidgetK o => o -> IO ColorChooserWidget
toColorChooserWidget = unsafeCastTo ColorChooserWidget

-- method ColorChooserWidget::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ColorChooserWidget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_chooser_widget_new" gtk_color_chooser_widget_new :: 
    IO (Ptr ColorChooserWidget)


colorChooserWidgetNew ::
    (MonadIO m) =>
    m ColorChooserWidget
colorChooserWidgetNew  = liftIO $ do
    result <- gtk_color_chooser_widget_new
    checkUnexpectedReturnNULL "gtk_color_chooser_widget_new" result
    result' <- (newObject ColorChooserWidget) result
    return result'

-- object ColorSelection 
newtype ColorSelection = ColorSelection (ForeignPtr ColorSelection)
noColorSelection :: Maybe ColorSelection
noColorSelection = Nothing

foreign import ccall "gtk_color_selection_get_type"
    c_gtk_color_selection_get_type :: IO GType

type instance ParentTypes ColorSelection = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject ColorSelection where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_color_selection_get_type
    

class GObject o => ColorSelectionK o
instance (GObject o, IsDescendantOf ColorSelection o) => ColorSelectionK o

toColorSelection :: ColorSelectionK o => o -> IO ColorSelection
toColorSelection = unsafeCastTo ColorSelection

-- method ColorSelection::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ColorSelection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_new" gtk_color_selection_new :: 
    IO (Ptr ColorSelection)


colorSelectionNew ::
    (MonadIO m) =>
    m ColorSelection
colorSelectionNew  = liftIO $ do
    result <- gtk_color_selection_new
    checkUnexpectedReturnNULL "gtk_color_selection_new" result
    result' <- (newObject ColorSelection) result
    return result'

-- method ColorSelection::get_current_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt16
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_get_current_alpha" gtk_color_selection_get_current_alpha :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    IO Word16


colorSelectionGetCurrentAlpha ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    m Word16
colorSelectionGetCurrentAlpha _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_color_selection_get_current_alpha _obj'
    touchManagedPtr _obj
    return result

-- method ColorSelection::get_current_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_get_current_color" gtk_color_selection_get_current_color :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED colorSelectionGetCurrentColor ["(Since version 3.4)","Use gtk_color_selection_get_current_rgba() instead."]#-}
colorSelectionGetCurrentColor ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    m (Gdk.Color)
colorSelectionGetCurrentColor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    color <- callocBoxedBytes 12 :: IO (Ptr Gdk.Color)
    gtk_color_selection_get_current_color _obj' color
    color' <- (wrapBoxed Gdk.Color) color
    touchManagedPtr _obj
    return color'

-- method ColorSelection::get_current_rgba
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_get_current_rgba" gtk_color_selection_get_current_rgba :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    Ptr Gdk.RGBA ->                         -- rgba : TInterface "Gdk" "RGBA"
    IO ()


colorSelectionGetCurrentRgba ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    m (Gdk.RGBA)
colorSelectionGetCurrentRgba _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    rgba <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    gtk_color_selection_get_current_rgba _obj' rgba
    rgba' <- (wrapBoxed Gdk.RGBA) rgba
    touchManagedPtr _obj
    return rgba'

-- method ColorSelection::get_has_opacity_control
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_get_has_opacity_control" gtk_color_selection_get_has_opacity_control :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    IO CInt


colorSelectionGetHasOpacityControl ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    m Bool
colorSelectionGetHasOpacityControl _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_color_selection_get_has_opacity_control _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ColorSelection::get_has_palette
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_get_has_palette" gtk_color_selection_get_has_palette :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    IO CInt


colorSelectionGetHasPalette ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    m Bool
colorSelectionGetHasPalette _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_color_selection_get_has_palette _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ColorSelection::get_previous_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt16
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_get_previous_alpha" gtk_color_selection_get_previous_alpha :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    IO Word16


colorSelectionGetPreviousAlpha ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    m Word16
colorSelectionGetPreviousAlpha _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_color_selection_get_previous_alpha _obj'
    touchManagedPtr _obj
    return result

-- method ColorSelection::get_previous_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_get_previous_color" gtk_color_selection_get_previous_color :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED colorSelectionGetPreviousColor ["(Since version 3.4)","Use gtk_color_selection_get_previous_rgba() instead."]#-}
colorSelectionGetPreviousColor ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    m (Gdk.Color)
colorSelectionGetPreviousColor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    color <- callocBoxedBytes 12 :: IO (Ptr Gdk.Color)
    gtk_color_selection_get_previous_color _obj' color
    color' <- (wrapBoxed Gdk.Color) color
    touchManagedPtr _obj
    return color'

-- method ColorSelection::get_previous_rgba
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_get_previous_rgba" gtk_color_selection_get_previous_rgba :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    Ptr Gdk.RGBA ->                         -- rgba : TInterface "Gdk" "RGBA"
    IO ()


colorSelectionGetPreviousRgba ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    m (Gdk.RGBA)
colorSelectionGetPreviousRgba _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    rgba <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    gtk_color_selection_get_previous_rgba _obj' rgba
    rgba' <- (wrapBoxed Gdk.RGBA) rgba
    touchManagedPtr _obj
    return rgba'

-- method ColorSelection::is_adjusting
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_is_adjusting" gtk_color_selection_is_adjusting :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    IO CInt


colorSelectionIsAdjusting ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    m Bool
colorSelectionIsAdjusting _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_color_selection_is_adjusting _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ColorSelection::set_current_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "alpha", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "alpha", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_set_current_alpha" gtk_color_selection_set_current_alpha :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    Word16 ->                               -- alpha : TBasicType TUInt16
    IO ()


colorSelectionSetCurrentAlpha ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    Word16 ->                               -- alpha
    m ()
colorSelectionSetCurrentAlpha _obj alpha = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_color_selection_set_current_alpha _obj' alpha
    touchManagedPtr _obj
    return ()

-- method ColorSelection::set_current_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_set_current_color" gtk_color_selection_set_current_color :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED colorSelectionSetCurrentColor ["(Since version 3.4)","Use gtk_color_selection_set_current_rgba() instead."]#-}
colorSelectionSetCurrentColor ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    Gdk.Color ->                            -- color
    m ()
colorSelectionSetCurrentColor _obj color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let color' = unsafeManagedPtrGetPtr color
    gtk_color_selection_set_current_color _obj' color'
    touchManagedPtr _obj
    touchManagedPtr color
    return ()

-- method ColorSelection::set_current_rgba
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_set_current_rgba" gtk_color_selection_set_current_rgba :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    Ptr Gdk.RGBA ->                         -- rgba : TInterface "Gdk" "RGBA"
    IO ()


colorSelectionSetCurrentRgba ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    Gdk.RGBA ->                             -- rgba
    m ()
colorSelectionSetCurrentRgba _obj rgba = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let rgba' = unsafeManagedPtrGetPtr rgba
    gtk_color_selection_set_current_rgba _obj' rgba'
    touchManagedPtr _obj
    touchManagedPtr rgba
    return ()

-- method ColorSelection::set_has_opacity_control
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_opacity", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_opacity", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_set_has_opacity_control" gtk_color_selection_set_has_opacity_control :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    CInt ->                                 -- has_opacity : TBasicType TBoolean
    IO ()


colorSelectionSetHasOpacityControl ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_opacity
    m ()
colorSelectionSetHasOpacityControl _obj has_opacity = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_opacity' = (fromIntegral . fromEnum) has_opacity
    gtk_color_selection_set_has_opacity_control _obj' has_opacity'
    touchManagedPtr _obj
    return ()

-- method ColorSelection::set_has_palette
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_palette", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_palette", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_set_has_palette" gtk_color_selection_set_has_palette :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    CInt ->                                 -- has_palette : TBasicType TBoolean
    IO ()


colorSelectionSetHasPalette ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_palette
    m ()
colorSelectionSetHasPalette _obj has_palette = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_palette' = (fromIntegral . fromEnum) has_palette
    gtk_color_selection_set_has_palette _obj' has_palette'
    touchManagedPtr _obj
    return ()

-- method ColorSelection::set_previous_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "alpha", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "alpha", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_set_previous_alpha" gtk_color_selection_set_previous_alpha :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    Word16 ->                               -- alpha : TBasicType TUInt16
    IO ()


colorSelectionSetPreviousAlpha ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    Word16 ->                               -- alpha
    m ()
colorSelectionSetPreviousAlpha _obj alpha = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_color_selection_set_previous_alpha _obj' alpha
    touchManagedPtr _obj
    return ()

-- method ColorSelection::set_previous_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_set_previous_color" gtk_color_selection_set_previous_color :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED colorSelectionSetPreviousColor ["(Since version 3.4)","Use gtk_color_selection_set_previous_rgba() instead."]#-}
colorSelectionSetPreviousColor ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    Gdk.Color ->                            -- color
    m ()
colorSelectionSetPreviousColor _obj color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let color' = unsafeManagedPtrGetPtr color
    gtk_color_selection_set_previous_color _obj' color'
    touchManagedPtr _obj
    touchManagedPtr color
    return ()

-- method ColorSelection::set_previous_rgba
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_set_previous_rgba" gtk_color_selection_set_previous_rgba :: 
    Ptr ColorSelection ->                   -- _obj : TInterface "Gtk" "ColorSelection"
    Ptr Gdk.RGBA ->                         -- rgba : TInterface "Gdk" "RGBA"
    IO ()


colorSelectionSetPreviousRgba ::
    (MonadIO m, ColorSelectionK a) =>
    a ->                                    -- _obj
    Gdk.RGBA ->                             -- rgba
    m ()
colorSelectionSetPreviousRgba _obj rgba = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let rgba' = unsafeManagedPtrGetPtr rgba
    gtk_color_selection_set_previous_rgba _obj' rgba'
    touchManagedPtr _obj
    touchManagedPtr rgba
    return ()

-- method ColorSelection::palette_from_string
-- method type : MemberFunction
-- Args : [Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "colors", argType = TCArray False (-1) 2 (TInterface "Gdk" "Color"), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "n_colors", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_colors", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_palette_from_string" gtk_color_selection_palette_from_string :: 
    CString ->                              -- str : TBasicType TUTF8
    Ptr (Ptr Gdk.Color) ->                  -- colors : TCArray False (-1) 2 (TInterface "Gdk" "Color")
    Ptr Int32 ->                            -- n_colors : TBasicType TInt32
    IO CInt


colorSelectionPaletteFromString ::
    (MonadIO m) =>
    T.Text ->                               -- str
    m (Bool,[Gdk.Color])
colorSelectionPaletteFromString str = liftIO $ do
    str' <- textToCString str
    colors <- allocMem :: IO (Ptr (Ptr Gdk.Color))
    n_colors <- allocMem :: IO (Ptr Int32)
    result <- gtk_color_selection_palette_from_string str' colors n_colors
    n_colors' <- peek n_colors
    let result' = (/= 0) result
    colors' <- peek colors
    colors'' <- (unpackBoxedArrayWithLength 12 n_colors') colors'
    colors''' <- mapM (wrapBoxed Gdk.Color) colors''
    freeMem colors'
    freeMem str'
    freeMem colors
    freeMem n_colors
    return (result', colors''')

-- method ColorSelection::palette_to_string
-- method type : MemberFunction
-- Args : [Arg {argName = "colors", argType = TCArray False (-1) 1 (TInterface "Gdk" "Color"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_colors", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_colors", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "colors", argType = TCArray False (-1) 1 (TInterface "Gdk" "Color"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_palette_to_string" gtk_color_selection_palette_to_string :: 
    Ptr Gdk.Color ->                        -- colors : TCArray False (-1) 1 (TInterface "Gdk" "Color")
    Int32 ->                                -- n_colors : TBasicType TInt32
    IO CString


colorSelectionPaletteToString ::
    (MonadIO m) =>
    [Gdk.Color] ->                          -- colors
    m T.Text
colorSelectionPaletteToString colors = liftIO $ do
    let n_colors = fromIntegral $ length colors
    let colors' = map unsafeManagedPtrGetPtr colors
    colors'' <- packBlockArray 12 colors'
    result <- gtk_color_selection_palette_to_string colors'' n_colors
    checkUnexpectedReturnNULL "gtk_color_selection_palette_to_string" result
    result' <- cstringToText result
    freeMem result
    mapM_ touchManagedPtr colors
    freeMem colors''
    return result'

-- signal ColorSelection::color-changed
type ColorSelectionColorChangedCallback =
    IO ()

noColorSelectionColorChangedCallback :: Maybe ColorSelectionColorChangedCallback
noColorSelectionColorChangedCallback = Nothing

type ColorSelectionColorChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkColorSelectionColorChangedCallback :: ColorSelectionColorChangedCallbackC -> IO (FunPtr ColorSelectionColorChangedCallbackC)

colorSelectionColorChangedClosure :: ColorSelectionColorChangedCallback -> IO Closure
colorSelectionColorChangedClosure cb = newCClosure =<< mkColorSelectionColorChangedCallback wrapped
    where wrapped = colorSelectionColorChangedCallbackWrapper cb

colorSelectionColorChangedCallbackWrapper ::
    ColorSelectionColorChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
colorSelectionColorChangedCallbackWrapper _cb _ _ = do
    _cb 

onColorSelectionColorChanged :: (GObject a, MonadIO m) => a -> ColorSelectionColorChangedCallback -> m SignalHandlerId
onColorSelectionColorChanged obj cb = liftIO $ connectColorSelectionColorChanged obj cb SignalConnectBefore
afterColorSelectionColorChanged :: (GObject a, MonadIO m) => a -> ColorSelectionColorChangedCallback -> m SignalHandlerId
afterColorSelectionColorChanged obj cb = connectColorSelectionColorChanged obj cb SignalConnectAfter

connectColorSelectionColorChanged :: (GObject a, MonadIO m) =>
                                     a -> ColorSelectionColorChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectColorSelectionColorChanged obj cb after = liftIO $ do
    cb' <- mkColorSelectionColorChangedCallback (colorSelectionColorChangedCallbackWrapper cb)
    connectSignalFunPtr obj "color-changed" cb' after

-- callback ColorSelectionChangePaletteFunc
colorSelectionChangePaletteFuncClosure :: ColorSelectionChangePaletteFunc -> IO Closure
colorSelectionChangePaletteFuncClosure cb = newCClosure =<< mkColorSelectionChangePaletteFunc wrapped
    where wrapped = colorSelectionChangePaletteFuncWrapper Nothing cb

type ColorSelectionChangePaletteFuncC =
    Ptr Gdk.Color ->
    Int32 ->
    IO ()

foreign import ccall "wrapper"
    mkColorSelectionChangePaletteFunc :: ColorSelectionChangePaletteFuncC -> IO (FunPtr ColorSelectionChangePaletteFuncC)

type ColorSelectionChangePaletteFunc =
    [Gdk.Color] ->
    IO ()

noColorSelectionChangePaletteFunc :: Maybe ColorSelectionChangePaletteFunc
noColorSelectionChangePaletteFunc = Nothing

colorSelectionChangePaletteFuncWrapper ::
    Maybe (Ptr (FunPtr (ColorSelectionChangePaletteFuncC))) ->
    ColorSelectionChangePaletteFunc ->
    Ptr Gdk.Color ->
    Int32 ->
    IO ()
colorSelectionChangePaletteFuncWrapper funptrptr _cb colors n_colors = do
    colors' <- (unpackBoxedArrayWithLength 12 n_colors) colors
    colors'' <- mapM (newBoxed Gdk.Color) colors'
    _cb  colors''
    maybeReleaseFunPtr funptrptr

-- callback ColorSelectionChangePaletteWithScreenFunc
colorSelectionChangePaletteWithScreenFuncClosure :: ColorSelectionChangePaletteWithScreenFunc -> IO Closure
colorSelectionChangePaletteWithScreenFuncClosure cb = newCClosure =<< mkColorSelectionChangePaletteWithScreenFunc wrapped
    where wrapped = colorSelectionChangePaletteWithScreenFuncWrapper Nothing cb

type ColorSelectionChangePaletteWithScreenFuncC =
    Ptr Gdk.Screen ->
    Ptr Gdk.Color ->
    Int32 ->
    IO ()

foreign import ccall "wrapper"
    mkColorSelectionChangePaletteWithScreenFunc :: ColorSelectionChangePaletteWithScreenFuncC -> IO (FunPtr ColorSelectionChangePaletteWithScreenFuncC)

type ColorSelectionChangePaletteWithScreenFunc =
    Gdk.Screen ->
    [Gdk.Color] ->
    IO ()

noColorSelectionChangePaletteWithScreenFunc :: Maybe ColorSelectionChangePaletteWithScreenFunc
noColorSelectionChangePaletteWithScreenFunc = Nothing

colorSelectionChangePaletteWithScreenFuncWrapper ::
    Maybe (Ptr (FunPtr (ColorSelectionChangePaletteWithScreenFuncC))) ->
    ColorSelectionChangePaletteWithScreenFunc ->
    Ptr Gdk.Screen ->
    Ptr Gdk.Color ->
    Int32 ->
    IO ()
colorSelectionChangePaletteWithScreenFuncWrapper funptrptr _cb screen colors n_colors = do
    screen' <- (newObject Gdk.Screen) screen
    colors' <- (unpackBoxedArrayWithLength 12 n_colors) colors
    colors'' <- mapM (newBoxed Gdk.Color) colors'
    _cb  screen' colors''
    maybeReleaseFunPtr funptrptr

-- object ColorSelectionDialog 
newtype ColorSelectionDialog = ColorSelectionDialog (ForeignPtr ColorSelectionDialog)
noColorSelectionDialog :: Maybe ColorSelectionDialog
noColorSelectionDialog = Nothing

foreign import ccall "gtk_color_selection_dialog_get_type"
    c_gtk_color_selection_dialog_get_type :: IO GType

type instance ParentTypes ColorSelectionDialog = '[Dialog, Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject ColorSelectionDialog where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_color_selection_dialog_get_type
    

class GObject o => ColorSelectionDialogK o
instance (GObject o, IsDescendantOf ColorSelectionDialog o) => ColorSelectionDialogK o

toColorSelectionDialog :: ColorSelectionDialogK o => o -> IO ColorSelectionDialog
toColorSelectionDialog = unsafeCastTo ColorSelectionDialog

-- method ColorSelectionDialog::new
-- method type : Constructor
-- Args : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ColorSelectionDialog"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_dialog_new" gtk_color_selection_dialog_new :: 
    CString ->                              -- title : TBasicType TUTF8
    IO (Ptr ColorSelectionDialog)


colorSelectionDialogNew ::
    (MonadIO m) =>
    T.Text ->                               -- title
    m ColorSelectionDialog
colorSelectionDialogNew title = liftIO $ do
    title' <- textToCString title
    result <- gtk_color_selection_dialog_new title'
    checkUnexpectedReturnNULL "gtk_color_selection_dialog_new" result
    result' <- (newObject ColorSelectionDialog) result
    freeMem title'
    return result'

-- method ColorSelectionDialog::get_color_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_color_selection_dialog_get_color_selection" gtk_color_selection_dialog_get_color_selection :: 
    Ptr ColorSelectionDialog ->             -- _obj : TInterface "Gtk" "ColorSelectionDialog"
    IO (Ptr Widget)


colorSelectionDialogGetColorSelection ::
    (MonadIO m, ColorSelectionDialogK a) =>
    a ->                                    -- _obj
    m Widget
colorSelectionDialogGetColorSelection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_color_selection_dialog_get_color_selection _obj'
    checkUnexpectedReturnNULL "gtk_color_selection_dialog_get_color_selection" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- object ComboBox 
newtype ComboBox = ComboBox (ForeignPtr ComboBox)
noComboBox :: Maybe ComboBox
noComboBox = Nothing

foreign import ccall "gtk_combo_box_get_type"
    c_gtk_combo_box_get_type :: IO GType

type instance ParentTypes ComboBox = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, CellEditable, CellLayout]

instance GObject ComboBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_combo_box_get_type
    

class GObject o => ComboBoxK o
instance (GObject o, IsDescendantOf ComboBox o) => ComboBoxK o

toComboBox :: ComboBoxK o => o -> IO ComboBox
toComboBox = unsafeCastTo ComboBox

-- method ComboBox::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ComboBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_new" gtk_combo_box_new :: 
    IO (Ptr ComboBox)


comboBoxNew ::
    (MonadIO m) =>
    m ComboBox
comboBoxNew  = liftIO $ do
    result <- gtk_combo_box_new
    checkUnexpectedReturnNULL "gtk_combo_box_new" result
    result' <- (newObject ComboBox) result
    return result'

-- method ComboBox::new_with_area
-- method type : Constructor
-- Args : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ComboBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_new_with_area" gtk_combo_box_new_with_area :: 
    Ptr CellArea ->                         -- area : TInterface "Gtk" "CellArea"
    IO (Ptr ComboBox)


comboBoxNewWithArea ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- area
    m ComboBox
comboBoxNewWithArea area = liftIO $ do
    let area' = unsafeManagedPtrCastPtr area
    result <- gtk_combo_box_new_with_area area'
    checkUnexpectedReturnNULL "gtk_combo_box_new_with_area" result
    result' <- (newObject ComboBox) result
    touchManagedPtr area
    return result'

-- method ComboBox::new_with_area_and_entry
-- method type : Constructor
-- Args : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ComboBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_new_with_area_and_entry" gtk_combo_box_new_with_area_and_entry :: 
    Ptr CellArea ->                         -- area : TInterface "Gtk" "CellArea"
    IO (Ptr ComboBox)


comboBoxNewWithAreaAndEntry ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- area
    m ComboBox
comboBoxNewWithAreaAndEntry area = liftIO $ do
    let area' = unsafeManagedPtrCastPtr area
    result <- gtk_combo_box_new_with_area_and_entry area'
    checkUnexpectedReturnNULL "gtk_combo_box_new_with_area_and_entry" result
    result' <- (newObject ComboBox) result
    touchManagedPtr area
    return result'

-- method ComboBox::new_with_entry
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ComboBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_new_with_entry" gtk_combo_box_new_with_entry :: 
    IO (Ptr ComboBox)


comboBoxNewWithEntry ::
    (MonadIO m) =>
    m ComboBox
comboBoxNewWithEntry  = liftIO $ do
    result <- gtk_combo_box_new_with_entry
    checkUnexpectedReturnNULL "gtk_combo_box_new_with_entry" result
    result' <- (newObject ComboBox) result
    return result'

-- method ComboBox::new_with_model
-- method type : Constructor
-- Args : [Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ComboBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_new_with_model" gtk_combo_box_new_with_model :: 
    Ptr TreeModel ->                        -- model : TInterface "Gtk" "TreeModel"
    IO (Ptr ComboBox)


comboBoxNewWithModel ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- model
    m ComboBox
comboBoxNewWithModel model = liftIO $ do
    let model' = unsafeManagedPtrCastPtr model
    result <- gtk_combo_box_new_with_model model'
    checkUnexpectedReturnNULL "gtk_combo_box_new_with_model" result
    result' <- (newObject ComboBox) result
    touchManagedPtr model
    return result'

-- method ComboBox::new_with_model_and_entry
-- method type : Constructor
-- Args : [Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ComboBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_new_with_model_and_entry" gtk_combo_box_new_with_model_and_entry :: 
    Ptr TreeModel ->                        -- model : TInterface "Gtk" "TreeModel"
    IO (Ptr ComboBox)


comboBoxNewWithModelAndEntry ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- model
    m ComboBox
comboBoxNewWithModelAndEntry model = liftIO $ do
    let model' = unsafeManagedPtrCastPtr model
    result <- gtk_combo_box_new_with_model_and_entry model'
    checkUnexpectedReturnNULL "gtk_combo_box_new_with_model_and_entry" result
    result' <- (newObject ComboBox) result
    touchManagedPtr model
    return result'

-- method ComboBox::get_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_active" gtk_combo_box_get_active :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO Int32


comboBoxGetActive ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m Int32
comboBoxGetActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_active _obj'
    touchManagedPtr _obj
    return result

-- method ComboBox::get_active_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_active_id" gtk_combo_box_get_active_id :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO CString


comboBoxGetActiveId ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m T.Text
comboBoxGetActiveId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_active_id _obj'
    checkUnexpectedReturnNULL "gtk_combo_box_get_active_id" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method ComboBox::get_active_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_active_iter" gtk_combo_box_get_active_iter :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


comboBoxGetActiveIter ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m (Bool,TreeIter)
comboBoxGetActiveIter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    result <- gtk_combo_box_get_active_iter _obj' iter
    let result' = (/= 0) result
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    return (result', iter')

-- method ComboBox::get_add_tearoffs
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_add_tearoffs" gtk_combo_box_get_add_tearoffs :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO CInt

{-# DEPRECATED comboBoxGetAddTearoffs ["(Since version 3.10)"]#-}
comboBoxGetAddTearoffs ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m Bool
comboBoxGetAddTearoffs _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_add_tearoffs _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ComboBox::get_button_sensitivity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SensitivityType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_button_sensitivity" gtk_combo_box_get_button_sensitivity :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO CUInt


comboBoxGetButtonSensitivity ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m SensitivityType
comboBoxGetButtonSensitivity _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_button_sensitivity _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ComboBox::get_column_span_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_column_span_column" gtk_combo_box_get_column_span_column :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO Int32


comboBoxGetColumnSpanColumn ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m Int32
comboBoxGetColumnSpanColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_column_span_column _obj'
    touchManagedPtr _obj
    return result

-- method ComboBox::get_entry_text_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_entry_text_column" gtk_combo_box_get_entry_text_column :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO Int32


comboBoxGetEntryTextColumn ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m Int32
comboBoxGetEntryTextColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_entry_text_column _obj'
    touchManagedPtr _obj
    return result

-- method ComboBox::get_focus_on_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_focus_on_click" gtk_combo_box_get_focus_on_click :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO CInt


comboBoxGetFocusOnClick ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m Bool
comboBoxGetFocusOnClick _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_focus_on_click _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ComboBox::get_has_entry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_has_entry" gtk_combo_box_get_has_entry :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO CInt


comboBoxGetHasEntry ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m Bool
comboBoxGetHasEntry _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_has_entry _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ComboBox::get_id_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_id_column" gtk_combo_box_get_id_column :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO Int32


comboBoxGetIdColumn ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m Int32
comboBoxGetIdColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_id_column _obj'
    touchManagedPtr _obj
    return result

-- method ComboBox::get_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_model" gtk_combo_box_get_model :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO (Ptr TreeModel)


comboBoxGetModel ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m TreeModel
comboBoxGetModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_model _obj'
    checkUnexpectedReturnNULL "gtk_combo_box_get_model" result
    result' <- (newObject TreeModel) result
    touchManagedPtr _obj
    return result'

-- method ComboBox::get_popup_accessible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_popup_accessible" gtk_combo_box_get_popup_accessible :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO (Ptr Atk.Object)


comboBoxGetPopupAccessible ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m Atk.Object
comboBoxGetPopupAccessible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_popup_accessible _obj'
    checkUnexpectedReturnNULL "gtk_combo_box_get_popup_accessible" result
    result' <- (newObject Atk.Object) result
    touchManagedPtr _obj
    return result'

-- method ComboBox::get_popup_fixed_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_popup_fixed_width" gtk_combo_box_get_popup_fixed_width :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO CInt


comboBoxGetPopupFixedWidth ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m Bool
comboBoxGetPopupFixedWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_popup_fixed_width _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ComboBox::get_row_span_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_row_span_column" gtk_combo_box_get_row_span_column :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO Int32


comboBoxGetRowSpanColumn ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m Int32
comboBoxGetRowSpanColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_row_span_column _obj'
    touchManagedPtr _obj
    return result

-- method ComboBox::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_title" gtk_combo_box_get_title :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO CString

{-# DEPRECATED comboBoxGetTitle ["(Since version 3.10)"]#-}
comboBoxGetTitle ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m T.Text
comboBoxGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_title _obj'
    checkUnexpectedReturnNULL "gtk_combo_box_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method ComboBox::get_wrap_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_get_wrap_width" gtk_combo_box_get_wrap_width :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO Int32


comboBoxGetWrapWidth ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m Int32
comboBoxGetWrapWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_get_wrap_width _obj'
    touchManagedPtr _obj
    return result

-- method ComboBox::popdown
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_popdown" gtk_combo_box_popdown :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO ()


comboBoxPopdown ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m ()
comboBoxPopdown _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_combo_box_popdown _obj'
    touchManagedPtr _obj
    return ()

-- method ComboBox::popup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_popup" gtk_combo_box_popup :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    IO ()


comboBoxPopup ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    m ()
comboBoxPopup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_combo_box_popup _obj'
    touchManagedPtr _obj
    return ()

-- method ComboBox::popup_for_device
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_popup_for_device" gtk_combo_box_popup_for_device :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    Ptr Gdk.Device ->                       -- device : TInterface "Gdk" "Device"
    IO ()


comboBoxPopupForDevice ::
    (MonadIO m, ComboBoxK a, Gdk.DeviceK b) =>
    a ->                                    -- _obj
    b ->                                    -- device
    m ()
comboBoxPopupForDevice _obj device = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let device' = unsafeManagedPtrCastPtr device
    gtk_combo_box_popup_for_device _obj' device'
    touchManagedPtr _obj
    touchManagedPtr device
    return ()

-- method ComboBox::set_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_active" gtk_combo_box_set_active :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    Int32 ->                                -- index_ : TBasicType TInt32
    IO ()


comboBoxSetActive ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- index_
    m ()
comboBoxSetActive _obj index_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_combo_box_set_active _obj' index_
    touchManagedPtr _obj
    return ()

-- method ComboBox::set_active_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "active_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "active_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_active_id" gtk_combo_box_set_active_id :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    CString ->                              -- active_id : TBasicType TUTF8
    IO CInt


comboBoxSetActiveId ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- active_id
    m Bool
comboBoxSetActiveId _obj active_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeActive_id <- case active_id of
        Nothing -> return nullPtr
        Just jActive_id -> do
            jActive_id' <- textToCString jActive_id
            return jActive_id'
    result <- gtk_combo_box_set_active_id _obj' maybeActive_id
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem maybeActive_id
    return result'

-- method ComboBox::set_active_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_active_iter" gtk_combo_box_set_active_iter :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO ()


comboBoxSetActiveIter ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- iter
    m ()
comboBoxSetActiveIter _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeIter <- case iter of
        Nothing -> return nullPtr
        Just jIter -> do
            let jIter' = unsafeManagedPtrGetPtr jIter
            return jIter'
    gtk_combo_box_set_active_iter _obj' maybeIter
    touchManagedPtr _obj
    whenJust iter touchManagedPtr
    return ()

-- method ComboBox::set_add_tearoffs
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "add_tearoffs", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "add_tearoffs", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_add_tearoffs" gtk_combo_box_set_add_tearoffs :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    CInt ->                                 -- add_tearoffs : TBasicType TBoolean
    IO ()

{-# DEPRECATED comboBoxSetAddTearoffs ["(Since version 3.10)"]#-}
comboBoxSetAddTearoffs ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- add_tearoffs
    m ()
comboBoxSetAddTearoffs _obj add_tearoffs = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let add_tearoffs' = (fromIntegral . fromEnum) add_tearoffs
    gtk_combo_box_set_add_tearoffs _obj' add_tearoffs'
    touchManagedPtr _obj
    return ()

-- method ComboBox::set_button_sensitivity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitivity", argType = TInterface "Gtk" "SensitivityType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitivity", argType = TInterface "Gtk" "SensitivityType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_button_sensitivity" gtk_combo_box_set_button_sensitivity :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    CUInt ->                                -- sensitivity : TInterface "Gtk" "SensitivityType"
    IO ()


comboBoxSetButtonSensitivity ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    SensitivityType ->                      -- sensitivity
    m ()
comboBoxSetButtonSensitivity _obj sensitivity = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sensitivity' = (fromIntegral . fromEnum) sensitivity
    gtk_combo_box_set_button_sensitivity _obj' sensitivity'
    touchManagedPtr _obj
    return ()

-- method ComboBox::set_column_span_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column_span", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column_span", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_column_span_column" gtk_combo_box_set_column_span_column :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    Int32 ->                                -- column_span : TBasicType TInt32
    IO ()


comboBoxSetColumnSpanColumn ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column_span
    m ()
comboBoxSetColumnSpanColumn _obj column_span = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_combo_box_set_column_span_column _obj' column_span
    touchManagedPtr _obj
    return ()

-- method ComboBox::set_entry_text_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text_column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text_column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_entry_text_column" gtk_combo_box_set_entry_text_column :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    Int32 ->                                -- text_column : TBasicType TInt32
    IO ()


comboBoxSetEntryTextColumn ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- text_column
    m ()
comboBoxSetEntryTextColumn _obj text_column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_combo_box_set_entry_text_column _obj' text_column
    touchManagedPtr _obj
    return ()

-- method ComboBox::set_focus_on_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_on_click", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_on_click", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_focus_on_click" gtk_combo_box_set_focus_on_click :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    CInt ->                                 -- focus_on_click : TBasicType TBoolean
    IO ()


comboBoxSetFocusOnClick ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- focus_on_click
    m ()
comboBoxSetFocusOnClick _obj focus_on_click = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let focus_on_click' = (fromIntegral . fromEnum) focus_on_click
    gtk_combo_box_set_focus_on_click _obj' focus_on_click'
    touchManagedPtr _obj
    return ()

-- method ComboBox::set_id_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id_column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id_column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_id_column" gtk_combo_box_set_id_column :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    Int32 ->                                -- id_column : TBasicType TInt32
    IO ()


comboBoxSetIdColumn ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- id_column
    m ()
comboBoxSetIdColumn _obj id_column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_combo_box_set_id_column _obj' id_column
    touchManagedPtr _obj
    return ()

-- method ComboBox::set_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_model" gtk_combo_box_set_model :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    Ptr TreeModel ->                        -- model : TInterface "Gtk" "TreeModel"
    IO ()


comboBoxSetModel ::
    (MonadIO m, ComboBoxK a, TreeModelK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- model
    m ()
comboBoxSetModel _obj model = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeModel <- case model of
        Nothing -> return nullPtr
        Just jModel -> do
            let jModel' = unsafeManagedPtrCastPtr jModel
            return jModel'
    gtk_combo_box_set_model _obj' maybeModel
    touchManagedPtr _obj
    whenJust model touchManagedPtr
    return ()

-- method ComboBox::set_popup_fixed_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_popup_fixed_width" gtk_combo_box_set_popup_fixed_width :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    CInt ->                                 -- fixed : TBasicType TBoolean
    IO ()


comboBoxSetPopupFixedWidth ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- fixed
    m ()
comboBoxSetPopupFixedWidth _obj fixed = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let fixed' = (fromIntegral . fromEnum) fixed
    gtk_combo_box_set_popup_fixed_width _obj' fixed'
    touchManagedPtr _obj
    return ()

-- method ComboBox::set_row_separator_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeViewRowSeparatorFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeViewRowSeparatorFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_row_separator_func" gtk_combo_box_set_row_separator_func :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    FunPtr TreeViewRowSeparatorFuncC ->     -- func : TInterface "Gtk" "TreeViewRowSeparatorFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


comboBoxSetRowSeparatorFunc ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    TreeViewRowSeparatorFunc ->             -- func
    m ()
comboBoxSetRowSeparatorFunc _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkTreeViewRowSeparatorFunc (treeViewRowSeparatorFuncWrapper Nothing func)
    let data_ = castFunPtrToPtr func'
    let destroy = safeFreeFunPtrPtr
    gtk_combo_box_set_row_separator_func _obj' func' data_ destroy
    touchManagedPtr _obj
    return ()

-- method ComboBox::set_row_span_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row_span", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row_span", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_row_span_column" gtk_combo_box_set_row_span_column :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    Int32 ->                                -- row_span : TBasicType TInt32
    IO ()


comboBoxSetRowSpanColumn ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row_span
    m ()
comboBoxSetRowSpanColumn _obj row_span = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_combo_box_set_row_span_column _obj' row_span
    touchManagedPtr _obj
    return ()

-- method ComboBox::set_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_title" gtk_combo_box_set_title :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    CString ->                              -- title : TBasicType TUTF8
    IO ()

{-# DEPRECATED comboBoxSetTitle ["(Since version 3.10)"]#-}
comboBoxSetTitle ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- title
    m ()
comboBoxSetTitle _obj title = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    title' <- textToCString title
    gtk_combo_box_set_title _obj' title'
    touchManagedPtr _obj
    freeMem title'
    return ()

-- method ComboBox::set_wrap_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_set_wrap_width" gtk_combo_box_set_wrap_width :: 
    Ptr ComboBox ->                         -- _obj : TInterface "Gtk" "ComboBox"
    Int32 ->                                -- width : TBasicType TInt32
    IO ()


comboBoxSetWrapWidth ::
    (MonadIO m, ComboBoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    m ()
comboBoxSetWrapWidth _obj width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_combo_box_set_wrap_width _obj' width
    touchManagedPtr _obj
    return ()

-- signal ComboBox::changed
type ComboBoxChangedCallback =
    IO ()

noComboBoxChangedCallback :: Maybe ComboBoxChangedCallback
noComboBoxChangedCallback = Nothing

type ComboBoxChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkComboBoxChangedCallback :: ComboBoxChangedCallbackC -> IO (FunPtr ComboBoxChangedCallbackC)

comboBoxChangedClosure :: ComboBoxChangedCallback -> IO Closure
comboBoxChangedClosure cb = newCClosure =<< mkComboBoxChangedCallback wrapped
    where wrapped = comboBoxChangedCallbackWrapper cb

comboBoxChangedCallbackWrapper ::
    ComboBoxChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
comboBoxChangedCallbackWrapper _cb _ _ = do
    _cb 

onComboBoxChanged :: (GObject a, MonadIO m) => a -> ComboBoxChangedCallback -> m SignalHandlerId
onComboBoxChanged obj cb = liftIO $ connectComboBoxChanged obj cb SignalConnectBefore
afterComboBoxChanged :: (GObject a, MonadIO m) => a -> ComboBoxChangedCallback -> m SignalHandlerId
afterComboBoxChanged obj cb = connectComboBoxChanged obj cb SignalConnectAfter

connectComboBoxChanged :: (GObject a, MonadIO m) =>
                          a -> ComboBoxChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectComboBoxChanged obj cb after = liftIO $ do
    cb' <- mkComboBoxChangedCallback (comboBoxChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- signal ComboBox::format-entry-text
type ComboBoxFormatEntryTextCallback =
    T.Text ->
    IO T.Text

noComboBoxFormatEntryTextCallback :: Maybe ComboBoxFormatEntryTextCallback
noComboBoxFormatEntryTextCallback = Nothing

type ComboBoxFormatEntryTextCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO CString

foreign import ccall "wrapper"
    mkComboBoxFormatEntryTextCallback :: ComboBoxFormatEntryTextCallbackC -> IO (FunPtr ComboBoxFormatEntryTextCallbackC)

comboBoxFormatEntryTextClosure :: ComboBoxFormatEntryTextCallback -> IO Closure
comboBoxFormatEntryTextClosure cb = newCClosure =<< mkComboBoxFormatEntryTextCallback wrapped
    where wrapped = comboBoxFormatEntryTextCallbackWrapper cb

comboBoxFormatEntryTextCallbackWrapper ::
    ComboBoxFormatEntryTextCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO CString
comboBoxFormatEntryTextCallbackWrapper _cb _ path _ = do
    path' <- cstringToText path
    result <- _cb  path'
    result' <- textToCString result
    return result'

onComboBoxFormatEntryText :: (GObject a, MonadIO m) => a -> ComboBoxFormatEntryTextCallback -> m SignalHandlerId
onComboBoxFormatEntryText obj cb = liftIO $ connectComboBoxFormatEntryText obj cb SignalConnectBefore
afterComboBoxFormatEntryText :: (GObject a, MonadIO m) => a -> ComboBoxFormatEntryTextCallback -> m SignalHandlerId
afterComboBoxFormatEntryText obj cb = connectComboBoxFormatEntryText obj cb SignalConnectAfter

connectComboBoxFormatEntryText :: (GObject a, MonadIO m) =>
                                  a -> ComboBoxFormatEntryTextCallback -> SignalConnectMode -> m SignalHandlerId
connectComboBoxFormatEntryText obj cb after = liftIO $ do
    cb' <- mkComboBoxFormatEntryTextCallback (comboBoxFormatEntryTextCallbackWrapper cb)
    connectSignalFunPtr obj "format-entry-text" cb' after

-- signal ComboBox::move-active
type ComboBoxMoveActiveCallback =
    ScrollType ->
    IO ()

noComboBoxMoveActiveCallback :: Maybe ComboBoxMoveActiveCallback
noComboBoxMoveActiveCallback = Nothing

type ComboBoxMoveActiveCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkComboBoxMoveActiveCallback :: ComboBoxMoveActiveCallbackC -> IO (FunPtr ComboBoxMoveActiveCallbackC)

comboBoxMoveActiveClosure :: ComboBoxMoveActiveCallback -> IO Closure
comboBoxMoveActiveClosure cb = newCClosure =<< mkComboBoxMoveActiveCallback wrapped
    where wrapped = comboBoxMoveActiveCallbackWrapper cb

comboBoxMoveActiveCallbackWrapper ::
    ComboBoxMoveActiveCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
comboBoxMoveActiveCallbackWrapper _cb _ scroll_type _ = do
    let scroll_type' = (toEnum . fromIntegral) scroll_type
    _cb  scroll_type'

onComboBoxMoveActive :: (GObject a, MonadIO m) => a -> ComboBoxMoveActiveCallback -> m SignalHandlerId
onComboBoxMoveActive obj cb = liftIO $ connectComboBoxMoveActive obj cb SignalConnectBefore
afterComboBoxMoveActive :: (GObject a, MonadIO m) => a -> ComboBoxMoveActiveCallback -> m SignalHandlerId
afterComboBoxMoveActive obj cb = connectComboBoxMoveActive obj cb SignalConnectAfter

connectComboBoxMoveActive :: (GObject a, MonadIO m) =>
                             a -> ComboBoxMoveActiveCallback -> SignalConnectMode -> m SignalHandlerId
connectComboBoxMoveActive obj cb after = liftIO $ do
    cb' <- mkComboBoxMoveActiveCallback (comboBoxMoveActiveCallbackWrapper cb)
    connectSignalFunPtr obj "move-active" cb' after

-- signal ComboBox::popdown
type ComboBoxPopdownCallback =
    IO Bool

noComboBoxPopdownCallback :: Maybe ComboBoxPopdownCallback
noComboBoxPopdownCallback = Nothing

type ComboBoxPopdownCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkComboBoxPopdownCallback :: ComboBoxPopdownCallbackC -> IO (FunPtr ComboBoxPopdownCallbackC)

comboBoxPopdownClosure :: ComboBoxPopdownCallback -> IO Closure
comboBoxPopdownClosure cb = newCClosure =<< mkComboBoxPopdownCallback wrapped
    where wrapped = comboBoxPopdownCallbackWrapper cb

comboBoxPopdownCallbackWrapper ::
    ComboBoxPopdownCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
comboBoxPopdownCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onComboBoxPopdown :: (GObject a, MonadIO m) => a -> ComboBoxPopdownCallback -> m SignalHandlerId
onComboBoxPopdown obj cb = liftIO $ connectComboBoxPopdown obj cb SignalConnectBefore
afterComboBoxPopdown :: (GObject a, MonadIO m) => a -> ComboBoxPopdownCallback -> m SignalHandlerId
afterComboBoxPopdown obj cb = connectComboBoxPopdown obj cb SignalConnectAfter

connectComboBoxPopdown :: (GObject a, MonadIO m) =>
                          a -> ComboBoxPopdownCallback -> SignalConnectMode -> m SignalHandlerId
connectComboBoxPopdown obj cb after = liftIO $ do
    cb' <- mkComboBoxPopdownCallback (comboBoxPopdownCallbackWrapper cb)
    connectSignalFunPtr obj "popdown" cb' after

-- signal ComboBox::popup
type ComboBoxPopupCallback =
    IO ()

noComboBoxPopupCallback :: Maybe ComboBoxPopupCallback
noComboBoxPopupCallback = Nothing

type ComboBoxPopupCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkComboBoxPopupCallback :: ComboBoxPopupCallbackC -> IO (FunPtr ComboBoxPopupCallbackC)

comboBoxPopupClosure :: ComboBoxPopupCallback -> IO Closure
comboBoxPopupClosure cb = newCClosure =<< mkComboBoxPopupCallback wrapped
    where wrapped = comboBoxPopupCallbackWrapper cb

comboBoxPopupCallbackWrapper ::
    ComboBoxPopupCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
comboBoxPopupCallbackWrapper _cb _ _ = do
    _cb 

onComboBoxPopup :: (GObject a, MonadIO m) => a -> ComboBoxPopupCallback -> m SignalHandlerId
onComboBoxPopup obj cb = liftIO $ connectComboBoxPopup obj cb SignalConnectBefore
afterComboBoxPopup :: (GObject a, MonadIO m) => a -> ComboBoxPopupCallback -> m SignalHandlerId
afterComboBoxPopup obj cb = connectComboBoxPopup obj cb SignalConnectAfter

connectComboBoxPopup :: (GObject a, MonadIO m) =>
                        a -> ComboBoxPopupCallback -> SignalConnectMode -> m SignalHandlerId
connectComboBoxPopup obj cb after = liftIO $ do
    cb' <- mkComboBoxPopupCallback (comboBoxPopupCallbackWrapper cb)
    connectSignalFunPtr obj "popup" cb' after

-- object ComboBoxAccessible 
newtype ComboBoxAccessible = ComboBoxAccessible (ForeignPtr ComboBoxAccessible)
noComboBoxAccessible :: Maybe ComboBoxAccessible
noComboBoxAccessible = Nothing

foreign import ccall "gtk_combo_box_accessible_get_type"
    c_gtk_combo_box_accessible_get_type :: IO GType

type instance ParentTypes ComboBoxAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Selection]

instance GObject ComboBoxAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_combo_box_accessible_get_type
    

class GObject o => ComboBoxAccessibleK o
instance (GObject o, IsDescendantOf ComboBoxAccessible o) => ComboBoxAccessibleK o

toComboBoxAccessible :: ComboBoxAccessibleK o => o -> IO ComboBoxAccessible
toComboBoxAccessible = unsafeCastTo ComboBoxAccessible

-- object ComboBoxText 
newtype ComboBoxText = ComboBoxText (ForeignPtr ComboBoxText)
noComboBoxText :: Maybe ComboBoxText
noComboBoxText = Nothing

foreign import ccall "gtk_combo_box_text_get_type"
    c_gtk_combo_box_text_get_type :: IO GType

type instance ParentTypes ComboBoxText = '[ComboBox, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, CellEditable, CellLayout]

instance GObject ComboBoxText where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_combo_box_text_get_type
    

class GObject o => ComboBoxTextK o
instance (GObject o, IsDescendantOf ComboBoxText o) => ComboBoxTextK o

toComboBoxText :: ComboBoxTextK o => o -> IO ComboBoxText
toComboBoxText = unsafeCastTo ComboBoxText

-- method ComboBoxText::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ComboBoxText"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_text_new" gtk_combo_box_text_new :: 
    IO (Ptr ComboBoxText)


comboBoxTextNew ::
    (MonadIO m) =>
    m ComboBoxText
comboBoxTextNew  = liftIO $ do
    result <- gtk_combo_box_text_new
    checkUnexpectedReturnNULL "gtk_combo_box_text_new" result
    result' <- (newObject ComboBoxText) result
    return result'

-- method ComboBoxText::new_with_entry
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ComboBoxText"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_text_new_with_entry" gtk_combo_box_text_new_with_entry :: 
    IO (Ptr ComboBoxText)


comboBoxTextNewWithEntry ::
    (MonadIO m) =>
    m ComboBoxText
comboBoxTextNewWithEntry  = liftIO $ do
    result <- gtk_combo_box_text_new_with_entry
    checkUnexpectedReturnNULL "gtk_combo_box_text_new_with_entry" result
    result' <- (newObject ComboBoxText) result
    return result'

-- method ComboBoxText::append
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_text_append" gtk_combo_box_text_append :: 
    Ptr ComboBoxText ->                     -- _obj : TInterface "Gtk" "ComboBoxText"
    CString ->                              -- id : TBasicType TUTF8
    CString ->                              -- text : TBasicType TUTF8
    IO ()


comboBoxTextAppend ::
    (MonadIO m, ComboBoxTextK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- id
    T.Text ->                               -- text
    m ()
comboBoxTextAppend _obj id text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeId <- case id of
        Nothing -> return nullPtr
        Just jId -> do
            jId' <- textToCString jId
            return jId'
    text' <- textToCString text
    gtk_combo_box_text_append _obj' maybeId text'
    touchManagedPtr _obj
    freeMem maybeId
    freeMem text'
    return ()

-- method ComboBoxText::append_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_text_append_text" gtk_combo_box_text_append_text :: 
    Ptr ComboBoxText ->                     -- _obj : TInterface "Gtk" "ComboBoxText"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


comboBoxTextAppendText ::
    (MonadIO m, ComboBoxTextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    m ()
comboBoxTextAppendText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_combo_box_text_append_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method ComboBoxText::get_active_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_text_get_active_text" gtk_combo_box_text_get_active_text :: 
    Ptr ComboBoxText ->                     -- _obj : TInterface "Gtk" "ComboBoxText"
    IO CString


comboBoxTextGetActiveText ::
    (MonadIO m, ComboBoxTextK a) =>
    a ->                                    -- _obj
    m T.Text
comboBoxTextGetActiveText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_combo_box_text_get_active_text _obj'
    checkUnexpectedReturnNULL "gtk_combo_box_text_get_active_text" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method ComboBoxText::insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_text_insert" gtk_combo_box_text_insert :: 
    Ptr ComboBoxText ->                     -- _obj : TInterface "Gtk" "ComboBoxText"
    Int32 ->                                -- position : TBasicType TInt32
    CString ->                              -- id : TBasicType TUTF8
    CString ->                              -- text : TBasicType TUTF8
    IO ()


comboBoxTextInsert ::
    (MonadIO m, ComboBoxTextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    Maybe (T.Text) ->                       -- id
    T.Text ->                               -- text
    m ()
comboBoxTextInsert _obj position id text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeId <- case id of
        Nothing -> return nullPtr
        Just jId -> do
            jId' <- textToCString jId
            return jId'
    text' <- textToCString text
    gtk_combo_box_text_insert _obj' position maybeId text'
    touchManagedPtr _obj
    freeMem maybeId
    freeMem text'
    return ()

-- method ComboBoxText::insert_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_text_insert_text" gtk_combo_box_text_insert_text :: 
    Ptr ComboBoxText ->                     -- _obj : TInterface "Gtk" "ComboBoxText"
    Int32 ->                                -- position : TBasicType TInt32
    CString ->                              -- text : TBasicType TUTF8
    IO ()


comboBoxTextInsertText ::
    (MonadIO m, ComboBoxTextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    T.Text ->                               -- text
    m ()
comboBoxTextInsertText _obj position text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_combo_box_text_insert_text _obj' position text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method ComboBoxText::prepend
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_text_prepend" gtk_combo_box_text_prepend :: 
    Ptr ComboBoxText ->                     -- _obj : TInterface "Gtk" "ComboBoxText"
    CString ->                              -- id : TBasicType TUTF8
    CString ->                              -- text : TBasicType TUTF8
    IO ()


comboBoxTextPrepend ::
    (MonadIO m, ComboBoxTextK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- id
    T.Text ->                               -- text
    m ()
comboBoxTextPrepend _obj id text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeId <- case id of
        Nothing -> return nullPtr
        Just jId -> do
            jId' <- textToCString jId
            return jId'
    text' <- textToCString text
    gtk_combo_box_text_prepend _obj' maybeId text'
    touchManagedPtr _obj
    freeMem maybeId
    freeMem text'
    return ()

-- method ComboBoxText::prepend_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_text_prepend_text" gtk_combo_box_text_prepend_text :: 
    Ptr ComboBoxText ->                     -- _obj : TInterface "Gtk" "ComboBoxText"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


comboBoxTextPrependText ::
    (MonadIO m, ComboBoxTextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    m ()
comboBoxTextPrependText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_combo_box_text_prepend_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method ComboBoxText::remove
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_text_remove" gtk_combo_box_text_remove :: 
    Ptr ComboBoxText ->                     -- _obj : TInterface "Gtk" "ComboBoxText"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


comboBoxTextRemove ::
    (MonadIO m, ComboBoxTextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    m ()
comboBoxTextRemove _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_combo_box_text_remove _obj' position
    touchManagedPtr _obj
    return ()

-- method ComboBoxText::remove_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ComboBoxText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_combo_box_text_remove_all" gtk_combo_box_text_remove_all :: 
    Ptr ComboBoxText ->                     -- _obj : TInterface "Gtk" "ComboBoxText"
    IO ()


comboBoxTextRemoveAll ::
    (MonadIO m, ComboBoxTextK a) =>
    a ->                                    -- _obj
    m ()
comboBoxTextRemoveAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_combo_box_text_remove_all _obj'
    touchManagedPtr _obj
    return ()

-- object Container 
newtype Container = Container (ForeignPtr Container)
noContainer :: Maybe Container
noContainer = Nothing

foreign import ccall "gtk_container_get_type"
    c_gtk_container_get_type :: IO GType

type instance ParentTypes Container = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Container where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_container_get_type
    

class GObject o => ContainerK o
instance (GObject o, IsDescendantOf Container o) => ContainerK o

toContainer :: ContainerK o => o -> IO Container
toContainer = unsafeCastTo Container

-- method Container::add
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_add" gtk_container_add :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


containerAdd ::
    (MonadIO m, ContainerK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    m ()
containerAdd _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_container_add _obj' widget'
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- method Container::check_resize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_check_resize" gtk_container_check_resize :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    IO ()


containerCheckResize ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    m ()
containerCheckResize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_container_check_resize _obj'
    touchManagedPtr _obj
    return ()

-- method Container::child_get_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_child_get_property" gtk_container_child_get_property :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


containerChildGetProperty ::
    (MonadIO m, ContainerK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    T.Text ->                               -- property_name
    GValue ->                               -- value
    m ()
containerChildGetProperty _obj child property_name value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    property_name' <- textToCString property_name
    let value' = unsafeManagedPtrGetPtr value
    gtk_container_child_get_property _obj' child' property_name' value'
    touchManagedPtr _obj
    touchManagedPtr child
    touchManagedPtr value
    freeMem property_name'
    return ()

-- method Container::child_notify
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_child_notify" gtk_container_child_notify :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CString ->                              -- child_property : TBasicType TUTF8
    IO ()


containerChildNotify ::
    (MonadIO m, ContainerK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    T.Text ->                               -- child_property
    m ()
containerChildNotify _obj child child_property = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    child_property' <- textToCString child_property
    gtk_container_child_notify _obj' child' child_property'
    touchManagedPtr _obj
    touchManagedPtr child
    freeMem child_property'
    return ()

-- method Container::child_notify_by_pspec
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_child_notify_by_pspec" gtk_container_child_notify_by_pspec :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    IO ()


containerChildNotifyByPspec ::
    (MonadIO m, ContainerK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    GParamSpec ->                           -- pspec
    m ()
containerChildNotifyByPspec _obj child pspec = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let pspec' = unsafeManagedPtrGetPtr pspec
    gtk_container_child_notify_by_pspec _obj' child' pspec'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Container::child_set_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_child_set_property" gtk_container_child_set_property :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


containerChildSetProperty ::
    (MonadIO m, ContainerK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    T.Text ->                               -- property_name
    GValue ->                               -- value
    m ()
containerChildSetProperty _obj child property_name value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    property_name' <- textToCString property_name
    let value' = unsafeManagedPtrGetPtr value
    gtk_container_child_set_property _obj' child' property_name' value'
    touchManagedPtr _obj
    touchManagedPtr child
    touchManagedPtr value
    freeMem property_name'
    return ()

-- method Container::child_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TGType
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_child_type" gtk_container_child_type :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    IO CGType


containerChildType ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    m GType
containerChildType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_container_child_type _obj'
    let result' = GType result
    touchManagedPtr _obj
    return result'

-- method Container::forall
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "Callback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "Callback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_forall" gtk_container_forall :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    FunPtr CallbackC ->                     -- callback : TInterface "Gtk" "Callback"
    Ptr () ->                               -- callback_data : TBasicType TVoid
    IO ()


containerForall ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    Callback ->                             -- callback
    m ()
containerForall _obj callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    callback' <- mkCallback (callbackWrapper Nothing callback)
    let callback_data = nullPtr
    gtk_container_forall _obj' callback' callback_data
    safeFreeFunPtr $ castFunPtrToPtr callback'
    touchManagedPtr _obj
    return ()

-- method Container::foreach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "Callback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "Callback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_foreach" gtk_container_foreach :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    FunPtr CallbackC ->                     -- callback : TInterface "Gtk" "Callback"
    Ptr () ->                               -- callback_data : TBasicType TVoid
    IO ()


containerForeach ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    Callback ->                             -- callback
    m ()
containerForeach _obj callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    callback' <- mkCallback (callbackWrapper Nothing callback)
    let callback_data = nullPtr
    gtk_container_foreach _obj' callback' callback_data
    safeFreeFunPtr $ castFunPtrToPtr callback'
    touchManagedPtr _obj
    return ()

-- method Container::get_border_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_get_border_width" gtk_container_get_border_width :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    IO Word32


containerGetBorderWidth ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    m Word32
containerGetBorderWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_container_get_border_width _obj'
    touchManagedPtr _obj
    return result

-- method Container::get_children
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "Widget")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_get_children" gtk_container_get_children :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    IO (Ptr (GList (Ptr Widget)))


containerGetChildren ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    m [Widget]
containerGetChildren _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_container_get_children _obj'
    checkUnexpectedReturnNULL "gtk_container_get_children" result
    result' <- unpackGList result
    result'' <- mapM (newObject Widget) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method Container::get_focus_chain
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focusable_widgets", argType = TGList (TInterface "Gtk" "Widget"), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferContainer}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_get_focus_chain" gtk_container_get_focus_chain :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr (Ptr (GList (Ptr Widget))) ->       -- focusable_widgets : TGList (TInterface "Gtk" "Widget")
    IO CInt


containerGetFocusChain ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    m (Bool,[Widget])
containerGetFocusChain _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    focusable_widgets <- allocMem :: IO (Ptr (Ptr (GList (Ptr Widget))))
    result <- gtk_container_get_focus_chain _obj' focusable_widgets
    let result' = (/= 0) result
    focusable_widgets' <- peek focusable_widgets
    focusable_widgets'' <- unpackGList focusable_widgets'
    focusable_widgets''' <- mapM (newObject Widget) focusable_widgets''
    g_list_free focusable_widgets'
    touchManagedPtr _obj
    freeMem focusable_widgets
    return (result', focusable_widgets''')

-- method Container::get_focus_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_get_focus_child" gtk_container_get_focus_child :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    IO (Ptr Widget)


containerGetFocusChild ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    m Widget
containerGetFocusChild _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_container_get_focus_child _obj'
    checkUnexpectedReturnNULL "gtk_container_get_focus_child" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Container::get_focus_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_get_focus_hadjustment" gtk_container_get_focus_hadjustment :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    IO (Ptr Adjustment)


containerGetFocusHadjustment ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    m Adjustment
containerGetFocusHadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_container_get_focus_hadjustment _obj'
    checkUnexpectedReturnNULL "gtk_container_get_focus_hadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method Container::get_focus_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_get_focus_vadjustment" gtk_container_get_focus_vadjustment :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    IO (Ptr Adjustment)


containerGetFocusVadjustment ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    m Adjustment
containerGetFocusVadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_container_get_focus_vadjustment _obj'
    checkUnexpectedReturnNULL "gtk_container_get_focus_vadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method Container::get_path_for_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "WidgetPath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_get_path_for_child" gtk_container_get_path_for_child :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO (Ptr WidgetPath)


containerGetPathForChild ::
    (MonadIO m, ContainerK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m WidgetPath
containerGetPathForChild _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    result <- gtk_container_get_path_for_child _obj' child'
    checkUnexpectedReturnNULL "gtk_container_get_path_for_child" result
    result' <- (wrapBoxed WidgetPath) result
    touchManagedPtr _obj
    touchManagedPtr child
    return result'

-- method Container::get_resize_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ResizeMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_get_resize_mode" gtk_container_get_resize_mode :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    IO CUInt

{-# DEPRECATED containerGetResizeMode ["(Since version 3.12)","Resize modes are deprecated. They aren\8217t necessary","    anymore since frame clocks and might introduce obscure bugs if","    used."]#-}
containerGetResizeMode ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    m ResizeMode
containerGetResizeMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_container_get_resize_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Container::propagate_draw
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_propagate_draw" gtk_container_propagate_draw :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    IO ()


containerPropagateDraw ::
    (MonadIO m, ContainerK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Cairo.Context ->                        -- cr
    m ()
containerPropagateDraw _obj child cr = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let cr' = unsafeManagedPtrGetPtr cr
    gtk_container_propagate_draw _obj' child' cr'
    touchManagedPtr _obj
    touchManagedPtr child
    touchManagedPtr cr
    return ()

-- method Container::remove
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_remove" gtk_container_remove :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


containerRemove ::
    (MonadIO m, ContainerK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    m ()
containerRemove _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_container_remove _obj' widget'
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- method Container::resize_children
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_resize_children" gtk_container_resize_children :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    IO ()

{-# DEPRECATED containerResizeChildren ["(Since version 3.10)"]#-}
containerResizeChildren ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    m ()
containerResizeChildren _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_container_resize_children _obj'
    touchManagedPtr _obj
    return ()

-- method Container::set_border_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border_width", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border_width", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_set_border_width" gtk_container_set_border_width :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Word32 ->                               -- border_width : TBasicType TUInt32
    IO ()


containerSetBorderWidth ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- border_width
    m ()
containerSetBorderWidth _obj border_width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_container_set_border_width _obj' border_width
    touchManagedPtr _obj
    return ()

-- method Container::set_focus_chain
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focusable_widgets", argType = TGList (TInterface "Gtk" "Widget"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focusable_widgets", argType = TGList (TInterface "Gtk" "Widget"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_set_focus_chain" gtk_container_set_focus_chain :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr (GList (Ptr Widget)) ->             -- focusable_widgets : TGList (TInterface "Gtk" "Widget")
    IO ()


containerSetFocusChain ::
    (MonadIO m, ContainerK a, WidgetK b) =>
    a ->                                    -- _obj
    [b] ->                                  -- focusable_widgets
    m ()
containerSetFocusChain _obj focusable_widgets = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let focusable_widgets' = map unsafeManagedPtrCastPtr focusable_widgets
    focusable_widgets'' <- packGList focusable_widgets'
    gtk_container_set_focus_chain _obj' focusable_widgets''
    touchManagedPtr _obj
    mapM_ touchManagedPtr focusable_widgets
    g_list_free focusable_widgets''
    return ()

-- method Container::set_focus_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_set_focus_child" gtk_container_set_focus_child :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


containerSetFocusChild ::
    (MonadIO m, ContainerK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- child
    m ()
containerSetFocusChild _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeChild <- case child of
        Nothing -> return nullPtr
        Just jChild -> do
            let jChild' = unsafeManagedPtrCastPtr jChild
            return jChild'
    gtk_container_set_focus_child _obj' maybeChild
    touchManagedPtr _obj
    whenJust child touchManagedPtr
    return ()

-- method Container::set_focus_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_set_focus_hadjustment" gtk_container_set_focus_hadjustment :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()


containerSetFocusHadjustment ::
    (MonadIO m, ContainerK a, AdjustmentK b) =>
    a ->                                    -- _obj
    b ->                                    -- adjustment
    m ()
containerSetFocusHadjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let adjustment' = unsafeManagedPtrCastPtr adjustment
    gtk_container_set_focus_hadjustment _obj' adjustment'
    touchManagedPtr _obj
    touchManagedPtr adjustment
    return ()

-- method Container::set_focus_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_set_focus_vadjustment" gtk_container_set_focus_vadjustment :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()


containerSetFocusVadjustment ::
    (MonadIO m, ContainerK a, AdjustmentK b) =>
    a ->                                    -- _obj
    b ->                                    -- adjustment
    m ()
containerSetFocusVadjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let adjustment' = unsafeManagedPtrCastPtr adjustment
    gtk_container_set_focus_vadjustment _obj' adjustment'
    touchManagedPtr _obj
    touchManagedPtr adjustment
    return ()

-- method Container::set_reallocate_redraws
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "needs_redraws", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "needs_redraws", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_set_reallocate_redraws" gtk_container_set_reallocate_redraws :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    CInt ->                                 -- needs_redraws : TBasicType TBoolean
    IO ()

{-# DEPRECATED containerSetReallocateRedraws ["(Since version 3.14)","Call gtk_widget_queue_draw() in your size_allocate handler."]#-}
containerSetReallocateRedraws ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- needs_redraws
    m ()
containerSetReallocateRedraws _obj needs_redraws = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let needs_redraws' = (fromIntegral . fromEnum) needs_redraws
    gtk_container_set_reallocate_redraws _obj' needs_redraws'
    touchManagedPtr _obj
    return ()

-- method Container::set_resize_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resize_mode", argType = TInterface "Gtk" "ResizeMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resize_mode", argType = TInterface "Gtk" "ResizeMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_set_resize_mode" gtk_container_set_resize_mode :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    CUInt ->                                -- resize_mode : TInterface "Gtk" "ResizeMode"
    IO ()

{-# DEPRECATED containerSetResizeMode ["(Since version 3.12)","Resize modes are deprecated. They aren\8217t necessary","    anymore since frame clocks and might introduce obscure bugs if","    used."]#-}
containerSetResizeMode ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    ResizeMode ->                           -- resize_mode
    m ()
containerSetResizeMode _obj resize_mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let resize_mode' = (fromIntegral . fromEnum) resize_mode
    gtk_container_set_resize_mode _obj' resize_mode'
    touchManagedPtr _obj
    return ()

-- method Container::unset_focus_chain
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Container", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_unset_focus_chain" gtk_container_unset_focus_chain :: 
    Ptr Container ->                        -- _obj : TInterface "Gtk" "Container"
    IO ()


containerUnsetFocusChain ::
    (MonadIO m, ContainerK a) =>
    a ->                                    -- _obj
    m ()
containerUnsetFocusChain _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_container_unset_focus_chain _obj'
    touchManagedPtr _obj
    return ()

-- signal Container::add
type ContainerAddCallback =
    Widget ->
    IO ()

noContainerAddCallback :: Maybe ContainerAddCallback
noContainerAddCallback = Nothing

type ContainerAddCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkContainerAddCallback :: ContainerAddCallbackC -> IO (FunPtr ContainerAddCallbackC)

containerAddClosure :: ContainerAddCallback -> IO Closure
containerAddClosure cb = newCClosure =<< mkContainerAddCallback wrapped
    where wrapped = containerAddCallbackWrapper cb

containerAddCallbackWrapper ::
    ContainerAddCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
containerAddCallbackWrapper _cb _ object _ = do
    object' <- (newObject Widget) object
    _cb  object'

onContainerAdd :: (GObject a, MonadIO m) => a -> ContainerAddCallback -> m SignalHandlerId
onContainerAdd obj cb = liftIO $ connectContainerAdd obj cb SignalConnectBefore
afterContainerAdd :: (GObject a, MonadIO m) => a -> ContainerAddCallback -> m SignalHandlerId
afterContainerAdd obj cb = connectContainerAdd obj cb SignalConnectAfter

connectContainerAdd :: (GObject a, MonadIO m) =>
                       a -> ContainerAddCallback -> SignalConnectMode -> m SignalHandlerId
connectContainerAdd obj cb after = liftIO $ do
    cb' <- mkContainerAddCallback (containerAddCallbackWrapper cb)
    connectSignalFunPtr obj "add" cb' after

-- signal Container::check-resize
type ContainerCheckResizeCallback =
    IO ()

noContainerCheckResizeCallback :: Maybe ContainerCheckResizeCallback
noContainerCheckResizeCallback = Nothing

type ContainerCheckResizeCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkContainerCheckResizeCallback :: ContainerCheckResizeCallbackC -> IO (FunPtr ContainerCheckResizeCallbackC)

containerCheckResizeClosure :: ContainerCheckResizeCallback -> IO Closure
containerCheckResizeClosure cb = newCClosure =<< mkContainerCheckResizeCallback wrapped
    where wrapped = containerCheckResizeCallbackWrapper cb

containerCheckResizeCallbackWrapper ::
    ContainerCheckResizeCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
containerCheckResizeCallbackWrapper _cb _ _ = do
    _cb 

onContainerCheckResize :: (GObject a, MonadIO m) => a -> ContainerCheckResizeCallback -> m SignalHandlerId
onContainerCheckResize obj cb = liftIO $ connectContainerCheckResize obj cb SignalConnectBefore
afterContainerCheckResize :: (GObject a, MonadIO m) => a -> ContainerCheckResizeCallback -> m SignalHandlerId
afterContainerCheckResize obj cb = connectContainerCheckResize obj cb SignalConnectAfter

connectContainerCheckResize :: (GObject a, MonadIO m) =>
                               a -> ContainerCheckResizeCallback -> SignalConnectMode -> m SignalHandlerId
connectContainerCheckResize obj cb after = liftIO $ do
    cb' <- mkContainerCheckResizeCallback (containerCheckResizeCallbackWrapper cb)
    connectSignalFunPtr obj "check-resize" cb' after

-- signal Container::remove
type ContainerRemoveCallback =
    Widget ->
    IO ()

noContainerRemoveCallback :: Maybe ContainerRemoveCallback
noContainerRemoveCallback = Nothing

type ContainerRemoveCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkContainerRemoveCallback :: ContainerRemoveCallbackC -> IO (FunPtr ContainerRemoveCallbackC)

containerRemoveClosure :: ContainerRemoveCallback -> IO Closure
containerRemoveClosure cb = newCClosure =<< mkContainerRemoveCallback wrapped
    where wrapped = containerRemoveCallbackWrapper cb

containerRemoveCallbackWrapper ::
    ContainerRemoveCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
containerRemoveCallbackWrapper _cb _ object _ = do
    object' <- (newObject Widget) object
    _cb  object'

onContainerRemove :: (GObject a, MonadIO m) => a -> ContainerRemoveCallback -> m SignalHandlerId
onContainerRemove obj cb = liftIO $ connectContainerRemove obj cb SignalConnectBefore
afterContainerRemove :: (GObject a, MonadIO m) => a -> ContainerRemoveCallback -> m SignalHandlerId
afterContainerRemove obj cb = connectContainerRemove obj cb SignalConnectAfter

connectContainerRemove :: (GObject a, MonadIO m) =>
                          a -> ContainerRemoveCallback -> SignalConnectMode -> m SignalHandlerId
connectContainerRemove obj cb after = liftIO $ do
    cb' <- mkContainerRemoveCallback (containerRemoveCallbackWrapper cb)
    connectSignalFunPtr obj "remove" cb' after

-- signal Container::set-focus-child
type ContainerSetFocusChildCallback =
    Widget ->
    IO ()

noContainerSetFocusChildCallback :: Maybe ContainerSetFocusChildCallback
noContainerSetFocusChildCallback = Nothing

type ContainerSetFocusChildCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkContainerSetFocusChildCallback :: ContainerSetFocusChildCallbackC -> IO (FunPtr ContainerSetFocusChildCallbackC)

containerSetFocusChildClosure :: ContainerSetFocusChildCallback -> IO Closure
containerSetFocusChildClosure cb = newCClosure =<< mkContainerSetFocusChildCallback wrapped
    where wrapped = containerSetFocusChildCallbackWrapper cb

containerSetFocusChildCallbackWrapper ::
    ContainerSetFocusChildCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
containerSetFocusChildCallbackWrapper _cb _ object _ = do
    object' <- (newObject Widget) object
    _cb  object'

onContainerSetFocusChild :: (GObject a, MonadIO m) => a -> ContainerSetFocusChildCallback -> m SignalHandlerId
onContainerSetFocusChild obj cb = liftIO $ connectContainerSetFocusChild obj cb SignalConnectBefore
afterContainerSetFocusChild :: (GObject a, MonadIO m) => a -> ContainerSetFocusChildCallback -> m SignalHandlerId
afterContainerSetFocusChild obj cb = connectContainerSetFocusChild obj cb SignalConnectAfter

connectContainerSetFocusChild :: (GObject a, MonadIO m) =>
                                 a -> ContainerSetFocusChildCallback -> SignalConnectMode -> m SignalHandlerId
connectContainerSetFocusChild obj cb after = liftIO $ do
    cb' <- mkContainerSetFocusChildCallback (containerSetFocusChildCallbackWrapper cb)
    connectSignalFunPtr obj "set-focus-child" cb' after

-- object ContainerAccessible 
newtype ContainerAccessible = ContainerAccessible (ForeignPtr ContainerAccessible)
noContainerAccessible :: Maybe ContainerAccessible
noContainerAccessible = Nothing

foreign import ccall "gtk_container_accessible_get_type"
    c_gtk_container_accessible_get_type :: IO GType

type instance ParentTypes ContainerAccessible = '[WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component]

instance GObject ContainerAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_container_accessible_get_type
    

class GObject o => ContainerAccessibleK o
instance (GObject o, IsDescendantOf ContainerAccessible o) => ContainerAccessibleK o

toContainerAccessible :: ContainerAccessibleK o => o -> IO ContainerAccessible
toContainerAccessible = unsafeCastTo ContainerAccessible

-- object ContainerCellAccessible 
newtype ContainerCellAccessible = ContainerCellAccessible (ForeignPtr ContainerCellAccessible)
noContainerCellAccessible :: Maybe ContainerCellAccessible
noContainerCellAccessible = Nothing

foreign import ccall "gtk_container_cell_accessible_get_type"
    c_gtk_container_cell_accessible_get_type :: IO GType

type instance ParentTypes ContainerCellAccessible = '[CellAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component]

instance GObject ContainerCellAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_container_cell_accessible_get_type
    

class GObject o => ContainerCellAccessibleK o
instance (GObject o, IsDescendantOf ContainerCellAccessible o) => ContainerCellAccessibleK o

toContainerCellAccessible :: ContainerCellAccessibleK o => o -> IO ContainerCellAccessible
toContainerCellAccessible = unsafeCastTo ContainerCellAccessible

-- method ContainerCellAccessible::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ContainerCellAccessible"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_cell_accessible_new" gtk_container_cell_accessible_new :: 
    IO (Ptr ContainerCellAccessible)


containerCellAccessibleNew ::
    (MonadIO m) =>
    m ContainerCellAccessible
containerCellAccessibleNew  = liftIO $ do
    result <- gtk_container_cell_accessible_new
    checkUnexpectedReturnNULL "gtk_container_cell_accessible_new" result
    result' <- (wrapObject ContainerCellAccessible) result
    return result'

-- method ContainerCellAccessible::add_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ContainerCellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ContainerCellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_cell_accessible_add_child" gtk_container_cell_accessible_add_child :: 
    Ptr ContainerCellAccessible ->          -- _obj : TInterface "Gtk" "ContainerCellAccessible"
    Ptr CellAccessible ->                   -- child : TInterface "Gtk" "CellAccessible"
    IO ()


containerCellAccessibleAddChild ::
    (MonadIO m, ContainerCellAccessibleK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
containerCellAccessibleAddChild _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_container_cell_accessible_add_child _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method ContainerCellAccessible::get_children
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ContainerCellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ContainerCellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "CellAccessible")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_cell_accessible_get_children" gtk_container_cell_accessible_get_children :: 
    Ptr ContainerCellAccessible ->          -- _obj : TInterface "Gtk" "ContainerCellAccessible"
    IO (Ptr (GList (Ptr CellAccessible)))


containerCellAccessibleGetChildren ::
    (MonadIO m, ContainerCellAccessibleK a) =>
    a ->                                    -- _obj
    m [CellAccessible]
containerCellAccessibleGetChildren _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_container_cell_accessible_get_children _obj'
    checkUnexpectedReturnNULL "gtk_container_cell_accessible_get_children" result
    result' <- unpackGList result
    result'' <- mapM (newObject CellAccessible) result'
    touchManagedPtr _obj
    return result''

-- method ContainerCellAccessible::remove_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ContainerCellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ContainerCellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "CellAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_container_cell_accessible_remove_child" gtk_container_cell_accessible_remove_child :: 
    Ptr ContainerCellAccessible ->          -- _obj : TInterface "Gtk" "ContainerCellAccessible"
    Ptr CellAccessible ->                   -- child : TInterface "Gtk" "CellAccessible"
    IO ()


containerCellAccessibleRemoveChild ::
    (MonadIO m, ContainerCellAccessibleK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
containerCellAccessibleRemoveChild _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_container_cell_accessible_remove_child _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- Enum CornerType

data CornerType = 
      CornerTypeTopLeft
    | CornerTypeBottomLeft
    | CornerTypeTopRight
    | CornerTypeBottomRight
    | AnotherCornerType Int
    deriving (Show, Eq)

instance Enum CornerType where
    fromEnum CornerTypeTopLeft = 0
    fromEnum CornerTypeBottomLeft = 1
    fromEnum CornerTypeTopRight = 2
    fromEnum CornerTypeBottomRight = 3
    fromEnum (AnotherCornerType k) = k

    toEnum 0 = CornerTypeTopLeft
    toEnum 1 = CornerTypeBottomLeft
    toEnum 2 = CornerTypeTopRight
    toEnum 3 = CornerTypeBottomRight
    toEnum k = AnotherCornerType k

foreign import ccall "gtk_corner_type_get_type" c_gtk_corner_type_get_type :: 
    IO GType

instance BoxedEnum CornerType where
    boxedEnumType _ = c_gtk_corner_type_get_type

-- object CssProvider 
newtype CssProvider = CssProvider (ForeignPtr CssProvider)
noCssProvider :: Maybe CssProvider
noCssProvider = Nothing

foreign import ccall "gtk_css_provider_get_type"
    c_gtk_css_provider_get_type :: IO GType

type instance ParentTypes CssProvider = '[GObject.Object, StyleProvider]

instance GObject CssProvider where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_css_provider_get_type
    

class GObject o => CssProviderK o
instance (GObject o, IsDescendantOf CssProvider o) => CssProviderK o

toCssProvider :: CssProviderK o => o -> IO CssProvider
toCssProvider = unsafeCastTo CssProvider

-- method CssProvider::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CssProvider"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_provider_new" gtk_css_provider_new :: 
    IO (Ptr CssProvider)


cssProviderNew ::
    (MonadIO m) =>
    m CssProvider
cssProviderNew  = liftIO $ do
    result <- gtk_css_provider_new
    checkUnexpectedReturnNULL "gtk_css_provider_new" result
    result' <- (wrapObject CssProvider) result
    return result'

-- method CssProvider::load_from_data
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_css_provider_load_from_data" gtk_css_provider_load_from_data :: 
    Ptr CssProvider ->                      -- _obj : TInterface "Gtk" "CssProvider"
    Ptr Word8 ->                            -- data : TCArray False (-1) 2 (TBasicType TUInt8)
    Int64 ->                                -- length : TBasicType TInt64
    Ptr (Ptr GError) ->                     -- error
    IO CInt


cssProviderLoadFromData ::
    (MonadIO m, CssProviderK a) =>
    a ->                                    -- _obj
    ByteString ->                           -- data
    m ()
cssProviderLoadFromData _obj data_ = liftIO $ do
    let length_ = fromIntegral $ B.length data_
    let _obj' = unsafeManagedPtrCastPtr _obj
    data_' <- packByteString data_
    onException (do
        _ <- propagateGError $ gtk_css_provider_load_from_data _obj' data_' length_
        touchManagedPtr _obj
        freeMem data_'
        return ()
     ) (do
        freeMem data_'
     )

-- method CssProvider::load_from_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_css_provider_load_from_file" gtk_css_provider_load_from_file :: 
    Ptr CssProvider ->                      -- _obj : TInterface "Gtk" "CssProvider"
    Ptr Gio.File ->                         -- file : TInterface "Gio" "File"
    Ptr (Ptr GError) ->                     -- error
    IO CInt


cssProviderLoadFromFile ::
    (MonadIO m, CssProviderK a, Gio.FileK b) =>
    a ->                                    -- _obj
    b ->                                    -- file
    m ()
cssProviderLoadFromFile _obj file = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let file' = unsafeManagedPtrCastPtr file
    onException (do
        _ <- propagateGError $ gtk_css_provider_load_from_file _obj' file'
        touchManagedPtr _obj
        touchManagedPtr file
        return ()
     ) (do
        return ()
     )

-- method CssProvider::load_from_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_css_provider_load_from_path" gtk_css_provider_load_from_path :: 
    Ptr CssProvider ->                      -- _obj : TInterface "Gtk" "CssProvider"
    CString ->                              -- path : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt


cssProviderLoadFromPath ::
    (MonadIO m, CssProviderK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- path
    m ()
cssProviderLoadFromPath _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path' <- textToCString path
    onException (do
        _ <- propagateGError $ gtk_css_provider_load_from_path _obj' path'
        touchManagedPtr _obj
        freeMem path'
        return ()
     ) (do
        freeMem path'
     )

-- method CssProvider::load_from_resource
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_provider_load_from_resource" gtk_css_provider_load_from_resource :: 
    Ptr CssProvider ->                      -- _obj : TInterface "Gtk" "CssProvider"
    CString ->                              -- resource_path : TBasicType TUTF8
    IO ()


cssProviderLoadFromResource ::
    (MonadIO m, CssProviderK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- resource_path
    m ()
cssProviderLoadFromResource _obj resource_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    resource_path' <- textToCString resource_path
    gtk_css_provider_load_from_resource _obj' resource_path'
    touchManagedPtr _obj
    freeMem resource_path'
    return ()

-- method CssProvider::to_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_provider_to_string" gtk_css_provider_to_string :: 
    Ptr CssProvider ->                      -- _obj : TInterface "Gtk" "CssProvider"
    IO CString


cssProviderToString ::
    (MonadIO m, CssProviderK a) =>
    a ->                                    -- _obj
    m T.Text
cssProviderToString _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_css_provider_to_string _obj'
    checkUnexpectedReturnNULL "gtk_css_provider_to_string" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method CssProvider::get_default
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "CssProvider"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_provider_get_default" gtk_css_provider_get_default :: 
    IO (Ptr CssProvider)


cssProviderGetDefault ::
    (MonadIO m) =>
    m CssProvider
cssProviderGetDefault  = liftIO $ do
    result <- gtk_css_provider_get_default
    checkUnexpectedReturnNULL "gtk_css_provider_get_default" result
    result' <- (newObject CssProvider) result
    return result'

-- method CssProvider::get_named
-- method type : MemberFunction
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "variant", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "variant", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CssProvider"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_provider_get_named" gtk_css_provider_get_named :: 
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- variant : TBasicType TUTF8
    IO (Ptr CssProvider)


cssProviderGetNamed ::
    (MonadIO m) =>
    T.Text ->                               -- name
    Maybe (T.Text) ->                       -- variant
    m CssProvider
cssProviderGetNamed name variant = liftIO $ do
    name' <- textToCString name
    maybeVariant <- case variant of
        Nothing -> return nullPtr
        Just jVariant -> do
            jVariant' <- textToCString jVariant
            return jVariant'
    result <- gtk_css_provider_get_named name' maybeVariant
    checkUnexpectedReturnNULL "gtk_css_provider_get_named" result
    result' <- (newObject CssProvider) result
    freeMem name'
    freeMem maybeVariant
    return result'

-- signal CssProvider::parsing-error
type CssProviderParsingErrorCallback =
    CssSection ->
    GError ->
    IO ()

noCssProviderParsingErrorCallback :: Maybe CssProviderParsingErrorCallback
noCssProviderParsingErrorCallback = Nothing

type CssProviderParsingErrorCallbackC =
    Ptr () ->                               -- object
    Ptr CssSection ->
    Ptr GError ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCssProviderParsingErrorCallback :: CssProviderParsingErrorCallbackC -> IO (FunPtr CssProviderParsingErrorCallbackC)

cssProviderParsingErrorClosure :: CssProviderParsingErrorCallback -> IO Closure
cssProviderParsingErrorClosure cb = newCClosure =<< mkCssProviderParsingErrorCallback wrapped
    where wrapped = cssProviderParsingErrorCallbackWrapper cb

cssProviderParsingErrorCallbackWrapper ::
    CssProviderParsingErrorCallback ->
    Ptr () ->
    Ptr CssSection ->
    Ptr GError ->
    Ptr () ->
    IO ()
cssProviderParsingErrorCallbackWrapper _cb _ section error_ _ = do
    section' <- (newBoxed CssSection) section
    error_' <- (newBoxed GError) error_
    _cb  section' error_'

onCssProviderParsingError :: (GObject a, MonadIO m) => a -> CssProviderParsingErrorCallback -> m SignalHandlerId
onCssProviderParsingError obj cb = liftIO $ connectCssProviderParsingError obj cb SignalConnectBefore
afterCssProviderParsingError :: (GObject a, MonadIO m) => a -> CssProviderParsingErrorCallback -> m SignalHandlerId
afterCssProviderParsingError obj cb = connectCssProviderParsingError obj cb SignalConnectAfter

connectCssProviderParsingError :: (GObject a, MonadIO m) =>
                                  a -> CssProviderParsingErrorCallback -> SignalConnectMode -> m SignalHandlerId
connectCssProviderParsingError obj cb after = liftIO $ do
    cb' <- mkCssProviderParsingErrorCallback (cssProviderParsingErrorCallbackWrapper cb)
    connectSignalFunPtr obj "parsing-error" cb' after

-- Enum CssProviderError

data CssProviderError = 
      CssProviderErrorFailed
    | CssProviderErrorSyntax
    | CssProviderErrorImport
    | CssProviderErrorName
    | CssProviderErrorDeprecated
    | CssProviderErrorUnknownValue
    | AnotherCssProviderError Int
    deriving (Show, Eq)

instance Enum CssProviderError where
    fromEnum CssProviderErrorFailed = 0
    fromEnum CssProviderErrorSyntax = 1
    fromEnum CssProviderErrorImport = 2
    fromEnum CssProviderErrorName = 3
    fromEnum CssProviderErrorDeprecated = 4
    fromEnum CssProviderErrorUnknownValue = 5
    fromEnum (AnotherCssProviderError k) = k

    toEnum 0 = CssProviderErrorFailed
    toEnum 1 = CssProviderErrorSyntax
    toEnum 2 = CssProviderErrorImport
    toEnum 3 = CssProviderErrorName
    toEnum 4 = CssProviderErrorDeprecated
    toEnum 5 = CssProviderErrorUnknownValue
    toEnum k = AnotherCssProviderError k

instance GErrorClass CssProviderError where
    gerrorClassDomain _ = "gtk-css-provider-error-quark"

catchCssProviderError ::
    IO a ->
    (CssProviderError -> GErrorMessage -> IO a) ->
    IO a
catchCssProviderError = catchGErrorJustDomain

handleCssProviderError ::
    (CssProviderError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleCssProviderError = handleGErrorJustDomain

foreign import ccall "gtk_css_provider_error_get_type" c_gtk_css_provider_error_get_type :: 
    IO GType

instance BoxedEnum CssProviderError where
    boxedEnumType _ = c_gtk_css_provider_error_get_type

-- struct CssSection
newtype CssSection = CssSection (ForeignPtr CssSection)
noCssSection :: Maybe CssSection
noCssSection = Nothing

foreign import ccall "gtk_css_section_get_type" c_gtk_css_section_get_type :: 
    IO GType

instance BoxedObject CssSection where
    boxedType _ = c_gtk_css_section_get_type

-- method CssSection::get_end_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_section_get_end_line" gtk_css_section_get_end_line :: 
    Ptr CssSection ->                       -- _obj : TInterface "Gtk" "CssSection"
    IO Word32


cssSectionGetEndLine ::
    (MonadIO m) =>
    CssSection ->                           -- _obj
    m Word32
cssSectionGetEndLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_css_section_get_end_line _obj'
    touchManagedPtr _obj
    return result

-- method CssSection::get_end_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_section_get_end_position" gtk_css_section_get_end_position :: 
    Ptr CssSection ->                       -- _obj : TInterface "Gtk" "CssSection"
    IO Word32


cssSectionGetEndPosition ::
    (MonadIO m) =>
    CssSection ->                           -- _obj
    m Word32
cssSectionGetEndPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_css_section_get_end_position _obj'
    touchManagedPtr _obj
    return result

-- method CssSection::get_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_section_get_file" gtk_css_section_get_file :: 
    Ptr CssSection ->                       -- _obj : TInterface "Gtk" "CssSection"
    IO (Ptr Gio.File)


cssSectionGetFile ::
    (MonadIO m) =>
    CssSection ->                           -- _obj
    m Gio.File
cssSectionGetFile _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_css_section_get_file _obj'
    checkUnexpectedReturnNULL "gtk_css_section_get_file" result
    result' <- (newObject Gio.File) result
    touchManagedPtr _obj
    return result'

-- method CssSection::get_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CssSection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_section_get_parent" gtk_css_section_get_parent :: 
    Ptr CssSection ->                       -- _obj : TInterface "Gtk" "CssSection"
    IO (Ptr CssSection)


cssSectionGetParent ::
    (MonadIO m) =>
    CssSection ->                           -- _obj
    m CssSection
cssSectionGetParent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_css_section_get_parent _obj'
    checkUnexpectedReturnNULL "gtk_css_section_get_parent" result
    result' <- (newBoxed CssSection) result
    touchManagedPtr _obj
    return result'

-- method CssSection::get_section_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CssSectionType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_section_get_section_type" gtk_css_section_get_section_type :: 
    Ptr CssSection ->                       -- _obj : TInterface "Gtk" "CssSection"
    IO CUInt


cssSectionGetSectionType ::
    (MonadIO m) =>
    CssSection ->                           -- _obj
    m CssSectionType
cssSectionGetSectionType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_css_section_get_section_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method CssSection::get_start_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_section_get_start_line" gtk_css_section_get_start_line :: 
    Ptr CssSection ->                       -- _obj : TInterface "Gtk" "CssSection"
    IO Word32


cssSectionGetStartLine ::
    (MonadIO m) =>
    CssSection ->                           -- _obj
    m Word32
cssSectionGetStartLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_css_section_get_start_line _obj'
    touchManagedPtr _obj
    return result

-- method CssSection::get_start_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_section_get_start_position" gtk_css_section_get_start_position :: 
    Ptr CssSection ->                       -- _obj : TInterface "Gtk" "CssSection"
    IO Word32


cssSectionGetStartPosition ::
    (MonadIO m) =>
    CssSection ->                           -- _obj
    m Word32
cssSectionGetStartPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_css_section_get_start_position _obj'
    touchManagedPtr _obj
    return result

-- method CssSection::ref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CssSection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_section_ref" gtk_css_section_ref :: 
    Ptr CssSection ->                       -- _obj : TInterface "Gtk" "CssSection"
    IO (Ptr CssSection)


cssSectionRef ::
    (MonadIO m) =>
    CssSection ->                           -- _obj
    m CssSection
cssSectionRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_css_section_ref _obj'
    checkUnexpectedReturnNULL "gtk_css_section_ref" result
    result' <- (wrapBoxed CssSection) result
    touchManagedPtr _obj
    return result'

-- method CssSection::unref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_section_unref" gtk_css_section_unref :: 
    Ptr CssSection ->                       -- _obj : TInterface "Gtk" "CssSection"
    IO ()


cssSectionUnref ::
    (MonadIO m) =>
    CssSection ->                           -- _obj
    m ()
cssSectionUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_css_section_unref _obj'
    touchManagedPtr _obj
    return ()

-- Enum CssSectionType

data CssSectionType = 
      CssSectionTypeDocument
    | CssSectionTypeImport
    | CssSectionTypeColorDefinition
    | CssSectionTypeBindingSet
    | CssSectionTypeRuleset
    | CssSectionTypeSelector
    | CssSectionTypeDeclaration
    | CssSectionTypeValue
    | CssSectionTypeKeyframes
    | AnotherCssSectionType Int
    deriving (Show, Eq)

instance Enum CssSectionType where
    fromEnum CssSectionTypeDocument = 0
    fromEnum CssSectionTypeImport = 1
    fromEnum CssSectionTypeColorDefinition = 2
    fromEnum CssSectionTypeBindingSet = 3
    fromEnum CssSectionTypeRuleset = 4
    fromEnum CssSectionTypeSelector = 5
    fromEnum CssSectionTypeDeclaration = 6
    fromEnum CssSectionTypeValue = 7
    fromEnum CssSectionTypeKeyframes = 8
    fromEnum (AnotherCssSectionType k) = k

    toEnum 0 = CssSectionTypeDocument
    toEnum 1 = CssSectionTypeImport
    toEnum 2 = CssSectionTypeColorDefinition
    toEnum 3 = CssSectionTypeBindingSet
    toEnum 4 = CssSectionTypeRuleset
    toEnum 5 = CssSectionTypeSelector
    toEnum 6 = CssSectionTypeDeclaration
    toEnum 7 = CssSectionTypeValue
    toEnum 8 = CssSectionTypeKeyframes
    toEnum k = AnotherCssSectionType k

foreign import ccall "gtk_css_section_type_get_type" c_gtk_css_section_type_get_type :: 
    IO GType

instance BoxedEnum CssSectionType where
    boxedEnumType _ = c_gtk_css_section_type_get_type

-- Flags DebugFlag

data DebugFlag = 
      DebugFlagMisc
    | DebugFlagPlugsocket
    | DebugFlagText
    | DebugFlagTree
    | DebugFlagUpdates
    | DebugFlagKeybindings
    | DebugFlagMultihead
    | DebugFlagModules
    | DebugFlagGeometry
    | DebugFlagIcontheme
    | DebugFlagPrinting
    | DebugFlagBuilder
    | DebugFlagSizeRequest
    | DebugFlagNoCssCache
    | DebugFlagBaselines
    | DebugFlagPixelCache
    | DebugFlagNoPixelCache
    | DebugFlagInteractive
    | DebugFlagTouchscreen
    | DebugFlagActions
    | AnotherDebugFlag Int
    deriving (Show, Eq)

instance Enum DebugFlag where
    fromEnum DebugFlagMisc = 1
    fromEnum DebugFlagPlugsocket = 2
    fromEnum DebugFlagText = 4
    fromEnum DebugFlagTree = 8
    fromEnum DebugFlagUpdates = 16
    fromEnum DebugFlagKeybindings = 32
    fromEnum DebugFlagMultihead = 64
    fromEnum DebugFlagModules = 128
    fromEnum DebugFlagGeometry = 256
    fromEnum DebugFlagIcontheme = 512
    fromEnum DebugFlagPrinting = 1024
    fromEnum DebugFlagBuilder = 2048
    fromEnum DebugFlagSizeRequest = 4096
    fromEnum DebugFlagNoCssCache = 8192
    fromEnum DebugFlagBaselines = 16384
    fromEnum DebugFlagPixelCache = 32768
    fromEnum DebugFlagNoPixelCache = 65536
    fromEnum DebugFlagInteractive = 131072
    fromEnum DebugFlagTouchscreen = 262144
    fromEnum DebugFlagActions = 524288
    fromEnum (AnotherDebugFlag k) = k

    toEnum 1 = DebugFlagMisc
    toEnum 2 = DebugFlagPlugsocket
    toEnum 4 = DebugFlagText
    toEnum 8 = DebugFlagTree
    toEnum 16 = DebugFlagUpdates
    toEnum 32 = DebugFlagKeybindings
    toEnum 64 = DebugFlagMultihead
    toEnum 128 = DebugFlagModules
    toEnum 256 = DebugFlagGeometry
    toEnum 512 = DebugFlagIcontheme
    toEnum 1024 = DebugFlagPrinting
    toEnum 2048 = DebugFlagBuilder
    toEnum 4096 = DebugFlagSizeRequest
    toEnum 8192 = DebugFlagNoCssCache
    toEnum 16384 = DebugFlagBaselines
    toEnum 32768 = DebugFlagPixelCache
    toEnum 65536 = DebugFlagNoPixelCache
    toEnum 131072 = DebugFlagInteractive
    toEnum 262144 = DebugFlagTouchscreen
    toEnum 524288 = DebugFlagActions
    toEnum k = AnotherDebugFlag k

foreign import ccall "gtk_debug_flag_get_type" c_gtk_debug_flag_get_type :: 
    IO GType

instance BoxedEnum DebugFlag where
    boxedEnumType _ = c_gtk_debug_flag_get_type

instance IsGFlag DebugFlag

-- Enum DeleteType

data DeleteType = 
      DeleteTypeChars
    | DeleteTypeWordEnds
    | DeleteTypeWords
    | DeleteTypeDisplayLines
    | DeleteTypeDisplayLineEnds
    | DeleteTypeParagraphEnds
    | DeleteTypeParagraphs
    | DeleteTypeWhitespace
    | AnotherDeleteType Int
    deriving (Show, Eq)

instance Enum DeleteType where
    fromEnum DeleteTypeChars = 0
    fromEnum DeleteTypeWordEnds = 1
    fromEnum DeleteTypeWords = 2
    fromEnum DeleteTypeDisplayLines = 3
    fromEnum DeleteTypeDisplayLineEnds = 4
    fromEnum DeleteTypeParagraphEnds = 5
    fromEnum DeleteTypeParagraphs = 6
    fromEnum DeleteTypeWhitespace = 7
    fromEnum (AnotherDeleteType k) = k

    toEnum 0 = DeleteTypeChars
    toEnum 1 = DeleteTypeWordEnds
    toEnum 2 = DeleteTypeWords
    toEnum 3 = DeleteTypeDisplayLines
    toEnum 4 = DeleteTypeDisplayLineEnds
    toEnum 5 = DeleteTypeParagraphEnds
    toEnum 6 = DeleteTypeParagraphs
    toEnum 7 = DeleteTypeWhitespace
    toEnum k = AnotherDeleteType k

foreign import ccall "gtk_delete_type_get_type" c_gtk_delete_type_get_type :: 
    IO GType

instance BoxedEnum DeleteType where
    boxedEnumType _ = c_gtk_delete_type_get_type

-- Flags DestDefaults

data DestDefaults = 
      DestDefaultsMotion
    | DestDefaultsHighlight
    | DestDefaultsDrop
    | DestDefaultsAll
    | AnotherDestDefaults Int
    deriving (Show, Eq)

instance Enum DestDefaults where
    fromEnum DestDefaultsMotion = 1
    fromEnum DestDefaultsHighlight = 2
    fromEnum DestDefaultsDrop = 4
    fromEnum DestDefaultsAll = 7
    fromEnum (AnotherDestDefaults k) = k

    toEnum 1 = DestDefaultsMotion
    toEnum 2 = DestDefaultsHighlight
    toEnum 4 = DestDefaultsDrop
    toEnum 7 = DestDefaultsAll
    toEnum k = AnotherDestDefaults k

foreign import ccall "gtk_dest_defaults_get_type" c_gtk_dest_defaults_get_type :: 
    IO GType

instance BoxedEnum DestDefaults where
    boxedEnumType _ = c_gtk_dest_defaults_get_type

instance IsGFlag DestDefaults

-- object Dialog 
newtype Dialog = Dialog (ForeignPtr Dialog)
noDialog :: Maybe Dialog
noDialog = Nothing

foreign import ccall "gtk_dialog_get_type"
    c_gtk_dialog_get_type :: IO GType

type instance ParentTypes Dialog = '[Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Dialog where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_dialog_get_type
    

class GObject o => DialogK o
instance (GObject o, IsDescendantOf Dialog o) => DialogK o

toDialog :: DialogK o => o -> IO Dialog
toDialog = unsafeCastTo Dialog

-- method Dialog::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Dialog"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_new" gtk_dialog_new :: 
    IO (Ptr Dialog)


dialogNew ::
    (MonadIO m) =>
    m Dialog
dialogNew  = liftIO $ do
    result <- gtk_dialog_new
    checkUnexpectedReturnNULL "gtk_dialog_new" result
    result' <- (newObject Dialog) result
    return result'

-- method Dialog::add_action_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_add_action_widget" gtk_dialog_add_action_widget :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Int32 ->                                -- response_id : TBasicType TInt32
    IO ()


dialogAddActionWidget ::
    (MonadIO m, DialogK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Int32 ->                                -- response_id
    m ()
dialogAddActionWidget _obj child response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_dialog_add_action_widget _obj' child' response_id
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Dialog::add_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_add_button" gtk_dialog_add_button :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    CString ->                              -- button_text : TBasicType TUTF8
    Int32 ->                                -- response_id : TBasicType TInt32
    IO (Ptr Widget)


dialogAddButton ::
    (MonadIO m, DialogK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- button_text
    Int32 ->                                -- response_id
    m Widget
dialogAddButton _obj button_text response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    button_text' <- textToCString button_text
    result <- gtk_dialog_add_button _obj' button_text' response_id
    checkUnexpectedReturnNULL "gtk_dialog_add_button" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    freeMem button_text'
    return result'

-- method Dialog::get_action_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_get_action_area" gtk_dialog_get_action_area :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    IO (Ptr Widget)

{-# DEPRECATED dialogGetActionArea ["(Since version 3.12)","Direct access to the action area","  is discouraged; use gtk_dialog_add_button(), etc."]#-}
dialogGetActionArea ::
    (MonadIO m, DialogK a) =>
    a ->                                    -- _obj
    m Widget
dialogGetActionArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_dialog_get_action_area _obj'
    checkUnexpectedReturnNULL "gtk_dialog_get_action_area" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Dialog::get_content_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Box"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_get_content_area" gtk_dialog_get_content_area :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    IO (Ptr Box)


dialogGetContentArea ::
    (MonadIO m, DialogK a) =>
    a ->                                    -- _obj
    m Box
dialogGetContentArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_dialog_get_content_area _obj'
    checkUnexpectedReturnNULL "gtk_dialog_get_content_area" result
    result' <- (newObject Box) result
    touchManagedPtr _obj
    return result'

-- method Dialog::get_header_bar
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_get_header_bar" gtk_dialog_get_header_bar :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    IO (Ptr Widget)


dialogGetHeaderBar ::
    (MonadIO m, DialogK a) =>
    a ->                                    -- _obj
    m Widget
dialogGetHeaderBar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_dialog_get_header_bar _obj'
    checkUnexpectedReturnNULL "gtk_dialog_get_header_bar" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Dialog::get_response_for_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_get_response_for_widget" gtk_dialog_get_response_for_widget :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO Int32


dialogGetResponseForWidget ::
    (MonadIO m, DialogK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    m Int32
dialogGetResponseForWidget _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_dialog_get_response_for_widget _obj' widget'
    touchManagedPtr _obj
    touchManagedPtr widget
    return result

-- method Dialog::get_widget_for_response
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_get_widget_for_response" gtk_dialog_get_widget_for_response :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    Int32 ->                                -- response_id : TBasicType TInt32
    IO (Ptr Widget)


dialogGetWidgetForResponse ::
    (MonadIO m, DialogK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- response_id
    m Widget
dialogGetWidgetForResponse _obj response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_dialog_get_widget_for_response _obj' response_id
    checkUnexpectedReturnNULL "gtk_dialog_get_widget_for_response" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Dialog::response
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_response" gtk_dialog_response :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    Int32 ->                                -- response_id : TBasicType TInt32
    IO ()


dialogResponse ::
    (MonadIO m, DialogK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- response_id
    m ()
dialogResponse _obj response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_dialog_response _obj' response_id
    touchManagedPtr _obj
    return ()

-- method Dialog::run
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_run" gtk_dialog_run :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    IO Int32


dialogRun ::
    (MonadIO m, DialogK a) =>
    a ->                                    -- _obj
    m Int32
dialogRun _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_dialog_run _obj'
    touchManagedPtr _obj
    return result

-- method Dialog::set_alternative_button_order_from_array
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_params", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_order", argType = TCArray False (-1) 1 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_params", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_order", argType = TCArray False (-1) 1 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_set_alternative_button_order_from_array" gtk_dialog_set_alternative_button_order_from_array :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    Int32 ->                                -- n_params : TBasicType TInt32
    Ptr Int32 ->                            -- new_order : TCArray False (-1) 1 (TBasicType TInt32)
    IO ()

{-# DEPRECATED dialogSetAlternativeButtonOrderFromArray ["(Since version 3.10)","Deprecated"]#-}
dialogSetAlternativeButtonOrderFromArray ::
    (MonadIO m, DialogK a) =>
    a ->                                    -- _obj
    [Int32] ->                              -- new_order
    m ()
dialogSetAlternativeButtonOrderFromArray _obj new_order = liftIO $ do
    let n_params = fromIntegral $ length new_order
    let _obj' = unsafeManagedPtrCastPtr _obj
    new_order' <- packStorableArray new_order
    gtk_dialog_set_alternative_button_order_from_array _obj' n_params new_order'
    touchManagedPtr _obj
    freeMem new_order'
    return ()

-- method Dialog::set_default_response
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_set_default_response" gtk_dialog_set_default_response :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    Int32 ->                                -- response_id : TBasicType TInt32
    IO ()


dialogSetDefaultResponse ::
    (MonadIO m, DialogK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- response_id
    m ()
dialogSetDefaultResponse _obj response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_dialog_set_default_response _obj' response_id
    touchManagedPtr _obj
    return ()

-- method Dialog::set_response_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_dialog_set_response_sensitive" gtk_dialog_set_response_sensitive :: 
    Ptr Dialog ->                           -- _obj : TInterface "Gtk" "Dialog"
    Int32 ->                                -- response_id : TBasicType TInt32
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


dialogSetResponseSensitive ::
    (MonadIO m, DialogK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- response_id
    Bool ->                                 -- setting
    m ()
dialogSetResponseSensitive _obj response_id setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_dialog_set_response_sensitive _obj' response_id setting'
    touchManagedPtr _obj
    return ()

-- signal Dialog::close
type DialogCloseCallback =
    IO ()

noDialogCloseCallback :: Maybe DialogCloseCallback
noDialogCloseCallback = Nothing

type DialogCloseCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkDialogCloseCallback :: DialogCloseCallbackC -> IO (FunPtr DialogCloseCallbackC)

dialogCloseClosure :: DialogCloseCallback -> IO Closure
dialogCloseClosure cb = newCClosure =<< mkDialogCloseCallback wrapped
    where wrapped = dialogCloseCallbackWrapper cb

dialogCloseCallbackWrapper ::
    DialogCloseCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
dialogCloseCallbackWrapper _cb _ _ = do
    _cb 

onDialogClose :: (GObject a, MonadIO m) => a -> DialogCloseCallback -> m SignalHandlerId
onDialogClose obj cb = liftIO $ connectDialogClose obj cb SignalConnectBefore
afterDialogClose :: (GObject a, MonadIO m) => a -> DialogCloseCallback -> m SignalHandlerId
afterDialogClose obj cb = connectDialogClose obj cb SignalConnectAfter

connectDialogClose :: (GObject a, MonadIO m) =>
                      a -> DialogCloseCallback -> SignalConnectMode -> m SignalHandlerId
connectDialogClose obj cb after = liftIO $ do
    cb' <- mkDialogCloseCallback (dialogCloseCallbackWrapper cb)
    connectSignalFunPtr obj "close" cb' after

-- signal Dialog::response
type DialogResponseCallback =
    Int32 ->
    IO ()

noDialogResponseCallback :: Maybe DialogResponseCallback
noDialogResponseCallback = Nothing

type DialogResponseCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkDialogResponseCallback :: DialogResponseCallbackC -> IO (FunPtr DialogResponseCallbackC)

dialogResponseClosure :: DialogResponseCallback -> IO Closure
dialogResponseClosure cb = newCClosure =<< mkDialogResponseCallback wrapped
    where wrapped = dialogResponseCallbackWrapper cb

dialogResponseCallbackWrapper ::
    DialogResponseCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO ()
dialogResponseCallbackWrapper _cb _ response_id _ = do
    _cb  response_id

onDialogResponse :: (GObject a, MonadIO m) => a -> DialogResponseCallback -> m SignalHandlerId
onDialogResponse obj cb = liftIO $ connectDialogResponse obj cb SignalConnectBefore
afterDialogResponse :: (GObject a, MonadIO m) => a -> DialogResponseCallback -> m SignalHandlerId
afterDialogResponse obj cb = connectDialogResponse obj cb SignalConnectAfter

connectDialogResponse :: (GObject a, MonadIO m) =>
                         a -> DialogResponseCallback -> SignalConnectMode -> m SignalHandlerId
connectDialogResponse obj cb after = liftIO $ do
    cb' <- mkDialogResponseCallback (dialogResponseCallbackWrapper cb)
    connectSignalFunPtr obj "response" cb' after

-- Flags DialogFlags

data DialogFlags = 
      DialogFlagsModal
    | DialogFlagsDestroyWithParent
    | DialogFlagsUseHeaderBar
    | AnotherDialogFlags Int
    deriving (Show, Eq)

instance Enum DialogFlags where
    fromEnum DialogFlagsModal = 1
    fromEnum DialogFlagsDestroyWithParent = 2
    fromEnum DialogFlagsUseHeaderBar = 4
    fromEnum (AnotherDialogFlags k) = k

    toEnum 1 = DialogFlagsModal
    toEnum 2 = DialogFlagsDestroyWithParent
    toEnum 4 = DialogFlagsUseHeaderBar
    toEnum k = AnotherDialogFlags k

foreign import ccall "gtk_dialog_flags_get_type" c_gtk_dialog_flags_get_type :: 
    IO GType

instance BoxedEnum DialogFlags where
    boxedEnumType _ = c_gtk_dialog_flags_get_type

instance IsGFlag DialogFlags

-- Enum DirectionType

data DirectionType = 
      DirectionTypeTabForward
    | DirectionTypeTabBackward
    | DirectionTypeUp
    | DirectionTypeDown
    | DirectionTypeLeft
    | DirectionTypeRight
    | AnotherDirectionType Int
    deriving (Show, Eq)

instance Enum DirectionType where
    fromEnum DirectionTypeTabForward = 0
    fromEnum DirectionTypeTabBackward = 1
    fromEnum DirectionTypeUp = 2
    fromEnum DirectionTypeDown = 3
    fromEnum DirectionTypeLeft = 4
    fromEnum DirectionTypeRight = 5
    fromEnum (AnotherDirectionType k) = k

    toEnum 0 = DirectionTypeTabForward
    toEnum 1 = DirectionTypeTabBackward
    toEnum 2 = DirectionTypeUp
    toEnum 3 = DirectionTypeDown
    toEnum 4 = DirectionTypeLeft
    toEnum 5 = DirectionTypeRight
    toEnum k = AnotherDirectionType k

foreign import ccall "gtk_direction_type_get_type" c_gtk_direction_type_get_type :: 
    IO GType

instance BoxedEnum DirectionType where
    boxedEnumType _ = c_gtk_direction_type_get_type

-- Enum DragResult

data DragResult = 
      DragResultSuccess
    | DragResultNoTarget
    | DragResultUserCancelled
    | DragResultTimeoutExpired
    | DragResultGrabBroken
    | DragResultError
    | AnotherDragResult Int
    deriving (Show, Eq)

instance Enum DragResult where
    fromEnum DragResultSuccess = 0
    fromEnum DragResultNoTarget = 1
    fromEnum DragResultUserCancelled = 2
    fromEnum DragResultTimeoutExpired = 3
    fromEnum DragResultGrabBroken = 4
    fromEnum DragResultError = 5
    fromEnum (AnotherDragResult k) = k

    toEnum 0 = DragResultSuccess
    toEnum 1 = DragResultNoTarget
    toEnum 2 = DragResultUserCancelled
    toEnum 3 = DragResultTimeoutExpired
    toEnum 4 = DragResultGrabBroken
    toEnum 5 = DragResultError
    toEnum k = AnotherDragResult k

foreign import ccall "gtk_drag_result_get_type" c_gtk_drag_result_get_type :: 
    IO GType

instance BoxedEnum DragResult where
    boxedEnumType _ = c_gtk_drag_result_get_type

-- object DrawingArea 
newtype DrawingArea = DrawingArea (ForeignPtr DrawingArea)
noDrawingArea :: Maybe DrawingArea
noDrawingArea = Nothing

foreign import ccall "gtk_drawing_area_get_type"
    c_gtk_drawing_area_get_type :: IO GType

type instance ParentTypes DrawingArea = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject DrawingArea where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_drawing_area_get_type
    

class GObject o => DrawingAreaK o
instance (GObject o, IsDescendantOf DrawingArea o) => DrawingAreaK o

toDrawingArea :: DrawingAreaK o => o -> IO DrawingArea
toDrawingArea = unsafeCastTo DrawingArea

-- method DrawingArea::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "DrawingArea"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drawing_area_new" gtk_drawing_area_new :: 
    IO (Ptr DrawingArea)


drawingAreaNew ::
    (MonadIO m) =>
    m DrawingArea
drawingAreaNew  = liftIO $ do
    result <- gtk_drawing_area_new
    checkUnexpectedReturnNULL "gtk_drawing_area_new" result
    result' <- (newObject DrawingArea) result
    return result'

-- interface Editable 

newtype Editable = Editable (ForeignPtr Editable)
noEditable :: Maybe Editable
noEditable = Nothing

class ForeignPtrNewtype a => EditableK a
instance (ForeignPtrNewtype o, IsDescendantOf Editable o) => EditableK o
type instance ParentTypes Editable = '[]

-- method Editable::copy_clipboard
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_copy_clipboard" gtk_editable_copy_clipboard :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    IO ()


editableCopyClipboard ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    m ()
editableCopyClipboard _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_editable_copy_clipboard _obj'
    touchManagedPtr _obj
    return ()

-- method Editable::cut_clipboard
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_cut_clipboard" gtk_editable_cut_clipboard :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    IO ()


editableCutClipboard ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    m ()
editableCutClipboard _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_editable_cut_clipboard _obj'
    touchManagedPtr _obj
    return ()

-- method Editable::delete_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_delete_selection" gtk_editable_delete_selection :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    IO ()


editableDeleteSelection ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    m ()
editableDeleteSelection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_editable_delete_selection _obj'
    touchManagedPtr _obj
    return ()

-- method Editable::delete_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_delete_text" gtk_editable_delete_text :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    Int32 ->                                -- start_pos : TBasicType TInt32
    Int32 ->                                -- end_pos : TBasicType TInt32
    IO ()


editableDeleteText ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- start_pos
    Int32 ->                                -- end_pos
    m ()
editableDeleteText _obj start_pos end_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_editable_delete_text _obj' start_pos end_pos
    touchManagedPtr _obj
    return ()

-- method Editable::get_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_get_chars" gtk_editable_get_chars :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    Int32 ->                                -- start_pos : TBasicType TInt32
    Int32 ->                                -- end_pos : TBasicType TInt32
    IO CString


editableGetChars ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- start_pos
    Int32 ->                                -- end_pos
    m T.Text
editableGetChars _obj start_pos end_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_editable_get_chars _obj' start_pos end_pos
    checkUnexpectedReturnNULL "gtk_editable_get_chars" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Editable::get_editable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_get_editable" gtk_editable_get_editable :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    IO CInt


editableGetEditable ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    m Bool
editableGetEditable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_editable_get_editable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Editable::get_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_get_position" gtk_editable_get_position :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    IO Int32


editableGetPosition ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    m Int32
editableGetPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_editable_get_position _obj'
    touchManagedPtr _obj
    return result

-- method Editable::get_selection_bounds
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "end_pos", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_get_selection_bounds" gtk_editable_get_selection_bounds :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    Ptr Int32 ->                            -- start_pos : TBasicType TInt32
    Ptr Int32 ->                            -- end_pos : TBasicType TInt32
    IO CInt


editableGetSelectionBounds ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    m (Bool,Int32,Int32)
editableGetSelectionBounds _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    start_pos <- allocMem :: IO (Ptr Int32)
    end_pos <- allocMem :: IO (Ptr Int32)
    result <- gtk_editable_get_selection_bounds _obj' start_pos end_pos
    let result' = (/= 0) result
    start_pos' <- peek start_pos
    end_pos' <- peek end_pos
    touchManagedPtr _obj
    freeMem start_pos
    freeMem end_pos
    return (result', start_pos', end_pos')

-- method Editable::insert_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_text_length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_text_length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_insert_text" gtk_editable_insert_text :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    CString ->                              -- new_text : TBasicType TUTF8
    Int32 ->                                -- new_text_length : TBasicType TInt32
    Ptr Int32 ->                            -- position : TBasicType TInt32
    IO ()


editableInsertText ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- new_text
    Int32 ->                                -- new_text_length
    Int32 ->                                -- position
    m (Int32)
editableInsertText _obj new_text new_text_length position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    new_text' <- textToCString new_text
    position' <- allocMem :: IO (Ptr Int32)
    poke position' position
    gtk_editable_insert_text _obj' new_text' new_text_length position'
    position'' <- peek position'
    touchManagedPtr _obj
    freeMem new_text'
    freeMem position'
    return position''

-- method Editable::paste_clipboard
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_paste_clipboard" gtk_editable_paste_clipboard :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    IO ()


editablePasteClipboard ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    m ()
editablePasteClipboard _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_editable_paste_clipboard _obj'
    touchManagedPtr _obj
    return ()

-- method Editable::select_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_select_region" gtk_editable_select_region :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    Int32 ->                                -- start_pos : TBasicType TInt32
    Int32 ->                                -- end_pos : TBasicType TInt32
    IO ()


editableSelectRegion ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- start_pos
    Int32 ->                                -- end_pos
    m ()
editableSelectRegion _obj start_pos end_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_editable_select_region _obj' start_pos end_pos
    touchManagedPtr _obj
    return ()

-- method Editable::set_editable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_set_editable" gtk_editable_set_editable :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    CInt ->                                 -- is_editable : TBasicType TBoolean
    IO ()


editableSetEditable ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- is_editable
    m ()
editableSetEditable _obj is_editable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let is_editable' = (fromIntegral . fromEnum) is_editable
    gtk_editable_set_editable _obj' is_editable'
    touchManagedPtr _obj
    return ()

-- method Editable::set_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Editable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_editable_set_position" gtk_editable_set_position :: 
    Ptr Editable ->                         -- _obj : TInterface "Gtk" "Editable"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


editableSetPosition ::
    (MonadIO m, EditableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    m ()
editableSetPosition _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_editable_set_position _obj' position
    touchManagedPtr _obj
    return ()

-- signal Editable::changed
type EditableChangedCallback =
    IO ()

noEditableChangedCallback :: Maybe EditableChangedCallback
noEditableChangedCallback = Nothing

type EditableChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEditableChangedCallback :: EditableChangedCallbackC -> IO (FunPtr EditableChangedCallbackC)

editableChangedClosure :: EditableChangedCallback -> IO Closure
editableChangedClosure cb = newCClosure =<< mkEditableChangedCallback wrapped
    where wrapped = editableChangedCallbackWrapper cb

editableChangedCallbackWrapper ::
    EditableChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
editableChangedCallbackWrapper _cb _ _ = do
    _cb 

onEditableChanged :: (GObject a, MonadIO m) => a -> EditableChangedCallback -> m SignalHandlerId
onEditableChanged obj cb = liftIO $ connectEditableChanged obj cb SignalConnectBefore
afterEditableChanged :: (GObject a, MonadIO m) => a -> EditableChangedCallback -> m SignalHandlerId
afterEditableChanged obj cb = connectEditableChanged obj cb SignalConnectAfter

connectEditableChanged :: (GObject a, MonadIO m) =>
                          a -> EditableChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectEditableChanged obj cb after = liftIO $ do
    cb' <- mkEditableChangedCallback (editableChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- signal Editable::delete-text
type EditableDeleteTextCallback =
    Int32 ->
    Int32 ->
    IO ()

noEditableDeleteTextCallback :: Maybe EditableDeleteTextCallback
noEditableDeleteTextCallback = Nothing

type EditableDeleteTextCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEditableDeleteTextCallback :: EditableDeleteTextCallbackC -> IO (FunPtr EditableDeleteTextCallbackC)

editableDeleteTextClosure :: EditableDeleteTextCallback -> IO Closure
editableDeleteTextClosure cb = newCClosure =<< mkEditableDeleteTextCallback wrapped
    where wrapped = editableDeleteTextCallbackWrapper cb

editableDeleteTextCallbackWrapper ::
    EditableDeleteTextCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO ()
editableDeleteTextCallbackWrapper _cb _ start_pos end_pos _ = do
    _cb  start_pos end_pos

onEditableDeleteText :: (GObject a, MonadIO m) => a -> EditableDeleteTextCallback -> m SignalHandlerId
onEditableDeleteText obj cb = liftIO $ connectEditableDeleteText obj cb SignalConnectBefore
afterEditableDeleteText :: (GObject a, MonadIO m) => a -> EditableDeleteTextCallback -> m SignalHandlerId
afterEditableDeleteText obj cb = connectEditableDeleteText obj cb SignalConnectAfter

connectEditableDeleteText :: (GObject a, MonadIO m) =>
                             a -> EditableDeleteTextCallback -> SignalConnectMode -> m SignalHandlerId
connectEditableDeleteText obj cb after = liftIO $ do
    cb' <- mkEditableDeleteTextCallback (editableDeleteTextCallbackWrapper cb)
    connectSignalFunPtr obj "delete-text" cb' after

-- signal Editable::insert-text
type EditableInsertTextCallback =
    T.Text ->
    Int32 ->
    Int32 ->
    IO (Int32)

noEditableInsertTextCallback :: Maybe EditableInsertTextCallback
noEditableInsertTextCallback = Nothing

type EditableInsertTextCallbackC =
    Ptr () ->                               -- object
    CString ->
    Int32 ->
    Ptr Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEditableInsertTextCallback :: EditableInsertTextCallbackC -> IO (FunPtr EditableInsertTextCallbackC)

editableInsertTextClosure :: EditableInsertTextCallback -> IO Closure
editableInsertTextClosure cb = newCClosure =<< mkEditableInsertTextCallback wrapped
    where wrapped = editableInsertTextCallbackWrapper cb

editableInsertTextCallbackWrapper ::
    EditableInsertTextCallback ->
    Ptr () ->
    CString ->
    Int32 ->
    Ptr Int32 ->
    Ptr () ->
    IO ()
editableInsertTextCallbackWrapper _cb _ new_text new_text_length position _ = do
    new_text' <- cstringToText new_text
    position' <- peek position
    outposition <- _cb  new_text' new_text_length position'
    poke position outposition

onEditableInsertText :: (GObject a, MonadIO m) => a -> EditableInsertTextCallback -> m SignalHandlerId
onEditableInsertText obj cb = liftIO $ connectEditableInsertText obj cb SignalConnectBefore
afterEditableInsertText :: (GObject a, MonadIO m) => a -> EditableInsertTextCallback -> m SignalHandlerId
afterEditableInsertText obj cb = connectEditableInsertText obj cb SignalConnectAfter

connectEditableInsertText :: (GObject a, MonadIO m) =>
                             a -> EditableInsertTextCallback -> SignalConnectMode -> m SignalHandlerId
connectEditableInsertText obj cb after = liftIO $ do
    cb' <- mkEditableInsertTextCallback (editableInsertTextCallbackWrapper cb)
    connectSignalFunPtr obj "insert-text" cb' after

-- object Entry 
newtype Entry = Entry (ForeignPtr Entry)
noEntry :: Maybe Entry
noEntry = Nothing

foreign import ccall "gtk_entry_get_type"
    c_gtk_entry_get_type :: IO GType

type instance ParentTypes Entry = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable, CellEditable, Editable]

instance GObject Entry where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_entry_get_type
    

class GObject o => EntryK o
instance (GObject o, IsDescendantOf Entry o) => EntryK o

toEntry :: EntryK o => o -> IO Entry
toEntry = unsafeCastTo Entry

-- method Entry::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Entry"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_new" gtk_entry_new :: 
    IO (Ptr Entry)


entryNew ::
    (MonadIO m) =>
    m Entry
entryNew  = liftIO $ do
    result <- gtk_entry_new
    checkUnexpectedReturnNULL "gtk_entry_new" result
    result' <- (newObject Entry) result
    return result'

-- method Entry::new_with_buffer
-- method type : Constructor
-- Args : [Arg {argName = "buffer", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "buffer", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Entry"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_new_with_buffer" gtk_entry_new_with_buffer :: 
    Ptr EntryBuffer ->                      -- buffer : TInterface "Gtk" "EntryBuffer"
    IO (Ptr Entry)


entryNewWithBuffer ::
    (MonadIO m, EntryBufferK a) =>
    a ->                                    -- buffer
    m Entry
entryNewWithBuffer buffer = liftIO $ do
    let buffer' = unsafeManagedPtrCastPtr buffer
    result <- gtk_entry_new_with_buffer buffer'
    checkUnexpectedReturnNULL "gtk_entry_new_with_buffer" result
    result' <- (newObject Entry) result
    touchManagedPtr buffer
    return result'

-- method Entry::get_activates_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_activates_default" gtk_entry_get_activates_default :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CInt


entryGetActivatesDefault ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Bool
entryGetActivatesDefault _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_activates_default _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFloat
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_alignment" gtk_entry_get_alignment :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CFloat


entryGetAlignment ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Float
entryGetAlignment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_alignment _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Entry::get_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "AttrList"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_attributes" gtk_entry_get_attributes :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO (Ptr Pango.AttrList)


entryGetAttributes ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Pango.AttrList
entryGetAttributes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_attributes _obj'
    checkUnexpectedReturnNULL "gtk_entry_get_attributes" result
    result' <- (newBoxed Pango.AttrList) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "EntryBuffer"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_buffer" gtk_entry_get_buffer :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO (Ptr EntryBuffer)


entryGetBuffer ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m EntryBuffer
entryGetBuffer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_buffer _obj'
    checkUnexpectedReturnNULL "gtk_entry_get_buffer" result
    result' <- (newObject EntryBuffer) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_completion
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "EntryCompletion"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_completion" gtk_entry_get_completion :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO (Ptr EntryCompletion)


entryGetCompletion ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m EntryCompletion
entryGetCompletion _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_completion _obj'
    checkUnexpectedReturnNULL "gtk_entry_get_completion" result
    result' <- (newObject EntryCompletion) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_current_icon_drag_source
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_current_icon_drag_source" gtk_entry_get_current_icon_drag_source :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO Int32


entryGetCurrentIconDragSource ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Int32
entryGetCurrentIconDragSource _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_current_icon_drag_source _obj'
    touchManagedPtr _obj
    return result

-- method Entry::get_cursor_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_cursor_hadjustment" gtk_entry_get_cursor_hadjustment :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO (Ptr Adjustment)


entryGetCursorHadjustment ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Adjustment
entryGetCursorHadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_cursor_hadjustment _obj'
    checkUnexpectedReturnNULL "gtk_entry_get_cursor_hadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_has_frame
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_has_frame" gtk_entry_get_has_frame :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CInt


entryGetHasFrame ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Bool
entryGetHasFrame _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_has_frame _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_icon_activatable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_icon_activatable" gtk_entry_get_icon_activatable :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    IO CInt


entryGetIconActivatable ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    m Bool
entryGetIconActivatable _obj icon_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    result <- gtk_entry_get_icon_activatable _obj' icon_pos'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_icon_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_icon_area" gtk_entry_get_icon_area :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    Ptr Gdk.Rectangle ->                    -- icon_area : TInterface "Gdk" "Rectangle"
    IO ()


entryGetIconArea ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    m (Gdk.Rectangle)
entryGetIconArea _obj icon_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    icon_area <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_entry_get_icon_area _obj' icon_pos' icon_area
    icon_area' <- (wrapBoxed Gdk.Rectangle) icon_area
    touchManagedPtr _obj
    return icon_area'

-- method Entry::get_icon_at_pos
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_icon_at_pos" gtk_entry_get_icon_at_pos :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO Int32


entryGetIconAtPos ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m Int32
entryGetIconAtPos _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_icon_at_pos _obj' x y
    touchManagedPtr _obj
    return result

-- method Entry::get_icon_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_icon_gicon" gtk_entry_get_icon_gicon :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    IO (Ptr Gio.Icon)


entryGetIconGicon ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    m Gio.Icon
entryGetIconGicon _obj icon_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    result <- gtk_entry_get_icon_gicon _obj' icon_pos'
    checkUnexpectedReturnNULL "gtk_entry_get_icon_gicon" result
    result' <- (newObject Gio.Icon) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_icon_name" gtk_entry_get_icon_name :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    IO CString


entryGetIconName ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    m T.Text
entryGetIconName _obj icon_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    result <- gtk_entry_get_icon_name _obj' icon_pos'
    checkUnexpectedReturnNULL "gtk_entry_get_icon_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Entry::get_icon_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_icon_pixbuf" gtk_entry_get_icon_pixbuf :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    IO (Ptr GdkPixbuf.Pixbuf)


entryGetIconPixbuf ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    m GdkPixbuf.Pixbuf
entryGetIconPixbuf _obj icon_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    result <- gtk_entry_get_icon_pixbuf _obj' icon_pos'
    checkUnexpectedReturnNULL "gtk_entry_get_icon_pixbuf" result
    result' <- (newObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_icon_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_icon_sensitive" gtk_entry_get_icon_sensitive :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    IO CInt


entryGetIconSensitive ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    m Bool
entryGetIconSensitive _obj icon_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    result <- gtk_entry_get_icon_sensitive _obj' icon_pos'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_icon_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_icon_stock" gtk_entry_get_icon_stock :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    IO CString

{-# DEPRECATED entryGetIconStock ["(Since version 3.10)","Use gtk_entry_get_icon_name() instead."]#-}
entryGetIconStock ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    m T.Text
entryGetIconStock _obj icon_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    result <- gtk_entry_get_icon_stock _obj' icon_pos'
    checkUnexpectedReturnNULL "gtk_entry_get_icon_stock" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Entry::get_icon_storage_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ImageType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_icon_storage_type" gtk_entry_get_icon_storage_type :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    IO CUInt


entryGetIconStorageType ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    m ImageType
entryGetIconStorageType _obj icon_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    result <- gtk_entry_get_icon_storage_type _obj' icon_pos'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_icon_tooltip_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_icon_tooltip_markup" gtk_entry_get_icon_tooltip_markup :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    IO CString


entryGetIconTooltipMarkup ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    m T.Text
entryGetIconTooltipMarkup _obj icon_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    result <- gtk_entry_get_icon_tooltip_markup _obj' icon_pos'
    checkUnexpectedReturnNULL "gtk_entry_get_icon_tooltip_markup" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Entry::get_icon_tooltip_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_icon_tooltip_text" gtk_entry_get_icon_tooltip_text :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    IO CString


entryGetIconTooltipText ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    m T.Text
entryGetIconTooltipText _obj icon_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    result <- gtk_entry_get_icon_tooltip_text _obj' icon_pos'
    checkUnexpectedReturnNULL "gtk_entry_get_icon_tooltip_text" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Entry::get_inner_border
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Border"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_inner_border" gtk_entry_get_inner_border :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO (Ptr Border)

{-# DEPRECATED entryGetInnerBorder ["(Since version 3.4)","Use the standard border and padding CSS properties (through","  objects like #GtkStyleContext and #GtkCssProvider); the value returned by","  this function is ignored by #GtkEntry."]#-}
entryGetInnerBorder ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Border
entryGetInnerBorder _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_inner_border _obj'
    checkUnexpectedReturnNULL "gtk_entry_get_inner_border" result
    result' <- (newBoxed Border) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_input_hints
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "InputHints"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_input_hints" gtk_entry_get_input_hints :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CUInt


entryGetInputHints ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m [InputHints]
entryGetInputHints _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_input_hints _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method Entry::get_input_purpose
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "InputPurpose"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_input_purpose" gtk_entry_get_input_purpose :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CUInt


entryGetInputPurpose ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m InputPurpose
entryGetInputPurpose _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_input_purpose _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_invisible_char
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUniChar
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_invisible_char" gtk_entry_get_invisible_char :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CInt


entryGetInvisibleChar ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Char
entryGetInvisibleChar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_invisible_char _obj'
    let result' = (chr . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Layout"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_layout" gtk_entry_get_layout :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO (Ptr Pango.Layout)


entryGetLayout ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Pango.Layout
entryGetLayout _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_layout _obj'
    checkUnexpectedReturnNULL "gtk_entry_get_layout" result
    result' <- (newObject Pango.Layout) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_layout_offsets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_layout_offsets" gtk_entry_get_layout_offsets :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO ()


entryGetLayoutOffsets ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
entryGetLayoutOffsets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    x <- allocMem :: IO (Ptr Int32)
    y <- allocMem :: IO (Ptr Int32)
    gtk_entry_get_layout_offsets _obj' x y
    x' <- peek x
    y' <- peek y
    touchManagedPtr _obj
    freeMem x
    freeMem y
    return (x', y')

-- method Entry::get_max_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_max_length" gtk_entry_get_max_length :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO Int32


entryGetMaxLength ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Int32
entryGetMaxLength _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_max_length _obj'
    touchManagedPtr _obj
    return result

-- method Entry::get_max_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_max_width_chars" gtk_entry_get_max_width_chars :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO Int32


entryGetMaxWidthChars ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Int32
entryGetMaxWidthChars _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_max_width_chars _obj'
    touchManagedPtr _obj
    return result

-- method Entry::get_overwrite_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_overwrite_mode" gtk_entry_get_overwrite_mode :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CInt


entryGetOverwriteMode ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Bool
entryGetOverwriteMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_overwrite_mode _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_placeholder_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_placeholder_text" gtk_entry_get_placeholder_text :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CString


entryGetPlaceholderText ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m T.Text
entryGetPlaceholderText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_placeholder_text _obj'
    checkUnexpectedReturnNULL "gtk_entry_get_placeholder_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Entry::get_progress_fraction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_progress_fraction" gtk_entry_get_progress_fraction :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CDouble


entryGetProgressFraction ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Double
entryGetProgressFraction _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_progress_fraction _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Entry::get_progress_pulse_step
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_progress_pulse_step" gtk_entry_get_progress_pulse_step :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CDouble


entryGetProgressPulseStep ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Double
entryGetProgressPulseStep _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_progress_pulse_step _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Entry::get_tabs
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "TabArray"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_tabs" gtk_entry_get_tabs :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO (Ptr Pango.TabArray)


entryGetTabs ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Pango.TabArray
entryGetTabs _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_tabs _obj'
    checkUnexpectedReturnNULL "gtk_entry_get_tabs" result
    result' <- (newBoxed Pango.TabArray) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_text" gtk_entry_get_text :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CString


entryGetText ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m T.Text
entryGetText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_text _obj'
    checkUnexpectedReturnNULL "gtk_entry_get_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Entry::get_text_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_text_area" gtk_entry_get_text_area :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Ptr Gdk.Rectangle ->                    -- text_area : TInterface "Gdk" "Rectangle"
    IO ()


entryGetTextArea ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m (Gdk.Rectangle)
entryGetTextArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text_area <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_entry_get_text_area _obj' text_area
    text_area' <- (wrapBoxed Gdk.Rectangle) text_area
    touchManagedPtr _obj
    return text_area'

-- method Entry::get_text_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt16
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_text_length" gtk_entry_get_text_length :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO Word16


entryGetTextLength ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Word16
entryGetTextLength _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_text_length _obj'
    touchManagedPtr _obj
    return result

-- method Entry::get_visibility
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_visibility" gtk_entry_get_visibility :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO CInt


entryGetVisibility ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Bool
entryGetVisibility _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_visibility _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Entry::get_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_get_width_chars" gtk_entry_get_width_chars :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO Int32


entryGetWidthChars ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m Int32
entryGetWidthChars _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_get_width_chars _obj'
    touchManagedPtr _obj
    return result

-- method Entry::grab_focus_without_selecting
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_grab_focus_without_selecting" gtk_entry_grab_focus_without_selecting :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO ()


entryGrabFocusWithoutSelecting ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m ()
entryGrabFocusWithoutSelecting _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_grab_focus_without_selecting _obj'
    touchManagedPtr _obj
    return ()

-- method Entry::im_context_filter_keypress
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_im_context_filter_keypress" gtk_entry_im_context_filter_keypress :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Ptr Gdk.EventKey ->                     -- event : TInterface "Gdk" "EventKey"
    IO CInt


entryImContextFilterKeypress ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Gdk.EventKey ->                         -- event
    m Bool
entryImContextFilterKeypress _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_entry_im_context_filter_keypress _obj' event'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event
    return result'

-- method Entry::layout_index_to_text_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_layout_index_to_text_index" gtk_entry_layout_index_to_text_index :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Int32 ->                                -- layout_index : TBasicType TInt32
    IO Int32


entryLayoutIndexToTextIndex ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- layout_index
    m Int32
entryLayoutIndexToTextIndex _obj layout_index = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_layout_index_to_text_index _obj' layout_index
    touchManagedPtr _obj
    return result

-- method Entry::progress_pulse
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_progress_pulse" gtk_entry_progress_pulse :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO ()


entryProgressPulse ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m ()
entryProgressPulse _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_progress_pulse _obj'
    touchManagedPtr _obj
    return ()

-- method Entry::reset_im_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_reset_im_context" gtk_entry_reset_im_context :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO ()


entryResetImContext ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m ()
entryResetImContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_reset_im_context _obj'
    touchManagedPtr _obj
    return ()

-- method Entry::set_activates_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_activates_default" gtk_entry_set_activates_default :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


entrySetActivatesDefault ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
entrySetActivatesDefault _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_entry_set_activates_default _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Entry::set_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_alignment" gtk_entry_set_alignment :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CFloat ->                               -- xalign : TBasicType TFloat
    IO ()


entrySetAlignment ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Float ->                                -- xalign
    m ()
entrySetAlignment _obj xalign = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let xalign' = realToFrac xalign
    gtk_entry_set_alignment _obj' xalign'
    touchManagedPtr _obj
    return ()

-- method Entry::set_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attrs", argType = TInterface "Pango" "AttrList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attrs", argType = TInterface "Pango" "AttrList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_attributes" gtk_entry_set_attributes :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Ptr Pango.AttrList ->                   -- attrs : TInterface "Pango" "AttrList"
    IO ()


entrySetAttributes ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Pango.AttrList ->                       -- attrs
    m ()
entrySetAttributes _obj attrs = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let attrs' = unsafeManagedPtrGetPtr attrs
    gtk_entry_set_attributes _obj' attrs'
    touchManagedPtr _obj
    touchManagedPtr attrs
    return ()

-- method Entry::set_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_buffer" gtk_entry_set_buffer :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Ptr EntryBuffer ->                      -- buffer : TInterface "Gtk" "EntryBuffer"
    IO ()


entrySetBuffer ::
    (MonadIO m, EntryK a, EntryBufferK b) =>
    a ->                                    -- _obj
    b ->                                    -- buffer
    m ()
entrySetBuffer _obj buffer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let buffer' = unsafeManagedPtrCastPtr buffer
    gtk_entry_set_buffer _obj' buffer'
    touchManagedPtr _obj
    touchManagedPtr buffer
    return ()

-- method Entry::set_completion
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "completion", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "completion", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_completion" gtk_entry_set_completion :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Ptr EntryCompletion ->                  -- completion : TInterface "Gtk" "EntryCompletion"
    IO ()


entrySetCompletion ::
    (MonadIO m, EntryK a, EntryCompletionK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- completion
    m ()
entrySetCompletion _obj completion = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCompletion <- case completion of
        Nothing -> return nullPtr
        Just jCompletion -> do
            let jCompletion' = unsafeManagedPtrCastPtr jCompletion
            return jCompletion'
    gtk_entry_set_completion _obj' maybeCompletion
    touchManagedPtr _obj
    whenJust completion touchManagedPtr
    return ()

-- method Entry::set_cursor_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_cursor_hadjustment" gtk_entry_set_cursor_hadjustment :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()


entrySetCursorHadjustment ::
    (MonadIO m, EntryK a, AdjustmentK b) =>
    a ->                                    -- _obj
    b ->                                    -- adjustment
    m ()
entrySetCursorHadjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let adjustment' = unsafeManagedPtrCastPtr adjustment
    gtk_entry_set_cursor_hadjustment _obj' adjustment'
    touchManagedPtr _obj
    touchManagedPtr adjustment
    return ()

-- method Entry::set_has_frame
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_has_frame" gtk_entry_set_has_frame :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


entrySetHasFrame ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
entrySetHasFrame _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_entry_set_has_frame _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Entry::set_icon_activatable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "activatable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "activatable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_icon_activatable" gtk_entry_set_icon_activatable :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    CInt ->                                 -- activatable : TBasicType TBoolean
    IO ()


entrySetIconActivatable ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    Bool ->                                 -- activatable
    m ()
entrySetIconActivatable _obj icon_pos activatable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    let activatable' = (fromIntegral . fromEnum) activatable
    gtk_entry_set_icon_activatable _obj' icon_pos' activatable'
    touchManagedPtr _obj
    return ()

-- method Entry::set_icon_drag_source
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_list", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_list", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_icon_drag_source" gtk_entry_set_icon_drag_source :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    Ptr TargetList ->                       -- target_list : TInterface "Gtk" "TargetList"
    CUInt ->                                -- actions : TInterface "Gdk" "DragAction"
    IO ()


entrySetIconDragSource ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    TargetList ->                           -- target_list
    [Gdk.DragAction] ->                     -- actions
    m ()
entrySetIconDragSource _obj icon_pos target_list actions = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    let target_list' = unsafeManagedPtrGetPtr target_list
    let actions' = gflagsToWord actions
    gtk_entry_set_icon_drag_source _obj' icon_pos' target_list' actions'
    touchManagedPtr _obj
    touchManagedPtr target_list
    return ()

-- method Entry::set_icon_from_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_icon_from_gicon" gtk_entry_set_icon_from_gicon :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    IO ()


entrySetIconFromGicon ::
    (MonadIO m, EntryK a, Gio.IconK b) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    Maybe (b) ->                            -- icon
    m ()
entrySetIconFromGicon _obj icon_pos icon = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    maybeIcon <- case icon of
        Nothing -> return nullPtr
        Just jIcon -> do
            let jIcon' = unsafeManagedPtrCastPtr jIcon
            return jIcon'
    gtk_entry_set_icon_from_gicon _obj' icon_pos' maybeIcon
    touchManagedPtr _obj
    whenJust icon touchManagedPtr
    return ()

-- method Entry::set_icon_from_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_icon_from_icon_name" gtk_entry_set_icon_from_icon_name :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()


entrySetIconFromIconName ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    Maybe (T.Text) ->                       -- icon_name
    m ()
entrySetIconFromIconName _obj icon_pos icon_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    maybeIcon_name <- case icon_name of
        Nothing -> return nullPtr
        Just jIcon_name -> do
            jIcon_name' <- textToCString jIcon_name
            return jIcon_name'
    gtk_entry_set_icon_from_icon_name _obj' icon_pos' maybeIcon_name
    touchManagedPtr _obj
    freeMem maybeIcon_name
    return ()

-- method Entry::set_icon_from_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_icon_from_pixbuf" gtk_entry_set_icon_from_pixbuf :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO ()


entrySetIconFromPixbuf ::
    (MonadIO m, EntryK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    Maybe (b) ->                            -- pixbuf
    m ()
entrySetIconFromPixbuf _obj icon_pos pixbuf = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    maybePixbuf <- case pixbuf of
        Nothing -> return nullPtr
        Just jPixbuf -> do
            let jPixbuf' = unsafeManagedPtrCastPtr jPixbuf
            return jPixbuf'
    gtk_entry_set_icon_from_pixbuf _obj' icon_pos' maybePixbuf
    touchManagedPtr _obj
    whenJust pixbuf touchManagedPtr
    return ()

-- method Entry::set_icon_from_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_icon_from_stock" gtk_entry_set_icon_from_stock :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    CString ->                              -- stock_id : TBasicType TUTF8
    IO ()

{-# DEPRECATED entrySetIconFromStock ["(Since version 3.10)","Use gtk_entry_set_icon_from_icon_name() instead."]#-}
entrySetIconFromStock ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    Maybe (T.Text) ->                       -- stock_id
    m ()
entrySetIconFromStock _obj icon_pos stock_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    maybeStock_id <- case stock_id of
        Nothing -> return nullPtr
        Just jStock_id -> do
            jStock_id' <- textToCString jStock_id
            return jStock_id'
    gtk_entry_set_icon_from_stock _obj' icon_pos' maybeStock_id
    touchManagedPtr _obj
    freeMem maybeStock_id
    return ()

-- method Entry::set_icon_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_icon_sensitive" gtk_entry_set_icon_sensitive :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    CInt ->                                 -- sensitive : TBasicType TBoolean
    IO ()


entrySetIconSensitive ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    Bool ->                                 -- sensitive
    m ()
entrySetIconSensitive _obj icon_pos sensitive = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    let sensitive' = (fromIntegral . fromEnum) sensitive
    gtk_entry_set_icon_sensitive _obj' icon_pos' sensitive'
    touchManagedPtr _obj
    return ()

-- method Entry::set_icon_tooltip_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_icon_tooltip_markup" gtk_entry_set_icon_tooltip_markup :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    CString ->                              -- tooltip : TBasicType TUTF8
    IO ()


entrySetIconTooltipMarkup ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    Maybe (T.Text) ->                       -- tooltip
    m ()
entrySetIconTooltipMarkup _obj icon_pos tooltip = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    maybeTooltip <- case tooltip of
        Nothing -> return nullPtr
        Just jTooltip -> do
            jTooltip' <- textToCString jTooltip
            return jTooltip'
    gtk_entry_set_icon_tooltip_markup _obj' icon_pos' maybeTooltip
    touchManagedPtr _obj
    freeMem maybeTooltip
    return ()

-- method Entry::set_icon_tooltip_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_pos", argType = TInterface "Gtk" "EntryIconPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_icon_tooltip_text" gtk_entry_set_icon_tooltip_text :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- icon_pos : TInterface "Gtk" "EntryIconPosition"
    CString ->                              -- tooltip : TBasicType TUTF8
    IO ()


entrySetIconTooltipText ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    EntryIconPosition ->                    -- icon_pos
    Maybe (T.Text) ->                       -- tooltip
    m ()
entrySetIconTooltipText _obj icon_pos tooltip = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_pos' = (fromIntegral . fromEnum) icon_pos
    maybeTooltip <- case tooltip of
        Nothing -> return nullPtr
        Just jTooltip -> do
            jTooltip' <- textToCString jTooltip
            return jTooltip'
    gtk_entry_set_icon_tooltip_text _obj' icon_pos' maybeTooltip
    touchManagedPtr _obj
    freeMem maybeTooltip
    return ()

-- method Entry::set_inner_border
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border", argType = TInterface "Gtk" "Border", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border", argType = TInterface "Gtk" "Border", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_inner_border" gtk_entry_set_inner_border :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Ptr Border ->                           -- border : TInterface "Gtk" "Border"
    IO ()

{-# DEPRECATED entrySetInnerBorder ["(Since version 3.4)","Use the standard border and padding CSS properties (through","  objects like #GtkStyleContext and #GtkCssProvider); the value set with","  this function is ignored by #GtkEntry."]#-}
entrySetInnerBorder ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Maybe (Border) ->                       -- border
    m ()
entrySetInnerBorder _obj border = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeBorder <- case border of
        Nothing -> return nullPtr
        Just jBorder -> do
            let jBorder' = unsafeManagedPtrGetPtr jBorder
            return jBorder'
    gtk_entry_set_inner_border _obj' maybeBorder
    touchManagedPtr _obj
    whenJust border touchManagedPtr
    return ()

-- method Entry::set_input_hints
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hints", argType = TInterface "Gtk" "InputHints", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hints", argType = TInterface "Gtk" "InputHints", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_input_hints" gtk_entry_set_input_hints :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- hints : TInterface "Gtk" "InputHints"
    IO ()


entrySetInputHints ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    [InputHints] ->                         -- hints
    m ()
entrySetInputHints _obj hints = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let hints' = gflagsToWord hints
    gtk_entry_set_input_hints _obj' hints'
    touchManagedPtr _obj
    return ()

-- method Entry::set_input_purpose
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "purpose", argType = TInterface "Gtk" "InputPurpose", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "purpose", argType = TInterface "Gtk" "InputPurpose", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_input_purpose" gtk_entry_set_input_purpose :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CUInt ->                                -- purpose : TInterface "Gtk" "InputPurpose"
    IO ()


entrySetInputPurpose ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    InputPurpose ->                         -- purpose
    m ()
entrySetInputPurpose _obj purpose = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let purpose' = (fromIntegral . fromEnum) purpose
    gtk_entry_set_input_purpose _obj' purpose'
    touchManagedPtr _obj
    return ()

-- method Entry::set_invisible_char
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_invisible_char" gtk_entry_set_invisible_char :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CInt ->                                 -- ch : TBasicType TUniChar
    IO ()


entrySetInvisibleChar ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Char ->                                 -- ch
    m ()
entrySetInvisibleChar _obj ch = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let ch' = (fromIntegral . ord) ch
    gtk_entry_set_invisible_char _obj' ch'
    touchManagedPtr _obj
    return ()

-- method Entry::set_max_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_max_length" gtk_entry_set_max_length :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Int32 ->                                -- max : TBasicType TInt32
    IO ()


entrySetMaxLength ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- max
    m ()
entrySetMaxLength _obj max = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_set_max_length _obj' max
    touchManagedPtr _obj
    return ()

-- method Entry::set_max_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_max_width_chars" gtk_entry_set_max_width_chars :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Int32 ->                                -- n_chars : TBasicType TInt32
    IO ()


entrySetMaxWidthChars ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- n_chars
    m ()
entrySetMaxWidthChars _obj n_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_set_max_width_chars _obj' n_chars
    touchManagedPtr _obj
    return ()

-- method Entry::set_overwrite_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "overwrite", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "overwrite", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_overwrite_mode" gtk_entry_set_overwrite_mode :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CInt ->                                 -- overwrite : TBasicType TBoolean
    IO ()


entrySetOverwriteMode ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- overwrite
    m ()
entrySetOverwriteMode _obj overwrite = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let overwrite' = (fromIntegral . fromEnum) overwrite
    gtk_entry_set_overwrite_mode _obj' overwrite'
    touchManagedPtr _obj
    return ()

-- method Entry::set_placeholder_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_placeholder_text" gtk_entry_set_placeholder_text :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


entrySetPlaceholderText ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    m ()
entrySetPlaceholderText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_entry_set_placeholder_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method Entry::set_progress_fraction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fraction", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fraction", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_progress_fraction" gtk_entry_set_progress_fraction :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CDouble ->                              -- fraction : TBasicType TDouble
    IO ()


entrySetProgressFraction ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Double ->                               -- fraction
    m ()
entrySetProgressFraction _obj fraction = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let fraction' = realToFrac fraction
    gtk_entry_set_progress_fraction _obj' fraction'
    touchManagedPtr _obj
    return ()

-- method Entry::set_progress_pulse_step
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fraction", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fraction", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_progress_pulse_step" gtk_entry_set_progress_pulse_step :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CDouble ->                              -- fraction : TBasicType TDouble
    IO ()


entrySetProgressPulseStep ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Double ->                               -- fraction
    m ()
entrySetProgressPulseStep _obj fraction = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let fraction' = realToFrac fraction
    gtk_entry_set_progress_pulse_step _obj' fraction'
    touchManagedPtr _obj
    return ()

-- method Entry::set_tabs
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tabs", argType = TInterface "Pango" "TabArray", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tabs", argType = TInterface "Pango" "TabArray", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_tabs" gtk_entry_set_tabs :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Ptr Pango.TabArray ->                   -- tabs : TInterface "Pango" "TabArray"
    IO ()


entrySetTabs ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Pango.TabArray ->                       -- tabs
    m ()
entrySetTabs _obj tabs = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tabs' = unsafeManagedPtrGetPtr tabs
    gtk_entry_set_tabs _obj' tabs'
    touchManagedPtr _obj
    touchManagedPtr tabs
    return ()

-- method Entry::set_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_text" gtk_entry_set_text :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


entrySetText ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    m ()
entrySetText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_entry_set_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method Entry::set_visibility
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_visibility" gtk_entry_set_visibility :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    CInt ->                                 -- visible : TBasicType TBoolean
    IO ()


entrySetVisibility ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible
    m ()
entrySetVisibility _obj visible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible' = (fromIntegral . fromEnum) visible
    gtk_entry_set_visibility _obj' visible'
    touchManagedPtr _obj
    return ()

-- method Entry::set_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_set_width_chars" gtk_entry_set_width_chars :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Int32 ->                                -- n_chars : TBasicType TInt32
    IO ()


entrySetWidthChars ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- n_chars
    m ()
entrySetWidthChars _obj n_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_set_width_chars _obj' n_chars
    touchManagedPtr _obj
    return ()

-- method Entry::text_index_to_layout_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_text_index_to_layout_index" gtk_entry_text_index_to_layout_index :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    Int32 ->                                -- text_index : TBasicType TInt32
    IO Int32


entryTextIndexToLayoutIndex ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- text_index
    m Int32
entryTextIndexToLayoutIndex _obj text_index = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_text_index_to_layout_index _obj' text_index
    touchManagedPtr _obj
    return result

-- method Entry::unset_invisible_char
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_unset_invisible_char" gtk_entry_unset_invisible_char :: 
    Ptr Entry ->                            -- _obj : TInterface "Gtk" "Entry"
    IO ()


entryUnsetInvisibleChar ::
    (MonadIO m, EntryK a) =>
    a ->                                    -- _obj
    m ()
entryUnsetInvisibleChar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_unset_invisible_char _obj'
    touchManagedPtr _obj
    return ()

-- signal Entry::activate
type EntryActivateCallback =
    IO ()

noEntryActivateCallback :: Maybe EntryActivateCallback
noEntryActivateCallback = Nothing

type EntryActivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryActivateCallback :: EntryActivateCallbackC -> IO (FunPtr EntryActivateCallbackC)

entryActivateClosure :: EntryActivateCallback -> IO Closure
entryActivateClosure cb = newCClosure =<< mkEntryActivateCallback wrapped
    where wrapped = entryActivateCallbackWrapper cb

entryActivateCallbackWrapper ::
    EntryActivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
entryActivateCallbackWrapper _cb _ _ = do
    _cb 

onEntryActivate :: (GObject a, MonadIO m) => a -> EntryActivateCallback -> m SignalHandlerId
onEntryActivate obj cb = liftIO $ connectEntryActivate obj cb SignalConnectBefore
afterEntryActivate :: (GObject a, MonadIO m) => a -> EntryActivateCallback -> m SignalHandlerId
afterEntryActivate obj cb = connectEntryActivate obj cb SignalConnectAfter

connectEntryActivate :: (GObject a, MonadIO m) =>
                        a -> EntryActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryActivate obj cb after = liftIO $ do
    cb' <- mkEntryActivateCallback (entryActivateCallbackWrapper cb)
    connectSignalFunPtr obj "activate" cb' after

-- signal Entry::backspace
type EntryBackspaceCallback =
    IO ()

noEntryBackspaceCallback :: Maybe EntryBackspaceCallback
noEntryBackspaceCallback = Nothing

type EntryBackspaceCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryBackspaceCallback :: EntryBackspaceCallbackC -> IO (FunPtr EntryBackspaceCallbackC)

entryBackspaceClosure :: EntryBackspaceCallback -> IO Closure
entryBackspaceClosure cb = newCClosure =<< mkEntryBackspaceCallback wrapped
    where wrapped = entryBackspaceCallbackWrapper cb

entryBackspaceCallbackWrapper ::
    EntryBackspaceCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
entryBackspaceCallbackWrapper _cb _ _ = do
    _cb 

onEntryBackspace :: (GObject a, MonadIO m) => a -> EntryBackspaceCallback -> m SignalHandlerId
onEntryBackspace obj cb = liftIO $ connectEntryBackspace obj cb SignalConnectBefore
afterEntryBackspace :: (GObject a, MonadIO m) => a -> EntryBackspaceCallback -> m SignalHandlerId
afterEntryBackspace obj cb = connectEntryBackspace obj cb SignalConnectAfter

connectEntryBackspace :: (GObject a, MonadIO m) =>
                         a -> EntryBackspaceCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryBackspace obj cb after = liftIO $ do
    cb' <- mkEntryBackspaceCallback (entryBackspaceCallbackWrapper cb)
    connectSignalFunPtr obj "backspace" cb' after

-- signal Entry::copy-clipboard
type EntryCopyClipboardCallback =
    IO ()

noEntryCopyClipboardCallback :: Maybe EntryCopyClipboardCallback
noEntryCopyClipboardCallback = Nothing

type EntryCopyClipboardCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryCopyClipboardCallback :: EntryCopyClipboardCallbackC -> IO (FunPtr EntryCopyClipboardCallbackC)

entryCopyClipboardClosure :: EntryCopyClipboardCallback -> IO Closure
entryCopyClipboardClosure cb = newCClosure =<< mkEntryCopyClipboardCallback wrapped
    where wrapped = entryCopyClipboardCallbackWrapper cb

entryCopyClipboardCallbackWrapper ::
    EntryCopyClipboardCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
entryCopyClipboardCallbackWrapper _cb _ _ = do
    _cb 

onEntryCopyClipboard :: (GObject a, MonadIO m) => a -> EntryCopyClipboardCallback -> m SignalHandlerId
onEntryCopyClipboard obj cb = liftIO $ connectEntryCopyClipboard obj cb SignalConnectBefore
afterEntryCopyClipboard :: (GObject a, MonadIO m) => a -> EntryCopyClipboardCallback -> m SignalHandlerId
afterEntryCopyClipboard obj cb = connectEntryCopyClipboard obj cb SignalConnectAfter

connectEntryCopyClipboard :: (GObject a, MonadIO m) =>
                             a -> EntryCopyClipboardCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryCopyClipboard obj cb after = liftIO $ do
    cb' <- mkEntryCopyClipboardCallback (entryCopyClipboardCallbackWrapper cb)
    connectSignalFunPtr obj "copy-clipboard" cb' after

-- signal Entry::cut-clipboard
type EntryCutClipboardCallback =
    IO ()

noEntryCutClipboardCallback :: Maybe EntryCutClipboardCallback
noEntryCutClipboardCallback = Nothing

type EntryCutClipboardCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryCutClipboardCallback :: EntryCutClipboardCallbackC -> IO (FunPtr EntryCutClipboardCallbackC)

entryCutClipboardClosure :: EntryCutClipboardCallback -> IO Closure
entryCutClipboardClosure cb = newCClosure =<< mkEntryCutClipboardCallback wrapped
    where wrapped = entryCutClipboardCallbackWrapper cb

entryCutClipboardCallbackWrapper ::
    EntryCutClipboardCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
entryCutClipboardCallbackWrapper _cb _ _ = do
    _cb 

onEntryCutClipboard :: (GObject a, MonadIO m) => a -> EntryCutClipboardCallback -> m SignalHandlerId
onEntryCutClipboard obj cb = liftIO $ connectEntryCutClipboard obj cb SignalConnectBefore
afterEntryCutClipboard :: (GObject a, MonadIO m) => a -> EntryCutClipboardCallback -> m SignalHandlerId
afterEntryCutClipboard obj cb = connectEntryCutClipboard obj cb SignalConnectAfter

connectEntryCutClipboard :: (GObject a, MonadIO m) =>
                            a -> EntryCutClipboardCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryCutClipboard obj cb after = liftIO $ do
    cb' <- mkEntryCutClipboardCallback (entryCutClipboardCallbackWrapper cb)
    connectSignalFunPtr obj "cut-clipboard" cb' after

-- signal Entry::delete-from-cursor
type EntryDeleteFromCursorCallback =
    DeleteType ->
    Int32 ->
    IO ()

noEntryDeleteFromCursorCallback :: Maybe EntryDeleteFromCursorCallback
noEntryDeleteFromCursorCallback = Nothing

type EntryDeleteFromCursorCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryDeleteFromCursorCallback :: EntryDeleteFromCursorCallbackC -> IO (FunPtr EntryDeleteFromCursorCallbackC)

entryDeleteFromCursorClosure :: EntryDeleteFromCursorCallback -> IO Closure
entryDeleteFromCursorClosure cb = newCClosure =<< mkEntryDeleteFromCursorCallback wrapped
    where wrapped = entryDeleteFromCursorCallbackWrapper cb

entryDeleteFromCursorCallbackWrapper ::
    EntryDeleteFromCursorCallback ->
    Ptr () ->
    CUInt ->
    Int32 ->
    Ptr () ->
    IO ()
entryDeleteFromCursorCallbackWrapper _cb _ type_ count _ = do
    let type_' = (toEnum . fromIntegral) type_
    _cb  type_' count

onEntryDeleteFromCursor :: (GObject a, MonadIO m) => a -> EntryDeleteFromCursorCallback -> m SignalHandlerId
onEntryDeleteFromCursor obj cb = liftIO $ connectEntryDeleteFromCursor obj cb SignalConnectBefore
afterEntryDeleteFromCursor :: (GObject a, MonadIO m) => a -> EntryDeleteFromCursorCallback -> m SignalHandlerId
afterEntryDeleteFromCursor obj cb = connectEntryDeleteFromCursor obj cb SignalConnectAfter

connectEntryDeleteFromCursor :: (GObject a, MonadIO m) =>
                                a -> EntryDeleteFromCursorCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryDeleteFromCursor obj cb after = liftIO $ do
    cb' <- mkEntryDeleteFromCursorCallback (entryDeleteFromCursorCallbackWrapper cb)
    connectSignalFunPtr obj "delete-from-cursor" cb' after

-- signal Entry::icon-press
type EntryIconPressCallback =
    EntryIconPosition ->
    Gdk.EventButton ->
    IO ()

noEntryIconPressCallback :: Maybe EntryIconPressCallback
noEntryIconPressCallback = Nothing

type EntryIconPressCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr Gdk.EventButton ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryIconPressCallback :: EntryIconPressCallbackC -> IO (FunPtr EntryIconPressCallbackC)

entryIconPressClosure :: EntryIconPressCallback -> IO Closure
entryIconPressClosure cb = newCClosure =<< mkEntryIconPressCallback wrapped
    where wrapped = entryIconPressCallbackWrapper cb

entryIconPressCallbackWrapper ::
    EntryIconPressCallback ->
    Ptr () ->
    CUInt ->
    Ptr Gdk.EventButton ->
    Ptr () ->
    IO ()
entryIconPressCallbackWrapper _cb _ icon_pos event _ = do
    let icon_pos' = (toEnum . fromIntegral) icon_pos
    event' <- (newPtr 80 Gdk.EventButton) event
    _cb  icon_pos' event'

onEntryIconPress :: (GObject a, MonadIO m) => a -> EntryIconPressCallback -> m SignalHandlerId
onEntryIconPress obj cb = liftIO $ connectEntryIconPress obj cb SignalConnectBefore
afterEntryIconPress :: (GObject a, MonadIO m) => a -> EntryIconPressCallback -> m SignalHandlerId
afterEntryIconPress obj cb = connectEntryIconPress obj cb SignalConnectAfter

connectEntryIconPress :: (GObject a, MonadIO m) =>
                         a -> EntryIconPressCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryIconPress obj cb after = liftIO $ do
    cb' <- mkEntryIconPressCallback (entryIconPressCallbackWrapper cb)
    connectSignalFunPtr obj "icon-press" cb' after

-- signal Entry::icon-release
type EntryIconReleaseCallback =
    EntryIconPosition ->
    Gdk.EventButton ->
    IO ()

noEntryIconReleaseCallback :: Maybe EntryIconReleaseCallback
noEntryIconReleaseCallback = Nothing

type EntryIconReleaseCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr Gdk.EventButton ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryIconReleaseCallback :: EntryIconReleaseCallbackC -> IO (FunPtr EntryIconReleaseCallbackC)

entryIconReleaseClosure :: EntryIconReleaseCallback -> IO Closure
entryIconReleaseClosure cb = newCClosure =<< mkEntryIconReleaseCallback wrapped
    where wrapped = entryIconReleaseCallbackWrapper cb

entryIconReleaseCallbackWrapper ::
    EntryIconReleaseCallback ->
    Ptr () ->
    CUInt ->
    Ptr Gdk.EventButton ->
    Ptr () ->
    IO ()
entryIconReleaseCallbackWrapper _cb _ icon_pos event _ = do
    let icon_pos' = (toEnum . fromIntegral) icon_pos
    event' <- (newPtr 80 Gdk.EventButton) event
    _cb  icon_pos' event'

onEntryIconRelease :: (GObject a, MonadIO m) => a -> EntryIconReleaseCallback -> m SignalHandlerId
onEntryIconRelease obj cb = liftIO $ connectEntryIconRelease obj cb SignalConnectBefore
afterEntryIconRelease :: (GObject a, MonadIO m) => a -> EntryIconReleaseCallback -> m SignalHandlerId
afterEntryIconRelease obj cb = connectEntryIconRelease obj cb SignalConnectAfter

connectEntryIconRelease :: (GObject a, MonadIO m) =>
                           a -> EntryIconReleaseCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryIconRelease obj cb after = liftIO $ do
    cb' <- mkEntryIconReleaseCallback (entryIconReleaseCallbackWrapper cb)
    connectSignalFunPtr obj "icon-release" cb' after

-- signal Entry::insert-at-cursor
type EntryInsertAtCursorCallback =
    T.Text ->
    IO ()

noEntryInsertAtCursorCallback :: Maybe EntryInsertAtCursorCallback
noEntryInsertAtCursorCallback = Nothing

type EntryInsertAtCursorCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryInsertAtCursorCallback :: EntryInsertAtCursorCallbackC -> IO (FunPtr EntryInsertAtCursorCallbackC)

entryInsertAtCursorClosure :: EntryInsertAtCursorCallback -> IO Closure
entryInsertAtCursorClosure cb = newCClosure =<< mkEntryInsertAtCursorCallback wrapped
    where wrapped = entryInsertAtCursorCallbackWrapper cb

entryInsertAtCursorCallbackWrapper ::
    EntryInsertAtCursorCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
entryInsertAtCursorCallbackWrapper _cb _ string _ = do
    string' <- cstringToText string
    _cb  string'

onEntryInsertAtCursor :: (GObject a, MonadIO m) => a -> EntryInsertAtCursorCallback -> m SignalHandlerId
onEntryInsertAtCursor obj cb = liftIO $ connectEntryInsertAtCursor obj cb SignalConnectBefore
afterEntryInsertAtCursor :: (GObject a, MonadIO m) => a -> EntryInsertAtCursorCallback -> m SignalHandlerId
afterEntryInsertAtCursor obj cb = connectEntryInsertAtCursor obj cb SignalConnectAfter

connectEntryInsertAtCursor :: (GObject a, MonadIO m) =>
                              a -> EntryInsertAtCursorCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryInsertAtCursor obj cb after = liftIO $ do
    cb' <- mkEntryInsertAtCursorCallback (entryInsertAtCursorCallbackWrapper cb)
    connectSignalFunPtr obj "insert-at-cursor" cb' after

-- signal Entry::move-cursor
type EntryMoveCursorCallback =
    MovementStep ->
    Int32 ->
    Bool ->
    IO ()

noEntryMoveCursorCallback :: Maybe EntryMoveCursorCallback
noEntryMoveCursorCallback = Nothing

type EntryMoveCursorCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Int32 ->
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryMoveCursorCallback :: EntryMoveCursorCallbackC -> IO (FunPtr EntryMoveCursorCallbackC)

entryMoveCursorClosure :: EntryMoveCursorCallback -> IO Closure
entryMoveCursorClosure cb = newCClosure =<< mkEntryMoveCursorCallback wrapped
    where wrapped = entryMoveCursorCallbackWrapper cb

entryMoveCursorCallbackWrapper ::
    EntryMoveCursorCallback ->
    Ptr () ->
    CUInt ->
    Int32 ->
    CInt ->
    Ptr () ->
    IO ()
entryMoveCursorCallbackWrapper _cb _ step count extend_selection _ = do
    let step' = (toEnum . fromIntegral) step
    let extend_selection' = (/= 0) extend_selection
    _cb  step' count extend_selection'

onEntryMoveCursor :: (GObject a, MonadIO m) => a -> EntryMoveCursorCallback -> m SignalHandlerId
onEntryMoveCursor obj cb = liftIO $ connectEntryMoveCursor obj cb SignalConnectBefore
afterEntryMoveCursor :: (GObject a, MonadIO m) => a -> EntryMoveCursorCallback -> m SignalHandlerId
afterEntryMoveCursor obj cb = connectEntryMoveCursor obj cb SignalConnectAfter

connectEntryMoveCursor :: (GObject a, MonadIO m) =>
                          a -> EntryMoveCursorCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryMoveCursor obj cb after = liftIO $ do
    cb' <- mkEntryMoveCursorCallback (entryMoveCursorCallbackWrapper cb)
    connectSignalFunPtr obj "move-cursor" cb' after

-- signal Entry::paste-clipboard
type EntryPasteClipboardCallback =
    IO ()

noEntryPasteClipboardCallback :: Maybe EntryPasteClipboardCallback
noEntryPasteClipboardCallback = Nothing

type EntryPasteClipboardCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryPasteClipboardCallback :: EntryPasteClipboardCallbackC -> IO (FunPtr EntryPasteClipboardCallbackC)

entryPasteClipboardClosure :: EntryPasteClipboardCallback -> IO Closure
entryPasteClipboardClosure cb = newCClosure =<< mkEntryPasteClipboardCallback wrapped
    where wrapped = entryPasteClipboardCallbackWrapper cb

entryPasteClipboardCallbackWrapper ::
    EntryPasteClipboardCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
entryPasteClipboardCallbackWrapper _cb _ _ = do
    _cb 

onEntryPasteClipboard :: (GObject a, MonadIO m) => a -> EntryPasteClipboardCallback -> m SignalHandlerId
onEntryPasteClipboard obj cb = liftIO $ connectEntryPasteClipboard obj cb SignalConnectBefore
afterEntryPasteClipboard :: (GObject a, MonadIO m) => a -> EntryPasteClipboardCallback -> m SignalHandlerId
afterEntryPasteClipboard obj cb = connectEntryPasteClipboard obj cb SignalConnectAfter

connectEntryPasteClipboard :: (GObject a, MonadIO m) =>
                              a -> EntryPasteClipboardCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryPasteClipboard obj cb after = liftIO $ do
    cb' <- mkEntryPasteClipboardCallback (entryPasteClipboardCallbackWrapper cb)
    connectSignalFunPtr obj "paste-clipboard" cb' after

-- signal Entry::populate-popup
type EntryPopulatePopupCallback =
    Widget ->
    IO ()

noEntryPopulatePopupCallback :: Maybe EntryPopulatePopupCallback
noEntryPopulatePopupCallback = Nothing

type EntryPopulatePopupCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryPopulatePopupCallback :: EntryPopulatePopupCallbackC -> IO (FunPtr EntryPopulatePopupCallbackC)

entryPopulatePopupClosure :: EntryPopulatePopupCallback -> IO Closure
entryPopulatePopupClosure cb = newCClosure =<< mkEntryPopulatePopupCallback wrapped
    where wrapped = entryPopulatePopupCallbackWrapper cb

entryPopulatePopupCallbackWrapper ::
    EntryPopulatePopupCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
entryPopulatePopupCallbackWrapper _cb _ popup _ = do
    popup' <- (newObject Widget) popup
    _cb  popup'

onEntryPopulatePopup :: (GObject a, MonadIO m) => a -> EntryPopulatePopupCallback -> m SignalHandlerId
onEntryPopulatePopup obj cb = liftIO $ connectEntryPopulatePopup obj cb SignalConnectBefore
afterEntryPopulatePopup :: (GObject a, MonadIO m) => a -> EntryPopulatePopupCallback -> m SignalHandlerId
afterEntryPopulatePopup obj cb = connectEntryPopulatePopup obj cb SignalConnectAfter

connectEntryPopulatePopup :: (GObject a, MonadIO m) =>
                             a -> EntryPopulatePopupCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryPopulatePopup obj cb after = liftIO $ do
    cb' <- mkEntryPopulatePopupCallback (entryPopulatePopupCallbackWrapper cb)
    connectSignalFunPtr obj "populate-popup" cb' after

-- signal Entry::preedit-changed
type EntryPreeditChangedCallback =
    T.Text ->
    IO ()

noEntryPreeditChangedCallback :: Maybe EntryPreeditChangedCallback
noEntryPreeditChangedCallback = Nothing

type EntryPreeditChangedCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryPreeditChangedCallback :: EntryPreeditChangedCallbackC -> IO (FunPtr EntryPreeditChangedCallbackC)

entryPreeditChangedClosure :: EntryPreeditChangedCallback -> IO Closure
entryPreeditChangedClosure cb = newCClosure =<< mkEntryPreeditChangedCallback wrapped
    where wrapped = entryPreeditChangedCallbackWrapper cb

entryPreeditChangedCallbackWrapper ::
    EntryPreeditChangedCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
entryPreeditChangedCallbackWrapper _cb _ preedit _ = do
    preedit' <- cstringToText preedit
    _cb  preedit'

onEntryPreeditChanged :: (GObject a, MonadIO m) => a -> EntryPreeditChangedCallback -> m SignalHandlerId
onEntryPreeditChanged obj cb = liftIO $ connectEntryPreeditChanged obj cb SignalConnectBefore
afterEntryPreeditChanged :: (GObject a, MonadIO m) => a -> EntryPreeditChangedCallback -> m SignalHandlerId
afterEntryPreeditChanged obj cb = connectEntryPreeditChanged obj cb SignalConnectAfter

connectEntryPreeditChanged :: (GObject a, MonadIO m) =>
                              a -> EntryPreeditChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryPreeditChanged obj cb after = liftIO $ do
    cb' <- mkEntryPreeditChangedCallback (entryPreeditChangedCallbackWrapper cb)
    connectSignalFunPtr obj "preedit-changed" cb' after

-- signal Entry::toggle-overwrite
type EntryToggleOverwriteCallback =
    IO ()

noEntryToggleOverwriteCallback :: Maybe EntryToggleOverwriteCallback
noEntryToggleOverwriteCallback = Nothing

type EntryToggleOverwriteCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryToggleOverwriteCallback :: EntryToggleOverwriteCallbackC -> IO (FunPtr EntryToggleOverwriteCallbackC)

entryToggleOverwriteClosure :: EntryToggleOverwriteCallback -> IO Closure
entryToggleOverwriteClosure cb = newCClosure =<< mkEntryToggleOverwriteCallback wrapped
    where wrapped = entryToggleOverwriteCallbackWrapper cb

entryToggleOverwriteCallbackWrapper ::
    EntryToggleOverwriteCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
entryToggleOverwriteCallbackWrapper _cb _ _ = do
    _cb 

onEntryToggleOverwrite :: (GObject a, MonadIO m) => a -> EntryToggleOverwriteCallback -> m SignalHandlerId
onEntryToggleOverwrite obj cb = liftIO $ connectEntryToggleOverwrite obj cb SignalConnectBefore
afterEntryToggleOverwrite :: (GObject a, MonadIO m) => a -> EntryToggleOverwriteCallback -> m SignalHandlerId
afterEntryToggleOverwrite obj cb = connectEntryToggleOverwrite obj cb SignalConnectAfter

connectEntryToggleOverwrite :: (GObject a, MonadIO m) =>
                               a -> EntryToggleOverwriteCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryToggleOverwrite obj cb after = liftIO $ do
    cb' <- mkEntryToggleOverwriteCallback (entryToggleOverwriteCallbackWrapper cb)
    connectSignalFunPtr obj "toggle-overwrite" cb' after

-- object EntryAccessible 
newtype EntryAccessible = EntryAccessible (ForeignPtr EntryAccessible)
noEntryAccessible :: Maybe EntryAccessible
noEntryAccessible = Nothing

foreign import ccall "gtk_entry_accessible_get_type"
    c_gtk_entry_accessible_get_type :: IO GType

type instance ParentTypes EntryAccessible = '[WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.EditableText, Atk.Text]

instance GObject EntryAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_entry_accessible_get_type
    

class GObject o => EntryAccessibleK o
instance (GObject o, IsDescendantOf EntryAccessible o) => EntryAccessibleK o

toEntryAccessible :: EntryAccessibleK o => o -> IO EntryAccessible
toEntryAccessible = unsafeCastTo EntryAccessible

-- object EntryBuffer 
newtype EntryBuffer = EntryBuffer (ForeignPtr EntryBuffer)
noEntryBuffer :: Maybe EntryBuffer
noEntryBuffer = Nothing

foreign import ccall "gtk_entry_buffer_get_type"
    c_gtk_entry_buffer_get_type :: IO GType

type instance ParentTypes EntryBuffer = '[GObject.Object]

instance GObject EntryBuffer where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_entry_buffer_get_type
    

class GObject o => EntryBufferK o
instance (GObject o, IsDescendantOf EntryBuffer o) => EntryBufferK o

toEntryBuffer :: EntryBufferK o => o -> IO EntryBuffer
toEntryBuffer = unsafeCastTo EntryBuffer

-- method EntryBuffer::new
-- method type : Constructor
-- Args : [Arg {argName = "initial_chars", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_initial_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "initial_chars", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_initial_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "EntryBuffer"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_buffer_new" gtk_entry_buffer_new :: 
    CString ->                              -- initial_chars : TBasicType TUTF8
    Int32 ->                                -- n_initial_chars : TBasicType TInt32
    IO (Ptr EntryBuffer)


entryBufferNew ::
    (MonadIO m) =>
    Maybe (T.Text) ->                       -- initial_chars
    Int32 ->                                -- n_initial_chars
    m EntryBuffer
entryBufferNew initial_chars n_initial_chars = liftIO $ do
    maybeInitial_chars <- case initial_chars of
        Nothing -> return nullPtr
        Just jInitial_chars -> do
            jInitial_chars' <- textToCString jInitial_chars
            return jInitial_chars'
    result <- gtk_entry_buffer_new maybeInitial_chars n_initial_chars
    checkUnexpectedReturnNULL "gtk_entry_buffer_new" result
    result' <- (wrapObject EntryBuffer) result
    freeMem maybeInitial_chars
    return result'

-- method EntryBuffer::delete_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_buffer_delete_text" gtk_entry_buffer_delete_text :: 
    Ptr EntryBuffer ->                      -- _obj : TInterface "Gtk" "EntryBuffer"
    Word32 ->                               -- position : TBasicType TUInt32
    Int32 ->                                -- n_chars : TBasicType TInt32
    IO Word32


entryBufferDeleteText ::
    (MonadIO m, EntryBufferK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- position
    Int32 ->                                -- n_chars
    m Word32
entryBufferDeleteText _obj position n_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_buffer_delete_text _obj' position n_chars
    touchManagedPtr _obj
    return result

-- method EntryBuffer::emit_deleted_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_buffer_emit_deleted_text" gtk_entry_buffer_emit_deleted_text :: 
    Ptr EntryBuffer ->                      -- _obj : TInterface "Gtk" "EntryBuffer"
    Word32 ->                               -- position : TBasicType TUInt32
    Word32 ->                               -- n_chars : TBasicType TUInt32
    IO ()


entryBufferEmitDeletedText ::
    (MonadIO m, EntryBufferK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- position
    Word32 ->                               -- n_chars
    m ()
entryBufferEmitDeletedText _obj position n_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_buffer_emit_deleted_text _obj' position n_chars
    touchManagedPtr _obj
    return ()

-- method EntryBuffer::emit_inserted_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "chars", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "chars", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_buffer_emit_inserted_text" gtk_entry_buffer_emit_inserted_text :: 
    Ptr EntryBuffer ->                      -- _obj : TInterface "Gtk" "EntryBuffer"
    Word32 ->                               -- position : TBasicType TUInt32
    CString ->                              -- chars : TBasicType TUTF8
    Word32 ->                               -- n_chars : TBasicType TUInt32
    IO ()


entryBufferEmitInsertedText ::
    (MonadIO m, EntryBufferK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- position
    T.Text ->                               -- chars
    Word32 ->                               -- n_chars
    m ()
entryBufferEmitInsertedText _obj position chars n_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    chars' <- textToCString chars
    gtk_entry_buffer_emit_inserted_text _obj' position chars' n_chars
    touchManagedPtr _obj
    freeMem chars'
    return ()

-- method EntryBuffer::get_bytes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_buffer_get_bytes" gtk_entry_buffer_get_bytes :: 
    Ptr EntryBuffer ->                      -- _obj : TInterface "Gtk" "EntryBuffer"
    IO Word64


entryBufferGetBytes ::
    (MonadIO m, EntryBufferK a) =>
    a ->                                    -- _obj
    m Word64
entryBufferGetBytes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_buffer_get_bytes _obj'
    touchManagedPtr _obj
    return result

-- method EntryBuffer::get_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_buffer_get_length" gtk_entry_buffer_get_length :: 
    Ptr EntryBuffer ->                      -- _obj : TInterface "Gtk" "EntryBuffer"
    IO Word32


entryBufferGetLength ::
    (MonadIO m, EntryBufferK a) =>
    a ->                                    -- _obj
    m Word32
entryBufferGetLength _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_buffer_get_length _obj'
    touchManagedPtr _obj
    return result

-- method EntryBuffer::get_max_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_buffer_get_max_length" gtk_entry_buffer_get_max_length :: 
    Ptr EntryBuffer ->                      -- _obj : TInterface "Gtk" "EntryBuffer"
    IO Int32


entryBufferGetMaxLength ::
    (MonadIO m, EntryBufferK a) =>
    a ->                                    -- _obj
    m Int32
entryBufferGetMaxLength _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_buffer_get_max_length _obj'
    touchManagedPtr _obj
    return result

-- method EntryBuffer::get_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_buffer_get_text" gtk_entry_buffer_get_text :: 
    Ptr EntryBuffer ->                      -- _obj : TInterface "Gtk" "EntryBuffer"
    IO CString


entryBufferGetText ::
    (MonadIO m, EntryBufferK a) =>
    a ->                                    -- _obj
    m T.Text
entryBufferGetText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_buffer_get_text _obj'
    checkUnexpectedReturnNULL "gtk_entry_buffer_get_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method EntryBuffer::insert_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "chars", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "chars", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_buffer_insert_text" gtk_entry_buffer_insert_text :: 
    Ptr EntryBuffer ->                      -- _obj : TInterface "Gtk" "EntryBuffer"
    Word32 ->                               -- position : TBasicType TUInt32
    CString ->                              -- chars : TBasicType TUTF8
    Int32 ->                                -- n_chars : TBasicType TInt32
    IO Word32


entryBufferInsertText ::
    (MonadIO m, EntryBufferK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- position
    T.Text ->                               -- chars
    Int32 ->                                -- n_chars
    m Word32
entryBufferInsertText _obj position chars n_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    chars' <- textToCString chars
    result <- gtk_entry_buffer_insert_text _obj' position chars' n_chars
    touchManagedPtr _obj
    freeMem chars'
    return result

-- method EntryBuffer::set_max_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max_length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max_length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_buffer_set_max_length" gtk_entry_buffer_set_max_length :: 
    Ptr EntryBuffer ->                      -- _obj : TInterface "Gtk" "EntryBuffer"
    Int32 ->                                -- max_length : TBasicType TInt32
    IO ()


entryBufferSetMaxLength ::
    (MonadIO m, EntryBufferK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- max_length
    m ()
entryBufferSetMaxLength _obj max_length = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_buffer_set_max_length _obj' max_length
    touchManagedPtr _obj
    return ()

-- method EntryBuffer::set_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "chars", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "chars", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_buffer_set_text" gtk_entry_buffer_set_text :: 
    Ptr EntryBuffer ->                      -- _obj : TInterface "Gtk" "EntryBuffer"
    CString ->                              -- chars : TBasicType TUTF8
    Int32 ->                                -- n_chars : TBasicType TInt32
    IO ()


entryBufferSetText ::
    (MonadIO m, EntryBufferK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- chars
    Int32 ->                                -- n_chars
    m ()
entryBufferSetText _obj chars n_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    chars' <- textToCString chars
    gtk_entry_buffer_set_text _obj' chars' n_chars
    touchManagedPtr _obj
    freeMem chars'
    return ()

-- signal EntryBuffer::deleted-text
type EntryBufferDeletedTextCallback =
    Word32 ->
    Word32 ->
    IO ()

noEntryBufferDeletedTextCallback :: Maybe EntryBufferDeletedTextCallback
noEntryBufferDeletedTextCallback = Nothing

type EntryBufferDeletedTextCallbackC =
    Ptr () ->                               -- object
    Word32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryBufferDeletedTextCallback :: EntryBufferDeletedTextCallbackC -> IO (FunPtr EntryBufferDeletedTextCallbackC)

entryBufferDeletedTextClosure :: EntryBufferDeletedTextCallback -> IO Closure
entryBufferDeletedTextClosure cb = newCClosure =<< mkEntryBufferDeletedTextCallback wrapped
    where wrapped = entryBufferDeletedTextCallbackWrapper cb

entryBufferDeletedTextCallbackWrapper ::
    EntryBufferDeletedTextCallback ->
    Ptr () ->
    Word32 ->
    Word32 ->
    Ptr () ->
    IO ()
entryBufferDeletedTextCallbackWrapper _cb _ position n_chars _ = do
    _cb  position n_chars

onEntryBufferDeletedText :: (GObject a, MonadIO m) => a -> EntryBufferDeletedTextCallback -> m SignalHandlerId
onEntryBufferDeletedText obj cb = liftIO $ connectEntryBufferDeletedText obj cb SignalConnectBefore
afterEntryBufferDeletedText :: (GObject a, MonadIO m) => a -> EntryBufferDeletedTextCallback -> m SignalHandlerId
afterEntryBufferDeletedText obj cb = connectEntryBufferDeletedText obj cb SignalConnectAfter

connectEntryBufferDeletedText :: (GObject a, MonadIO m) =>
                                 a -> EntryBufferDeletedTextCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryBufferDeletedText obj cb after = liftIO $ do
    cb' <- mkEntryBufferDeletedTextCallback (entryBufferDeletedTextCallbackWrapper cb)
    connectSignalFunPtr obj "deleted-text" cb' after

-- signal EntryBuffer::inserted-text
type EntryBufferInsertedTextCallback =
    Word32 ->
    T.Text ->
    Word32 ->
    IO ()

noEntryBufferInsertedTextCallback :: Maybe EntryBufferInsertedTextCallback
noEntryBufferInsertedTextCallback = Nothing

type EntryBufferInsertedTextCallbackC =
    Ptr () ->                               -- object
    Word32 ->
    CString ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryBufferInsertedTextCallback :: EntryBufferInsertedTextCallbackC -> IO (FunPtr EntryBufferInsertedTextCallbackC)

entryBufferInsertedTextClosure :: EntryBufferInsertedTextCallback -> IO Closure
entryBufferInsertedTextClosure cb = newCClosure =<< mkEntryBufferInsertedTextCallback wrapped
    where wrapped = entryBufferInsertedTextCallbackWrapper cb

entryBufferInsertedTextCallbackWrapper ::
    EntryBufferInsertedTextCallback ->
    Ptr () ->
    Word32 ->
    CString ->
    Word32 ->
    Ptr () ->
    IO ()
entryBufferInsertedTextCallbackWrapper _cb _ position chars n_chars _ = do
    chars' <- cstringToText chars
    _cb  position chars' n_chars

onEntryBufferInsertedText :: (GObject a, MonadIO m) => a -> EntryBufferInsertedTextCallback -> m SignalHandlerId
onEntryBufferInsertedText obj cb = liftIO $ connectEntryBufferInsertedText obj cb SignalConnectBefore
afterEntryBufferInsertedText :: (GObject a, MonadIO m) => a -> EntryBufferInsertedTextCallback -> m SignalHandlerId
afterEntryBufferInsertedText obj cb = connectEntryBufferInsertedText obj cb SignalConnectAfter

connectEntryBufferInsertedText :: (GObject a, MonadIO m) =>
                                  a -> EntryBufferInsertedTextCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryBufferInsertedText obj cb after = liftIO $ do
    cb' <- mkEntryBufferInsertedTextCallback (entryBufferInsertedTextCallbackWrapper cb)
    connectSignalFunPtr obj "inserted-text" cb' after

-- object EntryCompletion 
newtype EntryCompletion = EntryCompletion (ForeignPtr EntryCompletion)
noEntryCompletion :: Maybe EntryCompletion
noEntryCompletion = Nothing

foreign import ccall "gtk_entry_completion_get_type"
    c_gtk_entry_completion_get_type :: IO GType

type instance ParentTypes EntryCompletion = '[GObject.Object, Buildable, CellLayout]

instance GObject EntryCompletion where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_entry_completion_get_type
    

class GObject o => EntryCompletionK o
instance (GObject o, IsDescendantOf EntryCompletion o) => EntryCompletionK o

toEntryCompletion :: EntryCompletionK o => o -> IO EntryCompletion
toEntryCompletion = unsafeCastTo EntryCompletion

-- method EntryCompletion::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "EntryCompletion"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_new" gtk_entry_completion_new :: 
    IO (Ptr EntryCompletion)


entryCompletionNew ::
    (MonadIO m) =>
    m EntryCompletion
entryCompletionNew  = liftIO $ do
    result <- gtk_entry_completion_new
    checkUnexpectedReturnNULL "gtk_entry_completion_new" result
    result' <- (wrapObject EntryCompletion) result
    return result'

-- method EntryCompletion::new_with_area
-- method type : Constructor
-- Args : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "EntryCompletion"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_new_with_area" gtk_entry_completion_new_with_area :: 
    Ptr CellArea ->                         -- area : TInterface "Gtk" "CellArea"
    IO (Ptr EntryCompletion)


entryCompletionNewWithArea ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- area
    m EntryCompletion
entryCompletionNewWithArea area = liftIO $ do
    let area' = unsafeManagedPtrCastPtr area
    result <- gtk_entry_completion_new_with_area area'
    checkUnexpectedReturnNULL "gtk_entry_completion_new_with_area" result
    result' <- (wrapObject EntryCompletion) result
    touchManagedPtr area
    return result'

-- method EntryCompletion::complete
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_complete" gtk_entry_completion_complete :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO ()


entryCompletionComplete ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m ()
entryCompletionComplete _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_completion_complete _obj'
    touchManagedPtr _obj
    return ()

-- method EntryCompletion::compute_prefix
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_compute_prefix" gtk_entry_completion_compute_prefix :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    CString ->                              -- key : TBasicType TUTF8
    IO CString


entryCompletionComputePrefix ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    m T.Text
entryCompletionComputePrefix _obj key = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    result <- gtk_entry_completion_compute_prefix _obj' key'
    checkUnexpectedReturnNULL "gtk_entry_completion_compute_prefix" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    freeMem key'
    return result'

-- method EntryCompletion::delete_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_delete_action" gtk_entry_completion_delete_action :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    Int32 ->                                -- index_ : TBasicType TInt32
    IO ()


entryCompletionDeleteAction ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- index_
    m ()
entryCompletionDeleteAction _obj index_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_completion_delete_action _obj' index_
    touchManagedPtr _obj
    return ()

-- method EntryCompletion::get_completion_prefix
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_get_completion_prefix" gtk_entry_completion_get_completion_prefix :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO CString


entryCompletionGetCompletionPrefix ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m T.Text
entryCompletionGetCompletionPrefix _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_completion_get_completion_prefix _obj'
    checkUnexpectedReturnNULL "gtk_entry_completion_get_completion_prefix" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method EntryCompletion::get_entry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_get_entry" gtk_entry_completion_get_entry :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO (Ptr Widget)


entryCompletionGetEntry ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m Widget
entryCompletionGetEntry _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_completion_get_entry _obj'
    checkUnexpectedReturnNULL "gtk_entry_completion_get_entry" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method EntryCompletion::get_inline_completion
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_get_inline_completion" gtk_entry_completion_get_inline_completion :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO CInt


entryCompletionGetInlineCompletion ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m Bool
entryCompletionGetInlineCompletion _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_completion_get_inline_completion _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method EntryCompletion::get_inline_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_get_inline_selection" gtk_entry_completion_get_inline_selection :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO CInt


entryCompletionGetInlineSelection ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m Bool
entryCompletionGetInlineSelection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_completion_get_inline_selection _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method EntryCompletion::get_minimum_key_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_get_minimum_key_length" gtk_entry_completion_get_minimum_key_length :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO Int32


entryCompletionGetMinimumKeyLength ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m Int32
entryCompletionGetMinimumKeyLength _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_completion_get_minimum_key_length _obj'
    touchManagedPtr _obj
    return result

-- method EntryCompletion::get_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_get_model" gtk_entry_completion_get_model :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO (Ptr TreeModel)


entryCompletionGetModel ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m TreeModel
entryCompletionGetModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_completion_get_model _obj'
    checkUnexpectedReturnNULL "gtk_entry_completion_get_model" result
    result' <- (newObject TreeModel) result
    touchManagedPtr _obj
    return result'

-- method EntryCompletion::get_popup_completion
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_get_popup_completion" gtk_entry_completion_get_popup_completion :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO CInt


entryCompletionGetPopupCompletion ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m Bool
entryCompletionGetPopupCompletion _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_completion_get_popup_completion _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method EntryCompletion::get_popup_set_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_get_popup_set_width" gtk_entry_completion_get_popup_set_width :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO CInt


entryCompletionGetPopupSetWidth ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m Bool
entryCompletionGetPopupSetWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_completion_get_popup_set_width _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method EntryCompletion::get_popup_single_match
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_get_popup_single_match" gtk_entry_completion_get_popup_single_match :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO CInt


entryCompletionGetPopupSingleMatch ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m Bool
entryCompletionGetPopupSingleMatch _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_completion_get_popup_single_match _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method EntryCompletion::get_text_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_get_text_column" gtk_entry_completion_get_text_column :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO Int32


entryCompletionGetTextColumn ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m Int32
entryCompletionGetTextColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_entry_completion_get_text_column _obj'
    touchManagedPtr _obj
    return result

-- method EntryCompletion::insert_action_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_insert_action_markup" gtk_entry_completion_insert_action_markup :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    Int32 ->                                -- index_ : TBasicType TInt32
    CString ->                              -- markup : TBasicType TUTF8
    IO ()


entryCompletionInsertActionMarkup ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- index_
    T.Text ->                               -- markup
    m ()
entryCompletionInsertActionMarkup _obj index_ markup = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    markup' <- textToCString markup
    gtk_entry_completion_insert_action_markup _obj' index_ markup'
    touchManagedPtr _obj
    freeMem markup'
    return ()

-- method EntryCompletion::insert_action_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_insert_action_text" gtk_entry_completion_insert_action_text :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    Int32 ->                                -- index_ : TBasicType TInt32
    CString ->                              -- text : TBasicType TUTF8
    IO ()


entryCompletionInsertActionText ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- index_
    T.Text ->                               -- text
    m ()
entryCompletionInsertActionText _obj index_ text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_entry_completion_insert_action_text _obj' index_ text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method EntryCompletion::insert_prefix
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_insert_prefix" gtk_entry_completion_insert_prefix :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    IO ()


entryCompletionInsertPrefix ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    m ()
entryCompletionInsertPrefix _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_completion_insert_prefix _obj'
    touchManagedPtr _obj
    return ()

-- method EntryCompletion::set_inline_completion
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "inline_completion", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "inline_completion", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_set_inline_completion" gtk_entry_completion_set_inline_completion :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    CInt ->                                 -- inline_completion : TBasicType TBoolean
    IO ()


entryCompletionSetInlineCompletion ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- inline_completion
    m ()
entryCompletionSetInlineCompletion _obj inline_completion = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let inline_completion' = (fromIntegral . fromEnum) inline_completion
    gtk_entry_completion_set_inline_completion _obj' inline_completion'
    touchManagedPtr _obj
    return ()

-- method EntryCompletion::set_inline_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "inline_selection", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "inline_selection", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_set_inline_selection" gtk_entry_completion_set_inline_selection :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    CInt ->                                 -- inline_selection : TBasicType TBoolean
    IO ()


entryCompletionSetInlineSelection ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- inline_selection
    m ()
entryCompletionSetInlineSelection _obj inline_selection = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let inline_selection' = (fromIntegral . fromEnum) inline_selection
    gtk_entry_completion_set_inline_selection _obj' inline_selection'
    touchManagedPtr _obj
    return ()

-- method EntryCompletion::set_match_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "EntryCompletionMatchFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "func_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func_notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "EntryCompletionMatchFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_set_match_func" gtk_entry_completion_set_match_func :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    FunPtr EntryCompletionMatchFuncC ->     -- func : TInterface "Gtk" "EntryCompletionMatchFunc"
    Ptr () ->                               -- func_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- func_notify : TInterface "GLib" "DestroyNotify"
    IO ()


entryCompletionSetMatchFunc ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    EntryCompletionMatchFunc ->             -- func
    m ()
entryCompletionSetMatchFunc _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkEntryCompletionMatchFunc (entryCompletionMatchFuncWrapper Nothing func)
    let func_data = castFunPtrToPtr func'
    let func_notify = safeFreeFunPtrPtr
    gtk_entry_completion_set_match_func _obj' func' func_data func_notify
    touchManagedPtr _obj
    return ()

-- method EntryCompletion::set_minimum_key_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_set_minimum_key_length" gtk_entry_completion_set_minimum_key_length :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    Int32 ->                                -- length : TBasicType TInt32
    IO ()


entryCompletionSetMinimumKeyLength ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- length
    m ()
entryCompletionSetMinimumKeyLength _obj length_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_completion_set_minimum_key_length _obj' length_
    touchManagedPtr _obj
    return ()

-- method EntryCompletion::set_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_set_model" gtk_entry_completion_set_model :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    Ptr TreeModel ->                        -- model : TInterface "Gtk" "TreeModel"
    IO ()


entryCompletionSetModel ::
    (MonadIO m, EntryCompletionK a, TreeModelK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- model
    m ()
entryCompletionSetModel _obj model = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeModel <- case model of
        Nothing -> return nullPtr
        Just jModel -> do
            let jModel' = unsafeManagedPtrCastPtr jModel
            return jModel'
    gtk_entry_completion_set_model _obj' maybeModel
    touchManagedPtr _obj
    whenJust model touchManagedPtr
    return ()

-- method EntryCompletion::set_popup_completion
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "popup_completion", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "popup_completion", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_set_popup_completion" gtk_entry_completion_set_popup_completion :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    CInt ->                                 -- popup_completion : TBasicType TBoolean
    IO ()


entryCompletionSetPopupCompletion ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- popup_completion
    m ()
entryCompletionSetPopupCompletion _obj popup_completion = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let popup_completion' = (fromIntegral . fromEnum) popup_completion
    gtk_entry_completion_set_popup_completion _obj' popup_completion'
    touchManagedPtr _obj
    return ()

-- method EntryCompletion::set_popup_set_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "popup_set_width", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "popup_set_width", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_set_popup_set_width" gtk_entry_completion_set_popup_set_width :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    CInt ->                                 -- popup_set_width : TBasicType TBoolean
    IO ()


entryCompletionSetPopupSetWidth ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- popup_set_width
    m ()
entryCompletionSetPopupSetWidth _obj popup_set_width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let popup_set_width' = (fromIntegral . fromEnum) popup_set_width
    gtk_entry_completion_set_popup_set_width _obj' popup_set_width'
    touchManagedPtr _obj
    return ()

-- method EntryCompletion::set_popup_single_match
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "popup_single_match", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "popup_single_match", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_set_popup_single_match" gtk_entry_completion_set_popup_single_match :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    CInt ->                                 -- popup_single_match : TBasicType TBoolean
    IO ()


entryCompletionSetPopupSingleMatch ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- popup_single_match
    m ()
entryCompletionSetPopupSingleMatch _obj popup_single_match = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let popup_single_match' = (fromIntegral . fromEnum) popup_single_match
    gtk_entry_completion_set_popup_single_match _obj' popup_single_match'
    touchManagedPtr _obj
    return ()

-- method EntryCompletion::set_text_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EntryCompletion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_entry_completion_set_text_column" gtk_entry_completion_set_text_column :: 
    Ptr EntryCompletion ->                  -- _obj : TInterface "Gtk" "EntryCompletion"
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


entryCompletionSetTextColumn ::
    (MonadIO m, EntryCompletionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m ()
entryCompletionSetTextColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_entry_completion_set_text_column _obj' column
    touchManagedPtr _obj
    return ()

-- signal EntryCompletion::action-activated
type EntryCompletionActionActivatedCallback =
    Int32 ->
    IO ()

noEntryCompletionActionActivatedCallback :: Maybe EntryCompletionActionActivatedCallback
noEntryCompletionActionActivatedCallback = Nothing

type EntryCompletionActionActivatedCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryCompletionActionActivatedCallback :: EntryCompletionActionActivatedCallbackC -> IO (FunPtr EntryCompletionActionActivatedCallbackC)

entryCompletionActionActivatedClosure :: EntryCompletionActionActivatedCallback -> IO Closure
entryCompletionActionActivatedClosure cb = newCClosure =<< mkEntryCompletionActionActivatedCallback wrapped
    where wrapped = entryCompletionActionActivatedCallbackWrapper cb

entryCompletionActionActivatedCallbackWrapper ::
    EntryCompletionActionActivatedCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO ()
entryCompletionActionActivatedCallbackWrapper _cb _ index _ = do
    _cb  index

onEntryCompletionActionActivated :: (GObject a, MonadIO m) => a -> EntryCompletionActionActivatedCallback -> m SignalHandlerId
onEntryCompletionActionActivated obj cb = liftIO $ connectEntryCompletionActionActivated obj cb SignalConnectBefore
afterEntryCompletionActionActivated :: (GObject a, MonadIO m) => a -> EntryCompletionActionActivatedCallback -> m SignalHandlerId
afterEntryCompletionActionActivated obj cb = connectEntryCompletionActionActivated obj cb SignalConnectAfter

connectEntryCompletionActionActivated :: (GObject a, MonadIO m) =>
                                         a -> EntryCompletionActionActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryCompletionActionActivated obj cb after = liftIO $ do
    cb' <- mkEntryCompletionActionActivatedCallback (entryCompletionActionActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "action-activated" cb' after

-- signal EntryCompletion::cursor-on-match
type EntryCompletionCursorOnMatchCallback =
    TreeModel ->
    TreeIter ->
    IO Bool

noEntryCompletionCursorOnMatchCallback :: Maybe EntryCompletionCursorOnMatchCallback
noEntryCompletionCursorOnMatchCallback = Nothing

type EntryCompletionCursorOnMatchCallbackC =
    Ptr () ->                               -- object
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkEntryCompletionCursorOnMatchCallback :: EntryCompletionCursorOnMatchCallbackC -> IO (FunPtr EntryCompletionCursorOnMatchCallbackC)

entryCompletionCursorOnMatchClosure :: EntryCompletionCursorOnMatchCallback -> IO Closure
entryCompletionCursorOnMatchClosure cb = newCClosure =<< mkEntryCompletionCursorOnMatchCallback wrapped
    where wrapped = entryCompletionCursorOnMatchCallbackWrapper cb

entryCompletionCursorOnMatchCallbackWrapper ::
    EntryCompletionCursorOnMatchCallback ->
    Ptr () ->
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt
entryCompletionCursorOnMatchCallbackWrapper _cb _ model iter _ = do
    model' <- (newObject TreeModel) model
    iter' <- (newBoxed TreeIter) iter
    result <- _cb  model' iter'
    let result' = (fromIntegral . fromEnum) result
    return result'

onEntryCompletionCursorOnMatch :: (GObject a, MonadIO m) => a -> EntryCompletionCursorOnMatchCallback -> m SignalHandlerId
onEntryCompletionCursorOnMatch obj cb = liftIO $ connectEntryCompletionCursorOnMatch obj cb SignalConnectBefore
afterEntryCompletionCursorOnMatch :: (GObject a, MonadIO m) => a -> EntryCompletionCursorOnMatchCallback -> m SignalHandlerId
afterEntryCompletionCursorOnMatch obj cb = connectEntryCompletionCursorOnMatch obj cb SignalConnectAfter

connectEntryCompletionCursorOnMatch :: (GObject a, MonadIO m) =>
                                       a -> EntryCompletionCursorOnMatchCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryCompletionCursorOnMatch obj cb after = liftIO $ do
    cb' <- mkEntryCompletionCursorOnMatchCallback (entryCompletionCursorOnMatchCallbackWrapper cb)
    connectSignalFunPtr obj "cursor-on-match" cb' after

-- signal EntryCompletion::insert-prefix
type EntryCompletionInsertPrefixCallback =
    T.Text ->
    IO Bool

noEntryCompletionInsertPrefixCallback :: Maybe EntryCompletionInsertPrefixCallback
noEntryCompletionInsertPrefixCallback = Nothing

type EntryCompletionInsertPrefixCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkEntryCompletionInsertPrefixCallback :: EntryCompletionInsertPrefixCallbackC -> IO (FunPtr EntryCompletionInsertPrefixCallbackC)

entryCompletionInsertPrefixClosure :: EntryCompletionInsertPrefixCallback -> IO Closure
entryCompletionInsertPrefixClosure cb = newCClosure =<< mkEntryCompletionInsertPrefixCallback wrapped
    where wrapped = entryCompletionInsertPrefixCallbackWrapper cb

entryCompletionInsertPrefixCallbackWrapper ::
    EntryCompletionInsertPrefixCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO CInt
entryCompletionInsertPrefixCallbackWrapper _cb _ prefix _ = do
    prefix' <- cstringToText prefix
    result <- _cb  prefix'
    let result' = (fromIntegral . fromEnum) result
    return result'

onEntryCompletionInsertPrefix :: (GObject a, MonadIO m) => a -> EntryCompletionInsertPrefixCallback -> m SignalHandlerId
onEntryCompletionInsertPrefix obj cb = liftIO $ connectEntryCompletionInsertPrefix obj cb SignalConnectBefore
afterEntryCompletionInsertPrefix :: (GObject a, MonadIO m) => a -> EntryCompletionInsertPrefixCallback -> m SignalHandlerId
afterEntryCompletionInsertPrefix obj cb = connectEntryCompletionInsertPrefix obj cb SignalConnectAfter

connectEntryCompletionInsertPrefix :: (GObject a, MonadIO m) =>
                                      a -> EntryCompletionInsertPrefixCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryCompletionInsertPrefix obj cb after = liftIO $ do
    cb' <- mkEntryCompletionInsertPrefixCallback (entryCompletionInsertPrefixCallbackWrapper cb)
    connectSignalFunPtr obj "insert-prefix" cb' after

-- signal EntryCompletion::match-selected
type EntryCompletionMatchSelectedCallback =
    TreeModel ->
    TreeIter ->
    IO Bool

noEntryCompletionMatchSelectedCallback :: Maybe EntryCompletionMatchSelectedCallback
noEntryCompletionMatchSelectedCallback = Nothing

type EntryCompletionMatchSelectedCallbackC =
    Ptr () ->                               -- object
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkEntryCompletionMatchSelectedCallback :: EntryCompletionMatchSelectedCallbackC -> IO (FunPtr EntryCompletionMatchSelectedCallbackC)

entryCompletionMatchSelectedClosure :: EntryCompletionMatchSelectedCallback -> IO Closure
entryCompletionMatchSelectedClosure cb = newCClosure =<< mkEntryCompletionMatchSelectedCallback wrapped
    where wrapped = entryCompletionMatchSelectedCallbackWrapper cb

entryCompletionMatchSelectedCallbackWrapper ::
    EntryCompletionMatchSelectedCallback ->
    Ptr () ->
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt
entryCompletionMatchSelectedCallbackWrapper _cb _ model iter _ = do
    model' <- (newObject TreeModel) model
    iter' <- (newBoxed TreeIter) iter
    result <- _cb  model' iter'
    let result' = (fromIntegral . fromEnum) result
    return result'

onEntryCompletionMatchSelected :: (GObject a, MonadIO m) => a -> EntryCompletionMatchSelectedCallback -> m SignalHandlerId
onEntryCompletionMatchSelected obj cb = liftIO $ connectEntryCompletionMatchSelected obj cb SignalConnectBefore
afterEntryCompletionMatchSelected :: (GObject a, MonadIO m) => a -> EntryCompletionMatchSelectedCallback -> m SignalHandlerId
afterEntryCompletionMatchSelected obj cb = connectEntryCompletionMatchSelected obj cb SignalConnectAfter

connectEntryCompletionMatchSelected :: (GObject a, MonadIO m) =>
                                       a -> EntryCompletionMatchSelectedCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryCompletionMatchSelected obj cb after = liftIO $ do
    cb' <- mkEntryCompletionMatchSelectedCallback (entryCompletionMatchSelectedCallbackWrapper cb)
    connectSignalFunPtr obj "match-selected" cb' after

-- signal EntryCompletion::no-matches
type EntryCompletionNoMatchesCallback =
    IO ()

noEntryCompletionNoMatchesCallback :: Maybe EntryCompletionNoMatchesCallback
noEntryCompletionNoMatchesCallback = Nothing

type EntryCompletionNoMatchesCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkEntryCompletionNoMatchesCallback :: EntryCompletionNoMatchesCallbackC -> IO (FunPtr EntryCompletionNoMatchesCallbackC)

entryCompletionNoMatchesClosure :: EntryCompletionNoMatchesCallback -> IO Closure
entryCompletionNoMatchesClosure cb = newCClosure =<< mkEntryCompletionNoMatchesCallback wrapped
    where wrapped = entryCompletionNoMatchesCallbackWrapper cb

entryCompletionNoMatchesCallbackWrapper ::
    EntryCompletionNoMatchesCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
entryCompletionNoMatchesCallbackWrapper _cb _ _ = do
    _cb 

onEntryCompletionNoMatches :: (GObject a, MonadIO m) => a -> EntryCompletionNoMatchesCallback -> m SignalHandlerId
onEntryCompletionNoMatches obj cb = liftIO $ connectEntryCompletionNoMatches obj cb SignalConnectBefore
afterEntryCompletionNoMatches :: (GObject a, MonadIO m) => a -> EntryCompletionNoMatchesCallback -> m SignalHandlerId
afterEntryCompletionNoMatches obj cb = connectEntryCompletionNoMatches obj cb SignalConnectAfter

connectEntryCompletionNoMatches :: (GObject a, MonadIO m) =>
                                   a -> EntryCompletionNoMatchesCallback -> SignalConnectMode -> m SignalHandlerId
connectEntryCompletionNoMatches obj cb after = liftIO $ do
    cb' <- mkEntryCompletionNoMatchesCallback (entryCompletionNoMatchesCallbackWrapper cb)
    connectSignalFunPtr obj "no-matches" cb' after

-- callback EntryCompletionMatchFunc
entryCompletionMatchFuncClosure :: EntryCompletionMatchFunc -> IO Closure
entryCompletionMatchFuncClosure cb = newCClosure =<< mkEntryCompletionMatchFunc wrapped
    where wrapped = entryCompletionMatchFuncWrapper Nothing cb

type EntryCompletionMatchFuncC =
    Ptr EntryCompletion ->
    CString ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkEntryCompletionMatchFunc :: EntryCompletionMatchFuncC -> IO (FunPtr EntryCompletionMatchFuncC)

type EntryCompletionMatchFunc =
    EntryCompletion ->
    T.Text ->
    TreeIter ->
    IO Bool

noEntryCompletionMatchFunc :: Maybe EntryCompletionMatchFunc
noEntryCompletionMatchFunc = Nothing

entryCompletionMatchFuncWrapper ::
    Maybe (Ptr (FunPtr (EntryCompletionMatchFuncC))) ->
    EntryCompletionMatchFunc ->
    Ptr EntryCompletion ->
    CString ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt
entryCompletionMatchFuncWrapper funptrptr _cb completion key iter _ = do
    completion' <- (newObject EntryCompletion) completion
    key' <- cstringToText key
    iter' <- (newBoxed TreeIter) iter
    result <- _cb  completion' key' iter'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- object EntryIconAccessible 
newtype EntryIconAccessible = EntryIconAccessible (ForeignPtr EntryIconAccessible)
noEntryIconAccessible :: Maybe EntryIconAccessible
noEntryIconAccessible = Nothing

foreign import ccall "gtk_entry_icon_accessible_get_type"
    c_gtk_entry_icon_accessible_get_type :: IO GType

type instance ParentTypes EntryIconAccessible = '[Atk.Object, GObject.Object, Atk.Action, Atk.Component]

instance GObject EntryIconAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_entry_icon_accessible_get_type
    

class GObject o => EntryIconAccessibleK o
instance (GObject o, IsDescendantOf EntryIconAccessible o) => EntryIconAccessibleK o

toEntryIconAccessible :: EntryIconAccessibleK o => o -> IO EntryIconAccessible
toEntryIconAccessible = unsafeCastTo EntryIconAccessible

-- Enum EntryIconPosition

data EntryIconPosition = 
      EntryIconPositionPrimary
    | EntryIconPositionSecondary
    | AnotherEntryIconPosition Int
    deriving (Show, Eq)

instance Enum EntryIconPosition where
    fromEnum EntryIconPositionPrimary = 0
    fromEnum EntryIconPositionSecondary = 1
    fromEnum (AnotherEntryIconPosition k) = k

    toEnum 0 = EntryIconPositionPrimary
    toEnum 1 = EntryIconPositionSecondary
    toEnum k = AnotherEntryIconPosition k

foreign import ccall "gtk_entry_icon_position_get_type" c_gtk_entry_icon_position_get_type :: 
    IO GType

instance BoxedEnum EntryIconPosition where
    boxedEnumType _ = c_gtk_entry_icon_position_get_type

-- object EventBox 
newtype EventBox = EventBox (ForeignPtr EventBox)
noEventBox :: Maybe EventBox
noEventBox = Nothing

foreign import ccall "gtk_event_box_get_type"
    c_gtk_event_box_get_type :: IO GType

type instance ParentTypes EventBox = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject EventBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_event_box_get_type
    

class GObject o => EventBoxK o
instance (GObject o, IsDescendantOf EventBox o) => EventBoxK o

toEventBox :: EventBoxK o => o -> IO EventBox
toEventBox = unsafeCastTo EventBox

-- method EventBox::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "EventBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_event_box_new" gtk_event_box_new :: 
    IO (Ptr EventBox)


eventBoxNew ::
    (MonadIO m) =>
    m EventBox
eventBoxNew  = liftIO $ do
    result <- gtk_event_box_new
    checkUnexpectedReturnNULL "gtk_event_box_new" result
    result' <- (newObject EventBox) result
    return result'

-- method EventBox::get_above_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_event_box_get_above_child" gtk_event_box_get_above_child :: 
    Ptr EventBox ->                         -- _obj : TInterface "Gtk" "EventBox"
    IO CInt


eventBoxGetAboveChild ::
    (MonadIO m, EventBoxK a) =>
    a ->                                    -- _obj
    m Bool
eventBoxGetAboveChild _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_event_box_get_above_child _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method EventBox::get_visible_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_event_box_get_visible_window" gtk_event_box_get_visible_window :: 
    Ptr EventBox ->                         -- _obj : TInterface "Gtk" "EventBox"
    IO CInt


eventBoxGetVisibleWindow ::
    (MonadIO m, EventBoxK a) =>
    a ->                                    -- _obj
    m Bool
eventBoxGetVisibleWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_event_box_get_visible_window _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method EventBox::set_above_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "above_child", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "above_child", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_event_box_set_above_child" gtk_event_box_set_above_child :: 
    Ptr EventBox ->                         -- _obj : TInterface "Gtk" "EventBox"
    CInt ->                                 -- above_child : TBasicType TBoolean
    IO ()


eventBoxSetAboveChild ::
    (MonadIO m, EventBoxK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- above_child
    m ()
eventBoxSetAboveChild _obj above_child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let above_child' = (fromIntegral . fromEnum) above_child
    gtk_event_box_set_above_child _obj' above_child'
    touchManagedPtr _obj
    return ()

-- method EventBox::set_visible_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_window", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_window", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_event_box_set_visible_window" gtk_event_box_set_visible_window :: 
    Ptr EventBox ->                         -- _obj : TInterface "Gtk" "EventBox"
    CInt ->                                 -- visible_window : TBasicType TBoolean
    IO ()


eventBoxSetVisibleWindow ::
    (MonadIO m, EventBoxK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible_window
    m ()
eventBoxSetVisibleWindow _obj visible_window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible_window' = (fromIntegral . fromEnum) visible_window
    gtk_event_box_set_visible_window _obj' visible_window'
    touchManagedPtr _obj
    return ()

-- object EventController 
newtype EventController = EventController (ForeignPtr EventController)
noEventController :: Maybe EventController
noEventController = Nothing

foreign import ccall "gtk_event_controller_get_type"
    c_gtk_event_controller_get_type :: IO GType

type instance ParentTypes EventController = '[GObject.Object]

instance GObject EventController where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_event_controller_get_type
    

class GObject o => EventControllerK o
instance (GObject o, IsDescendantOf EventController o) => EventControllerK o

toEventController :: EventControllerK o => o -> IO EventController
toEventController = unsafeCastTo EventController

-- method EventController::get_propagation_phase
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PropagationPhase"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_event_controller_get_propagation_phase" gtk_event_controller_get_propagation_phase :: 
    Ptr EventController ->                  -- _obj : TInterface "Gtk" "EventController"
    IO CUInt


eventControllerGetPropagationPhase ::
    (MonadIO m, EventControllerK a) =>
    a ->                                    -- _obj
    m PropagationPhase
eventControllerGetPropagationPhase _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_event_controller_get_propagation_phase _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method EventController::get_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_event_controller_get_widget" gtk_event_controller_get_widget :: 
    Ptr EventController ->                  -- _obj : TInterface "Gtk" "EventController"
    IO (Ptr Widget)


eventControllerGetWidget ::
    (MonadIO m, EventControllerK a) =>
    a ->                                    -- _obj
    m Widget
eventControllerGetWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_event_controller_get_widget _obj'
    checkUnexpectedReturnNULL "gtk_event_controller_get_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method EventController::handle_event
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_event_controller_handle_event" gtk_event_controller_handle_event :: 
    Ptr EventController ->                  -- _obj : TInterface "Gtk" "EventController"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    IO CInt


eventControllerHandleEvent ::
    (MonadIO m, EventControllerK a) =>
    a ->                                    -- _obj
    Gdk.Event ->                            -- event
    m Bool
eventControllerHandleEvent _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_event_controller_handle_event _obj' event'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event
    return result'

-- method EventController::reset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_event_controller_reset" gtk_event_controller_reset :: 
    Ptr EventController ->                  -- _obj : TInterface "Gtk" "EventController"
    IO ()


eventControllerReset ::
    (MonadIO m, EventControllerK a) =>
    a ->                                    -- _obj
    m ()
eventControllerReset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_event_controller_reset _obj'
    touchManagedPtr _obj
    return ()

-- method EventController::set_propagation_phase
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "phase", argType = TInterface "Gtk" "PropagationPhase", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "EventController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "phase", argType = TInterface "Gtk" "PropagationPhase", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_event_controller_set_propagation_phase" gtk_event_controller_set_propagation_phase :: 
    Ptr EventController ->                  -- _obj : TInterface "Gtk" "EventController"
    CUInt ->                                -- phase : TInterface "Gtk" "PropagationPhase"
    IO ()


eventControllerSetPropagationPhase ::
    (MonadIO m, EventControllerK a) =>
    a ->                                    -- _obj
    PropagationPhase ->                     -- phase
    m ()
eventControllerSetPropagationPhase _obj phase = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let phase' = (fromIntegral . fromEnum) phase
    gtk_event_controller_set_propagation_phase _obj' phase'
    touchManagedPtr _obj
    return ()

-- Enum EventSequenceState

data EventSequenceState = 
      EventSequenceStateNone
    | EventSequenceStateClaimed
    | EventSequenceStateDenied
    | AnotherEventSequenceState Int
    deriving (Show, Eq)

instance Enum EventSequenceState where
    fromEnum EventSequenceStateNone = 0
    fromEnum EventSequenceStateClaimed = 1
    fromEnum EventSequenceStateDenied = 2
    fromEnum (AnotherEventSequenceState k) = k

    toEnum 0 = EventSequenceStateNone
    toEnum 1 = EventSequenceStateClaimed
    toEnum 2 = EventSequenceStateDenied
    toEnum k = AnotherEventSequenceState k

foreign import ccall "gtk_event_sequence_state_get_type" c_gtk_event_sequence_state_get_type :: 
    IO GType

instance BoxedEnum EventSequenceState where
    boxedEnumType _ = c_gtk_event_sequence_state_get_type

-- object Expander 
newtype Expander = Expander (ForeignPtr Expander)
noExpander :: Maybe Expander
noExpander = Nothing

foreign import ccall "gtk_expander_get_type"
    c_gtk_expander_get_type :: IO GType

type instance ParentTypes Expander = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Expander where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_expander_get_type
    

class GObject o => ExpanderK o
instance (GObject o, IsDescendantOf Expander o) => ExpanderK o

toExpander :: ExpanderK o => o -> IO Expander
toExpander = unsafeCastTo Expander

-- method Expander::new
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Expander"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_new" gtk_expander_new :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr Expander)


expanderNew ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m Expander
expanderNew label = liftIO $ do
    label' <- textToCString label
    result <- gtk_expander_new label'
    checkUnexpectedReturnNULL "gtk_expander_new" result
    result' <- (newObject Expander) result
    freeMem label'
    return result'

-- method Expander::new_with_mnemonic
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Expander"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_new_with_mnemonic" gtk_expander_new_with_mnemonic :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr Expander)


expanderNewWithMnemonic ::
    (MonadIO m) =>
    Maybe (T.Text) ->                       -- label
    m Expander
expanderNewWithMnemonic label = liftIO $ do
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    result <- gtk_expander_new_with_mnemonic maybeLabel
    checkUnexpectedReturnNULL "gtk_expander_new_with_mnemonic" result
    result' <- (newObject Expander) result
    freeMem maybeLabel
    return result'

-- method Expander::get_expanded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_get_expanded" gtk_expander_get_expanded :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    IO CInt


expanderGetExpanded ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    m Bool
expanderGetExpanded _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_expander_get_expanded _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Expander::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_get_label" gtk_expander_get_label :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    IO CString


expanderGetLabel ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    m T.Text
expanderGetLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_expander_get_label _obj'
    checkUnexpectedReturnNULL "gtk_expander_get_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Expander::get_label_fill
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_get_label_fill" gtk_expander_get_label_fill :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    IO CInt


expanderGetLabelFill ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    m Bool
expanderGetLabelFill _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_expander_get_label_fill _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Expander::get_label_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_get_label_widget" gtk_expander_get_label_widget :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    IO (Ptr Widget)


expanderGetLabelWidget ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    m Widget
expanderGetLabelWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_expander_get_label_widget _obj'
    checkUnexpectedReturnNULL "gtk_expander_get_label_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Expander::get_resize_toplevel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_get_resize_toplevel" gtk_expander_get_resize_toplevel :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    IO CInt


expanderGetResizeToplevel ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    m Bool
expanderGetResizeToplevel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_expander_get_resize_toplevel _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Expander::get_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_get_spacing" gtk_expander_get_spacing :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    IO Int32


expanderGetSpacing ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    m Int32
expanderGetSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_expander_get_spacing _obj'
    touchManagedPtr _obj
    return result

-- method Expander::get_use_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_get_use_markup" gtk_expander_get_use_markup :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    IO CInt


expanderGetUseMarkup ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    m Bool
expanderGetUseMarkup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_expander_get_use_markup _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Expander::get_use_underline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_get_use_underline" gtk_expander_get_use_underline :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    IO CInt


expanderGetUseUnderline ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    m Bool
expanderGetUseUnderline _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_expander_get_use_underline _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Expander::set_expanded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expanded", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expanded", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_set_expanded" gtk_expander_set_expanded :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    CInt ->                                 -- expanded : TBasicType TBoolean
    IO ()


expanderSetExpanded ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- expanded
    m ()
expanderSetExpanded _obj expanded = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let expanded' = (fromIntegral . fromEnum) expanded
    gtk_expander_set_expanded _obj' expanded'
    touchManagedPtr _obj
    return ()

-- method Expander::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_set_label" gtk_expander_set_label :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    CString ->                              -- label : TBasicType TUTF8
    IO ()


expanderSetLabel ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- label
    m ()
expanderSetLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    gtk_expander_set_label _obj' maybeLabel
    touchManagedPtr _obj
    freeMem maybeLabel
    return ()

-- method Expander::set_label_fill
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_fill", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_fill", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_set_label_fill" gtk_expander_set_label_fill :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    CInt ->                                 -- label_fill : TBasicType TBoolean
    IO ()


expanderSetLabelFill ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- label_fill
    m ()
expanderSetLabelFill _obj label_fill = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let label_fill' = (fromIntegral . fromEnum) label_fill
    gtk_expander_set_label_fill _obj' label_fill'
    touchManagedPtr _obj
    return ()

-- method Expander::set_label_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_set_label_widget" gtk_expander_set_label_widget :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    Ptr Widget ->                           -- label_widget : TInterface "Gtk" "Widget"
    IO ()


expanderSetLabelWidget ::
    (MonadIO m, ExpanderK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- label_widget
    m ()
expanderSetLabelWidget _obj label_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLabel_widget <- case label_widget of
        Nothing -> return nullPtr
        Just jLabel_widget -> do
            let jLabel_widget' = unsafeManagedPtrCastPtr jLabel_widget
            return jLabel_widget'
    gtk_expander_set_label_widget _obj' maybeLabel_widget
    touchManagedPtr _obj
    whenJust label_widget touchManagedPtr
    return ()

-- method Expander::set_resize_toplevel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resize_toplevel", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resize_toplevel", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_set_resize_toplevel" gtk_expander_set_resize_toplevel :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    CInt ->                                 -- resize_toplevel : TBasicType TBoolean
    IO ()


expanderSetResizeToplevel ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- resize_toplevel
    m ()
expanderSetResizeToplevel _obj resize_toplevel = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let resize_toplevel' = (fromIntegral . fromEnum) resize_toplevel
    gtk_expander_set_resize_toplevel _obj' resize_toplevel'
    touchManagedPtr _obj
    return ()

-- method Expander::set_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_set_spacing" gtk_expander_set_spacing :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    Int32 ->                                -- spacing : TBasicType TInt32
    IO ()


expanderSetSpacing ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- spacing
    m ()
expanderSetSpacing _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_expander_set_spacing _obj' spacing
    touchManagedPtr _obj
    return ()

-- method Expander::set_use_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_markup", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_markup", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_set_use_markup" gtk_expander_set_use_markup :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    CInt ->                                 -- use_markup : TBasicType TBoolean
    IO ()


expanderSetUseMarkup ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_markup
    m ()
expanderSetUseMarkup _obj use_markup = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_markup' = (fromIntegral . fromEnum) use_markup
    gtk_expander_set_use_markup _obj' use_markup'
    touchManagedPtr _obj
    return ()

-- method Expander::set_use_underline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_underline", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Expander", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_underline", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_expander_set_use_underline" gtk_expander_set_use_underline :: 
    Ptr Expander ->                         -- _obj : TInterface "Gtk" "Expander"
    CInt ->                                 -- use_underline : TBasicType TBoolean
    IO ()


expanderSetUseUnderline ::
    (MonadIO m, ExpanderK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_underline
    m ()
expanderSetUseUnderline _obj use_underline = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_underline' = (fromIntegral . fromEnum) use_underline
    gtk_expander_set_use_underline _obj' use_underline'
    touchManagedPtr _obj
    return ()

-- signal Expander::activate
type ExpanderActivateCallback =
    IO ()

noExpanderActivateCallback :: Maybe ExpanderActivateCallback
noExpanderActivateCallback = Nothing

type ExpanderActivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkExpanderActivateCallback :: ExpanderActivateCallbackC -> IO (FunPtr ExpanderActivateCallbackC)

expanderActivateClosure :: ExpanderActivateCallback -> IO Closure
expanderActivateClosure cb = newCClosure =<< mkExpanderActivateCallback wrapped
    where wrapped = expanderActivateCallbackWrapper cb

expanderActivateCallbackWrapper ::
    ExpanderActivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
expanderActivateCallbackWrapper _cb _ _ = do
    _cb 

onExpanderActivate :: (GObject a, MonadIO m) => a -> ExpanderActivateCallback -> m SignalHandlerId
onExpanderActivate obj cb = liftIO $ connectExpanderActivate obj cb SignalConnectBefore
afterExpanderActivate :: (GObject a, MonadIO m) => a -> ExpanderActivateCallback -> m SignalHandlerId
afterExpanderActivate obj cb = connectExpanderActivate obj cb SignalConnectAfter

connectExpanderActivate :: (GObject a, MonadIO m) =>
                           a -> ExpanderActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectExpanderActivate obj cb after = liftIO $ do
    cb' <- mkExpanderActivateCallback (expanderActivateCallbackWrapper cb)
    connectSignalFunPtr obj "activate" cb' after

-- object ExpanderAccessible 
newtype ExpanderAccessible = ExpanderAccessible (ForeignPtr ExpanderAccessible)
noExpanderAccessible :: Maybe ExpanderAccessible
noExpanderAccessible = Nothing

foreign import ccall "gtk_expander_accessible_get_type"
    c_gtk_expander_accessible_get_type :: IO GType

type instance ParentTypes ExpanderAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component]

instance GObject ExpanderAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_expander_accessible_get_type
    

class GObject o => ExpanderAccessibleK o
instance (GObject o, IsDescendantOf ExpanderAccessible o) => ExpanderAccessibleK o

toExpanderAccessible :: ExpanderAccessibleK o => o -> IO ExpanderAccessible
toExpanderAccessible = unsafeCastTo ExpanderAccessible

-- Enum ExpanderStyle

data ExpanderStyle = 
      ExpanderStyleCollapsed
    | ExpanderStyleSemiCollapsed
    | ExpanderStyleSemiExpanded
    | ExpanderStyleExpanded
    | AnotherExpanderStyle Int
    deriving (Show, Eq)

instance Enum ExpanderStyle where
    fromEnum ExpanderStyleCollapsed = 0
    fromEnum ExpanderStyleSemiCollapsed = 1
    fromEnum ExpanderStyleSemiExpanded = 2
    fromEnum ExpanderStyleExpanded = 3
    fromEnum (AnotherExpanderStyle k) = k

    toEnum 0 = ExpanderStyleCollapsed
    toEnum 1 = ExpanderStyleSemiCollapsed
    toEnum 2 = ExpanderStyleSemiExpanded
    toEnum 3 = ExpanderStyleExpanded
    toEnum k = AnotherExpanderStyle k

foreign import ccall "gtk_expander_style_get_type" c_gtk_expander_style_get_type :: 
    IO GType

instance BoxedEnum ExpanderStyle where
    boxedEnumType _ = c_gtk_expander_style_get_type

-- interface FileChooser 

newtype FileChooser = FileChooser (ForeignPtr FileChooser)
noFileChooser :: Maybe FileChooser
noFileChooser = Nothing

foreign import ccall "gtk_file_chooser_get_type"
    c_gtk_file_chooser_get_type :: IO GType

type instance ParentTypes FileChooser = '[Widget, GObject.Object]

instance GObject FileChooser where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_file_chooser_get_type
    

class GObject o => FileChooserK o
instance (GObject o, IsDescendantOf FileChooser o) => FileChooserK o

toFileChooser :: FileChooserK o => o -> IO FileChooser
toFileChooser = unsafeCastTo FileChooser

-- method FileChooser::add_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_add_filter" gtk_file_chooser_add_filter :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    Ptr FileFilter ->                       -- filter : TInterface "Gtk" "FileFilter"
    IO ()


fileChooserAddFilter ::
    (MonadIO m, FileChooserK a, FileFilterK b) =>
    a ->                                    -- _obj
    b ->                                    -- filter
    m ()
fileChooserAddFilter _obj filter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filter' <- refObject filter
    gtk_file_chooser_add_filter _obj' filter'
    touchManagedPtr _obj
    touchManagedPtr filter
    return ()

-- method FileChooser::add_shortcut_folder
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "folder", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "folder", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_file_chooser_add_shortcut_folder" gtk_file_chooser_add_shortcut_folder :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- folder : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO CInt


fileChooserAddShortcutFolder ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- folder
    m ()
fileChooserAddShortcutFolder _obj folder = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    folder' <- stringToCString folder
    onException (do
        _ <- propagateGError $ gtk_file_chooser_add_shortcut_folder _obj' folder'
        touchManagedPtr _obj
        freeMem folder'
        return ()
     ) (do
        freeMem folder'
     )

-- method FileChooser::add_shortcut_folder_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_file_chooser_add_shortcut_folder_uri" gtk_file_chooser_add_shortcut_folder_uri :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- uri : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt


fileChooserAddShortcutFolderUri ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m ()
fileChooserAddShortcutFolderUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    onException (do
        _ <- propagateGError $ gtk_file_chooser_add_shortcut_folder_uri _obj' uri'
        touchManagedPtr _obj
        freeMem uri'
        return ()
     ) (do
        freeMem uri'
     )

-- method FileChooser::get_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "FileChooserAction"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_action" gtk_file_chooser_get_action :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CUInt


fileChooserGetAction ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m FileChooserAction
fileChooserGetAction _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_action _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_create_folders
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_create_folders" gtk_file_chooser_get_create_folders :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CInt


fileChooserGetCreateFolders ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Bool
fileChooserGetCreateFolders _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_create_folders _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_current_folder
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFileName
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_current_folder" gtk_file_chooser_get_current_folder :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CString


fileChooserGetCurrentFolder ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m [Char]
fileChooserGetCurrentFolder _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_current_folder _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_current_folder" result
    result' <- cstringToString result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_current_folder_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_current_folder_file" gtk_file_chooser_get_current_folder_file :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr Gio.File)


fileChooserGetCurrentFolderFile ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Gio.File
fileChooserGetCurrentFolderFile _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_current_folder_file _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_current_folder_file" result
    result' <- (wrapObject Gio.File) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_current_folder_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_current_folder_uri" gtk_file_chooser_get_current_folder_uri :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CString


fileChooserGetCurrentFolderUri ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m T.Text
fileChooserGetCurrentFolderUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_current_folder_uri _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_current_folder_uri" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_current_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_current_name" gtk_file_chooser_get_current_name :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CString


fileChooserGetCurrentName ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m T.Text
fileChooserGetCurrentName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_current_name _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_current_name" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_do_overwrite_confirmation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_do_overwrite_confirmation" gtk_file_chooser_get_do_overwrite_confirmation :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CInt


fileChooserGetDoOverwriteConfirmation ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Bool
fileChooserGetDoOverwriteConfirmation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_do_overwrite_confirmation _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_extra_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_extra_widget" gtk_file_chooser_get_extra_widget :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr Widget)


fileChooserGetExtraWidget ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Widget
fileChooserGetExtraWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_extra_widget _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_extra_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_file" gtk_file_chooser_get_file :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr Gio.File)


fileChooserGetFile ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Gio.File
fileChooserGetFile _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_file _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_file" result
    result' <- (wrapObject Gio.File) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_filename
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFileName
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_filename" gtk_file_chooser_get_filename :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CString


fileChooserGetFilename ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m [Char]
fileChooserGetFilename _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_filename _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_filename" result
    result' <- cstringToString result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_filenames
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TBasicType TFileName)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_filenames" gtk_file_chooser_get_filenames :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr (GSList CString))


fileChooserGetFilenames ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m [[Char]]
fileChooserGetFilenames _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_filenames _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_filenames" result
    result' <- unpackGSList result
    result'' <- mapM cstringToString result'
    mapGSList freeMem result
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method FileChooser::get_files
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gio" "File")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_files" gtk_file_chooser_get_files :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr (GSList (Ptr Gio.File)))


fileChooserGetFiles ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m [Gio.File]
fileChooserGetFiles _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_files _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_files" result
    result' <- unpackGSList result
    result'' <- mapM (wrapObject Gio.File) result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method FileChooser::get_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "FileFilter"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_filter" gtk_file_chooser_get_filter :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr FileFilter)


fileChooserGetFilter ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m FileFilter
fileChooserGetFilter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_filter _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_filter" result
    result' <- (newObject FileFilter) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_local_only
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_local_only" gtk_file_chooser_get_local_only :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CInt


fileChooserGetLocalOnly ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Bool
fileChooserGetLocalOnly _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_local_only _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_preview_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_preview_file" gtk_file_chooser_get_preview_file :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr Gio.File)


fileChooserGetPreviewFile ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Gio.File
fileChooserGetPreviewFile _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_preview_file _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_preview_file" result
    result' <- (wrapObject Gio.File) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_preview_filename
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFileName
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_preview_filename" gtk_file_chooser_get_preview_filename :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CString


fileChooserGetPreviewFilename ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m [Char]
fileChooserGetPreviewFilename _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_preview_filename _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_preview_filename" result
    result' <- cstringToString result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_preview_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_preview_uri" gtk_file_chooser_get_preview_uri :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CString


fileChooserGetPreviewUri ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m T.Text
fileChooserGetPreviewUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_preview_uri _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_preview_uri" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_preview_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_preview_widget" gtk_file_chooser_get_preview_widget :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr Widget)


fileChooserGetPreviewWidget ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Widget
fileChooserGetPreviewWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_preview_widget _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_preview_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_preview_widget_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_preview_widget_active" gtk_file_chooser_get_preview_widget_active :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CInt


fileChooserGetPreviewWidgetActive ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Bool
fileChooserGetPreviewWidgetActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_preview_widget_active _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_select_multiple
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_select_multiple" gtk_file_chooser_get_select_multiple :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CInt


fileChooserGetSelectMultiple ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Bool
fileChooserGetSelectMultiple _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_select_multiple _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_show_hidden
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_show_hidden" gtk_file_chooser_get_show_hidden :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CInt


fileChooserGetShowHidden ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Bool
fileChooserGetShowHidden _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_show_hidden _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_uri" gtk_file_chooser_get_uri :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CString


fileChooserGetUri ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m T.Text
fileChooserGetUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_uri _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_uri" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method FileChooser::get_uris
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_uris" gtk_file_chooser_get_uris :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr (GSList CString))


fileChooserGetUris ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m [T.Text]
fileChooserGetUris _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_uris _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_get_uris" result
    result' <- unpackGSList result
    result'' <- mapM cstringToText result'
    mapGSList freeMem result
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method FileChooser::get_use_preview_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_get_use_preview_label" gtk_file_chooser_get_use_preview_label :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO CInt


fileChooserGetUsePreviewLabel ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m Bool
fileChooserGetUsePreviewLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_get_use_preview_label _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FileChooser::list_filters
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "FileFilter")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_list_filters" gtk_file_chooser_list_filters :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr (GSList (Ptr FileFilter)))


fileChooserListFilters ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m [FileFilter]
fileChooserListFilters _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_list_filters _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_list_filters" result
    result' <- unpackGSList result
    result'' <- mapM (newObject FileFilter) result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method FileChooser::list_shortcut_folder_uris
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_list_shortcut_folder_uris" gtk_file_chooser_list_shortcut_folder_uris :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr (GSList CString))


fileChooserListShortcutFolderUris ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m [T.Text]
fileChooserListShortcutFolderUris _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_list_shortcut_folder_uris _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_list_shortcut_folder_uris" result
    result' <- unpackGSList result
    result'' <- mapM cstringToText result'
    mapGSList freeMem result
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method FileChooser::list_shortcut_folders
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TBasicType TFileName)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_list_shortcut_folders" gtk_file_chooser_list_shortcut_folders :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO (Ptr (GSList CString))


fileChooserListShortcutFolders ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m [[Char]]
fileChooserListShortcutFolders _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_list_shortcut_folders _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_list_shortcut_folders" result
    result' <- unpackGSList result
    result'' <- mapM cstringToString result'
    mapGSList freeMem result
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method FileChooser::remove_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_remove_filter" gtk_file_chooser_remove_filter :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    Ptr FileFilter ->                       -- filter : TInterface "Gtk" "FileFilter"
    IO ()


fileChooserRemoveFilter ::
    (MonadIO m, FileChooserK a, FileFilterK b) =>
    a ->                                    -- _obj
    b ->                                    -- filter
    m ()
fileChooserRemoveFilter _obj filter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let filter' = unsafeManagedPtrCastPtr filter
    gtk_file_chooser_remove_filter _obj' filter'
    touchManagedPtr _obj
    touchManagedPtr filter
    return ()

-- method FileChooser::remove_shortcut_folder
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "folder", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "folder", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_file_chooser_remove_shortcut_folder" gtk_file_chooser_remove_shortcut_folder :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- folder : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO CInt


fileChooserRemoveShortcutFolder ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- folder
    m ()
fileChooserRemoveShortcutFolder _obj folder = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    folder' <- stringToCString folder
    onException (do
        _ <- propagateGError $ gtk_file_chooser_remove_shortcut_folder _obj' folder'
        touchManagedPtr _obj
        freeMem folder'
        return ()
     ) (do
        freeMem folder'
     )

-- method FileChooser::remove_shortcut_folder_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_file_chooser_remove_shortcut_folder_uri" gtk_file_chooser_remove_shortcut_folder_uri :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- uri : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt


fileChooserRemoveShortcutFolderUri ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m ()
fileChooserRemoveShortcutFolderUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    onException (do
        _ <- propagateGError $ gtk_file_chooser_remove_shortcut_folder_uri _obj' uri'
        touchManagedPtr _obj
        freeMem uri'
        return ()
     ) (do
        freeMem uri'
     )

-- method FileChooser::select_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_select_all" gtk_file_chooser_select_all :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO ()


fileChooserSelectAll ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m ()
fileChooserSelectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_file_chooser_select_all _obj'
    touchManagedPtr _obj
    return ()

-- method FileChooser::select_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_file_chooser_select_file" gtk_file_chooser_select_file :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    Ptr Gio.File ->                         -- file : TInterface "Gio" "File"
    Ptr (Ptr GError) ->                     -- error
    IO CInt


fileChooserSelectFile ::
    (MonadIO m, FileChooserK a, Gio.FileK b) =>
    a ->                                    -- _obj
    b ->                                    -- file
    m ()
fileChooserSelectFile _obj file = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let file' = unsafeManagedPtrCastPtr file
    onException (do
        _ <- propagateGError $ gtk_file_chooser_select_file _obj' file'
        touchManagedPtr _obj
        touchManagedPtr file
        return ()
     ) (do
        return ()
     )

-- method FileChooser::select_filename
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_select_filename" gtk_file_chooser_select_filename :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- filename : TBasicType TFileName
    IO CInt


fileChooserSelectFilename ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- filename
    m Bool
fileChooserSelectFilename _obj filename = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filename' <- stringToCString filename
    result <- gtk_file_chooser_select_filename _obj' filename'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem filename'
    return result'

-- method FileChooser::select_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_select_uri" gtk_file_chooser_select_uri :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- uri : TBasicType TUTF8
    IO CInt


fileChooserSelectUri ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m Bool
fileChooserSelectUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    result <- gtk_file_chooser_select_uri _obj' uri'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem uri'
    return result'

-- method FileChooser::set_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "FileChooserAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "FileChooserAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_action" gtk_file_chooser_set_action :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CUInt ->                                -- action : TInterface "Gtk" "FileChooserAction"
    IO ()


fileChooserSetAction ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    FileChooserAction ->                    -- action
    m ()
fileChooserSetAction _obj action = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action' = (fromIntegral . fromEnum) action
    gtk_file_chooser_set_action _obj' action'
    touchManagedPtr _obj
    return ()

-- method FileChooser::set_create_folders
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "create_folders", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "create_folders", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_create_folders" gtk_file_chooser_set_create_folders :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CInt ->                                 -- create_folders : TBasicType TBoolean
    IO ()


fileChooserSetCreateFolders ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- create_folders
    m ()
fileChooserSetCreateFolders _obj create_folders = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let create_folders' = (fromIntegral . fromEnum) create_folders
    gtk_file_chooser_set_create_folders _obj' create_folders'
    touchManagedPtr _obj
    return ()

-- method FileChooser::set_current_folder
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_current_folder" gtk_file_chooser_set_current_folder :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- filename : TBasicType TFileName
    IO CInt


fileChooserSetCurrentFolder ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- filename
    m Bool
fileChooserSetCurrentFolder _obj filename = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filename' <- stringToCString filename
    result <- gtk_file_chooser_set_current_folder _obj' filename'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem filename'
    return result'

-- method FileChooser::set_current_folder_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_current_folder_file" gtk_file_chooser_set_current_folder_file :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    Ptr Gio.File ->                         -- file : TInterface "Gio" "File"
    Ptr (Ptr GError) ->                     -- error
    IO CInt


fileChooserSetCurrentFolderFile ::
    (MonadIO m, FileChooserK a, Gio.FileK b) =>
    a ->                                    -- _obj
    b ->                                    -- file
    m ()
fileChooserSetCurrentFolderFile _obj file = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let file' = unsafeManagedPtrCastPtr file
    onException (do
        _ <- propagateGError $ gtk_file_chooser_set_current_folder_file _obj' file'
        touchManagedPtr _obj
        touchManagedPtr file
        return ()
     ) (do
        return ()
     )

-- method FileChooser::set_current_folder_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_current_folder_uri" gtk_file_chooser_set_current_folder_uri :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- uri : TBasicType TUTF8
    IO CInt


fileChooserSetCurrentFolderUri ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m Bool
fileChooserSetCurrentFolderUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    result <- gtk_file_chooser_set_current_folder_uri _obj' uri'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem uri'
    return result'

-- method FileChooser::set_current_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_current_name" gtk_file_chooser_set_current_name :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- name : TBasicType TFileName
    IO ()


fileChooserSetCurrentName ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- name
    m ()
fileChooserSetCurrentName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- stringToCString name
    gtk_file_chooser_set_current_name _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method FileChooser::set_do_overwrite_confirmation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "do_overwrite_confirmation", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "do_overwrite_confirmation", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_do_overwrite_confirmation" gtk_file_chooser_set_do_overwrite_confirmation :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CInt ->                                 -- do_overwrite_confirmation : TBasicType TBoolean
    IO ()


fileChooserSetDoOverwriteConfirmation ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- do_overwrite_confirmation
    m ()
fileChooserSetDoOverwriteConfirmation _obj do_overwrite_confirmation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let do_overwrite_confirmation' = (fromIntegral . fromEnum) do_overwrite_confirmation
    gtk_file_chooser_set_do_overwrite_confirmation _obj' do_overwrite_confirmation'
    touchManagedPtr _obj
    return ()

-- method FileChooser::set_extra_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "extra_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "extra_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_extra_widget" gtk_file_chooser_set_extra_widget :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    Ptr Widget ->                           -- extra_widget : TInterface "Gtk" "Widget"
    IO ()


fileChooserSetExtraWidget ::
    (MonadIO m, FileChooserK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- extra_widget
    m ()
fileChooserSetExtraWidget _obj extra_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let extra_widget' = unsafeManagedPtrCastPtr extra_widget
    gtk_file_chooser_set_extra_widget _obj' extra_widget'
    touchManagedPtr _obj
    touchManagedPtr extra_widget
    return ()

-- method FileChooser::set_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_file" gtk_file_chooser_set_file :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    Ptr Gio.File ->                         -- file : TInterface "Gio" "File"
    Ptr (Ptr GError) ->                     -- error
    IO CInt


fileChooserSetFile ::
    (MonadIO m, FileChooserK a, Gio.FileK b) =>
    a ->                                    -- _obj
    b ->                                    -- file
    m ()
fileChooserSetFile _obj file = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let file' = unsafeManagedPtrCastPtr file
    onException (do
        _ <- propagateGError $ gtk_file_chooser_set_file _obj' file'
        touchManagedPtr _obj
        touchManagedPtr file
        return ()
     ) (do
        return ()
     )

-- method FileChooser::set_filename
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_filename" gtk_file_chooser_set_filename :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- filename : TBasicType TFileName
    IO CInt


fileChooserSetFilename ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- filename
    m Bool
fileChooserSetFilename _obj filename = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filename' <- stringToCString filename
    result <- gtk_file_chooser_set_filename _obj' filename'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem filename'
    return result'

-- method FileChooser::set_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_filter" gtk_file_chooser_set_filter :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    Ptr FileFilter ->                       -- filter : TInterface "Gtk" "FileFilter"
    IO ()


fileChooserSetFilter ::
    (MonadIO m, FileChooserK a, FileFilterK b) =>
    a ->                                    -- _obj
    b ->                                    -- filter
    m ()
fileChooserSetFilter _obj filter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let filter' = unsafeManagedPtrCastPtr filter
    gtk_file_chooser_set_filter _obj' filter'
    touchManagedPtr _obj
    touchManagedPtr filter
    return ()

-- method FileChooser::set_local_only
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "local_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "local_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_local_only" gtk_file_chooser_set_local_only :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CInt ->                                 -- local_only : TBasicType TBoolean
    IO ()


fileChooserSetLocalOnly ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- local_only
    m ()
fileChooserSetLocalOnly _obj local_only = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let local_only' = (fromIntegral . fromEnum) local_only
    gtk_file_chooser_set_local_only _obj' local_only'
    touchManagedPtr _obj
    return ()

-- method FileChooser::set_preview_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "preview_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "preview_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_preview_widget" gtk_file_chooser_set_preview_widget :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    Ptr Widget ->                           -- preview_widget : TInterface "Gtk" "Widget"
    IO ()


fileChooserSetPreviewWidget ::
    (MonadIO m, FileChooserK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- preview_widget
    m ()
fileChooserSetPreviewWidget _obj preview_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let preview_widget' = unsafeManagedPtrCastPtr preview_widget
    gtk_file_chooser_set_preview_widget _obj' preview_widget'
    touchManagedPtr _obj
    touchManagedPtr preview_widget
    return ()

-- method FileChooser::set_preview_widget_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_preview_widget_active" gtk_file_chooser_set_preview_widget_active :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CInt ->                                 -- active : TBasicType TBoolean
    IO ()


fileChooserSetPreviewWidgetActive ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- active
    m ()
fileChooserSetPreviewWidgetActive _obj active = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let active' = (fromIntegral . fromEnum) active
    gtk_file_chooser_set_preview_widget_active _obj' active'
    touchManagedPtr _obj
    return ()

-- method FileChooser::set_select_multiple
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "select_multiple", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "select_multiple", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_select_multiple" gtk_file_chooser_set_select_multiple :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CInt ->                                 -- select_multiple : TBasicType TBoolean
    IO ()


fileChooserSetSelectMultiple ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- select_multiple
    m ()
fileChooserSetSelectMultiple _obj select_multiple = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let select_multiple' = (fromIntegral . fromEnum) select_multiple
    gtk_file_chooser_set_select_multiple _obj' select_multiple'
    touchManagedPtr _obj
    return ()

-- method FileChooser::set_show_hidden
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_hidden", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_hidden", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_show_hidden" gtk_file_chooser_set_show_hidden :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CInt ->                                 -- show_hidden : TBasicType TBoolean
    IO ()


fileChooserSetShowHidden ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_hidden
    m ()
fileChooserSetShowHidden _obj show_hidden = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_hidden' = (fromIntegral . fromEnum) show_hidden
    gtk_file_chooser_set_show_hidden _obj' show_hidden'
    touchManagedPtr _obj
    return ()

-- method FileChooser::set_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_uri" gtk_file_chooser_set_uri :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- uri : TBasicType TUTF8
    IO CInt


fileChooserSetUri ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m Bool
fileChooserSetUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    result <- gtk_file_chooser_set_uri _obj' uri'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem uri'
    return result'

-- method FileChooser::set_use_preview_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_label", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_label", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_set_use_preview_label" gtk_file_chooser_set_use_preview_label :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CInt ->                                 -- use_label : TBasicType TBoolean
    IO ()


fileChooserSetUsePreviewLabel ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_label
    m ()
fileChooserSetUsePreviewLabel _obj use_label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_label' = (fromIntegral . fromEnum) use_label
    gtk_file_chooser_set_use_preview_label _obj' use_label'
    touchManagedPtr _obj
    return ()

-- method FileChooser::unselect_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_unselect_all" gtk_file_chooser_unselect_all :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    IO ()


fileChooserUnselectAll ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    m ()
fileChooserUnselectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_file_chooser_unselect_all _obj'
    touchManagedPtr _obj
    return ()

-- method FileChooser::unselect_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_unselect_file" gtk_file_chooser_unselect_file :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    Ptr Gio.File ->                         -- file : TInterface "Gio" "File"
    IO ()


fileChooserUnselectFile ::
    (MonadIO m, FileChooserK a, Gio.FileK b) =>
    a ->                                    -- _obj
    b ->                                    -- file
    m ()
fileChooserUnselectFile _obj file = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let file' = unsafeManagedPtrCastPtr file
    gtk_file_chooser_unselect_file _obj' file'
    touchManagedPtr _obj
    touchManagedPtr file
    return ()

-- method FileChooser::unselect_filename
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_unselect_filename" gtk_file_chooser_unselect_filename :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- filename : TBasicType TFileName
    IO ()


fileChooserUnselectFilename ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- filename
    m ()
fileChooserUnselectFilename _obj filename = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filename' <- stringToCString filename
    gtk_file_chooser_unselect_filename _obj' filename'
    touchManagedPtr _obj
    freeMem filename'
    return ()

-- method FileChooser::unselect_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_unselect_uri" gtk_file_chooser_unselect_uri :: 
    Ptr FileChooser ->                      -- _obj : TInterface "Gtk" "FileChooser"
    CString ->                              -- uri : TBasicType TUTF8
    IO ()


fileChooserUnselectUri ::
    (MonadIO m, FileChooserK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m ()
fileChooserUnselectUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    gtk_file_chooser_unselect_uri _obj' uri'
    touchManagedPtr _obj
    freeMem uri'
    return ()

-- signal FileChooser::confirm-overwrite
type FileChooserConfirmOverwriteCallback =
    IO FileChooserConfirmation

noFileChooserConfirmOverwriteCallback :: Maybe FileChooserConfirmOverwriteCallback
noFileChooserConfirmOverwriteCallback = Nothing

type FileChooserConfirmOverwriteCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CUInt

foreign import ccall "wrapper"
    mkFileChooserConfirmOverwriteCallback :: FileChooserConfirmOverwriteCallbackC -> IO (FunPtr FileChooserConfirmOverwriteCallbackC)

fileChooserConfirmOverwriteClosure :: FileChooserConfirmOverwriteCallback -> IO Closure
fileChooserConfirmOverwriteClosure cb = newCClosure =<< mkFileChooserConfirmOverwriteCallback wrapped
    where wrapped = fileChooserConfirmOverwriteCallbackWrapper cb

fileChooserConfirmOverwriteCallbackWrapper ::
    FileChooserConfirmOverwriteCallback ->
    Ptr () ->
    Ptr () ->
    IO CUInt
fileChooserConfirmOverwriteCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onFileChooserConfirmOverwrite :: (GObject a, MonadIO m) => a -> FileChooserConfirmOverwriteCallback -> m SignalHandlerId
onFileChooserConfirmOverwrite obj cb = liftIO $ connectFileChooserConfirmOverwrite obj cb SignalConnectBefore
afterFileChooserConfirmOverwrite :: (GObject a, MonadIO m) => a -> FileChooserConfirmOverwriteCallback -> m SignalHandlerId
afterFileChooserConfirmOverwrite obj cb = connectFileChooserConfirmOverwrite obj cb SignalConnectAfter

connectFileChooserConfirmOverwrite :: (GObject a, MonadIO m) =>
                                      a -> FileChooserConfirmOverwriteCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserConfirmOverwrite obj cb after = liftIO $ do
    cb' <- mkFileChooserConfirmOverwriteCallback (fileChooserConfirmOverwriteCallbackWrapper cb)
    connectSignalFunPtr obj "confirm-overwrite" cb' after

-- signal FileChooser::current-folder-changed
type FileChooserCurrentFolderChangedCallback =
    IO ()

noFileChooserCurrentFolderChangedCallback :: Maybe FileChooserCurrentFolderChangedCallback
noFileChooserCurrentFolderChangedCallback = Nothing

type FileChooserCurrentFolderChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserCurrentFolderChangedCallback :: FileChooserCurrentFolderChangedCallbackC -> IO (FunPtr FileChooserCurrentFolderChangedCallbackC)

fileChooserCurrentFolderChangedClosure :: FileChooserCurrentFolderChangedCallback -> IO Closure
fileChooserCurrentFolderChangedClosure cb = newCClosure =<< mkFileChooserCurrentFolderChangedCallback wrapped
    where wrapped = fileChooserCurrentFolderChangedCallbackWrapper cb

fileChooserCurrentFolderChangedCallbackWrapper ::
    FileChooserCurrentFolderChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserCurrentFolderChangedCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserCurrentFolderChanged :: (GObject a, MonadIO m) => a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
onFileChooserCurrentFolderChanged obj cb = liftIO $ connectFileChooserCurrentFolderChanged obj cb SignalConnectBefore
afterFileChooserCurrentFolderChanged :: (GObject a, MonadIO m) => a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
afterFileChooserCurrentFolderChanged obj cb = connectFileChooserCurrentFolderChanged obj cb SignalConnectAfter

connectFileChooserCurrentFolderChanged :: (GObject a, MonadIO m) =>
                                          a -> FileChooserCurrentFolderChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserCurrentFolderChanged obj cb after = liftIO $ do
    cb' <- mkFileChooserCurrentFolderChangedCallback (fileChooserCurrentFolderChangedCallbackWrapper cb)
    connectSignalFunPtr obj "current-folder-changed" cb' after

-- signal FileChooser::file-activated
type FileChooserFileActivatedCallback =
    IO ()

noFileChooserFileActivatedCallback :: Maybe FileChooserFileActivatedCallback
noFileChooserFileActivatedCallback = Nothing

type FileChooserFileActivatedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserFileActivatedCallback :: FileChooserFileActivatedCallbackC -> IO (FunPtr FileChooserFileActivatedCallbackC)

fileChooserFileActivatedClosure :: FileChooserFileActivatedCallback -> IO Closure
fileChooserFileActivatedClosure cb = newCClosure =<< mkFileChooserFileActivatedCallback wrapped
    where wrapped = fileChooserFileActivatedCallbackWrapper cb

fileChooserFileActivatedCallbackWrapper ::
    FileChooserFileActivatedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserFileActivatedCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserFileActivated :: (GObject a, MonadIO m) => a -> FileChooserFileActivatedCallback -> m SignalHandlerId
onFileChooserFileActivated obj cb = liftIO $ connectFileChooserFileActivated obj cb SignalConnectBefore
afterFileChooserFileActivated :: (GObject a, MonadIO m) => a -> FileChooserFileActivatedCallback -> m SignalHandlerId
afterFileChooserFileActivated obj cb = connectFileChooserFileActivated obj cb SignalConnectAfter

connectFileChooserFileActivated :: (GObject a, MonadIO m) =>
                                   a -> FileChooserFileActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserFileActivated obj cb after = liftIO $ do
    cb' <- mkFileChooserFileActivatedCallback (fileChooserFileActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "file-activated" cb' after

-- signal FileChooser::selection-changed
type FileChooserSelectionChangedCallback =
    IO ()

noFileChooserSelectionChangedCallback :: Maybe FileChooserSelectionChangedCallback
noFileChooserSelectionChangedCallback = Nothing

type FileChooserSelectionChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserSelectionChangedCallback :: FileChooserSelectionChangedCallbackC -> IO (FunPtr FileChooserSelectionChangedCallbackC)

fileChooserSelectionChangedClosure :: FileChooserSelectionChangedCallback -> IO Closure
fileChooserSelectionChangedClosure cb = newCClosure =<< mkFileChooserSelectionChangedCallback wrapped
    where wrapped = fileChooserSelectionChangedCallbackWrapper cb

fileChooserSelectionChangedCallbackWrapper ::
    FileChooserSelectionChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserSelectionChangedCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserSelectionChanged :: (GObject a, MonadIO m) => a -> FileChooserSelectionChangedCallback -> m SignalHandlerId
onFileChooserSelectionChanged obj cb = liftIO $ connectFileChooserSelectionChanged obj cb SignalConnectBefore
afterFileChooserSelectionChanged :: (GObject a, MonadIO m) => a -> FileChooserSelectionChangedCallback -> m SignalHandlerId
afterFileChooserSelectionChanged obj cb = connectFileChooserSelectionChanged obj cb SignalConnectAfter

connectFileChooserSelectionChanged :: (GObject a, MonadIO m) =>
                                      a -> FileChooserSelectionChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserSelectionChanged obj cb after = liftIO $ do
    cb' <- mkFileChooserSelectionChangedCallback (fileChooserSelectionChangedCallbackWrapper cb)
    connectSignalFunPtr obj "selection-changed" cb' after

-- signal FileChooser::update-preview
type FileChooserUpdatePreviewCallback =
    IO ()

noFileChooserUpdatePreviewCallback :: Maybe FileChooserUpdatePreviewCallback
noFileChooserUpdatePreviewCallback = Nothing

type FileChooserUpdatePreviewCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserUpdatePreviewCallback :: FileChooserUpdatePreviewCallbackC -> IO (FunPtr FileChooserUpdatePreviewCallbackC)

fileChooserUpdatePreviewClosure :: FileChooserUpdatePreviewCallback -> IO Closure
fileChooserUpdatePreviewClosure cb = newCClosure =<< mkFileChooserUpdatePreviewCallback wrapped
    where wrapped = fileChooserUpdatePreviewCallbackWrapper cb

fileChooserUpdatePreviewCallbackWrapper ::
    FileChooserUpdatePreviewCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserUpdatePreviewCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserUpdatePreview :: (GObject a, MonadIO m) => a -> FileChooserUpdatePreviewCallback -> m SignalHandlerId
onFileChooserUpdatePreview obj cb = liftIO $ connectFileChooserUpdatePreview obj cb SignalConnectBefore
afterFileChooserUpdatePreview :: (GObject a, MonadIO m) => a -> FileChooserUpdatePreviewCallback -> m SignalHandlerId
afterFileChooserUpdatePreview obj cb = connectFileChooserUpdatePreview obj cb SignalConnectAfter

connectFileChooserUpdatePreview :: (GObject a, MonadIO m) =>
                                   a -> FileChooserUpdatePreviewCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserUpdatePreview obj cb after = liftIO $ do
    cb' <- mkFileChooserUpdatePreviewCallback (fileChooserUpdatePreviewCallbackWrapper cb)
    connectSignalFunPtr obj "update-preview" cb' after

-- Enum FileChooserAction

data FileChooserAction = 
      FileChooserActionOpen
    | FileChooserActionSave
    | FileChooserActionSelectFolder
    | FileChooserActionCreateFolder
    | AnotherFileChooserAction Int
    deriving (Show, Eq)

instance Enum FileChooserAction where
    fromEnum FileChooserActionOpen = 0
    fromEnum FileChooserActionSave = 1
    fromEnum FileChooserActionSelectFolder = 2
    fromEnum FileChooserActionCreateFolder = 3
    fromEnum (AnotherFileChooserAction k) = k

    toEnum 0 = FileChooserActionOpen
    toEnum 1 = FileChooserActionSave
    toEnum 2 = FileChooserActionSelectFolder
    toEnum 3 = FileChooserActionCreateFolder
    toEnum k = AnotherFileChooserAction k

foreign import ccall "gtk_file_chooser_action_get_type" c_gtk_file_chooser_action_get_type :: 
    IO GType

instance BoxedEnum FileChooserAction where
    boxedEnumType _ = c_gtk_file_chooser_action_get_type

-- object FileChooserButton 
newtype FileChooserButton = FileChooserButton (ForeignPtr FileChooserButton)
noFileChooserButton :: Maybe FileChooserButton
noFileChooserButton = Nothing

foreign import ccall "gtk_file_chooser_button_get_type"
    c_gtk_file_chooser_button_get_type :: IO GType

type instance ParentTypes FileChooserButton = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, FileChooser, Orientable]

instance GObject FileChooserButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_file_chooser_button_get_type
    

class GObject o => FileChooserButtonK o
instance (GObject o, IsDescendantOf FileChooserButton o) => FileChooserButtonK o

toFileChooserButton :: FileChooserButtonK o => o -> IO FileChooserButton
toFileChooserButton = unsafeCastTo FileChooserButton

-- method FileChooserButton::new
-- method type : Constructor
-- Args : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "FileChooserAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "FileChooserAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "FileChooserButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_button_new" gtk_file_chooser_button_new :: 
    CString ->                              -- title : TBasicType TUTF8
    CUInt ->                                -- action : TInterface "Gtk" "FileChooserAction"
    IO (Ptr FileChooserButton)


fileChooserButtonNew ::
    (MonadIO m) =>
    T.Text ->                               -- title
    FileChooserAction ->                    -- action
    m FileChooserButton
fileChooserButtonNew title action = liftIO $ do
    title' <- textToCString title
    let action' = (fromIntegral . fromEnum) action
    result <- gtk_file_chooser_button_new title' action'
    checkUnexpectedReturnNULL "gtk_file_chooser_button_new" result
    result' <- (newObject FileChooserButton) result
    freeMem title'
    return result'

-- method FileChooserButton::new_with_dialog
-- method type : Constructor
-- Args : [Arg {argName = "dialog", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "dialog", argType = TInterface "Gtk" "Dialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "FileChooserButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_button_new_with_dialog" gtk_file_chooser_button_new_with_dialog :: 
    Ptr Dialog ->                           -- dialog : TInterface "Gtk" "Dialog"
    IO (Ptr FileChooserButton)


fileChooserButtonNewWithDialog ::
    (MonadIO m, DialogK a) =>
    a ->                                    -- dialog
    m FileChooserButton
fileChooserButtonNewWithDialog dialog = liftIO $ do
    let dialog' = unsafeManagedPtrCastPtr dialog
    result <- gtk_file_chooser_button_new_with_dialog dialog'
    checkUnexpectedReturnNULL "gtk_file_chooser_button_new_with_dialog" result
    result' <- (newObject FileChooserButton) result
    touchManagedPtr dialog
    return result'

-- method FileChooserButton::get_focus_on_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_button_get_focus_on_click" gtk_file_chooser_button_get_focus_on_click :: 
    Ptr FileChooserButton ->                -- _obj : TInterface "Gtk" "FileChooserButton"
    IO CInt


fileChooserButtonGetFocusOnClick ::
    (MonadIO m, FileChooserButtonK a) =>
    a ->                                    -- _obj
    m Bool
fileChooserButtonGetFocusOnClick _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_button_get_focus_on_click _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FileChooserButton::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_button_get_title" gtk_file_chooser_button_get_title :: 
    Ptr FileChooserButton ->                -- _obj : TInterface "Gtk" "FileChooserButton"
    IO CString


fileChooserButtonGetTitle ::
    (MonadIO m, FileChooserButtonK a) =>
    a ->                                    -- _obj
    m T.Text
fileChooserButtonGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_button_get_title _obj'
    checkUnexpectedReturnNULL "gtk_file_chooser_button_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method FileChooserButton::get_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_button_get_width_chars" gtk_file_chooser_button_get_width_chars :: 
    Ptr FileChooserButton ->                -- _obj : TInterface "Gtk" "FileChooserButton"
    IO Int32


fileChooserButtonGetWidthChars ::
    (MonadIO m, FileChooserButtonK a) =>
    a ->                                    -- _obj
    m Int32
fileChooserButtonGetWidthChars _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_chooser_button_get_width_chars _obj'
    touchManagedPtr _obj
    return result

-- method FileChooserButton::set_focus_on_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_on_click", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_on_click", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_button_set_focus_on_click" gtk_file_chooser_button_set_focus_on_click :: 
    Ptr FileChooserButton ->                -- _obj : TInterface "Gtk" "FileChooserButton"
    CInt ->                                 -- focus_on_click : TBasicType TBoolean
    IO ()


fileChooserButtonSetFocusOnClick ::
    (MonadIO m, FileChooserButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- focus_on_click
    m ()
fileChooserButtonSetFocusOnClick _obj focus_on_click = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let focus_on_click' = (fromIntegral . fromEnum) focus_on_click
    gtk_file_chooser_button_set_focus_on_click _obj' focus_on_click'
    touchManagedPtr _obj
    return ()

-- method FileChooserButton::set_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_button_set_title" gtk_file_chooser_button_set_title :: 
    Ptr FileChooserButton ->                -- _obj : TInterface "Gtk" "FileChooserButton"
    CString ->                              -- title : TBasicType TUTF8
    IO ()


fileChooserButtonSetTitle ::
    (MonadIO m, FileChooserButtonK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- title
    m ()
fileChooserButtonSetTitle _obj title = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    title' <- textToCString title
    gtk_file_chooser_button_set_title _obj' title'
    touchManagedPtr _obj
    freeMem title'
    return ()

-- method FileChooserButton::set_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileChooserButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_button_set_width_chars" gtk_file_chooser_button_set_width_chars :: 
    Ptr FileChooserButton ->                -- _obj : TInterface "Gtk" "FileChooserButton"
    Int32 ->                                -- n_chars : TBasicType TInt32
    IO ()


fileChooserButtonSetWidthChars ::
    (MonadIO m, FileChooserButtonK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- n_chars
    m ()
fileChooserButtonSetWidthChars _obj n_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_file_chooser_button_set_width_chars _obj' n_chars
    touchManagedPtr _obj
    return ()

-- signal FileChooserButton::file-set
type FileChooserButtonFileSetCallback =
    IO ()

noFileChooserButtonFileSetCallback :: Maybe FileChooserButtonFileSetCallback
noFileChooserButtonFileSetCallback = Nothing

type FileChooserButtonFileSetCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserButtonFileSetCallback :: FileChooserButtonFileSetCallbackC -> IO (FunPtr FileChooserButtonFileSetCallbackC)

fileChooserButtonFileSetClosure :: FileChooserButtonFileSetCallback -> IO Closure
fileChooserButtonFileSetClosure cb = newCClosure =<< mkFileChooserButtonFileSetCallback wrapped
    where wrapped = fileChooserButtonFileSetCallbackWrapper cb

fileChooserButtonFileSetCallbackWrapper ::
    FileChooserButtonFileSetCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserButtonFileSetCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserButtonFileSet :: (GObject a, MonadIO m) => a -> FileChooserButtonFileSetCallback -> m SignalHandlerId
onFileChooserButtonFileSet obj cb = liftIO $ connectFileChooserButtonFileSet obj cb SignalConnectBefore
afterFileChooserButtonFileSet :: (GObject a, MonadIO m) => a -> FileChooserButtonFileSetCallback -> m SignalHandlerId
afterFileChooserButtonFileSet obj cb = connectFileChooserButtonFileSet obj cb SignalConnectAfter

connectFileChooserButtonFileSet :: (GObject a, MonadIO m) =>
                                   a -> FileChooserButtonFileSetCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserButtonFileSet obj cb after = liftIO $ do
    cb' <- mkFileChooserButtonFileSetCallback (fileChooserButtonFileSetCallbackWrapper cb)
    connectSignalFunPtr obj "file-set" cb' after

-- Enum FileChooserConfirmation

data FileChooserConfirmation = 
      FileChooserConfirmationConfirm
    | FileChooserConfirmationAcceptFilename
    | FileChooserConfirmationSelectAgain
    | AnotherFileChooserConfirmation Int
    deriving (Show, Eq)

instance Enum FileChooserConfirmation where
    fromEnum FileChooserConfirmationConfirm = 0
    fromEnum FileChooserConfirmationAcceptFilename = 1
    fromEnum FileChooserConfirmationSelectAgain = 2
    fromEnum (AnotherFileChooserConfirmation k) = k

    toEnum 0 = FileChooserConfirmationConfirm
    toEnum 1 = FileChooserConfirmationAcceptFilename
    toEnum 2 = FileChooserConfirmationSelectAgain
    toEnum k = AnotherFileChooserConfirmation k

foreign import ccall "gtk_file_chooser_confirmation_get_type" c_gtk_file_chooser_confirmation_get_type :: 
    IO GType

instance BoxedEnum FileChooserConfirmation where
    boxedEnumType _ = c_gtk_file_chooser_confirmation_get_type

-- object FileChooserDialog 
newtype FileChooserDialog = FileChooserDialog (ForeignPtr FileChooserDialog)
noFileChooserDialog :: Maybe FileChooserDialog
noFileChooserDialog = Nothing

foreign import ccall "gtk_file_chooser_dialog_get_type"
    c_gtk_file_chooser_dialog_get_type :: IO GType

type instance ParentTypes FileChooserDialog = '[Dialog, Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, FileChooser]

instance GObject FileChooserDialog where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_file_chooser_dialog_get_type
    

class GObject o => FileChooserDialogK o
instance (GObject o, IsDescendantOf FileChooserDialog o) => FileChooserDialogK o

toFileChooserDialog :: FileChooserDialogK o => o -> IO FileChooserDialog
toFileChooserDialog = unsafeCastTo FileChooserDialog

-- Enum FileChooserError

data FileChooserError = 
      FileChooserErrorNonexistent
    | FileChooserErrorBadFilename
    | FileChooserErrorAlreadyExists
    | FileChooserErrorIncompleteHostname
    | AnotherFileChooserError Int
    deriving (Show, Eq)

instance Enum FileChooserError where
    fromEnum FileChooserErrorNonexistent = 0
    fromEnum FileChooserErrorBadFilename = 1
    fromEnum FileChooserErrorAlreadyExists = 2
    fromEnum FileChooserErrorIncompleteHostname = 3
    fromEnum (AnotherFileChooserError k) = k

    toEnum 0 = FileChooserErrorNonexistent
    toEnum 1 = FileChooserErrorBadFilename
    toEnum 2 = FileChooserErrorAlreadyExists
    toEnum 3 = FileChooserErrorIncompleteHostname
    toEnum k = AnotherFileChooserError k

instance GErrorClass FileChooserError where
    gerrorClassDomain _ = "gtk-file-chooser-error-quark"

catchFileChooserError ::
    IO a ->
    (FileChooserError -> GErrorMessage -> IO a) ->
    IO a
catchFileChooserError = catchGErrorJustDomain

handleFileChooserError ::
    (FileChooserError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleFileChooserError = handleGErrorJustDomain

foreign import ccall "gtk_file_chooser_error_get_type" c_gtk_file_chooser_error_get_type :: 
    IO GType

instance BoxedEnum FileChooserError where
    boxedEnumType _ = c_gtk_file_chooser_error_get_type

-- object FileChooserWidget 
newtype FileChooserWidget = FileChooserWidget (ForeignPtr FileChooserWidget)
noFileChooserWidget :: Maybe FileChooserWidget
noFileChooserWidget = Nothing

foreign import ccall "gtk_file_chooser_widget_get_type"
    c_gtk_file_chooser_widget_get_type :: IO GType

type instance ParentTypes FileChooserWidget = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, FileChooser, Orientable]

instance GObject FileChooserWidget where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_file_chooser_widget_get_type
    

class GObject o => FileChooserWidgetK o
instance (GObject o, IsDescendantOf FileChooserWidget o) => FileChooserWidgetK o

toFileChooserWidget :: FileChooserWidgetK o => o -> IO FileChooserWidget
toFileChooserWidget = unsafeCastTo FileChooserWidget

-- method FileChooserWidget::new
-- method type : Constructor
-- Args : [Arg {argName = "action", argType = TInterface "Gtk" "FileChooserAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "action", argType = TInterface "Gtk" "FileChooserAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "FileChooserWidget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_widget_new" gtk_file_chooser_widget_new :: 
    CUInt ->                                -- action : TInterface "Gtk" "FileChooserAction"
    IO (Ptr FileChooserWidget)


fileChooserWidgetNew ::
    (MonadIO m) =>
    FileChooserAction ->                    -- action
    m FileChooserWidget
fileChooserWidgetNew action = liftIO $ do
    let action' = (fromIntegral . fromEnum) action
    result <- gtk_file_chooser_widget_new action'
    checkUnexpectedReturnNULL "gtk_file_chooser_widget_new" result
    result' <- (newObject FileChooserWidget) result
    return result'

-- signal FileChooserWidget::desktop-folder
type FileChooserWidgetDesktopFolderCallback =
    IO ()

noFileChooserWidgetDesktopFolderCallback :: Maybe FileChooserWidgetDesktopFolderCallback
noFileChooserWidgetDesktopFolderCallback = Nothing

type FileChooserWidgetDesktopFolderCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetDesktopFolderCallback :: FileChooserWidgetDesktopFolderCallbackC -> IO (FunPtr FileChooserWidgetDesktopFolderCallbackC)

fileChooserWidgetDesktopFolderClosure :: FileChooserWidgetDesktopFolderCallback -> IO Closure
fileChooserWidgetDesktopFolderClosure cb = newCClosure =<< mkFileChooserWidgetDesktopFolderCallback wrapped
    where wrapped = fileChooserWidgetDesktopFolderCallbackWrapper cb

fileChooserWidgetDesktopFolderCallbackWrapper ::
    FileChooserWidgetDesktopFolderCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserWidgetDesktopFolderCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserWidgetDesktopFolder :: (GObject a, MonadIO m) => a -> FileChooserWidgetDesktopFolderCallback -> m SignalHandlerId
onFileChooserWidgetDesktopFolder obj cb = liftIO $ connectFileChooserWidgetDesktopFolder obj cb SignalConnectBefore
afterFileChooserWidgetDesktopFolder :: (GObject a, MonadIO m) => a -> FileChooserWidgetDesktopFolderCallback -> m SignalHandlerId
afterFileChooserWidgetDesktopFolder obj cb = connectFileChooserWidgetDesktopFolder obj cb SignalConnectAfter

connectFileChooserWidgetDesktopFolder :: (GObject a, MonadIO m) =>
                                         a -> FileChooserWidgetDesktopFolderCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetDesktopFolder obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetDesktopFolderCallback (fileChooserWidgetDesktopFolderCallbackWrapper cb)
    connectSignalFunPtr obj "desktop-folder" cb' after

-- signal FileChooserWidget::down-folder
type FileChooserWidgetDownFolderCallback =
    IO ()

noFileChooserWidgetDownFolderCallback :: Maybe FileChooserWidgetDownFolderCallback
noFileChooserWidgetDownFolderCallback = Nothing

type FileChooserWidgetDownFolderCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetDownFolderCallback :: FileChooserWidgetDownFolderCallbackC -> IO (FunPtr FileChooserWidgetDownFolderCallbackC)

fileChooserWidgetDownFolderClosure :: FileChooserWidgetDownFolderCallback -> IO Closure
fileChooserWidgetDownFolderClosure cb = newCClosure =<< mkFileChooserWidgetDownFolderCallback wrapped
    where wrapped = fileChooserWidgetDownFolderCallbackWrapper cb

fileChooserWidgetDownFolderCallbackWrapper ::
    FileChooserWidgetDownFolderCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserWidgetDownFolderCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserWidgetDownFolder :: (GObject a, MonadIO m) => a -> FileChooserWidgetDownFolderCallback -> m SignalHandlerId
onFileChooserWidgetDownFolder obj cb = liftIO $ connectFileChooserWidgetDownFolder obj cb SignalConnectBefore
afterFileChooserWidgetDownFolder :: (GObject a, MonadIO m) => a -> FileChooserWidgetDownFolderCallback -> m SignalHandlerId
afterFileChooserWidgetDownFolder obj cb = connectFileChooserWidgetDownFolder obj cb SignalConnectAfter

connectFileChooserWidgetDownFolder :: (GObject a, MonadIO m) =>
                                      a -> FileChooserWidgetDownFolderCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetDownFolder obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetDownFolderCallback (fileChooserWidgetDownFolderCallbackWrapper cb)
    connectSignalFunPtr obj "down-folder" cb' after

-- signal FileChooserWidget::home-folder
type FileChooserWidgetHomeFolderCallback =
    IO ()

noFileChooserWidgetHomeFolderCallback :: Maybe FileChooserWidgetHomeFolderCallback
noFileChooserWidgetHomeFolderCallback = Nothing

type FileChooserWidgetHomeFolderCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetHomeFolderCallback :: FileChooserWidgetHomeFolderCallbackC -> IO (FunPtr FileChooserWidgetHomeFolderCallbackC)

fileChooserWidgetHomeFolderClosure :: FileChooserWidgetHomeFolderCallback -> IO Closure
fileChooserWidgetHomeFolderClosure cb = newCClosure =<< mkFileChooserWidgetHomeFolderCallback wrapped
    where wrapped = fileChooserWidgetHomeFolderCallbackWrapper cb

fileChooserWidgetHomeFolderCallbackWrapper ::
    FileChooserWidgetHomeFolderCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserWidgetHomeFolderCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserWidgetHomeFolder :: (GObject a, MonadIO m) => a -> FileChooserWidgetHomeFolderCallback -> m SignalHandlerId
onFileChooserWidgetHomeFolder obj cb = liftIO $ connectFileChooserWidgetHomeFolder obj cb SignalConnectBefore
afterFileChooserWidgetHomeFolder :: (GObject a, MonadIO m) => a -> FileChooserWidgetHomeFolderCallback -> m SignalHandlerId
afterFileChooserWidgetHomeFolder obj cb = connectFileChooserWidgetHomeFolder obj cb SignalConnectAfter

connectFileChooserWidgetHomeFolder :: (GObject a, MonadIO m) =>
                                      a -> FileChooserWidgetHomeFolderCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetHomeFolder obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetHomeFolderCallback (fileChooserWidgetHomeFolderCallbackWrapper cb)
    connectSignalFunPtr obj "home-folder" cb' after

-- signal FileChooserWidget::location-popup
type FileChooserWidgetLocationPopupCallback =
    T.Text ->
    IO ()

noFileChooserWidgetLocationPopupCallback :: Maybe FileChooserWidgetLocationPopupCallback
noFileChooserWidgetLocationPopupCallback = Nothing

type FileChooserWidgetLocationPopupCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetLocationPopupCallback :: FileChooserWidgetLocationPopupCallbackC -> IO (FunPtr FileChooserWidgetLocationPopupCallbackC)

fileChooserWidgetLocationPopupClosure :: FileChooserWidgetLocationPopupCallback -> IO Closure
fileChooserWidgetLocationPopupClosure cb = newCClosure =<< mkFileChooserWidgetLocationPopupCallback wrapped
    where wrapped = fileChooserWidgetLocationPopupCallbackWrapper cb

fileChooserWidgetLocationPopupCallbackWrapper ::
    FileChooserWidgetLocationPopupCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
fileChooserWidgetLocationPopupCallbackWrapper _cb _ path _ = do
    path' <- cstringToText path
    _cb  path'

onFileChooserWidgetLocationPopup :: (GObject a, MonadIO m) => a -> FileChooserWidgetLocationPopupCallback -> m SignalHandlerId
onFileChooserWidgetLocationPopup obj cb = liftIO $ connectFileChooserWidgetLocationPopup obj cb SignalConnectBefore
afterFileChooserWidgetLocationPopup :: (GObject a, MonadIO m) => a -> FileChooserWidgetLocationPopupCallback -> m SignalHandlerId
afterFileChooserWidgetLocationPopup obj cb = connectFileChooserWidgetLocationPopup obj cb SignalConnectAfter

connectFileChooserWidgetLocationPopup :: (GObject a, MonadIO m) =>
                                         a -> FileChooserWidgetLocationPopupCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetLocationPopup obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetLocationPopupCallback (fileChooserWidgetLocationPopupCallbackWrapper cb)
    connectSignalFunPtr obj "location-popup" cb' after

-- signal FileChooserWidget::location-popup-on-paste
type FileChooserWidgetLocationPopupOnPasteCallback =
    IO ()

noFileChooserWidgetLocationPopupOnPasteCallback :: Maybe FileChooserWidgetLocationPopupOnPasteCallback
noFileChooserWidgetLocationPopupOnPasteCallback = Nothing

type FileChooserWidgetLocationPopupOnPasteCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetLocationPopupOnPasteCallback :: FileChooserWidgetLocationPopupOnPasteCallbackC -> IO (FunPtr FileChooserWidgetLocationPopupOnPasteCallbackC)

fileChooserWidgetLocationPopupOnPasteClosure :: FileChooserWidgetLocationPopupOnPasteCallback -> IO Closure
fileChooserWidgetLocationPopupOnPasteClosure cb = newCClosure =<< mkFileChooserWidgetLocationPopupOnPasteCallback wrapped
    where wrapped = fileChooserWidgetLocationPopupOnPasteCallbackWrapper cb

fileChooserWidgetLocationPopupOnPasteCallbackWrapper ::
    FileChooserWidgetLocationPopupOnPasteCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserWidgetLocationPopupOnPasteCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserWidgetLocationPopupOnPaste :: (GObject a, MonadIO m) => a -> FileChooserWidgetLocationPopupOnPasteCallback -> m SignalHandlerId
onFileChooserWidgetLocationPopupOnPaste obj cb = liftIO $ connectFileChooserWidgetLocationPopupOnPaste obj cb SignalConnectBefore
afterFileChooserWidgetLocationPopupOnPaste :: (GObject a, MonadIO m) => a -> FileChooserWidgetLocationPopupOnPasteCallback -> m SignalHandlerId
afterFileChooserWidgetLocationPopupOnPaste obj cb = connectFileChooserWidgetLocationPopupOnPaste obj cb SignalConnectAfter

connectFileChooserWidgetLocationPopupOnPaste :: (GObject a, MonadIO m) =>
                                                a -> FileChooserWidgetLocationPopupOnPasteCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetLocationPopupOnPaste obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetLocationPopupOnPasteCallback (fileChooserWidgetLocationPopupOnPasteCallbackWrapper cb)
    connectSignalFunPtr obj "location-popup-on-paste" cb' after

-- signal FileChooserWidget::location-toggle-popup
type FileChooserWidgetLocationTogglePopupCallback =
    IO ()

noFileChooserWidgetLocationTogglePopupCallback :: Maybe FileChooserWidgetLocationTogglePopupCallback
noFileChooserWidgetLocationTogglePopupCallback = Nothing

type FileChooserWidgetLocationTogglePopupCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetLocationTogglePopupCallback :: FileChooserWidgetLocationTogglePopupCallbackC -> IO (FunPtr FileChooserWidgetLocationTogglePopupCallbackC)

fileChooserWidgetLocationTogglePopupClosure :: FileChooserWidgetLocationTogglePopupCallback -> IO Closure
fileChooserWidgetLocationTogglePopupClosure cb = newCClosure =<< mkFileChooserWidgetLocationTogglePopupCallback wrapped
    where wrapped = fileChooserWidgetLocationTogglePopupCallbackWrapper cb

fileChooserWidgetLocationTogglePopupCallbackWrapper ::
    FileChooserWidgetLocationTogglePopupCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserWidgetLocationTogglePopupCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserWidgetLocationTogglePopup :: (GObject a, MonadIO m) => a -> FileChooserWidgetLocationTogglePopupCallback -> m SignalHandlerId
onFileChooserWidgetLocationTogglePopup obj cb = liftIO $ connectFileChooserWidgetLocationTogglePopup obj cb SignalConnectBefore
afterFileChooserWidgetLocationTogglePopup :: (GObject a, MonadIO m) => a -> FileChooserWidgetLocationTogglePopupCallback -> m SignalHandlerId
afterFileChooserWidgetLocationTogglePopup obj cb = connectFileChooserWidgetLocationTogglePopup obj cb SignalConnectAfter

connectFileChooserWidgetLocationTogglePopup :: (GObject a, MonadIO m) =>
                                               a -> FileChooserWidgetLocationTogglePopupCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetLocationTogglePopup obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetLocationTogglePopupCallback (fileChooserWidgetLocationTogglePopupCallbackWrapper cb)
    connectSignalFunPtr obj "location-toggle-popup" cb' after

-- signal FileChooserWidget::places-shortcut
type FileChooserWidgetPlacesShortcutCallback =
    IO ()

noFileChooserWidgetPlacesShortcutCallback :: Maybe FileChooserWidgetPlacesShortcutCallback
noFileChooserWidgetPlacesShortcutCallback = Nothing

type FileChooserWidgetPlacesShortcutCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetPlacesShortcutCallback :: FileChooserWidgetPlacesShortcutCallbackC -> IO (FunPtr FileChooserWidgetPlacesShortcutCallbackC)

fileChooserWidgetPlacesShortcutClosure :: FileChooserWidgetPlacesShortcutCallback -> IO Closure
fileChooserWidgetPlacesShortcutClosure cb = newCClosure =<< mkFileChooserWidgetPlacesShortcutCallback wrapped
    where wrapped = fileChooserWidgetPlacesShortcutCallbackWrapper cb

fileChooserWidgetPlacesShortcutCallbackWrapper ::
    FileChooserWidgetPlacesShortcutCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserWidgetPlacesShortcutCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserWidgetPlacesShortcut :: (GObject a, MonadIO m) => a -> FileChooserWidgetPlacesShortcutCallback -> m SignalHandlerId
onFileChooserWidgetPlacesShortcut obj cb = liftIO $ connectFileChooserWidgetPlacesShortcut obj cb SignalConnectBefore
afterFileChooserWidgetPlacesShortcut :: (GObject a, MonadIO m) => a -> FileChooserWidgetPlacesShortcutCallback -> m SignalHandlerId
afterFileChooserWidgetPlacesShortcut obj cb = connectFileChooserWidgetPlacesShortcut obj cb SignalConnectAfter

connectFileChooserWidgetPlacesShortcut :: (GObject a, MonadIO m) =>
                                          a -> FileChooserWidgetPlacesShortcutCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetPlacesShortcut obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetPlacesShortcutCallback (fileChooserWidgetPlacesShortcutCallbackWrapper cb)
    connectSignalFunPtr obj "places-shortcut" cb' after

-- signal FileChooserWidget::quick-bookmark
type FileChooserWidgetQuickBookmarkCallback =
    Int32 ->
    IO ()

noFileChooserWidgetQuickBookmarkCallback :: Maybe FileChooserWidgetQuickBookmarkCallback
noFileChooserWidgetQuickBookmarkCallback = Nothing

type FileChooserWidgetQuickBookmarkCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetQuickBookmarkCallback :: FileChooserWidgetQuickBookmarkCallbackC -> IO (FunPtr FileChooserWidgetQuickBookmarkCallbackC)

fileChooserWidgetQuickBookmarkClosure :: FileChooserWidgetQuickBookmarkCallback -> IO Closure
fileChooserWidgetQuickBookmarkClosure cb = newCClosure =<< mkFileChooserWidgetQuickBookmarkCallback wrapped
    where wrapped = fileChooserWidgetQuickBookmarkCallbackWrapper cb

fileChooserWidgetQuickBookmarkCallbackWrapper ::
    FileChooserWidgetQuickBookmarkCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO ()
fileChooserWidgetQuickBookmarkCallbackWrapper _cb _ bookmark_index _ = do
    _cb  bookmark_index

onFileChooserWidgetQuickBookmark :: (GObject a, MonadIO m) => a -> FileChooserWidgetQuickBookmarkCallback -> m SignalHandlerId
onFileChooserWidgetQuickBookmark obj cb = liftIO $ connectFileChooserWidgetQuickBookmark obj cb SignalConnectBefore
afterFileChooserWidgetQuickBookmark :: (GObject a, MonadIO m) => a -> FileChooserWidgetQuickBookmarkCallback -> m SignalHandlerId
afterFileChooserWidgetQuickBookmark obj cb = connectFileChooserWidgetQuickBookmark obj cb SignalConnectAfter

connectFileChooserWidgetQuickBookmark :: (GObject a, MonadIO m) =>
                                         a -> FileChooserWidgetQuickBookmarkCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetQuickBookmark obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetQuickBookmarkCallback (fileChooserWidgetQuickBookmarkCallbackWrapper cb)
    connectSignalFunPtr obj "quick-bookmark" cb' after

-- signal FileChooserWidget::recent-shortcut
type FileChooserWidgetRecentShortcutCallback =
    IO ()

noFileChooserWidgetRecentShortcutCallback :: Maybe FileChooserWidgetRecentShortcutCallback
noFileChooserWidgetRecentShortcutCallback = Nothing

type FileChooserWidgetRecentShortcutCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetRecentShortcutCallback :: FileChooserWidgetRecentShortcutCallbackC -> IO (FunPtr FileChooserWidgetRecentShortcutCallbackC)

fileChooserWidgetRecentShortcutClosure :: FileChooserWidgetRecentShortcutCallback -> IO Closure
fileChooserWidgetRecentShortcutClosure cb = newCClosure =<< mkFileChooserWidgetRecentShortcutCallback wrapped
    where wrapped = fileChooserWidgetRecentShortcutCallbackWrapper cb

fileChooserWidgetRecentShortcutCallbackWrapper ::
    FileChooserWidgetRecentShortcutCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserWidgetRecentShortcutCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserWidgetRecentShortcut :: (GObject a, MonadIO m) => a -> FileChooserWidgetRecentShortcutCallback -> m SignalHandlerId
onFileChooserWidgetRecentShortcut obj cb = liftIO $ connectFileChooserWidgetRecentShortcut obj cb SignalConnectBefore
afterFileChooserWidgetRecentShortcut :: (GObject a, MonadIO m) => a -> FileChooserWidgetRecentShortcutCallback -> m SignalHandlerId
afterFileChooserWidgetRecentShortcut obj cb = connectFileChooserWidgetRecentShortcut obj cb SignalConnectAfter

connectFileChooserWidgetRecentShortcut :: (GObject a, MonadIO m) =>
                                          a -> FileChooserWidgetRecentShortcutCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetRecentShortcut obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetRecentShortcutCallback (fileChooserWidgetRecentShortcutCallbackWrapper cb)
    connectSignalFunPtr obj "recent-shortcut" cb' after

-- signal FileChooserWidget::search-shortcut
type FileChooserWidgetSearchShortcutCallback =
    IO ()

noFileChooserWidgetSearchShortcutCallback :: Maybe FileChooserWidgetSearchShortcutCallback
noFileChooserWidgetSearchShortcutCallback = Nothing

type FileChooserWidgetSearchShortcutCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetSearchShortcutCallback :: FileChooserWidgetSearchShortcutCallbackC -> IO (FunPtr FileChooserWidgetSearchShortcutCallbackC)

fileChooserWidgetSearchShortcutClosure :: FileChooserWidgetSearchShortcutCallback -> IO Closure
fileChooserWidgetSearchShortcutClosure cb = newCClosure =<< mkFileChooserWidgetSearchShortcutCallback wrapped
    where wrapped = fileChooserWidgetSearchShortcutCallbackWrapper cb

fileChooserWidgetSearchShortcutCallbackWrapper ::
    FileChooserWidgetSearchShortcutCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserWidgetSearchShortcutCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserWidgetSearchShortcut :: (GObject a, MonadIO m) => a -> FileChooserWidgetSearchShortcutCallback -> m SignalHandlerId
onFileChooserWidgetSearchShortcut obj cb = liftIO $ connectFileChooserWidgetSearchShortcut obj cb SignalConnectBefore
afterFileChooserWidgetSearchShortcut :: (GObject a, MonadIO m) => a -> FileChooserWidgetSearchShortcutCallback -> m SignalHandlerId
afterFileChooserWidgetSearchShortcut obj cb = connectFileChooserWidgetSearchShortcut obj cb SignalConnectAfter

connectFileChooserWidgetSearchShortcut :: (GObject a, MonadIO m) =>
                                          a -> FileChooserWidgetSearchShortcutCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetSearchShortcut obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetSearchShortcutCallback (fileChooserWidgetSearchShortcutCallbackWrapper cb)
    connectSignalFunPtr obj "search-shortcut" cb' after

-- signal FileChooserWidget::show-hidden
type FileChooserWidgetShowHiddenCallback =
    IO ()

noFileChooserWidgetShowHiddenCallback :: Maybe FileChooserWidgetShowHiddenCallback
noFileChooserWidgetShowHiddenCallback = Nothing

type FileChooserWidgetShowHiddenCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetShowHiddenCallback :: FileChooserWidgetShowHiddenCallbackC -> IO (FunPtr FileChooserWidgetShowHiddenCallbackC)

fileChooserWidgetShowHiddenClosure :: FileChooserWidgetShowHiddenCallback -> IO Closure
fileChooserWidgetShowHiddenClosure cb = newCClosure =<< mkFileChooserWidgetShowHiddenCallback wrapped
    where wrapped = fileChooserWidgetShowHiddenCallbackWrapper cb

fileChooserWidgetShowHiddenCallbackWrapper ::
    FileChooserWidgetShowHiddenCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserWidgetShowHiddenCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserWidgetShowHidden :: (GObject a, MonadIO m) => a -> FileChooserWidgetShowHiddenCallback -> m SignalHandlerId
onFileChooserWidgetShowHidden obj cb = liftIO $ connectFileChooserWidgetShowHidden obj cb SignalConnectBefore
afterFileChooserWidgetShowHidden :: (GObject a, MonadIO m) => a -> FileChooserWidgetShowHiddenCallback -> m SignalHandlerId
afterFileChooserWidgetShowHidden obj cb = connectFileChooserWidgetShowHidden obj cb SignalConnectAfter

connectFileChooserWidgetShowHidden :: (GObject a, MonadIO m) =>
                                      a -> FileChooserWidgetShowHiddenCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetShowHidden obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetShowHiddenCallback (fileChooserWidgetShowHiddenCallbackWrapper cb)
    connectSignalFunPtr obj "show-hidden" cb' after

-- signal FileChooserWidget::up-folder
type FileChooserWidgetUpFolderCallback =
    IO ()

noFileChooserWidgetUpFolderCallback :: Maybe FileChooserWidgetUpFolderCallback
noFileChooserWidgetUpFolderCallback = Nothing

type FileChooserWidgetUpFolderCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFileChooserWidgetUpFolderCallback :: FileChooserWidgetUpFolderCallbackC -> IO (FunPtr FileChooserWidgetUpFolderCallbackC)

fileChooserWidgetUpFolderClosure :: FileChooserWidgetUpFolderCallback -> IO Closure
fileChooserWidgetUpFolderClosure cb = newCClosure =<< mkFileChooserWidgetUpFolderCallback wrapped
    where wrapped = fileChooserWidgetUpFolderCallbackWrapper cb

fileChooserWidgetUpFolderCallbackWrapper ::
    FileChooserWidgetUpFolderCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fileChooserWidgetUpFolderCallbackWrapper _cb _ _ = do
    _cb 

onFileChooserWidgetUpFolder :: (GObject a, MonadIO m) => a -> FileChooserWidgetUpFolderCallback -> m SignalHandlerId
onFileChooserWidgetUpFolder obj cb = liftIO $ connectFileChooserWidgetUpFolder obj cb SignalConnectBefore
afterFileChooserWidgetUpFolder :: (GObject a, MonadIO m) => a -> FileChooserWidgetUpFolderCallback -> m SignalHandlerId
afterFileChooserWidgetUpFolder obj cb = connectFileChooserWidgetUpFolder obj cb SignalConnectAfter

connectFileChooserWidgetUpFolder :: (GObject a, MonadIO m) =>
                                    a -> FileChooserWidgetUpFolderCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserWidgetUpFolder obj cb after = liftIO $ do
    cb' <- mkFileChooserWidgetUpFolderCallback (fileChooserWidgetUpFolderCallbackWrapper cb)
    connectSignalFunPtr obj "up-folder" cb' after

-- object FileFilter 
newtype FileFilter = FileFilter (ForeignPtr FileFilter)
noFileFilter :: Maybe FileFilter
noFileFilter = Nothing

foreign import ccall "gtk_file_filter_get_type"
    c_gtk_file_filter_get_type :: IO GType

type instance ParentTypes FileFilter = '[GObject.Object, Buildable]

instance GObject FileFilter where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_file_filter_get_type
    

class GObject o => FileFilterK o
instance (GObject o, IsDescendantOf FileFilter o) => FileFilterK o

toFileFilter :: FileFilterK o => o -> IO FileFilter
toFileFilter = unsafeCastTo FileFilter

-- method FileFilter::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "FileFilter"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_filter_new" gtk_file_filter_new :: 
    IO (Ptr FileFilter)


fileFilterNew ::
    (MonadIO m) =>
    m FileFilter
fileFilterNew  = liftIO $ do
    result <- gtk_file_filter_new
    checkUnexpectedReturnNULL "gtk_file_filter_new" result
    result' <- (newObject FileFilter) result
    return result'

-- method FileFilter::add_custom
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "needed", argType = TInterface "Gtk" "FileFilterFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "FileFilterFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "needed", argType = TInterface "Gtk" "FileFilterFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "FileFilterFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_filter_add_custom" gtk_file_filter_add_custom :: 
    Ptr FileFilter ->                       -- _obj : TInterface "Gtk" "FileFilter"
    CUInt ->                                -- needed : TInterface "Gtk" "FileFilterFlags"
    FunPtr FileFilterFuncC ->               -- func : TInterface "Gtk" "FileFilterFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- notify : TInterface "GLib" "DestroyNotify"
    IO ()


fileFilterAddCustom ::
    (MonadIO m, FileFilterK a) =>
    a ->                                    -- _obj
    [FileFilterFlags] ->                    -- needed
    FileFilterFunc ->                       -- func
    m ()
fileFilterAddCustom _obj needed func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let needed' = gflagsToWord needed
    func' <- mkFileFilterFunc (fileFilterFuncWrapper Nothing func)
    let data_ = castFunPtrToPtr func'
    let notify = safeFreeFunPtrPtr
    gtk_file_filter_add_custom _obj' needed' func' data_ notify
    touchManagedPtr _obj
    return ()

-- method FileFilter::add_mime_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_filter_add_mime_type" gtk_file_filter_add_mime_type :: 
    Ptr FileFilter ->                       -- _obj : TInterface "Gtk" "FileFilter"
    CString ->                              -- mime_type : TBasicType TUTF8
    IO ()


fileFilterAddMimeType ::
    (MonadIO m, FileFilterK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- mime_type
    m ()
fileFilterAddMimeType _obj mime_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    mime_type' <- textToCString mime_type
    gtk_file_filter_add_mime_type _obj' mime_type'
    touchManagedPtr _obj
    freeMem mime_type'
    return ()

-- method FileFilter::add_pattern
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_filter_add_pattern" gtk_file_filter_add_pattern :: 
    Ptr FileFilter ->                       -- _obj : TInterface "Gtk" "FileFilter"
    CString ->                              -- pattern : TBasicType TUTF8
    IO ()


fileFilterAddPattern ::
    (MonadIO m, FileFilterK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- pattern
    m ()
fileFilterAddPattern _obj pattern = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    pattern' <- textToCString pattern
    gtk_file_filter_add_pattern _obj' pattern'
    touchManagedPtr _obj
    freeMem pattern'
    return ()

-- method FileFilter::add_pixbuf_formats
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_filter_add_pixbuf_formats" gtk_file_filter_add_pixbuf_formats :: 
    Ptr FileFilter ->                       -- _obj : TInterface "Gtk" "FileFilter"
    IO ()


fileFilterAddPixbufFormats ::
    (MonadIO m, FileFilterK a) =>
    a ->                                    -- _obj
    m ()
fileFilterAddPixbufFormats _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_file_filter_add_pixbuf_formats _obj'
    touchManagedPtr _obj
    return ()

-- method FileFilter::filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_info", argType = TInterface "Gtk" "FileFilterInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_info", argType = TInterface "Gtk" "FileFilterInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_filter_filter" gtk_file_filter_filter :: 
    Ptr FileFilter ->                       -- _obj : TInterface "Gtk" "FileFilter"
    Ptr FileFilterInfo ->                   -- filter_info : TInterface "Gtk" "FileFilterInfo"
    IO CInt


fileFilterFilter ::
    (MonadIO m, FileFilterK a) =>
    a ->                                    -- _obj
    FileFilterInfo ->                       -- filter_info
    m Bool
fileFilterFilter _obj filter_info = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let filter_info' = unsafeManagedPtrGetPtr filter_info
    result <- gtk_file_filter_filter _obj' filter_info'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr filter_info
    return result'

-- method FileFilter::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_filter_get_name" gtk_file_filter_get_name :: 
    Ptr FileFilter ->                       -- _obj : TInterface "Gtk" "FileFilter"
    IO CString


fileFilterGetName ::
    (MonadIO m, FileFilterK a) =>
    a ->                                    -- _obj
    m T.Text
fileFilterGetName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_filter_get_name _obj'
    checkUnexpectedReturnNULL "gtk_file_filter_get_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method FileFilter::get_needed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "FileFilterFlags"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_filter_get_needed" gtk_file_filter_get_needed :: 
    Ptr FileFilter ->                       -- _obj : TInterface "Gtk" "FileFilter"
    IO CUInt


fileFilterGetNeeded ::
    (MonadIO m, FileFilterK a) =>
    a ->                                    -- _obj
    m [FileFilterFlags]
fileFilterGetNeeded _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_file_filter_get_needed _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method FileFilter::set_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FileFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_filter_set_name" gtk_file_filter_set_name :: 
    Ptr FileFilter ->                       -- _obj : TInterface "Gtk" "FileFilter"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


fileFilterSetName ::
    (MonadIO m, FileFilterK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- name
    m ()
fileFilterSetName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeName <- case name of
        Nothing -> return nullPtr
        Just jName -> do
            jName' <- textToCString jName
            return jName'
    gtk_file_filter_set_name _obj' maybeName
    touchManagedPtr _obj
    freeMem maybeName
    return ()

-- Flags FileFilterFlags

data FileFilterFlags = 
      FileFilterFlagsFilename
    | FileFilterFlagsUri
    | FileFilterFlagsDisplayName
    | FileFilterFlagsMimeType
    | AnotherFileFilterFlags Int
    deriving (Show, Eq)

instance Enum FileFilterFlags where
    fromEnum FileFilterFlagsFilename = 1
    fromEnum FileFilterFlagsUri = 2
    fromEnum FileFilterFlagsDisplayName = 4
    fromEnum FileFilterFlagsMimeType = 8
    fromEnum (AnotherFileFilterFlags k) = k

    toEnum 1 = FileFilterFlagsFilename
    toEnum 2 = FileFilterFlagsUri
    toEnum 4 = FileFilterFlagsDisplayName
    toEnum 8 = FileFilterFlagsMimeType
    toEnum k = AnotherFileFilterFlags k

foreign import ccall "gtk_file_filter_flags_get_type" c_gtk_file_filter_flags_get_type :: 
    IO GType

instance BoxedEnum FileFilterFlags where
    boxedEnumType _ = c_gtk_file_filter_flags_get_type

instance IsGFlag FileFilterFlags

-- callback FileFilterFunc
fileFilterFuncClosure :: FileFilterFunc -> IO Closure
fileFilterFuncClosure cb = newCClosure =<< mkFileFilterFunc wrapped
    where wrapped = fileFilterFuncWrapper Nothing cb

type FileFilterFuncC =
    Ptr FileFilterInfo ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkFileFilterFunc :: FileFilterFuncC -> IO (FunPtr FileFilterFuncC)

type FileFilterFunc =
    FileFilterInfo ->
    IO Bool

noFileFilterFunc :: Maybe FileFilterFunc
noFileFilterFunc = Nothing

fileFilterFuncWrapper ::
    Maybe (Ptr (FunPtr (FileFilterFuncC))) ->
    FileFilterFunc ->
    Ptr FileFilterInfo ->
    Ptr () ->
    IO CInt
fileFilterFuncWrapper funptrptr _cb filter_info _ = do
    filter_info' <- (newPtr 40 FileFilterInfo) filter_info
    result <- _cb  filter_info'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- struct FileFilterInfo
newtype FileFilterInfo = FileFilterInfo (ForeignPtr FileFilterInfo)
noFileFilterInfo :: Maybe FileFilterInfo
noFileFilterInfo = Nothing

fileFilterInfoReadContains :: FileFilterInfo -> IO [FileFilterFlags]
fileFilterInfoReadContains s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CUInt
    let val' = wordToGFlags val
    return val'

fileFilterInfoReadFilename :: FileFilterInfo -> IO T.Text
fileFilterInfoReadFilename s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

fileFilterInfoReadUri :: FileFilterInfo -> IO T.Text
fileFilterInfoReadUri s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO CString
    val' <- cstringToText val
    return val'

fileFilterInfoReadDisplayName :: FileFilterInfo -> IO T.Text
fileFilterInfoReadDisplayName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO CString
    val' <- cstringToText val
    return val'

fileFilterInfoReadMimeType :: FileFilterInfo -> IO T.Text
fileFilterInfoReadMimeType s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO CString
    val' <- cstringToText val
    return val'

-- object Fixed 
newtype Fixed = Fixed (ForeignPtr Fixed)
noFixed :: Maybe Fixed
noFixed = Nothing

foreign import ccall "gtk_fixed_get_type"
    c_gtk_fixed_get_type :: IO GType

type instance ParentTypes Fixed = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Fixed where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_fixed_get_type
    

class GObject o => FixedK o
instance (GObject o, IsDescendantOf Fixed o) => FixedK o

toFixed :: FixedK o => o -> IO Fixed
toFixed = unsafeCastTo Fixed

-- method Fixed::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Fixed"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_fixed_new" gtk_fixed_new :: 
    IO (Ptr Fixed)


fixedNew ::
    (MonadIO m) =>
    m Fixed
fixedNew  = liftIO $ do
    result <- gtk_fixed_new
    checkUnexpectedReturnNULL "gtk_fixed_new" result
    result' <- (newObject Fixed) result
    return result'

-- method Fixed::move
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Fixed", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Fixed", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_fixed_move" gtk_fixed_move :: 
    Ptr Fixed ->                            -- _obj : TInterface "Gtk" "Fixed"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO ()


fixedMove ::
    (MonadIO m, FixedK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    Int32 ->                                -- x
    Int32 ->                                -- y
    m ()
fixedMove _obj widget x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_fixed_move _obj' widget' x y
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- method Fixed::put
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Fixed", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Fixed", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_fixed_put" gtk_fixed_put :: 
    Ptr Fixed ->                            -- _obj : TInterface "Gtk" "Fixed"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO ()


fixedPut ::
    (MonadIO m, FixedK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    Int32 ->                                -- x
    Int32 ->                                -- y
    m ()
fixedPut _obj widget x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_fixed_put _obj' widget' x y
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- struct FixedChild
newtype FixedChild = FixedChild (ForeignPtr FixedChild)
noFixedChild :: Maybe FixedChild
noFixedChild = Nothing

fixedChildReadWidget :: FixedChild -> IO Widget
fixedChildReadWidget s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO (Ptr Widget)
    val' <- (newObject Widget) val
    return val'

fixedChildReadX :: FixedChild -> IO Int32
fixedChildReadX s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Int32
    return val

fixedChildReadY :: FixedChild -> IO Int32
fixedChildReadY s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 12) :: IO Int32
    return val

-- object FlowBox 
newtype FlowBox = FlowBox (ForeignPtr FlowBox)
noFlowBox :: Maybe FlowBox
noFlowBox = Nothing

foreign import ccall "gtk_flow_box_get_type"
    c_gtk_flow_box_get_type :: IO GType

type instance ParentTypes FlowBox = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject FlowBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_flow_box_get_type
    

class GObject o => FlowBoxK o
instance (GObject o, IsDescendantOf FlowBox o) => FlowBoxK o

toFlowBox :: FlowBoxK o => o -> IO FlowBox
toFlowBox = unsafeCastTo FlowBox

-- method FlowBox::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "FlowBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_new" gtk_flow_box_new :: 
    IO (Ptr FlowBox)


flowBoxNew ::
    (MonadIO m) =>
    m FlowBox
flowBoxNew  = liftIO $ do
    result <- gtk_flow_box_new
    checkUnexpectedReturnNULL "gtk_flow_box_new" result
    result' <- (newObject FlowBox) result
    return result'

-- method FlowBox::get_activate_on_single_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_get_activate_on_single_click" gtk_flow_box_get_activate_on_single_click :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO CInt


flowBoxGetActivateOnSingleClick ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m Bool
flowBoxGetActivateOnSingleClick _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_flow_box_get_activate_on_single_click _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FlowBox::get_child_at_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "idx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "idx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "FlowBoxChild"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_get_child_at_index" gtk_flow_box_get_child_at_index :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    Int32 ->                                -- idx : TBasicType TInt32
    IO (Ptr FlowBoxChild)


flowBoxGetChildAtIndex ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- idx
    m FlowBoxChild
flowBoxGetChildAtIndex _obj idx = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_flow_box_get_child_at_index _obj' idx
    checkUnexpectedReturnNULL "gtk_flow_box_get_child_at_index" result
    result' <- (newObject FlowBoxChild) result
    touchManagedPtr _obj
    return result'

-- method FlowBox::get_column_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_get_column_spacing" gtk_flow_box_get_column_spacing :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO Word32


flowBoxGetColumnSpacing ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m Word32
flowBoxGetColumnSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_flow_box_get_column_spacing _obj'
    touchManagedPtr _obj
    return result

-- method FlowBox::get_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_get_homogeneous" gtk_flow_box_get_homogeneous :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO CInt


flowBoxGetHomogeneous ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m Bool
flowBoxGetHomogeneous _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_flow_box_get_homogeneous _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FlowBox::get_max_children_per_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_get_max_children_per_line" gtk_flow_box_get_max_children_per_line :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO Word32


flowBoxGetMaxChildrenPerLine ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m Word32
flowBoxGetMaxChildrenPerLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_flow_box_get_max_children_per_line _obj'
    touchManagedPtr _obj
    return result

-- method FlowBox::get_min_children_per_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_get_min_children_per_line" gtk_flow_box_get_min_children_per_line :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO Word32


flowBoxGetMinChildrenPerLine ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m Word32
flowBoxGetMinChildrenPerLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_flow_box_get_min_children_per_line _obj'
    touchManagedPtr _obj
    return result

-- method FlowBox::get_row_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_get_row_spacing" gtk_flow_box_get_row_spacing :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO Word32


flowBoxGetRowSpacing ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m Word32
flowBoxGetRowSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_flow_box_get_row_spacing _obj'
    touchManagedPtr _obj
    return result

-- method FlowBox::get_selected_children
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "FlowBoxChild")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_get_selected_children" gtk_flow_box_get_selected_children :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO (Ptr (GList (Ptr FlowBoxChild)))


flowBoxGetSelectedChildren ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m [FlowBoxChild]
flowBoxGetSelectedChildren _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_flow_box_get_selected_children _obj'
    checkUnexpectedReturnNULL "gtk_flow_box_get_selected_children" result
    result' <- unpackGList result
    result'' <- mapM (newObject FlowBoxChild) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method FlowBox::get_selection_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SelectionMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_get_selection_mode" gtk_flow_box_get_selection_mode :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO CUInt


flowBoxGetSelectionMode ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m SelectionMode
flowBoxGetSelectionMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_flow_box_get_selection_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method FlowBox::insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_insert" gtk_flow_box_insert :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


flowBoxInsert ::
    (MonadIO m, FlowBoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    Int32 ->                                -- position
    m ()
flowBoxInsert _obj widget position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_flow_box_insert _obj' widget' position
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- method FlowBox::invalidate_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_invalidate_filter" gtk_flow_box_invalidate_filter :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO ()


flowBoxInvalidateFilter ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m ()
flowBoxInvalidateFilter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_flow_box_invalidate_filter _obj'
    touchManagedPtr _obj
    return ()

-- method FlowBox::invalidate_sort
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_invalidate_sort" gtk_flow_box_invalidate_sort :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO ()


flowBoxInvalidateSort ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m ()
flowBoxInvalidateSort _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_flow_box_invalidate_sort _obj'
    touchManagedPtr _obj
    return ()

-- method FlowBox::select_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_select_all" gtk_flow_box_select_all :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO ()


flowBoxSelectAll ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m ()
flowBoxSelectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_flow_box_select_all _obj'
    touchManagedPtr _obj
    return ()

-- method FlowBox::select_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "FlowBoxChild", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "FlowBoxChild", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_select_child" gtk_flow_box_select_child :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    Ptr FlowBoxChild ->                     -- child : TInterface "Gtk" "FlowBoxChild"
    IO ()


flowBoxSelectChild ::
    (MonadIO m, FlowBoxK a, FlowBoxChildK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
flowBoxSelectChild _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_flow_box_select_child _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method FlowBox::selected_foreach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "FlowBoxForeachFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "FlowBoxForeachFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_selected_foreach" gtk_flow_box_selected_foreach :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    FunPtr FlowBoxForeachFuncC ->           -- func : TInterface "Gtk" "FlowBoxForeachFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    IO ()


flowBoxSelectedForeach ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    FlowBoxForeachFunc ->                   -- func
    m ()
flowBoxSelectedForeach _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkFlowBoxForeachFunc (flowBoxForeachFuncWrapper Nothing func)
    let data_ = nullPtr
    gtk_flow_box_selected_foreach _obj' func' data_
    safeFreeFunPtr $ castFunPtrToPtr func'
    touchManagedPtr _obj
    return ()

-- method FlowBox::set_activate_on_single_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "single", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "single", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_set_activate_on_single_click" gtk_flow_box_set_activate_on_single_click :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    CInt ->                                 -- single : TBasicType TBoolean
    IO ()


flowBoxSetActivateOnSingleClick ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- single
    m ()
flowBoxSetActivateOnSingleClick _obj single = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let single' = (fromIntegral . fromEnum) single
    gtk_flow_box_set_activate_on_single_click _obj' single'
    touchManagedPtr _obj
    return ()

-- method FlowBox::set_column_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_set_column_spacing" gtk_flow_box_set_column_spacing :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    Word32 ->                               -- spacing : TBasicType TUInt32
    IO ()


flowBoxSetColumnSpacing ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- spacing
    m ()
flowBoxSetColumnSpacing _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_flow_box_set_column_spacing _obj' spacing
    touchManagedPtr _obj
    return ()

-- method FlowBox::set_filter_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_func", argType = TInterface "Gtk" "FlowBoxFilterFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_func", argType = TInterface "Gtk" "FlowBoxFilterFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_set_filter_func" gtk_flow_box_set_filter_func :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    FunPtr FlowBoxFilterFuncC ->            -- filter_func : TInterface "Gtk" "FlowBoxFilterFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


flowBoxSetFilterFunc ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    Maybe (FlowBoxFilterFunc) ->            -- filter_func
    m ()
flowBoxSetFilterFunc _obj filter_func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFilter_func <- case filter_func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jFilter_func -> do
            jFilter_func' <- mkFlowBoxFilterFunc (flowBoxFilterFuncWrapper Nothing jFilter_func)
            return jFilter_func'
    let user_data = castFunPtrToPtr maybeFilter_func
    let destroy = safeFreeFunPtrPtr
    gtk_flow_box_set_filter_func _obj' maybeFilter_func user_data destroy
    touchManagedPtr _obj
    return ()

-- method FlowBox::set_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_set_hadjustment" gtk_flow_box_set_hadjustment :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()


flowBoxSetHadjustment ::
    (MonadIO m, FlowBoxK a, AdjustmentK b) =>
    a ->                                    -- _obj
    b ->                                    -- adjustment
    m ()
flowBoxSetHadjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let adjustment' = unsafeManagedPtrCastPtr adjustment
    gtk_flow_box_set_hadjustment _obj' adjustment'
    touchManagedPtr _obj
    touchManagedPtr adjustment
    return ()

-- method FlowBox::set_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_set_homogeneous" gtk_flow_box_set_homogeneous :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    CInt ->                                 -- homogeneous : TBasicType TBoolean
    IO ()


flowBoxSetHomogeneous ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- homogeneous
    m ()
flowBoxSetHomogeneous _obj homogeneous = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let homogeneous' = (fromIntegral . fromEnum) homogeneous
    gtk_flow_box_set_homogeneous _obj' homogeneous'
    touchManagedPtr _obj
    return ()

-- method FlowBox::set_max_children_per_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_children", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_children", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_set_max_children_per_line" gtk_flow_box_set_max_children_per_line :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    Word32 ->                               -- n_children : TBasicType TUInt32
    IO ()


flowBoxSetMaxChildrenPerLine ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- n_children
    m ()
flowBoxSetMaxChildrenPerLine _obj n_children = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_flow_box_set_max_children_per_line _obj' n_children
    touchManagedPtr _obj
    return ()

-- method FlowBox::set_min_children_per_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_children", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_children", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_set_min_children_per_line" gtk_flow_box_set_min_children_per_line :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    Word32 ->                               -- n_children : TBasicType TUInt32
    IO ()


flowBoxSetMinChildrenPerLine ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- n_children
    m ()
flowBoxSetMinChildrenPerLine _obj n_children = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_flow_box_set_min_children_per_line _obj' n_children
    touchManagedPtr _obj
    return ()

-- method FlowBox::set_row_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_set_row_spacing" gtk_flow_box_set_row_spacing :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    Word32 ->                               -- spacing : TBasicType TUInt32
    IO ()


flowBoxSetRowSpacing ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- spacing
    m ()
flowBoxSetRowSpacing _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_flow_box_set_row_spacing _obj' spacing
    touchManagedPtr _obj
    return ()

-- method FlowBox::set_selection_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Gtk" "SelectionMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Gtk" "SelectionMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_set_selection_mode" gtk_flow_box_set_selection_mode :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    CUInt ->                                -- mode : TInterface "Gtk" "SelectionMode"
    IO ()


flowBoxSetSelectionMode ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    SelectionMode ->                        -- mode
    m ()
flowBoxSetSelectionMode _obj mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mode' = (fromIntegral . fromEnum) mode
    gtk_flow_box_set_selection_mode _obj' mode'
    touchManagedPtr _obj
    return ()

-- method FlowBox::set_sort_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_func", argType = TInterface "Gtk" "FlowBoxSortFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_func", argType = TInterface "Gtk" "FlowBoxSortFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_set_sort_func" gtk_flow_box_set_sort_func :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    FunPtr FlowBoxSortFuncC ->              -- sort_func : TInterface "Gtk" "FlowBoxSortFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


flowBoxSetSortFunc ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    Maybe (FlowBoxSortFunc) ->              -- sort_func
    m ()
flowBoxSetSortFunc _obj sort_func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeSort_func <- case sort_func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jSort_func -> do
            jSort_func' <- mkFlowBoxSortFunc (flowBoxSortFuncWrapper Nothing jSort_func)
            return jSort_func'
    let user_data = castFunPtrToPtr maybeSort_func
    let destroy = safeFreeFunPtrPtr
    gtk_flow_box_set_sort_func _obj' maybeSort_func user_data destroy
    touchManagedPtr _obj
    return ()

-- method FlowBox::set_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_set_vadjustment" gtk_flow_box_set_vadjustment :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()


flowBoxSetVadjustment ::
    (MonadIO m, FlowBoxK a, AdjustmentK b) =>
    a ->                                    -- _obj
    b ->                                    -- adjustment
    m ()
flowBoxSetVadjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let adjustment' = unsafeManagedPtrCastPtr adjustment
    gtk_flow_box_set_vadjustment _obj' adjustment'
    touchManagedPtr _obj
    touchManagedPtr adjustment
    return ()

-- method FlowBox::unselect_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_unselect_all" gtk_flow_box_unselect_all :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    IO ()


flowBoxUnselectAll ::
    (MonadIO m, FlowBoxK a) =>
    a ->                                    -- _obj
    m ()
flowBoxUnselectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_flow_box_unselect_all _obj'
    touchManagedPtr _obj
    return ()

-- method FlowBox::unselect_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "FlowBoxChild", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "FlowBoxChild", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_unselect_child" gtk_flow_box_unselect_child :: 
    Ptr FlowBox ->                          -- _obj : TInterface "Gtk" "FlowBox"
    Ptr FlowBoxChild ->                     -- child : TInterface "Gtk" "FlowBoxChild"
    IO ()


flowBoxUnselectChild ::
    (MonadIO m, FlowBoxK a, FlowBoxChildK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
flowBoxUnselectChild _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_flow_box_unselect_child _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- signal FlowBox::activate-cursor-child
type FlowBoxActivateCursorChildCallback =
    IO ()

noFlowBoxActivateCursorChildCallback :: Maybe FlowBoxActivateCursorChildCallback
noFlowBoxActivateCursorChildCallback = Nothing

type FlowBoxActivateCursorChildCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFlowBoxActivateCursorChildCallback :: FlowBoxActivateCursorChildCallbackC -> IO (FunPtr FlowBoxActivateCursorChildCallbackC)

flowBoxActivateCursorChildClosure :: FlowBoxActivateCursorChildCallback -> IO Closure
flowBoxActivateCursorChildClosure cb = newCClosure =<< mkFlowBoxActivateCursorChildCallback wrapped
    where wrapped = flowBoxActivateCursorChildCallbackWrapper cb

flowBoxActivateCursorChildCallbackWrapper ::
    FlowBoxActivateCursorChildCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
flowBoxActivateCursorChildCallbackWrapper _cb _ _ = do
    _cb 

onFlowBoxActivateCursorChild :: (GObject a, MonadIO m) => a -> FlowBoxActivateCursorChildCallback -> m SignalHandlerId
onFlowBoxActivateCursorChild obj cb = liftIO $ connectFlowBoxActivateCursorChild obj cb SignalConnectBefore
afterFlowBoxActivateCursorChild :: (GObject a, MonadIO m) => a -> FlowBoxActivateCursorChildCallback -> m SignalHandlerId
afterFlowBoxActivateCursorChild obj cb = connectFlowBoxActivateCursorChild obj cb SignalConnectAfter

connectFlowBoxActivateCursorChild :: (GObject a, MonadIO m) =>
                                     a -> FlowBoxActivateCursorChildCallback -> SignalConnectMode -> m SignalHandlerId
connectFlowBoxActivateCursorChild obj cb after = liftIO $ do
    cb' <- mkFlowBoxActivateCursorChildCallback (flowBoxActivateCursorChildCallbackWrapper cb)
    connectSignalFunPtr obj "activate-cursor-child" cb' after

-- signal FlowBox::child-activated
type FlowBoxChildActivatedCallback =
    FlowBoxChild ->
    IO ()

noFlowBoxChildActivatedCallback :: Maybe FlowBoxChildActivatedCallback
noFlowBoxChildActivatedCallback = Nothing

type FlowBoxChildActivatedCallbackC =
    Ptr () ->                               -- object
    Ptr FlowBoxChild ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFlowBoxChildActivatedCallback :: FlowBoxChildActivatedCallbackC -> IO (FunPtr FlowBoxChildActivatedCallbackC)

flowBoxChildActivatedClosure :: FlowBoxChildActivatedCallback -> IO Closure
flowBoxChildActivatedClosure cb = newCClosure =<< mkFlowBoxChildActivatedCallback wrapped
    where wrapped = flowBoxChildActivatedCallbackWrapper cb

flowBoxChildActivatedCallbackWrapper ::
    FlowBoxChildActivatedCallback ->
    Ptr () ->
    Ptr FlowBoxChild ->
    Ptr () ->
    IO ()
flowBoxChildActivatedCallbackWrapper _cb _ child _ = do
    child' <- (newObject FlowBoxChild) child
    _cb  child'

onFlowBoxChildActivated :: (GObject a, MonadIO m) => a -> FlowBoxChildActivatedCallback -> m SignalHandlerId
onFlowBoxChildActivated obj cb = liftIO $ connectFlowBoxChildActivated obj cb SignalConnectBefore
afterFlowBoxChildActivated :: (GObject a, MonadIO m) => a -> FlowBoxChildActivatedCallback -> m SignalHandlerId
afterFlowBoxChildActivated obj cb = connectFlowBoxChildActivated obj cb SignalConnectAfter

connectFlowBoxChildActivated :: (GObject a, MonadIO m) =>
                                a -> FlowBoxChildActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectFlowBoxChildActivated obj cb after = liftIO $ do
    cb' <- mkFlowBoxChildActivatedCallback (flowBoxChildActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "child-activated" cb' after

-- signal FlowBox::move-cursor
type FlowBoxMoveCursorCallback =
    MovementStep ->
    Int32 ->
    IO Bool

noFlowBoxMoveCursorCallback :: Maybe FlowBoxMoveCursorCallback
noFlowBoxMoveCursorCallback = Nothing

type FlowBoxMoveCursorCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkFlowBoxMoveCursorCallback :: FlowBoxMoveCursorCallbackC -> IO (FunPtr FlowBoxMoveCursorCallbackC)

flowBoxMoveCursorClosure :: FlowBoxMoveCursorCallback -> IO Closure
flowBoxMoveCursorClosure cb = newCClosure =<< mkFlowBoxMoveCursorCallback wrapped
    where wrapped = flowBoxMoveCursorCallbackWrapper cb

flowBoxMoveCursorCallbackWrapper ::
    FlowBoxMoveCursorCallback ->
    Ptr () ->
    CUInt ->
    Int32 ->
    Ptr () ->
    IO CInt
flowBoxMoveCursorCallbackWrapper _cb _ step count _ = do
    let step' = (toEnum . fromIntegral) step
    result <- _cb  step' count
    let result' = (fromIntegral . fromEnum) result
    return result'

onFlowBoxMoveCursor :: (GObject a, MonadIO m) => a -> FlowBoxMoveCursorCallback -> m SignalHandlerId
onFlowBoxMoveCursor obj cb = liftIO $ connectFlowBoxMoveCursor obj cb SignalConnectBefore
afterFlowBoxMoveCursor :: (GObject a, MonadIO m) => a -> FlowBoxMoveCursorCallback -> m SignalHandlerId
afterFlowBoxMoveCursor obj cb = connectFlowBoxMoveCursor obj cb SignalConnectAfter

connectFlowBoxMoveCursor :: (GObject a, MonadIO m) =>
                            a -> FlowBoxMoveCursorCallback -> SignalConnectMode -> m SignalHandlerId
connectFlowBoxMoveCursor obj cb after = liftIO $ do
    cb' <- mkFlowBoxMoveCursorCallback (flowBoxMoveCursorCallbackWrapper cb)
    connectSignalFunPtr obj "move-cursor" cb' after

-- signal FlowBox::select-all
type FlowBoxSelectAllCallback =
    IO ()

noFlowBoxSelectAllCallback :: Maybe FlowBoxSelectAllCallback
noFlowBoxSelectAllCallback = Nothing

type FlowBoxSelectAllCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFlowBoxSelectAllCallback :: FlowBoxSelectAllCallbackC -> IO (FunPtr FlowBoxSelectAllCallbackC)

flowBoxSelectAllClosure :: FlowBoxSelectAllCallback -> IO Closure
flowBoxSelectAllClosure cb = newCClosure =<< mkFlowBoxSelectAllCallback wrapped
    where wrapped = flowBoxSelectAllCallbackWrapper cb

flowBoxSelectAllCallbackWrapper ::
    FlowBoxSelectAllCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
flowBoxSelectAllCallbackWrapper _cb _ _ = do
    _cb 

onFlowBoxSelectAll :: (GObject a, MonadIO m) => a -> FlowBoxSelectAllCallback -> m SignalHandlerId
onFlowBoxSelectAll obj cb = liftIO $ connectFlowBoxSelectAll obj cb SignalConnectBefore
afterFlowBoxSelectAll :: (GObject a, MonadIO m) => a -> FlowBoxSelectAllCallback -> m SignalHandlerId
afterFlowBoxSelectAll obj cb = connectFlowBoxSelectAll obj cb SignalConnectAfter

connectFlowBoxSelectAll :: (GObject a, MonadIO m) =>
                           a -> FlowBoxSelectAllCallback -> SignalConnectMode -> m SignalHandlerId
connectFlowBoxSelectAll obj cb after = liftIO $ do
    cb' <- mkFlowBoxSelectAllCallback (flowBoxSelectAllCallbackWrapper cb)
    connectSignalFunPtr obj "select-all" cb' after

-- signal FlowBox::selected-children-changed
type FlowBoxSelectedChildrenChangedCallback =
    IO ()

noFlowBoxSelectedChildrenChangedCallback :: Maybe FlowBoxSelectedChildrenChangedCallback
noFlowBoxSelectedChildrenChangedCallback = Nothing

type FlowBoxSelectedChildrenChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFlowBoxSelectedChildrenChangedCallback :: FlowBoxSelectedChildrenChangedCallbackC -> IO (FunPtr FlowBoxSelectedChildrenChangedCallbackC)

flowBoxSelectedChildrenChangedClosure :: FlowBoxSelectedChildrenChangedCallback -> IO Closure
flowBoxSelectedChildrenChangedClosure cb = newCClosure =<< mkFlowBoxSelectedChildrenChangedCallback wrapped
    where wrapped = flowBoxSelectedChildrenChangedCallbackWrapper cb

flowBoxSelectedChildrenChangedCallbackWrapper ::
    FlowBoxSelectedChildrenChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
flowBoxSelectedChildrenChangedCallbackWrapper _cb _ _ = do
    _cb 

onFlowBoxSelectedChildrenChanged :: (GObject a, MonadIO m) => a -> FlowBoxSelectedChildrenChangedCallback -> m SignalHandlerId
onFlowBoxSelectedChildrenChanged obj cb = liftIO $ connectFlowBoxSelectedChildrenChanged obj cb SignalConnectBefore
afterFlowBoxSelectedChildrenChanged :: (GObject a, MonadIO m) => a -> FlowBoxSelectedChildrenChangedCallback -> m SignalHandlerId
afterFlowBoxSelectedChildrenChanged obj cb = connectFlowBoxSelectedChildrenChanged obj cb SignalConnectAfter

connectFlowBoxSelectedChildrenChanged :: (GObject a, MonadIO m) =>
                                         a -> FlowBoxSelectedChildrenChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectFlowBoxSelectedChildrenChanged obj cb after = liftIO $ do
    cb' <- mkFlowBoxSelectedChildrenChangedCallback (flowBoxSelectedChildrenChangedCallbackWrapper cb)
    connectSignalFunPtr obj "selected-children-changed" cb' after

-- signal FlowBox::toggle-cursor-child
type FlowBoxToggleCursorChildCallback =
    IO ()

noFlowBoxToggleCursorChildCallback :: Maybe FlowBoxToggleCursorChildCallback
noFlowBoxToggleCursorChildCallback = Nothing

type FlowBoxToggleCursorChildCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFlowBoxToggleCursorChildCallback :: FlowBoxToggleCursorChildCallbackC -> IO (FunPtr FlowBoxToggleCursorChildCallbackC)

flowBoxToggleCursorChildClosure :: FlowBoxToggleCursorChildCallback -> IO Closure
flowBoxToggleCursorChildClosure cb = newCClosure =<< mkFlowBoxToggleCursorChildCallback wrapped
    where wrapped = flowBoxToggleCursorChildCallbackWrapper cb

flowBoxToggleCursorChildCallbackWrapper ::
    FlowBoxToggleCursorChildCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
flowBoxToggleCursorChildCallbackWrapper _cb _ _ = do
    _cb 

onFlowBoxToggleCursorChild :: (GObject a, MonadIO m) => a -> FlowBoxToggleCursorChildCallback -> m SignalHandlerId
onFlowBoxToggleCursorChild obj cb = liftIO $ connectFlowBoxToggleCursorChild obj cb SignalConnectBefore
afterFlowBoxToggleCursorChild :: (GObject a, MonadIO m) => a -> FlowBoxToggleCursorChildCallback -> m SignalHandlerId
afterFlowBoxToggleCursorChild obj cb = connectFlowBoxToggleCursorChild obj cb SignalConnectAfter

connectFlowBoxToggleCursorChild :: (GObject a, MonadIO m) =>
                                   a -> FlowBoxToggleCursorChildCallback -> SignalConnectMode -> m SignalHandlerId
connectFlowBoxToggleCursorChild obj cb after = liftIO $ do
    cb' <- mkFlowBoxToggleCursorChildCallback (flowBoxToggleCursorChildCallbackWrapper cb)
    connectSignalFunPtr obj "toggle-cursor-child" cb' after

-- signal FlowBox::unselect-all
type FlowBoxUnselectAllCallback =
    IO ()

noFlowBoxUnselectAllCallback :: Maybe FlowBoxUnselectAllCallback
noFlowBoxUnselectAllCallback = Nothing

type FlowBoxUnselectAllCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFlowBoxUnselectAllCallback :: FlowBoxUnselectAllCallbackC -> IO (FunPtr FlowBoxUnselectAllCallbackC)

flowBoxUnselectAllClosure :: FlowBoxUnselectAllCallback -> IO Closure
flowBoxUnselectAllClosure cb = newCClosure =<< mkFlowBoxUnselectAllCallback wrapped
    where wrapped = flowBoxUnselectAllCallbackWrapper cb

flowBoxUnselectAllCallbackWrapper ::
    FlowBoxUnselectAllCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
flowBoxUnselectAllCallbackWrapper _cb _ _ = do
    _cb 

onFlowBoxUnselectAll :: (GObject a, MonadIO m) => a -> FlowBoxUnselectAllCallback -> m SignalHandlerId
onFlowBoxUnselectAll obj cb = liftIO $ connectFlowBoxUnselectAll obj cb SignalConnectBefore
afterFlowBoxUnselectAll :: (GObject a, MonadIO m) => a -> FlowBoxUnselectAllCallback -> m SignalHandlerId
afterFlowBoxUnselectAll obj cb = connectFlowBoxUnselectAll obj cb SignalConnectAfter

connectFlowBoxUnselectAll :: (GObject a, MonadIO m) =>
                             a -> FlowBoxUnselectAllCallback -> SignalConnectMode -> m SignalHandlerId
connectFlowBoxUnselectAll obj cb after = liftIO $ do
    cb' <- mkFlowBoxUnselectAllCallback (flowBoxUnselectAllCallbackWrapper cb)
    connectSignalFunPtr obj "unselect-all" cb' after

-- object FlowBoxAccessible 
newtype FlowBoxAccessible = FlowBoxAccessible (ForeignPtr FlowBoxAccessible)
noFlowBoxAccessible :: Maybe FlowBoxAccessible
noFlowBoxAccessible = Nothing

foreign import ccall "gtk_flow_box_accessible_get_type"
    c_gtk_flow_box_accessible_get_type :: IO GType

type instance ParentTypes FlowBoxAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Selection]

instance GObject FlowBoxAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_flow_box_accessible_get_type
    

class GObject o => FlowBoxAccessibleK o
instance (GObject o, IsDescendantOf FlowBoxAccessible o) => FlowBoxAccessibleK o

toFlowBoxAccessible :: FlowBoxAccessibleK o => o -> IO FlowBoxAccessible
toFlowBoxAccessible = unsafeCastTo FlowBoxAccessible

-- object FlowBoxChild 
newtype FlowBoxChild = FlowBoxChild (ForeignPtr FlowBoxChild)
noFlowBoxChild :: Maybe FlowBoxChild
noFlowBoxChild = Nothing

foreign import ccall "gtk_flow_box_child_get_type"
    c_gtk_flow_box_child_get_type :: IO GType

type instance ParentTypes FlowBoxChild = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject FlowBoxChild where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_flow_box_child_get_type
    

class GObject o => FlowBoxChildK o
instance (GObject o, IsDescendantOf FlowBoxChild o) => FlowBoxChildK o

toFlowBoxChild :: FlowBoxChildK o => o -> IO FlowBoxChild
toFlowBoxChild = unsafeCastTo FlowBoxChild

-- method FlowBoxChild::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "FlowBoxChild"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_child_new" gtk_flow_box_child_new :: 
    IO (Ptr FlowBoxChild)


flowBoxChildNew ::
    (MonadIO m) =>
    m FlowBoxChild
flowBoxChildNew  = liftIO $ do
    result <- gtk_flow_box_child_new
    checkUnexpectedReturnNULL "gtk_flow_box_child_new" result
    result' <- (newObject FlowBoxChild) result
    return result'

-- method FlowBoxChild::changed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBoxChild", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBoxChild", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_child_changed" gtk_flow_box_child_changed :: 
    Ptr FlowBoxChild ->                     -- _obj : TInterface "Gtk" "FlowBoxChild"
    IO ()


flowBoxChildChanged ::
    (MonadIO m, FlowBoxChildK a) =>
    a ->                                    -- _obj
    m ()
flowBoxChildChanged _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_flow_box_child_changed _obj'
    touchManagedPtr _obj
    return ()

-- method FlowBoxChild::get_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBoxChild", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBoxChild", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_child_get_index" gtk_flow_box_child_get_index :: 
    Ptr FlowBoxChild ->                     -- _obj : TInterface "Gtk" "FlowBoxChild"
    IO Int32


flowBoxChildGetIndex ::
    (MonadIO m, FlowBoxChildK a) =>
    a ->                                    -- _obj
    m Int32
flowBoxChildGetIndex _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_flow_box_child_get_index _obj'
    touchManagedPtr _obj
    return result

-- method FlowBoxChild::is_selected
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBoxChild", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FlowBoxChild", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_flow_box_child_is_selected" gtk_flow_box_child_is_selected :: 
    Ptr FlowBoxChild ->                     -- _obj : TInterface "Gtk" "FlowBoxChild"
    IO CInt


flowBoxChildIsSelected ::
    (MonadIO m, FlowBoxChildK a) =>
    a ->                                    -- _obj
    m Bool
flowBoxChildIsSelected _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_flow_box_child_is_selected _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- signal FlowBoxChild::activate
type FlowBoxChildActivateCallback =
    IO ()

noFlowBoxChildActivateCallback :: Maybe FlowBoxChildActivateCallback
noFlowBoxChildActivateCallback = Nothing

type FlowBoxChildActivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFlowBoxChildActivateCallback :: FlowBoxChildActivateCallbackC -> IO (FunPtr FlowBoxChildActivateCallbackC)

flowBoxChildActivateClosure :: FlowBoxChildActivateCallback -> IO Closure
flowBoxChildActivateClosure cb = newCClosure =<< mkFlowBoxChildActivateCallback wrapped
    where wrapped = flowBoxChildActivateCallbackWrapper cb

flowBoxChildActivateCallbackWrapper ::
    FlowBoxChildActivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
flowBoxChildActivateCallbackWrapper _cb _ _ = do
    _cb 

onFlowBoxChildActivate :: (GObject a, MonadIO m) => a -> FlowBoxChildActivateCallback -> m SignalHandlerId
onFlowBoxChildActivate obj cb = liftIO $ connectFlowBoxChildActivate obj cb SignalConnectBefore
afterFlowBoxChildActivate :: (GObject a, MonadIO m) => a -> FlowBoxChildActivateCallback -> m SignalHandlerId
afterFlowBoxChildActivate obj cb = connectFlowBoxChildActivate obj cb SignalConnectAfter

connectFlowBoxChildActivate :: (GObject a, MonadIO m) =>
                               a -> FlowBoxChildActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectFlowBoxChildActivate obj cb after = liftIO $ do
    cb' <- mkFlowBoxChildActivateCallback (flowBoxChildActivateCallbackWrapper cb)
    connectSignalFunPtr obj "activate" cb' after

-- object FlowBoxChildAccessible 
newtype FlowBoxChildAccessible = FlowBoxChildAccessible (ForeignPtr FlowBoxChildAccessible)
noFlowBoxChildAccessible :: Maybe FlowBoxChildAccessible
noFlowBoxChildAccessible = Nothing

foreign import ccall "gtk_flow_box_child_accessible_get_type"
    c_gtk_flow_box_child_accessible_get_type :: IO GType

type instance ParentTypes FlowBoxChildAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component]

instance GObject FlowBoxChildAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_flow_box_child_accessible_get_type
    

class GObject o => FlowBoxChildAccessibleK o
instance (GObject o, IsDescendantOf FlowBoxChildAccessible o) => FlowBoxChildAccessibleK o

toFlowBoxChildAccessible :: FlowBoxChildAccessibleK o => o -> IO FlowBoxChildAccessible
toFlowBoxChildAccessible = unsafeCastTo FlowBoxChildAccessible

-- callback FlowBoxFilterFunc
flowBoxFilterFuncClosure :: FlowBoxFilterFunc -> IO Closure
flowBoxFilterFuncClosure cb = newCClosure =<< mkFlowBoxFilterFunc wrapped
    where wrapped = flowBoxFilterFuncWrapper Nothing cb

type FlowBoxFilterFuncC =
    Ptr FlowBoxChild ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkFlowBoxFilterFunc :: FlowBoxFilterFuncC -> IO (FunPtr FlowBoxFilterFuncC)

type FlowBoxFilterFunc =
    FlowBoxChild ->
    IO Bool

noFlowBoxFilterFunc :: Maybe FlowBoxFilterFunc
noFlowBoxFilterFunc = Nothing

flowBoxFilterFuncWrapper ::
    Maybe (Ptr (FunPtr (FlowBoxFilterFuncC))) ->
    FlowBoxFilterFunc ->
    Ptr FlowBoxChild ->
    Ptr () ->
    IO CInt
flowBoxFilterFuncWrapper funptrptr _cb child _ = do
    child' <- (newObject FlowBoxChild) child
    result <- _cb  child'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- callback FlowBoxForeachFunc
flowBoxForeachFuncClosure :: FlowBoxForeachFunc -> IO Closure
flowBoxForeachFuncClosure cb = newCClosure =<< mkFlowBoxForeachFunc wrapped
    where wrapped = flowBoxForeachFuncWrapper Nothing cb

type FlowBoxForeachFuncC =
    Ptr FlowBox ->
    Ptr FlowBoxChild ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkFlowBoxForeachFunc :: FlowBoxForeachFuncC -> IO (FunPtr FlowBoxForeachFuncC)

type FlowBoxForeachFunc =
    FlowBox ->
    FlowBoxChild ->
    IO ()

noFlowBoxForeachFunc :: Maybe FlowBoxForeachFunc
noFlowBoxForeachFunc = Nothing

flowBoxForeachFuncWrapper ::
    Maybe (Ptr (FunPtr (FlowBoxForeachFuncC))) ->
    FlowBoxForeachFunc ->
    Ptr FlowBox ->
    Ptr FlowBoxChild ->
    Ptr () ->
    IO ()
flowBoxForeachFuncWrapper funptrptr _cb box child _ = do
    box' <- (newObject FlowBox) box
    child' <- (newObject FlowBoxChild) child
    _cb  box' child'
    maybeReleaseFunPtr funptrptr

-- callback FlowBoxSortFunc
flowBoxSortFuncClosure :: FlowBoxSortFunc -> IO Closure
flowBoxSortFuncClosure cb = newCClosure =<< mkFlowBoxSortFunc wrapped
    where wrapped = flowBoxSortFuncWrapper Nothing cb

type FlowBoxSortFuncC =
    Ptr FlowBoxChild ->
    Ptr FlowBoxChild ->
    Ptr () ->
    IO Int32

foreign import ccall "wrapper"
    mkFlowBoxSortFunc :: FlowBoxSortFuncC -> IO (FunPtr FlowBoxSortFuncC)

type FlowBoxSortFunc =
    FlowBoxChild ->
    FlowBoxChild ->
    IO Int32

noFlowBoxSortFunc :: Maybe FlowBoxSortFunc
noFlowBoxSortFunc = Nothing

flowBoxSortFuncWrapper ::
    Maybe (Ptr (FunPtr (FlowBoxSortFuncC))) ->
    FlowBoxSortFunc ->
    Ptr FlowBoxChild ->
    Ptr FlowBoxChild ->
    Ptr () ->
    IO Int32
flowBoxSortFuncWrapper funptrptr _cb child1 child2 _ = do
    child1' <- (newObject FlowBoxChild) child1
    child2' <- (newObject FlowBoxChild) child2
    result <- _cb  child1' child2'
    maybeReleaseFunPtr funptrptr
    return result

-- object FontButton 
newtype FontButton = FontButton (ForeignPtr FontButton)
noFontButton :: Maybe FontButton
noFontButton = Nothing

foreign import ccall "gtk_font_button_get_type"
    c_gtk_font_button_get_type :: IO GType

type instance ParentTypes FontButton = '[Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable, FontChooser]

instance GObject FontButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_font_button_get_type
    

class GObject o => FontButtonK o
instance (GObject o, IsDescendantOf FontButton o) => FontButtonK o

toFontButton :: FontButtonK o => o -> IO FontButton
toFontButton = unsafeCastTo FontButton

-- method FontButton::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "FontButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_new" gtk_font_button_new :: 
    IO (Ptr FontButton)


fontButtonNew ::
    (MonadIO m) =>
    m FontButton
fontButtonNew  = liftIO $ do
    result <- gtk_font_button_new
    checkUnexpectedReturnNULL "gtk_font_button_new" result
    result' <- (newObject FontButton) result
    return result'

-- method FontButton::new_with_font
-- method type : Constructor
-- Args : [Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "FontButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_new_with_font" gtk_font_button_new_with_font :: 
    CString ->                              -- fontname : TBasicType TUTF8
    IO (Ptr FontButton)


fontButtonNewWithFont ::
    (MonadIO m) =>
    T.Text ->                               -- fontname
    m FontButton
fontButtonNewWithFont fontname = liftIO $ do
    fontname' <- textToCString fontname
    result <- gtk_font_button_new_with_font fontname'
    checkUnexpectedReturnNULL "gtk_font_button_new_with_font" result
    result' <- (newObject FontButton) result
    freeMem fontname'
    return result'

-- method FontButton::get_font_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_get_font_name" gtk_font_button_get_font_name :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    IO CString


fontButtonGetFontName ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    m T.Text
fontButtonGetFontName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_button_get_font_name _obj'
    checkUnexpectedReturnNULL "gtk_font_button_get_font_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method FontButton::get_show_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_get_show_size" gtk_font_button_get_show_size :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    IO CInt


fontButtonGetShowSize ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    m Bool
fontButtonGetShowSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_button_get_show_size _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FontButton::get_show_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_get_show_style" gtk_font_button_get_show_style :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    IO CInt


fontButtonGetShowStyle ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    m Bool
fontButtonGetShowStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_button_get_show_style _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FontButton::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_get_title" gtk_font_button_get_title :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    IO CString


fontButtonGetTitle ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    m T.Text
fontButtonGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_button_get_title _obj'
    checkUnexpectedReturnNULL "gtk_font_button_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method FontButton::get_use_font
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_get_use_font" gtk_font_button_get_use_font :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    IO CInt


fontButtonGetUseFont ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    m Bool
fontButtonGetUseFont _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_button_get_use_font _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FontButton::get_use_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_get_use_size" gtk_font_button_get_use_size :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    IO CInt


fontButtonGetUseSize ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    m Bool
fontButtonGetUseSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_button_get_use_size _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FontButton::set_font_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_set_font_name" gtk_font_button_set_font_name :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    CString ->                              -- fontname : TBasicType TUTF8
    IO CInt


fontButtonSetFontName ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- fontname
    m Bool
fontButtonSetFontName _obj fontname = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    fontname' <- textToCString fontname
    result <- gtk_font_button_set_font_name _obj' fontname'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem fontname'
    return result'

-- method FontButton::set_show_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_size", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_size", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_set_show_size" gtk_font_button_set_show_size :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    CInt ->                                 -- show_size : TBasicType TBoolean
    IO ()


fontButtonSetShowSize ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_size
    m ()
fontButtonSetShowSize _obj show_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_size' = (fromIntegral . fromEnum) show_size
    gtk_font_button_set_show_size _obj' show_size'
    touchManagedPtr _obj
    return ()

-- method FontButton::set_show_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_style", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_style", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_set_show_style" gtk_font_button_set_show_style :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    CInt ->                                 -- show_style : TBasicType TBoolean
    IO ()


fontButtonSetShowStyle ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_style
    m ()
fontButtonSetShowStyle _obj show_style = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_style' = (fromIntegral . fromEnum) show_style
    gtk_font_button_set_show_style _obj' show_style'
    touchManagedPtr _obj
    return ()

-- method FontButton::set_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_set_title" gtk_font_button_set_title :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    CString ->                              -- title : TBasicType TUTF8
    IO ()


fontButtonSetTitle ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- title
    m ()
fontButtonSetTitle _obj title = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    title' <- textToCString title
    gtk_font_button_set_title _obj' title'
    touchManagedPtr _obj
    freeMem title'
    return ()

-- method FontButton::set_use_font
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_font", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_font", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_set_use_font" gtk_font_button_set_use_font :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    CInt ->                                 -- use_font : TBasicType TBoolean
    IO ()


fontButtonSetUseFont ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_font
    m ()
fontButtonSetUseFont _obj use_font = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_font' = (fromIntegral . fromEnum) use_font
    gtk_font_button_set_use_font _obj' use_font'
    touchManagedPtr _obj
    return ()

-- method FontButton::set_use_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_size", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_size", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_button_set_use_size" gtk_font_button_set_use_size :: 
    Ptr FontButton ->                       -- _obj : TInterface "Gtk" "FontButton"
    CInt ->                                 -- use_size : TBasicType TBoolean
    IO ()


fontButtonSetUseSize ::
    (MonadIO m, FontButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_size
    m ()
fontButtonSetUseSize _obj use_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_size' = (fromIntegral . fromEnum) use_size
    gtk_font_button_set_use_size _obj' use_size'
    touchManagedPtr _obj
    return ()

-- signal FontButton::font-set
type FontButtonFontSetCallback =
    IO ()

noFontButtonFontSetCallback :: Maybe FontButtonFontSetCallback
noFontButtonFontSetCallback = Nothing

type FontButtonFontSetCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFontButtonFontSetCallback :: FontButtonFontSetCallbackC -> IO (FunPtr FontButtonFontSetCallbackC)

fontButtonFontSetClosure :: FontButtonFontSetCallback -> IO Closure
fontButtonFontSetClosure cb = newCClosure =<< mkFontButtonFontSetCallback wrapped
    where wrapped = fontButtonFontSetCallbackWrapper cb

fontButtonFontSetCallbackWrapper ::
    FontButtonFontSetCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
fontButtonFontSetCallbackWrapper _cb _ _ = do
    _cb 

onFontButtonFontSet :: (GObject a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId
onFontButtonFontSet obj cb = liftIO $ connectFontButtonFontSet obj cb SignalConnectBefore
afterFontButtonFontSet :: (GObject a, MonadIO m) => a -> FontButtonFontSetCallback -> m SignalHandlerId
afterFontButtonFontSet obj cb = connectFontButtonFontSet obj cb SignalConnectAfter

connectFontButtonFontSet :: (GObject a, MonadIO m) =>
                            a -> FontButtonFontSetCallback -> SignalConnectMode -> m SignalHandlerId
connectFontButtonFontSet obj cb after = liftIO $ do
    cb' <- mkFontButtonFontSetCallback (fontButtonFontSetCallbackWrapper cb)
    connectSignalFunPtr obj "font-set" cb' after

-- interface FontChooser 

newtype FontChooser = FontChooser (ForeignPtr FontChooser)
noFontChooser :: Maybe FontChooser
noFontChooser = Nothing

foreign import ccall "gtk_font_chooser_get_type"
    c_gtk_font_chooser_get_type :: IO GType

type instance ParentTypes FontChooser = '[GObject.Object]

instance GObject FontChooser where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_font_chooser_get_type
    

class GObject o => FontChooserK o
instance (GObject o, IsDescendantOf FontChooser o) => FontChooserK o

toFontChooser :: FontChooserK o => o -> IO FontChooser
toFontChooser = unsafeCastTo FontChooser

-- method FontChooser::get_font
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_get_font" gtk_font_chooser_get_font :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    IO CString


fontChooserGetFont ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    m T.Text
fontChooserGetFont _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_chooser_get_font _obj'
    checkUnexpectedReturnNULL "gtk_font_chooser_get_font" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method FontChooser::get_font_desc
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontDescription"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_get_font_desc" gtk_font_chooser_get_font_desc :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    IO (Ptr Pango.FontDescription)


fontChooserGetFontDesc ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    m Pango.FontDescription
fontChooserGetFontDesc _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_chooser_get_font_desc _obj'
    checkUnexpectedReturnNULL "gtk_font_chooser_get_font_desc" result
    result' <- (wrapBoxed Pango.FontDescription) result
    touchManagedPtr _obj
    return result'

-- method FontChooser::get_font_face
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontFace"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_get_font_face" gtk_font_chooser_get_font_face :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    IO (Ptr Pango.FontFace)


fontChooserGetFontFace ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    m Pango.FontFace
fontChooserGetFontFace _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_chooser_get_font_face _obj'
    checkUnexpectedReturnNULL "gtk_font_chooser_get_font_face" result
    result' <- (newObject Pango.FontFace) result
    touchManagedPtr _obj
    return result'

-- method FontChooser::get_font_family
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontFamily"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_get_font_family" gtk_font_chooser_get_font_family :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    IO (Ptr Pango.FontFamily)


fontChooserGetFontFamily ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    m Pango.FontFamily
fontChooserGetFontFamily _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_chooser_get_font_family _obj'
    checkUnexpectedReturnNULL "gtk_font_chooser_get_font_family" result
    result' <- (newObject Pango.FontFamily) result
    touchManagedPtr _obj
    return result'

-- method FontChooser::get_font_map
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontMap"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_get_font_map" gtk_font_chooser_get_font_map :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    IO (Ptr Pango.FontMap)


fontChooserGetFontMap ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    m Pango.FontMap
fontChooserGetFontMap _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_chooser_get_font_map _obj'
    checkUnexpectedReturnNULL "gtk_font_chooser_get_font_map" result
    result' <- (wrapObject Pango.FontMap) result
    touchManagedPtr _obj
    return result'

-- method FontChooser::get_font_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_get_font_size" gtk_font_chooser_get_font_size :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    IO Int32


fontChooserGetFontSize ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    m Int32
fontChooserGetFontSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_chooser_get_font_size _obj'
    touchManagedPtr _obj
    return result

-- method FontChooser::get_preview_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_get_preview_text" gtk_font_chooser_get_preview_text :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    IO CString


fontChooserGetPreviewText ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    m T.Text
fontChooserGetPreviewText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_chooser_get_preview_text _obj'
    checkUnexpectedReturnNULL "gtk_font_chooser_get_preview_text" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method FontChooser::get_show_preview_entry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_get_show_preview_entry" gtk_font_chooser_get_show_preview_entry :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    IO CInt


fontChooserGetShowPreviewEntry ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    m Bool
fontChooserGetShowPreviewEntry _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_chooser_get_show_preview_entry _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FontChooser::set_filter_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "FontFilterFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "FontFilterFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_set_filter_func" gtk_font_chooser_set_filter_func :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    FunPtr FontFilterFuncC ->               -- filter : TInterface "Gtk" "FontFilterFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


fontChooserSetFilterFunc ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    Maybe (FontFilterFunc) ->               -- filter
    m ()
fontChooserSetFilterFunc _obj filter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFilter <- case filter of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jFilter -> do
            jFilter' <- mkFontFilterFunc (fontFilterFuncWrapper Nothing jFilter)
            return jFilter'
    let user_data = castFunPtrToPtr maybeFilter
    let destroy = safeFreeFunPtrPtr
    gtk_font_chooser_set_filter_func _obj' maybeFilter user_data destroy
    touchManagedPtr _obj
    return ()

-- method FontChooser::set_font
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_set_font" gtk_font_chooser_set_font :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    CString ->                              -- fontname : TBasicType TUTF8
    IO ()


fontChooserSetFont ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- fontname
    m ()
fontChooserSetFont _obj fontname = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    fontname' <- textToCString fontname
    gtk_font_chooser_set_font _obj' fontname'
    touchManagedPtr _obj
    freeMem fontname'
    return ()

-- method FontChooser::set_font_desc
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font_desc", argType = TInterface "Pango" "FontDescription", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font_desc", argType = TInterface "Pango" "FontDescription", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_set_font_desc" gtk_font_chooser_set_font_desc :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    Ptr Pango.FontDescription ->            -- font_desc : TInterface "Pango" "FontDescription"
    IO ()


fontChooserSetFontDesc ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    Pango.FontDescription ->                -- font_desc
    m ()
fontChooserSetFontDesc _obj font_desc = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let font_desc' = unsafeManagedPtrGetPtr font_desc
    gtk_font_chooser_set_font_desc _obj' font_desc'
    touchManagedPtr _obj
    touchManagedPtr font_desc
    return ()

-- method FontChooser::set_font_map
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontmap", argType = TInterface "Pango" "FontMap", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontmap", argType = TInterface "Pango" "FontMap", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_set_font_map" gtk_font_chooser_set_font_map :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    Ptr Pango.FontMap ->                    -- fontmap : TInterface "Pango" "FontMap"
    IO ()


fontChooserSetFontMap ::
    (MonadIO m, FontChooserK a, Pango.FontMapK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- fontmap
    m ()
fontChooserSetFontMap _obj fontmap = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFontmap <- case fontmap of
        Nothing -> return nullPtr
        Just jFontmap -> do
            let jFontmap' = unsafeManagedPtrCastPtr jFontmap
            return jFontmap'
    gtk_font_chooser_set_font_map _obj' maybeFontmap
    touchManagedPtr _obj
    whenJust fontmap touchManagedPtr
    return ()

-- method FontChooser::set_preview_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_set_preview_text" gtk_font_chooser_set_preview_text :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


fontChooserSetPreviewText ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    m ()
fontChooserSetPreviewText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_font_chooser_set_preview_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method FontChooser::set_show_preview_entry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_preview_entry", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_preview_entry", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_set_show_preview_entry" gtk_font_chooser_set_show_preview_entry :: 
    Ptr FontChooser ->                      -- _obj : TInterface "Gtk" "FontChooser"
    CInt ->                                 -- show_preview_entry : TBasicType TBoolean
    IO ()


fontChooserSetShowPreviewEntry ::
    (MonadIO m, FontChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_preview_entry
    m ()
fontChooserSetShowPreviewEntry _obj show_preview_entry = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_preview_entry' = (fromIntegral . fromEnum) show_preview_entry
    gtk_font_chooser_set_show_preview_entry _obj' show_preview_entry'
    touchManagedPtr _obj
    return ()

-- signal FontChooser::font-activated
type FontChooserFontActivatedCallback =
    T.Text ->
    IO ()

noFontChooserFontActivatedCallback :: Maybe FontChooserFontActivatedCallback
noFontChooserFontActivatedCallback = Nothing

type FontChooserFontActivatedCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFontChooserFontActivatedCallback :: FontChooserFontActivatedCallbackC -> IO (FunPtr FontChooserFontActivatedCallbackC)

fontChooserFontActivatedClosure :: FontChooserFontActivatedCallback -> IO Closure
fontChooserFontActivatedClosure cb = newCClosure =<< mkFontChooserFontActivatedCallback wrapped
    where wrapped = fontChooserFontActivatedCallbackWrapper cb

fontChooserFontActivatedCallbackWrapper ::
    FontChooserFontActivatedCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
fontChooserFontActivatedCallbackWrapper _cb _ fontname _ = do
    fontname' <- cstringToText fontname
    _cb  fontname'

onFontChooserFontActivated :: (GObject a, MonadIO m) => a -> FontChooserFontActivatedCallback -> m SignalHandlerId
onFontChooserFontActivated obj cb = liftIO $ connectFontChooserFontActivated obj cb SignalConnectBefore
afterFontChooserFontActivated :: (GObject a, MonadIO m) => a -> FontChooserFontActivatedCallback -> m SignalHandlerId
afterFontChooserFontActivated obj cb = connectFontChooserFontActivated obj cb SignalConnectAfter

connectFontChooserFontActivated :: (GObject a, MonadIO m) =>
                                   a -> FontChooserFontActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectFontChooserFontActivated obj cb after = liftIO $ do
    cb' <- mkFontChooserFontActivatedCallback (fontChooserFontActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "font-activated" cb' after

-- object FontChooserDialog 
newtype FontChooserDialog = FontChooserDialog (ForeignPtr FontChooserDialog)
noFontChooserDialog :: Maybe FontChooserDialog
noFontChooserDialog = Nothing

foreign import ccall "gtk_font_chooser_dialog_get_type"
    c_gtk_font_chooser_dialog_get_type :: IO GType

type instance ParentTypes FontChooserDialog = '[Dialog, Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, FontChooser]

instance GObject FontChooserDialog where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_font_chooser_dialog_get_type
    

class GObject o => FontChooserDialogK o
instance (GObject o, IsDescendantOf FontChooserDialog o) => FontChooserDialogK o

toFontChooserDialog :: FontChooserDialogK o => o -> IO FontChooserDialog
toFontChooserDialog = unsafeCastTo FontChooserDialog

-- method FontChooserDialog::new
-- method type : Constructor
-- Args : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "FontChooserDialog"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_dialog_new" gtk_font_chooser_dialog_new :: 
    CString ->                              -- title : TBasicType TUTF8
    Ptr Window ->                           -- parent : TInterface "Gtk" "Window"
    IO (Ptr FontChooserDialog)


fontChooserDialogNew ::
    (MonadIO m, WindowK a) =>
    Maybe (T.Text) ->                       -- title
    Maybe (a) ->                            -- parent
    m FontChooserDialog
fontChooserDialogNew title parent = liftIO $ do
    maybeTitle <- case title of
        Nothing -> return nullPtr
        Just jTitle -> do
            jTitle' <- textToCString jTitle
            return jTitle'
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    result <- gtk_font_chooser_dialog_new maybeTitle maybeParent
    checkUnexpectedReturnNULL "gtk_font_chooser_dialog_new" result
    result' <- (newObject FontChooserDialog) result
    whenJust parent touchManagedPtr
    freeMem maybeTitle
    return result'

-- object FontChooserWidget 
newtype FontChooserWidget = FontChooserWidget (ForeignPtr FontChooserWidget)
noFontChooserWidget :: Maybe FontChooserWidget
noFontChooserWidget = Nothing

foreign import ccall "gtk_font_chooser_widget_get_type"
    c_gtk_font_chooser_widget_get_type :: IO GType

type instance ParentTypes FontChooserWidget = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, FontChooser, Orientable]

instance GObject FontChooserWidget where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_font_chooser_widget_get_type
    

class GObject o => FontChooserWidgetK o
instance (GObject o, IsDescendantOf FontChooserWidget o) => FontChooserWidgetK o

toFontChooserWidget :: FontChooserWidgetK o => o -> IO FontChooserWidget
toFontChooserWidget = unsafeCastTo FontChooserWidget

-- method FontChooserWidget::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "FontChooserWidget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_chooser_widget_new" gtk_font_chooser_widget_new :: 
    IO (Ptr FontChooserWidget)


fontChooserWidgetNew ::
    (MonadIO m) =>
    m FontChooserWidget
fontChooserWidgetNew  = liftIO $ do
    result <- gtk_font_chooser_widget_new
    checkUnexpectedReturnNULL "gtk_font_chooser_widget_new" result
    result' <- (newObject FontChooserWidget) result
    return result'

-- callback FontFilterFunc
fontFilterFuncClosure :: FontFilterFunc -> IO Closure
fontFilterFuncClosure cb = newCClosure =<< mkFontFilterFunc wrapped
    where wrapped = fontFilterFuncWrapper Nothing cb

type FontFilterFuncC =
    Ptr Pango.FontFamily ->
    Ptr Pango.FontFace ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkFontFilterFunc :: FontFilterFuncC -> IO (FunPtr FontFilterFuncC)

type FontFilterFunc =
    Pango.FontFamily ->
    Pango.FontFace ->
    IO Bool

noFontFilterFunc :: Maybe FontFilterFunc
noFontFilterFunc = Nothing

fontFilterFuncWrapper ::
    Maybe (Ptr (FunPtr (FontFilterFuncC))) ->
    FontFilterFunc ->
    Ptr Pango.FontFamily ->
    Ptr Pango.FontFace ->
    Ptr () ->
    IO CInt
fontFilterFuncWrapper funptrptr _cb family face _ = do
    family' <- (newObject Pango.FontFamily) family
    face' <- (newObject Pango.FontFace) face
    result <- _cb  family' face'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- object FontSelection 
newtype FontSelection = FontSelection (ForeignPtr FontSelection)
noFontSelection :: Maybe FontSelection
noFontSelection = Nothing

foreign import ccall "gtk_font_selection_get_type"
    c_gtk_font_selection_get_type :: IO GType

type instance ParentTypes FontSelection = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject FontSelection where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_font_selection_get_type
    

class GObject o => FontSelectionK o
instance (GObject o, IsDescendantOf FontSelection o) => FontSelectionK o

toFontSelection :: FontSelectionK o => o -> IO FontSelection
toFontSelection = unsafeCastTo FontSelection

-- method FontSelection::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "FontSelection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_new" gtk_font_selection_new :: 
    IO (Ptr FontSelection)

{-# DEPRECATED fontSelectionNew ["(Since version 3.2)","Use #GtkFontChooserWidget instead"]#-}
fontSelectionNew ::
    (MonadIO m) =>
    m FontSelection
fontSelectionNew  = liftIO $ do
    result <- gtk_font_selection_new
    checkUnexpectedReturnNULL "gtk_font_selection_new" result
    result' <- (newObject FontSelection) result
    return result'

-- method FontSelection::get_face
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontFace"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_get_face" gtk_font_selection_get_face :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    IO (Ptr Pango.FontFace)

{-# DEPRECATED fontSelectionGetFace ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetFace ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    m Pango.FontFace
fontSelectionGetFace _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_get_face _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_get_face" result
    result' <- (newObject Pango.FontFace) result
    touchManagedPtr _obj
    return result'

-- method FontSelection::get_face_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_get_face_list" gtk_font_selection_get_face_list :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    IO (Ptr Widget)

{-# DEPRECATED fontSelectionGetFaceList ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetFaceList ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    m Widget
fontSelectionGetFaceList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_get_face_list _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_get_face_list" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method FontSelection::get_family
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontFamily"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_get_family" gtk_font_selection_get_family :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    IO (Ptr Pango.FontFamily)

{-# DEPRECATED fontSelectionGetFamily ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetFamily ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    m Pango.FontFamily
fontSelectionGetFamily _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_get_family _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_get_family" result
    result' <- (newObject Pango.FontFamily) result
    touchManagedPtr _obj
    return result'

-- method FontSelection::get_family_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_get_family_list" gtk_font_selection_get_family_list :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    IO (Ptr Widget)

{-# DEPRECATED fontSelectionGetFamilyList ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetFamilyList ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    m Widget
fontSelectionGetFamilyList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_get_family_list _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_get_family_list" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method FontSelection::get_font_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_get_font_name" gtk_font_selection_get_font_name :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    IO CString

{-# DEPRECATED fontSelectionGetFontName ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetFontName ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    m T.Text
fontSelectionGetFontName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_get_font_name _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_get_font_name" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method FontSelection::get_preview_entry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_get_preview_entry" gtk_font_selection_get_preview_entry :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    IO (Ptr Widget)

{-# DEPRECATED fontSelectionGetPreviewEntry ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetPreviewEntry ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    m Widget
fontSelectionGetPreviewEntry _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_get_preview_entry _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_get_preview_entry" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method FontSelection::get_preview_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_get_preview_text" gtk_font_selection_get_preview_text :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    IO CString

{-# DEPRECATED fontSelectionGetPreviewText ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetPreviewText ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    m T.Text
fontSelectionGetPreviewText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_get_preview_text _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_get_preview_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method FontSelection::get_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_get_size" gtk_font_selection_get_size :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    IO Int32

{-# DEPRECATED fontSelectionGetSize ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetSize ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    m Int32
fontSelectionGetSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_get_size _obj'
    touchManagedPtr _obj
    return result

-- method FontSelection::get_size_entry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_get_size_entry" gtk_font_selection_get_size_entry :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    IO (Ptr Widget)

{-# DEPRECATED fontSelectionGetSizeEntry ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetSizeEntry ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    m Widget
fontSelectionGetSizeEntry _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_get_size_entry _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_get_size_entry" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method FontSelection::get_size_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_get_size_list" gtk_font_selection_get_size_list :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    IO (Ptr Widget)

{-# DEPRECATED fontSelectionGetSizeList ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionGetSizeList ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    m Widget
fontSelectionGetSizeList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_get_size_list _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_get_size_list" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method FontSelection::set_font_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_set_font_name" gtk_font_selection_set_font_name :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    CString ->                              -- fontname : TBasicType TUTF8
    IO CInt

{-# DEPRECATED fontSelectionSetFontName ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionSetFontName ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- fontname
    m Bool
fontSelectionSetFontName _obj fontname = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    fontname' <- textToCString fontname
    result <- gtk_font_selection_set_font_name _obj' fontname'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem fontname'
    return result'

-- method FontSelection::set_preview_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_set_preview_text" gtk_font_selection_set_preview_text :: 
    Ptr FontSelection ->                    -- _obj : TInterface "Gtk" "FontSelection"
    CString ->                              -- text : TBasicType TUTF8
    IO ()

{-# DEPRECATED fontSelectionSetPreviewText ["(Since version 3.2)","Use #GtkFontChooser"]#-}
fontSelectionSetPreviewText ::
    (MonadIO m, FontSelectionK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    m ()
fontSelectionSetPreviewText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_font_selection_set_preview_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- object FontSelectionDialog 
newtype FontSelectionDialog = FontSelectionDialog (ForeignPtr FontSelectionDialog)
noFontSelectionDialog :: Maybe FontSelectionDialog
noFontSelectionDialog = Nothing

foreign import ccall "gtk_font_selection_dialog_get_type"
    c_gtk_font_selection_dialog_get_type :: IO GType

type instance ParentTypes FontSelectionDialog = '[Dialog, Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject FontSelectionDialog where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_font_selection_dialog_get_type
    

class GObject o => FontSelectionDialogK o
instance (GObject o, IsDescendantOf FontSelectionDialog o) => FontSelectionDialogK o

toFontSelectionDialog :: FontSelectionDialogK o => o -> IO FontSelectionDialog
toFontSelectionDialog = unsafeCastTo FontSelectionDialog

-- method FontSelectionDialog::new
-- method type : Constructor
-- Args : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "FontSelectionDialog"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_dialog_new" gtk_font_selection_dialog_new :: 
    CString ->                              -- title : TBasicType TUTF8
    IO (Ptr FontSelectionDialog)

{-# DEPRECATED fontSelectionDialogNew ["(Since version 3.2)","Use #GtkFontChooserDialog"]#-}
fontSelectionDialogNew ::
    (MonadIO m) =>
    T.Text ->                               -- title
    m FontSelectionDialog
fontSelectionDialogNew title = liftIO $ do
    title' <- textToCString title
    result <- gtk_font_selection_dialog_new title'
    checkUnexpectedReturnNULL "gtk_font_selection_dialog_new" result
    result' <- (newObject FontSelectionDialog) result
    freeMem title'
    return result'

-- method FontSelectionDialog::get_cancel_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_dialog_get_cancel_button" gtk_font_selection_dialog_get_cancel_button :: 
    Ptr FontSelectionDialog ->              -- _obj : TInterface "Gtk" "FontSelectionDialog"
    IO (Ptr Widget)

{-# DEPRECATED fontSelectionDialogGetCancelButton ["(Since version 3.2)","Use #GtkFontChooserDialog"]#-}
fontSelectionDialogGetCancelButton ::
    (MonadIO m, FontSelectionDialogK a) =>
    a ->                                    -- _obj
    m Widget
fontSelectionDialogGetCancelButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_dialog_get_cancel_button _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_dialog_get_cancel_button" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method FontSelectionDialog::get_font_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_dialog_get_font_name" gtk_font_selection_dialog_get_font_name :: 
    Ptr FontSelectionDialog ->              -- _obj : TInterface "Gtk" "FontSelectionDialog"
    IO CString

{-# DEPRECATED fontSelectionDialogGetFontName ["(Since version 3.2)","Use #GtkFontChooserDialog"]#-}
fontSelectionDialogGetFontName ::
    (MonadIO m, FontSelectionDialogK a) =>
    a ->                                    -- _obj
    m T.Text
fontSelectionDialogGetFontName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_dialog_get_font_name _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_dialog_get_font_name" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method FontSelectionDialog::get_font_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_dialog_get_font_selection" gtk_font_selection_dialog_get_font_selection :: 
    Ptr FontSelectionDialog ->              -- _obj : TInterface "Gtk" "FontSelectionDialog"
    IO (Ptr Widget)

{-# DEPRECATED fontSelectionDialogGetFontSelection ["(Since version 3.2)","Use #GtkFontChooserDialog"]#-}
fontSelectionDialogGetFontSelection ::
    (MonadIO m, FontSelectionDialogK a) =>
    a ->                                    -- _obj
    m Widget
fontSelectionDialogGetFontSelection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_dialog_get_font_selection _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_dialog_get_font_selection" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method FontSelectionDialog::get_ok_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_dialog_get_ok_button" gtk_font_selection_dialog_get_ok_button :: 
    Ptr FontSelectionDialog ->              -- _obj : TInterface "Gtk" "FontSelectionDialog"
    IO (Ptr Widget)

{-# DEPRECATED fontSelectionDialogGetOkButton ["(Since version 3.2)","Use #GtkFontChooserDialog"]#-}
fontSelectionDialogGetOkButton ::
    (MonadIO m, FontSelectionDialogK a) =>
    a ->                                    -- _obj
    m Widget
fontSelectionDialogGetOkButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_dialog_get_ok_button _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_dialog_get_ok_button" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method FontSelectionDialog::get_preview_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_dialog_get_preview_text" gtk_font_selection_dialog_get_preview_text :: 
    Ptr FontSelectionDialog ->              -- _obj : TInterface "Gtk" "FontSelectionDialog"
    IO CString

{-# DEPRECATED fontSelectionDialogGetPreviewText ["(Since version 3.2)","Use #GtkFontChooserDialog"]#-}
fontSelectionDialogGetPreviewText ::
    (MonadIO m, FontSelectionDialogK a) =>
    a ->                                    -- _obj
    m T.Text
fontSelectionDialogGetPreviewText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_font_selection_dialog_get_preview_text _obj'
    checkUnexpectedReturnNULL "gtk_font_selection_dialog_get_preview_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method FontSelectionDialog::set_font_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_dialog_set_font_name" gtk_font_selection_dialog_set_font_name :: 
    Ptr FontSelectionDialog ->              -- _obj : TInterface "Gtk" "FontSelectionDialog"
    CString ->                              -- fontname : TBasicType TUTF8
    IO CInt

{-# DEPRECATED fontSelectionDialogSetFontName ["(Since version 3.2)","Use #GtkFontChooserDialog"]#-}
fontSelectionDialogSetFontName ::
    (MonadIO m, FontSelectionDialogK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- fontname
    m Bool
fontSelectionDialogSetFontName _obj fontname = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    fontname' <- textToCString fontname
    result <- gtk_font_selection_dialog_set_font_name _obj' fontname'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem fontname'
    return result'

-- method FontSelectionDialog::set_preview_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "FontSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_font_selection_dialog_set_preview_text" gtk_font_selection_dialog_set_preview_text :: 
    Ptr FontSelectionDialog ->              -- _obj : TInterface "Gtk" "FontSelectionDialog"
    CString ->                              -- text : TBasicType TUTF8
    IO ()

{-# DEPRECATED fontSelectionDialogSetPreviewText ["(Since version 3.2)","Use #GtkFontChooserDialog"]#-}
fontSelectionDialogSetPreviewText ::
    (MonadIO m, FontSelectionDialogK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    m ()
fontSelectionDialogSetPreviewText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_font_selection_dialog_set_preview_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- object Frame 
newtype Frame = Frame (ForeignPtr Frame)
noFrame :: Maybe Frame
noFrame = Nothing

foreign import ccall "gtk_frame_get_type"
    c_gtk_frame_get_type :: IO GType

type instance ParentTypes Frame = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Frame where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_frame_get_type
    

class GObject o => FrameK o
instance (GObject o, IsDescendantOf Frame o) => FrameK o

toFrame :: FrameK o => o -> IO Frame
toFrame = unsafeCastTo Frame

-- method Frame::new
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Frame"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_frame_new" gtk_frame_new :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr Frame)


frameNew ::
    (MonadIO m) =>
    Maybe (T.Text) ->                       -- label
    m Frame
frameNew label = liftIO $ do
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    result <- gtk_frame_new maybeLabel
    checkUnexpectedReturnNULL "gtk_frame_new" result
    result' <- (newObject Frame) result
    freeMem maybeLabel
    return result'

-- method Frame::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_frame_get_label" gtk_frame_get_label :: 
    Ptr Frame ->                            -- _obj : TInterface "Gtk" "Frame"
    IO CString


frameGetLabel ::
    (MonadIO m, FrameK a) =>
    a ->                                    -- _obj
    m T.Text
frameGetLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_frame_get_label _obj'
    checkUnexpectedReturnNULL "gtk_frame_get_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Frame::get_label_align
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_frame_get_label_align" gtk_frame_get_label_align :: 
    Ptr Frame ->                            -- _obj : TInterface "Gtk" "Frame"
    Ptr CFloat ->                           -- xalign : TBasicType TFloat
    Ptr CFloat ->                           -- yalign : TBasicType TFloat
    IO ()


frameGetLabelAlign ::
    (MonadIO m, FrameK a) =>
    a ->                                    -- _obj
    m (Float,Float)
frameGetLabelAlign _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    xalign <- allocMem :: IO (Ptr CFloat)
    yalign <- allocMem :: IO (Ptr CFloat)
    gtk_frame_get_label_align _obj' xalign yalign
    xalign' <- peek xalign
    let xalign'' = realToFrac xalign'
    yalign' <- peek yalign
    let yalign'' = realToFrac yalign'
    touchManagedPtr _obj
    freeMem xalign
    freeMem yalign
    return (xalign'', yalign'')

-- method Frame::get_label_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_frame_get_label_widget" gtk_frame_get_label_widget :: 
    Ptr Frame ->                            -- _obj : TInterface "Gtk" "Frame"
    IO (Ptr Widget)


frameGetLabelWidget ::
    (MonadIO m, FrameK a) =>
    a ->                                    -- _obj
    m Widget
frameGetLabelWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_frame_get_label_widget _obj'
    checkUnexpectedReturnNULL "gtk_frame_get_label_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Frame::get_shadow_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ShadowType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_frame_get_shadow_type" gtk_frame_get_shadow_type :: 
    Ptr Frame ->                            -- _obj : TInterface "Gtk" "Frame"
    IO CUInt


frameGetShadowType ::
    (MonadIO m, FrameK a) =>
    a ->                                    -- _obj
    m ShadowType
frameGetShadowType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_frame_get_shadow_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Frame::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_frame_set_label" gtk_frame_set_label :: 
    Ptr Frame ->                            -- _obj : TInterface "Gtk" "Frame"
    CString ->                              -- label : TBasicType TUTF8
    IO ()


frameSetLabel ::
    (MonadIO m, FrameK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- label
    m ()
frameSetLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    gtk_frame_set_label _obj' maybeLabel
    touchManagedPtr _obj
    freeMem maybeLabel
    return ()

-- method Frame::set_label_align
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_frame_set_label_align" gtk_frame_set_label_align :: 
    Ptr Frame ->                            -- _obj : TInterface "Gtk" "Frame"
    CFloat ->                               -- xalign : TBasicType TFloat
    CFloat ->                               -- yalign : TBasicType TFloat
    IO ()


frameSetLabelAlign ::
    (MonadIO m, FrameK a) =>
    a ->                                    -- _obj
    Float ->                                -- xalign
    Float ->                                -- yalign
    m ()
frameSetLabelAlign _obj xalign yalign = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let xalign' = realToFrac xalign
    let yalign' = realToFrac yalign
    gtk_frame_set_label_align _obj' xalign' yalign'
    touchManagedPtr _obj
    return ()

-- method Frame::set_label_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_frame_set_label_widget" gtk_frame_set_label_widget :: 
    Ptr Frame ->                            -- _obj : TInterface "Gtk" "Frame"
    Ptr Widget ->                           -- label_widget : TInterface "Gtk" "Widget"
    IO ()


frameSetLabelWidget ::
    (MonadIO m, FrameK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- label_widget
    m ()
frameSetLabelWidget _obj label_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLabel_widget <- case label_widget of
        Nothing -> return nullPtr
        Just jLabel_widget -> do
            let jLabel_widget' = unsafeManagedPtrCastPtr jLabel_widget
            return jLabel_widget'
    gtk_frame_set_label_widget _obj' maybeLabel_widget
    touchManagedPtr _obj
    whenJust label_widget touchManagedPtr
    return ()

-- method Frame::set_shadow_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Frame", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_frame_set_shadow_type" gtk_frame_set_shadow_type :: 
    Ptr Frame ->                            -- _obj : TInterface "Gtk" "Frame"
    CUInt ->                                -- type : TInterface "Gtk" "ShadowType"
    IO ()


frameSetShadowType ::
    (MonadIO m, FrameK a) =>
    a ->                                    -- _obj
    ShadowType ->                           -- type
    m ()
frameSetShadowType _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    gtk_frame_set_shadow_type _obj' type_'
    touchManagedPtr _obj
    return ()

-- object FrameAccessible 
newtype FrameAccessible = FrameAccessible (ForeignPtr FrameAccessible)
noFrameAccessible :: Maybe FrameAccessible
noFrameAccessible = Nothing

foreign import ccall "gtk_frame_accessible_get_type"
    c_gtk_frame_accessible_get_type :: IO GType

type instance ParentTypes FrameAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component]

instance GObject FrameAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_frame_accessible_get_type
    

class GObject o => FrameAccessibleK o
instance (GObject o, IsDescendantOf FrameAccessible o) => FrameAccessibleK o

toFrameAccessible :: FrameAccessibleK o => o -> IO FrameAccessible
toFrameAccessible = unsafeCastTo FrameAccessible

-- object GLArea 
newtype GLArea = GLArea (ForeignPtr GLArea)
noGLArea :: Maybe GLArea
noGLArea = Nothing

foreign import ccall "gtk_gl_area_get_type"
    c_gtk_gl_area_get_type :: IO GType

type instance ParentTypes GLArea = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject GLArea where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_gl_area_get_type
    

class GObject o => GLAreaK o
instance (GObject o, IsDescendantOf GLArea o) => GLAreaK o

toGLArea :: GLAreaK o => o -> IO GLArea
toGLArea = unsafeCastTo GLArea

-- method GLArea::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "GLArea"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_new" gtk_gl_area_new :: 
    IO (Ptr GLArea)


gLAreaNew ::
    (MonadIO m) =>
    m GLArea
gLAreaNew  = liftIO $ do
    result <- gtk_gl_area_new
    checkUnexpectedReturnNULL "gtk_gl_area_new" result
    result' <- (wrapObject GLArea) result
    return result'

-- method GLArea::attach_buffers
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_attach_buffers" gtk_gl_area_attach_buffers :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO ()


gLAreaAttachBuffers ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m ()
gLAreaAttachBuffers _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_gl_area_attach_buffers _obj'
    touchManagedPtr _obj
    return ()

-- method GLArea::get_auto_render
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_auto_render" gtk_gl_area_get_auto_render :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO CInt


gLAreaGetAutoRender ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m Bool
gLAreaGetAutoRender _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_auto_render _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "GLContext"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_context" gtk_gl_area_get_context :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO (Ptr Gdk.GLContext)


gLAreaGetContext ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m Gdk.GLContext
gLAreaGetContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_context _obj'
    checkUnexpectedReturnNULL "gtk_gl_area_get_context" result
    result' <- (newObject Gdk.GLContext) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_error
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TError
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_error" gtk_gl_area_get_error :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO (Ptr GError)


gLAreaGetError ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m GError
gLAreaGetError _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_error _obj'
    checkUnexpectedReturnNULL "gtk_gl_area_get_error" result
    result' <- (newBoxed GError) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_has_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_has_alpha" gtk_gl_area_get_has_alpha :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO CInt


gLAreaGetHasAlpha ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m Bool
gLAreaGetHasAlpha _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_has_alpha _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_has_depth_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_has_depth_buffer" gtk_gl_area_get_has_depth_buffer :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO CInt


gLAreaGetHasDepthBuffer ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m Bool
gLAreaGetHasDepthBuffer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_has_depth_buffer _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_has_stencil_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_has_stencil_buffer" gtk_gl_area_get_has_stencil_buffer :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO CInt


gLAreaGetHasStencilBuffer ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m Bool
gLAreaGetHasStencilBuffer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_has_stencil_buffer _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_required_version
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "major", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "minor", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_required_version" gtk_gl_area_get_required_version :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    Ptr Int32 ->                            -- major : TBasicType TInt32
    Ptr Int32 ->                            -- minor : TBasicType TInt32
    IO ()


gLAreaGetRequiredVersion ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
gLAreaGetRequiredVersion _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    major <- allocMem :: IO (Ptr Int32)
    minor <- allocMem :: IO (Ptr Int32)
    gtk_gl_area_get_required_version _obj' major minor
    major' <- peek major
    minor' <- peek minor
    touchManagedPtr _obj
    freeMem major
    freeMem minor
    return (major', minor')

-- method GLArea::make_current
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_make_current" gtk_gl_area_make_current :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO ()


gLAreaMakeCurrent ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m ()
gLAreaMakeCurrent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_gl_area_make_current _obj'
    touchManagedPtr _obj
    return ()

-- method GLArea::queue_render
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_queue_render" gtk_gl_area_queue_render :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO ()


gLAreaQueueRender ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m ()
gLAreaQueueRender _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_gl_area_queue_render _obj'
    touchManagedPtr _obj
    return ()

-- method GLArea::set_auto_render
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "auto_render", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "auto_render", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_auto_render" gtk_gl_area_set_auto_render :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    CInt ->                                 -- auto_render : TBasicType TBoolean
    IO ()


gLAreaSetAutoRender ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- auto_render
    m ()
gLAreaSetAutoRender _obj auto_render = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let auto_render' = (fromIntegral . fromEnum) auto_render
    gtk_gl_area_set_auto_render _obj' auto_render'
    touchManagedPtr _obj
    return ()

-- method GLArea::set_error
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_error" gtk_gl_area_set_error :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    Ptr GError ->                           -- error : TError
    IO ()


gLAreaSetError ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Maybe (GError) ->                       -- error
    m ()
gLAreaSetError _obj error_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeError_ <- case error_ of
        Nothing -> return nullPtr
        Just jError_ -> do
            let jError_' = unsafeManagedPtrGetPtr jError_
            return jError_'
    gtk_gl_area_set_error _obj' maybeError_
    touchManagedPtr _obj
    whenJust error_ touchManagedPtr
    return ()

-- method GLArea::set_has_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_alpha", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_alpha", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_has_alpha" gtk_gl_area_set_has_alpha :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    CInt ->                                 -- has_alpha : TBasicType TBoolean
    IO ()


gLAreaSetHasAlpha ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_alpha
    m ()
gLAreaSetHasAlpha _obj has_alpha = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_alpha' = (fromIntegral . fromEnum) has_alpha
    gtk_gl_area_set_has_alpha _obj' has_alpha'
    touchManagedPtr _obj
    return ()

-- method GLArea::set_has_depth_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_depth_buffer", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_depth_buffer", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_has_depth_buffer" gtk_gl_area_set_has_depth_buffer :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    CInt ->                                 -- has_depth_buffer : TBasicType TBoolean
    IO ()


gLAreaSetHasDepthBuffer ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_depth_buffer
    m ()
gLAreaSetHasDepthBuffer _obj has_depth_buffer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_depth_buffer' = (fromIntegral . fromEnum) has_depth_buffer
    gtk_gl_area_set_has_depth_buffer _obj' has_depth_buffer'
    touchManagedPtr _obj
    return ()

-- method GLArea::set_has_stencil_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_stencil_buffer", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_stencil_buffer", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_has_stencil_buffer" gtk_gl_area_set_has_stencil_buffer :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    CInt ->                                 -- has_stencil_buffer : TBasicType TBoolean
    IO ()


gLAreaSetHasStencilBuffer ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_stencil_buffer
    m ()
gLAreaSetHasStencilBuffer _obj has_stencil_buffer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_stencil_buffer' = (fromIntegral . fromEnum) has_stencil_buffer
    gtk_gl_area_set_has_stencil_buffer _obj' has_stencil_buffer'
    touchManagedPtr _obj
    return ()

-- method GLArea::set_required_version
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "major", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minor", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "major", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minor", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_required_version" gtk_gl_area_set_required_version :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    Int32 ->                                -- major : TBasicType TInt32
    Int32 ->                                -- minor : TBasicType TInt32
    IO ()


gLAreaSetRequiredVersion ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- major
    Int32 ->                                -- minor
    m ()
gLAreaSetRequiredVersion _obj major minor = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_gl_area_set_required_version _obj' major minor
    touchManagedPtr _obj
    return ()

-- signal GLArea::create-context
type GLAreaCreateContextCallback =
    IO Gdk.GLContext

noGLAreaCreateContextCallback :: Maybe GLAreaCreateContextCallback
noGLAreaCreateContextCallback = Nothing

type GLAreaCreateContextCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO (Ptr Gdk.GLContext)

foreign import ccall "wrapper"
    mkGLAreaCreateContextCallback :: GLAreaCreateContextCallbackC -> IO (FunPtr GLAreaCreateContextCallbackC)

gLAreaCreateContextClosure :: GLAreaCreateContextCallback -> IO Closure
gLAreaCreateContextClosure cb = newCClosure =<< mkGLAreaCreateContextCallback wrapped
    where wrapped = gLAreaCreateContextCallbackWrapper cb

gLAreaCreateContextCallbackWrapper ::
    GLAreaCreateContextCallback ->
    Ptr () ->
    Ptr () ->
    IO (Ptr Gdk.GLContext)
gLAreaCreateContextCallbackWrapper _cb _ _ = do
    result <- _cb 
    result' <- refObject result
    return result'

onGLAreaCreateContext :: (GObject a, MonadIO m) => a -> GLAreaCreateContextCallback -> m SignalHandlerId
onGLAreaCreateContext obj cb = liftIO $ connectGLAreaCreateContext obj cb SignalConnectBefore
afterGLAreaCreateContext :: (GObject a, MonadIO m) => a -> GLAreaCreateContextCallback -> m SignalHandlerId
afterGLAreaCreateContext obj cb = connectGLAreaCreateContext obj cb SignalConnectAfter

connectGLAreaCreateContext :: (GObject a, MonadIO m) =>
                              a -> GLAreaCreateContextCallback -> SignalConnectMode -> m SignalHandlerId
connectGLAreaCreateContext obj cb after = liftIO $ do
    cb' <- mkGLAreaCreateContextCallback (gLAreaCreateContextCallbackWrapper cb)
    connectSignalFunPtr obj "create-context" cb' after

-- signal GLArea::render
type GLAreaRenderCallback =
    Gdk.GLContext ->
    IO Bool

noGLAreaRenderCallback :: Maybe GLAreaRenderCallback
noGLAreaRenderCallback = Nothing

type GLAreaRenderCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.GLContext ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkGLAreaRenderCallback :: GLAreaRenderCallbackC -> IO (FunPtr GLAreaRenderCallbackC)

gLAreaRenderClosure :: GLAreaRenderCallback -> IO Closure
gLAreaRenderClosure cb = newCClosure =<< mkGLAreaRenderCallback wrapped
    where wrapped = gLAreaRenderCallbackWrapper cb

gLAreaRenderCallbackWrapper ::
    GLAreaRenderCallback ->
    Ptr () ->
    Ptr Gdk.GLContext ->
    Ptr () ->
    IO CInt
gLAreaRenderCallbackWrapper _cb _ context _ = do
    context' <- (newObject Gdk.GLContext) context
    result <- _cb  context'
    let result' = (fromIntegral . fromEnum) result
    return result'

onGLAreaRender :: (GObject a, MonadIO m) => a -> GLAreaRenderCallback -> m SignalHandlerId
onGLAreaRender obj cb = liftIO $ connectGLAreaRender obj cb SignalConnectBefore
afterGLAreaRender :: (GObject a, MonadIO m) => a -> GLAreaRenderCallback -> m SignalHandlerId
afterGLAreaRender obj cb = connectGLAreaRender obj cb SignalConnectAfter

connectGLAreaRender :: (GObject a, MonadIO m) =>
                       a -> GLAreaRenderCallback -> SignalConnectMode -> m SignalHandlerId
connectGLAreaRender obj cb after = liftIO $ do
    cb' <- mkGLAreaRenderCallback (gLAreaRenderCallbackWrapper cb)
    connectSignalFunPtr obj "render" cb' after

-- signal GLArea::resize
type GLAreaResizeCallback =
    Int32 ->
    Int32 ->
    IO ()

noGLAreaResizeCallback :: Maybe GLAreaResizeCallback
noGLAreaResizeCallback = Nothing

type GLAreaResizeCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGLAreaResizeCallback :: GLAreaResizeCallbackC -> IO (FunPtr GLAreaResizeCallbackC)

gLAreaResizeClosure :: GLAreaResizeCallback -> IO Closure
gLAreaResizeClosure cb = newCClosure =<< mkGLAreaResizeCallback wrapped
    where wrapped = gLAreaResizeCallbackWrapper cb

gLAreaResizeCallbackWrapper ::
    GLAreaResizeCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO ()
gLAreaResizeCallbackWrapper _cb _ width height _ = do
    _cb  width height

onGLAreaResize :: (GObject a, MonadIO m) => a -> GLAreaResizeCallback -> m SignalHandlerId
onGLAreaResize obj cb = liftIO $ connectGLAreaResize obj cb SignalConnectBefore
afterGLAreaResize :: (GObject a, MonadIO m) => a -> GLAreaResizeCallback -> m SignalHandlerId
afterGLAreaResize obj cb = connectGLAreaResize obj cb SignalConnectAfter

connectGLAreaResize :: (GObject a, MonadIO m) =>
                       a -> GLAreaResizeCallback -> SignalConnectMode -> m SignalHandlerId
connectGLAreaResize obj cb after = liftIO $ do
    cb' <- mkGLAreaResizeCallback (gLAreaResizeCallbackWrapper cb)
    connectSignalFunPtr obj "resize" cb' after

-- object Gesture 
newtype Gesture = Gesture (ForeignPtr Gesture)
noGesture :: Maybe Gesture
noGesture = Nothing

foreign import ccall "gtk_gesture_get_type"
    c_gtk_gesture_get_type :: IO GType

type instance ParentTypes Gesture = '[EventController, GObject.Object]

instance GObject Gesture where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_gesture_get_type
    

class GObject o => GestureK o
instance (GObject o, IsDescendantOf Gesture o) => GestureK o

toGesture :: GestureK o => o -> IO Gesture
toGesture = unsafeCastTo Gesture

-- method Gesture::get_bounding_box
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_get_bounding_box" gtk_gesture_get_bounding_box :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    Ptr Gdk.Rectangle ->                    -- rect : TInterface "Gdk" "Rectangle"
    IO CInt


gestureGetBoundingBox ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    m (Bool,Gdk.Rectangle)
gestureGetBoundingBox _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    rect <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    result <- gtk_gesture_get_bounding_box _obj' rect
    let result' = (/= 0) result
    rect' <- (wrapBoxed Gdk.Rectangle) rect
    touchManagedPtr _obj
    return (result', rect')

-- method Gesture::get_bounding_box_center
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_get_bounding_box_center" gtk_gesture_get_bounding_box_center :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    Ptr CDouble ->                          -- x : TBasicType TDouble
    Ptr CDouble ->                          -- y : TBasicType TDouble
    IO CInt


gestureGetBoundingBoxCenter ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    m (Bool,Double,Double)
gestureGetBoundingBoxCenter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    x <- allocMem :: IO (Ptr CDouble)
    y <- allocMem :: IO (Ptr CDouble)
    result <- gtk_gesture_get_bounding_box_center _obj' x y
    let result' = (/= 0) result
    x' <- peek x
    let x'' = realToFrac x'
    y' <- peek y
    let y'' = realToFrac y'
    touchManagedPtr _obj
    freeMem x
    freeMem y
    return (result', x'', y'')

-- method Gesture::get_device
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Device"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_get_device" gtk_gesture_get_device :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    IO (Ptr Gdk.Device)


gestureGetDevice ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    m Gdk.Device
gestureGetDevice _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_get_device _obj'
    checkUnexpectedReturnNULL "gtk_gesture_get_device" result
    result' <- (newObject Gdk.Device) result
    touchManagedPtr _obj
    return result'

-- method Gesture::get_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "Gesture")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_get_group" gtk_gesture_get_group :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    IO (Ptr (GList (Ptr Gesture)))


gestureGetGroup ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    m [Gesture]
gestureGetGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_get_group _obj'
    checkUnexpectedReturnNULL "gtk_gesture_get_group" result
    result' <- unpackGList result
    result'' <- mapM (newObject Gesture) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method Gesture::get_last_event
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sequence", argType = TInterface "Gdk" "EventSequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sequence", argType = TInterface "Gdk" "EventSequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Event"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_get_last_event" gtk_gesture_get_last_event :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    Ptr Gdk.EventSequence ->                -- sequence : TInterface "Gdk" "EventSequence"
    IO (Ptr Gdk.Event)


gestureGetLastEvent ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    Gdk.EventSequence ->                    -- sequence
    m Gdk.Event
gestureGetLastEvent _obj sequence = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sequence' = unsafeManagedPtrGetPtr sequence
    result <- gtk_gesture_get_last_event _obj' sequence'
    checkUnexpectedReturnNULL "gtk_gesture_get_last_event" result
    result' <- (newBoxed Gdk.Event) result
    touchManagedPtr _obj
    touchManagedPtr sequence
    return result'

-- method Gesture::get_last_updated_sequence
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "EventSequence"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_get_last_updated_sequence" gtk_gesture_get_last_updated_sequence :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    IO (Ptr Gdk.EventSequence)


gestureGetLastUpdatedSequence ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    m Gdk.EventSequence
gestureGetLastUpdatedSequence _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_get_last_updated_sequence _obj'
    checkUnexpectedReturnNULL "gtk_gesture_get_last_updated_sequence" result
    result' <- (wrapBoxed Gdk.EventSequence) result
    touchManagedPtr _obj
    return result'

-- method Gesture::get_point
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sequence", argType = TInterface "Gdk" "EventSequence", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sequence", argType = TInterface "Gdk" "EventSequence", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_get_point" gtk_gesture_get_point :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    Ptr Gdk.EventSequence ->                -- sequence : TInterface "Gdk" "EventSequence"
    Ptr CDouble ->                          -- x : TBasicType TDouble
    Ptr CDouble ->                          -- y : TBasicType TDouble
    IO CInt


gestureGetPoint ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    Maybe (Gdk.EventSequence) ->            -- sequence
    m (Bool,Double,Double)
gestureGetPoint _obj sequence = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeSequence <- case sequence of
        Nothing -> return nullPtr
        Just jSequence -> do
            let jSequence' = unsafeManagedPtrGetPtr jSequence
            return jSequence'
    x <- allocMem :: IO (Ptr CDouble)
    y <- allocMem :: IO (Ptr CDouble)
    result <- gtk_gesture_get_point _obj' maybeSequence x y
    let result' = (/= 0) result
    x' <- peek x
    let x'' = realToFrac x'
    y' <- peek y
    let y'' = realToFrac y'
    touchManagedPtr _obj
    whenJust sequence touchManagedPtr
    freeMem x
    freeMem y
    return (result', x'', y'')

-- method Gesture::get_sequence_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sequence", argType = TInterface "Gdk" "EventSequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sequence", argType = TInterface "Gdk" "EventSequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "EventSequenceState"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_get_sequence_state" gtk_gesture_get_sequence_state :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    Ptr Gdk.EventSequence ->                -- sequence : TInterface "Gdk" "EventSequence"
    IO CUInt


gestureGetSequenceState ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    Gdk.EventSequence ->                    -- sequence
    m EventSequenceState
gestureGetSequenceState _obj sequence = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sequence' = unsafeManagedPtrGetPtr sequence
    result <- gtk_gesture_get_sequence_state _obj' sequence'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    touchManagedPtr sequence
    return result'

-- method Gesture::get_sequences
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gdk" "EventSequence")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_get_sequences" gtk_gesture_get_sequences :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    IO (Ptr (GList (Ptr Gdk.EventSequence)))


gestureGetSequences ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    m [Gdk.EventSequence]
gestureGetSequences _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_get_sequences _obj'
    checkUnexpectedReturnNULL "gtk_gesture_get_sequences" result
    result' <- unpackGList result
    result'' <- mapM (newBoxed Gdk.EventSequence) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method Gesture::get_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_get_window" gtk_gesture_get_window :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    IO (Ptr Gdk.Window)


gestureGetWindow ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    m Gdk.Window
gestureGetWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_get_window _obj'
    checkUnexpectedReturnNULL "gtk_gesture_get_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- method Gesture::group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gesture", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gesture", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_group" gtk_gesture_group :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    Ptr Gesture ->                          -- gesture : TInterface "Gtk" "Gesture"
    IO ()


gestureGroup ::
    (MonadIO m, GestureK a, GestureK b) =>
    a ->                                    -- _obj
    b ->                                    -- gesture
    m ()
gestureGroup _obj gesture = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let gesture' = unsafeManagedPtrCastPtr gesture
    gtk_gesture_group _obj' gesture'
    touchManagedPtr _obj
    touchManagedPtr gesture
    return ()

-- method Gesture::handles_sequence
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sequence", argType = TInterface "Gdk" "EventSequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sequence", argType = TInterface "Gdk" "EventSequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_handles_sequence" gtk_gesture_handles_sequence :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    Ptr Gdk.EventSequence ->                -- sequence : TInterface "Gdk" "EventSequence"
    IO CInt


gestureHandlesSequence ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    Gdk.EventSequence ->                    -- sequence
    m Bool
gestureHandlesSequence _obj sequence = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sequence' = unsafeManagedPtrGetPtr sequence
    result <- gtk_gesture_handles_sequence _obj' sequence'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr sequence
    return result'

-- method Gesture::is_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_is_active" gtk_gesture_is_active :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    IO CInt


gestureIsActive ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    m Bool
gestureIsActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_is_active _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Gesture::is_grouped_with
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "other", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "other", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_is_grouped_with" gtk_gesture_is_grouped_with :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    Ptr Gesture ->                          -- other : TInterface "Gtk" "Gesture"
    IO CInt


gestureIsGroupedWith ::
    (MonadIO m, GestureK a, GestureK b) =>
    a ->                                    -- _obj
    b ->                                    -- other
    m Bool
gestureIsGroupedWith _obj other = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let other' = unsafeManagedPtrCastPtr other
    result <- gtk_gesture_is_grouped_with _obj' other'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr other
    return result'

-- method Gesture::is_recognized
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_is_recognized" gtk_gesture_is_recognized :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    IO CInt


gestureIsRecognized ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    m Bool
gestureIsRecognized _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_is_recognized _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Gesture::set_sequence_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sequence", argType = TInterface "Gdk" "EventSequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "EventSequenceState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sequence", argType = TInterface "Gdk" "EventSequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "EventSequenceState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_set_sequence_state" gtk_gesture_set_sequence_state :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    Ptr Gdk.EventSequence ->                -- sequence : TInterface "Gdk" "EventSequence"
    CUInt ->                                -- state : TInterface "Gtk" "EventSequenceState"
    IO CInt


gestureSetSequenceState ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    Gdk.EventSequence ->                    -- sequence
    EventSequenceState ->                   -- state
    m Bool
gestureSetSequenceState _obj sequence state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sequence' = unsafeManagedPtrGetPtr sequence
    let state' = (fromIntegral . fromEnum) state
    result <- gtk_gesture_set_sequence_state _obj' sequence' state'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr sequence
    return result'

-- method Gesture::set_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "EventSequenceState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "EventSequenceState", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_set_state" gtk_gesture_set_state :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    CUInt ->                                -- state : TInterface "Gtk" "EventSequenceState"
    IO CInt


gestureSetState ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    EventSequenceState ->                   -- state
    m Bool
gestureSetState _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = (fromIntegral . fromEnum) state
    result <- gtk_gesture_set_state _obj' state'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Gesture::set_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_set_window" gtk_gesture_set_window :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    IO ()


gestureSetWindow ::
    (MonadIO m, GestureK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- window
    m ()
gestureSetWindow _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeWindow <- case window of
        Nothing -> return nullPtr
        Just jWindow -> do
            let jWindow' = unsafeManagedPtrCastPtr jWindow
            return jWindow'
    gtk_gesture_set_window _obj' maybeWindow
    touchManagedPtr _obj
    whenJust window touchManagedPtr
    return ()

-- method Gesture::ungroup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gesture", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_ungroup" gtk_gesture_ungroup :: 
    Ptr Gesture ->                          -- _obj : TInterface "Gtk" "Gesture"
    IO ()


gestureUngroup ::
    (MonadIO m, GestureK a) =>
    a ->                                    -- _obj
    m ()
gestureUngroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_gesture_ungroup _obj'
    touchManagedPtr _obj
    return ()

-- signal Gesture::begin
type GestureBeginCallback =
    Gdk.EventSequence ->
    IO ()

noGestureBeginCallback :: Maybe GestureBeginCallback
noGestureBeginCallback = Nothing

type GestureBeginCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventSequence ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureBeginCallback :: GestureBeginCallbackC -> IO (FunPtr GestureBeginCallbackC)

gestureBeginClosure :: GestureBeginCallback -> IO Closure
gestureBeginClosure cb = newCClosure =<< mkGestureBeginCallback wrapped
    where wrapped = gestureBeginCallbackWrapper cb

gestureBeginCallbackWrapper ::
    GestureBeginCallback ->
    Ptr () ->
    Ptr Gdk.EventSequence ->
    Ptr () ->
    IO ()
gestureBeginCallbackWrapper _cb _ sequence _ = do
    sequence' <- (newBoxed Gdk.EventSequence) sequence
    _cb  sequence'

onGestureBegin :: (GObject a, MonadIO m) => a -> GestureBeginCallback -> m SignalHandlerId
onGestureBegin obj cb = liftIO $ connectGestureBegin obj cb SignalConnectBefore
afterGestureBegin :: (GObject a, MonadIO m) => a -> GestureBeginCallback -> m SignalHandlerId
afterGestureBegin obj cb = connectGestureBegin obj cb SignalConnectAfter

connectGestureBegin :: (GObject a, MonadIO m) =>
                       a -> GestureBeginCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureBegin obj cb after = liftIO $ do
    cb' <- mkGestureBeginCallback (gestureBeginCallbackWrapper cb)
    connectSignalFunPtr obj "begin" cb' after

-- signal Gesture::cancel
type GestureCancelCallback =
    Gdk.EventSequence ->
    IO ()

noGestureCancelCallback :: Maybe GestureCancelCallback
noGestureCancelCallback = Nothing

type GestureCancelCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventSequence ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureCancelCallback :: GestureCancelCallbackC -> IO (FunPtr GestureCancelCallbackC)

gestureCancelClosure :: GestureCancelCallback -> IO Closure
gestureCancelClosure cb = newCClosure =<< mkGestureCancelCallback wrapped
    where wrapped = gestureCancelCallbackWrapper cb

gestureCancelCallbackWrapper ::
    GestureCancelCallback ->
    Ptr () ->
    Ptr Gdk.EventSequence ->
    Ptr () ->
    IO ()
gestureCancelCallbackWrapper _cb _ sequence _ = do
    sequence' <- (newBoxed Gdk.EventSequence) sequence
    _cb  sequence'

onGestureCancel :: (GObject a, MonadIO m) => a -> GestureCancelCallback -> m SignalHandlerId
onGestureCancel obj cb = liftIO $ connectGestureCancel obj cb SignalConnectBefore
afterGestureCancel :: (GObject a, MonadIO m) => a -> GestureCancelCallback -> m SignalHandlerId
afterGestureCancel obj cb = connectGestureCancel obj cb SignalConnectAfter

connectGestureCancel :: (GObject a, MonadIO m) =>
                        a -> GestureCancelCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureCancel obj cb after = liftIO $ do
    cb' <- mkGestureCancelCallback (gestureCancelCallbackWrapper cb)
    connectSignalFunPtr obj "cancel" cb' after

-- signal Gesture::end
type GestureEndCallback =
    Gdk.EventSequence ->
    IO ()

noGestureEndCallback :: Maybe GestureEndCallback
noGestureEndCallback = Nothing

type GestureEndCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventSequence ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureEndCallback :: GestureEndCallbackC -> IO (FunPtr GestureEndCallbackC)

gestureEndClosure :: GestureEndCallback -> IO Closure
gestureEndClosure cb = newCClosure =<< mkGestureEndCallback wrapped
    where wrapped = gestureEndCallbackWrapper cb

gestureEndCallbackWrapper ::
    GestureEndCallback ->
    Ptr () ->
    Ptr Gdk.EventSequence ->
    Ptr () ->
    IO ()
gestureEndCallbackWrapper _cb _ sequence _ = do
    sequence' <- (newBoxed Gdk.EventSequence) sequence
    _cb  sequence'

onGestureEnd :: (GObject a, MonadIO m) => a -> GestureEndCallback -> m SignalHandlerId
onGestureEnd obj cb = liftIO $ connectGestureEnd obj cb SignalConnectBefore
afterGestureEnd :: (GObject a, MonadIO m) => a -> GestureEndCallback -> m SignalHandlerId
afterGestureEnd obj cb = connectGestureEnd obj cb SignalConnectAfter

connectGestureEnd :: (GObject a, MonadIO m) =>
                     a -> GestureEndCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureEnd obj cb after = liftIO $ do
    cb' <- mkGestureEndCallback (gestureEndCallbackWrapper cb)
    connectSignalFunPtr obj "end" cb' after

-- signal Gesture::sequence-state-changed
type GestureSequenceStateChangedCallback =
    Gdk.EventSequence ->
    EventSequenceState ->
    IO ()

noGestureSequenceStateChangedCallback :: Maybe GestureSequenceStateChangedCallback
noGestureSequenceStateChangedCallback = Nothing

type GestureSequenceStateChangedCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventSequence ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureSequenceStateChangedCallback :: GestureSequenceStateChangedCallbackC -> IO (FunPtr GestureSequenceStateChangedCallbackC)

gestureSequenceStateChangedClosure :: GestureSequenceStateChangedCallback -> IO Closure
gestureSequenceStateChangedClosure cb = newCClosure =<< mkGestureSequenceStateChangedCallback wrapped
    where wrapped = gestureSequenceStateChangedCallbackWrapper cb

gestureSequenceStateChangedCallbackWrapper ::
    GestureSequenceStateChangedCallback ->
    Ptr () ->
    Ptr Gdk.EventSequence ->
    CUInt ->
    Ptr () ->
    IO ()
gestureSequenceStateChangedCallbackWrapper _cb _ sequence state _ = do
    sequence' <- (newBoxed Gdk.EventSequence) sequence
    let state' = (toEnum . fromIntegral) state
    _cb  sequence' state'

onGestureSequenceStateChanged :: (GObject a, MonadIO m) => a -> GestureSequenceStateChangedCallback -> m SignalHandlerId
onGestureSequenceStateChanged obj cb = liftIO $ connectGestureSequenceStateChanged obj cb SignalConnectBefore
afterGestureSequenceStateChanged :: (GObject a, MonadIO m) => a -> GestureSequenceStateChangedCallback -> m SignalHandlerId
afterGestureSequenceStateChanged obj cb = connectGestureSequenceStateChanged obj cb SignalConnectAfter

connectGestureSequenceStateChanged :: (GObject a, MonadIO m) =>
                                      a -> GestureSequenceStateChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureSequenceStateChanged obj cb after = liftIO $ do
    cb' <- mkGestureSequenceStateChangedCallback (gestureSequenceStateChangedCallbackWrapper cb)
    connectSignalFunPtr obj "sequence-state-changed" cb' after

-- signal Gesture::update
type GestureUpdateCallback =
    Gdk.EventSequence ->
    IO ()

noGestureUpdateCallback :: Maybe GestureUpdateCallback
noGestureUpdateCallback = Nothing

type GestureUpdateCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventSequence ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureUpdateCallback :: GestureUpdateCallbackC -> IO (FunPtr GestureUpdateCallbackC)

gestureUpdateClosure :: GestureUpdateCallback -> IO Closure
gestureUpdateClosure cb = newCClosure =<< mkGestureUpdateCallback wrapped
    where wrapped = gestureUpdateCallbackWrapper cb

gestureUpdateCallbackWrapper ::
    GestureUpdateCallback ->
    Ptr () ->
    Ptr Gdk.EventSequence ->
    Ptr () ->
    IO ()
gestureUpdateCallbackWrapper _cb _ sequence _ = do
    sequence' <- (newBoxed Gdk.EventSequence) sequence
    _cb  sequence'

onGestureUpdate :: (GObject a, MonadIO m) => a -> GestureUpdateCallback -> m SignalHandlerId
onGestureUpdate obj cb = liftIO $ connectGestureUpdate obj cb SignalConnectBefore
afterGestureUpdate :: (GObject a, MonadIO m) => a -> GestureUpdateCallback -> m SignalHandlerId
afterGestureUpdate obj cb = connectGestureUpdate obj cb SignalConnectAfter

connectGestureUpdate :: (GObject a, MonadIO m) =>
                        a -> GestureUpdateCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureUpdate obj cb after = liftIO $ do
    cb' <- mkGestureUpdateCallback (gestureUpdateCallbackWrapper cb)
    connectSignalFunPtr obj "update" cb' after

-- object GestureDrag 
newtype GestureDrag = GestureDrag (ForeignPtr GestureDrag)
noGestureDrag :: Maybe GestureDrag
noGestureDrag = Nothing

foreign import ccall "gtk_gesture_drag_get_type"
    c_gtk_gesture_drag_get_type :: IO GType

type instance ParentTypes GestureDrag = '[GestureSingle, Gesture, EventController, GObject.Object]

instance GObject GestureDrag where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_gesture_drag_get_type
    

class GObject o => GestureDragK o
instance (GObject o, IsDescendantOf GestureDrag o) => GestureDragK o

toGestureDrag :: GestureDragK o => o -> IO GestureDrag
toGestureDrag = unsafeCastTo GestureDrag

-- method GestureDrag::new
-- method type : Constructor
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "GestureDrag"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_drag_new" gtk_gesture_drag_new :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO (Ptr GestureDrag)


gestureDragNew ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m GestureDrag
gestureDragNew widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_gesture_drag_new widget'
    checkUnexpectedReturnNULL "gtk_gesture_drag_new" result
    result' <- (wrapObject GestureDrag) result
    touchManagedPtr widget
    return result'

-- XXX Could not generate method GestureDrag::get_offset
-- Error was : Bad introspection data: "argument \"x\" is not of nullable type (TBasicType TDouble), but it is marked as such."
-- XXX Could not generate method GestureDrag::get_start_point
-- Error was : Bad introspection data: "argument \"x\" is not of nullable type (TBasicType TDouble), but it is marked as such."
-- signal GestureDrag::drag-begin
type GestureDragDragBeginCallback =
    Double ->
    Double ->
    IO ()

noGestureDragDragBeginCallback :: Maybe GestureDragDragBeginCallback
noGestureDragDragBeginCallback = Nothing

type GestureDragDragBeginCallbackC =
    Ptr () ->                               -- object
    CDouble ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureDragDragBeginCallback :: GestureDragDragBeginCallbackC -> IO (FunPtr GestureDragDragBeginCallbackC)

gestureDragDragBeginClosure :: GestureDragDragBeginCallback -> IO Closure
gestureDragDragBeginClosure cb = newCClosure =<< mkGestureDragDragBeginCallback wrapped
    where wrapped = gestureDragDragBeginCallbackWrapper cb

gestureDragDragBeginCallbackWrapper ::
    GestureDragDragBeginCallback ->
    Ptr () ->
    CDouble ->
    CDouble ->
    Ptr () ->
    IO ()
gestureDragDragBeginCallbackWrapper _cb _ start_x start_y _ = do
    let start_x' = realToFrac start_x
    let start_y' = realToFrac start_y
    _cb  start_x' start_y'

onGestureDragDragBegin :: (GObject a, MonadIO m) => a -> GestureDragDragBeginCallback -> m SignalHandlerId
onGestureDragDragBegin obj cb = liftIO $ connectGestureDragDragBegin obj cb SignalConnectBefore
afterGestureDragDragBegin :: (GObject a, MonadIO m) => a -> GestureDragDragBeginCallback -> m SignalHandlerId
afterGestureDragDragBegin obj cb = connectGestureDragDragBegin obj cb SignalConnectAfter

connectGestureDragDragBegin :: (GObject a, MonadIO m) =>
                               a -> GestureDragDragBeginCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureDragDragBegin obj cb after = liftIO $ do
    cb' <- mkGestureDragDragBeginCallback (gestureDragDragBeginCallbackWrapper cb)
    connectSignalFunPtr obj "drag-begin" cb' after

-- signal GestureDrag::drag-end
type GestureDragDragEndCallback =
    Double ->
    Double ->
    IO ()

noGestureDragDragEndCallback :: Maybe GestureDragDragEndCallback
noGestureDragDragEndCallback = Nothing

type GestureDragDragEndCallbackC =
    Ptr () ->                               -- object
    CDouble ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureDragDragEndCallback :: GestureDragDragEndCallbackC -> IO (FunPtr GestureDragDragEndCallbackC)

gestureDragDragEndClosure :: GestureDragDragEndCallback -> IO Closure
gestureDragDragEndClosure cb = newCClosure =<< mkGestureDragDragEndCallback wrapped
    where wrapped = gestureDragDragEndCallbackWrapper cb

gestureDragDragEndCallbackWrapper ::
    GestureDragDragEndCallback ->
    Ptr () ->
    CDouble ->
    CDouble ->
    Ptr () ->
    IO ()
gestureDragDragEndCallbackWrapper _cb _ offset_x offset_y _ = do
    let offset_x' = realToFrac offset_x
    let offset_y' = realToFrac offset_y
    _cb  offset_x' offset_y'

onGestureDragDragEnd :: (GObject a, MonadIO m) => a -> GestureDragDragEndCallback -> m SignalHandlerId
onGestureDragDragEnd obj cb = liftIO $ connectGestureDragDragEnd obj cb SignalConnectBefore
afterGestureDragDragEnd :: (GObject a, MonadIO m) => a -> GestureDragDragEndCallback -> m SignalHandlerId
afterGestureDragDragEnd obj cb = connectGestureDragDragEnd obj cb SignalConnectAfter

connectGestureDragDragEnd :: (GObject a, MonadIO m) =>
                             a -> GestureDragDragEndCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureDragDragEnd obj cb after = liftIO $ do
    cb' <- mkGestureDragDragEndCallback (gestureDragDragEndCallbackWrapper cb)
    connectSignalFunPtr obj "drag-end" cb' after

-- signal GestureDrag::drag-update
type GestureDragDragUpdateCallback =
    Double ->
    Double ->
    IO ()

noGestureDragDragUpdateCallback :: Maybe GestureDragDragUpdateCallback
noGestureDragDragUpdateCallback = Nothing

type GestureDragDragUpdateCallbackC =
    Ptr () ->                               -- object
    CDouble ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureDragDragUpdateCallback :: GestureDragDragUpdateCallbackC -> IO (FunPtr GestureDragDragUpdateCallbackC)

gestureDragDragUpdateClosure :: GestureDragDragUpdateCallback -> IO Closure
gestureDragDragUpdateClosure cb = newCClosure =<< mkGestureDragDragUpdateCallback wrapped
    where wrapped = gestureDragDragUpdateCallbackWrapper cb

gestureDragDragUpdateCallbackWrapper ::
    GestureDragDragUpdateCallback ->
    Ptr () ->
    CDouble ->
    CDouble ->
    Ptr () ->
    IO ()
gestureDragDragUpdateCallbackWrapper _cb _ offset_x offset_y _ = do
    let offset_x' = realToFrac offset_x
    let offset_y' = realToFrac offset_y
    _cb  offset_x' offset_y'

onGestureDragDragUpdate :: (GObject a, MonadIO m) => a -> GestureDragDragUpdateCallback -> m SignalHandlerId
onGestureDragDragUpdate obj cb = liftIO $ connectGestureDragDragUpdate obj cb SignalConnectBefore
afterGestureDragDragUpdate :: (GObject a, MonadIO m) => a -> GestureDragDragUpdateCallback -> m SignalHandlerId
afterGestureDragDragUpdate obj cb = connectGestureDragDragUpdate obj cb SignalConnectAfter

connectGestureDragDragUpdate :: (GObject a, MonadIO m) =>
                                a -> GestureDragDragUpdateCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureDragDragUpdate obj cb after = liftIO $ do
    cb' <- mkGestureDragDragUpdateCallback (gestureDragDragUpdateCallbackWrapper cb)
    connectSignalFunPtr obj "drag-update" cb' after

-- object GestureLongPress 
newtype GestureLongPress = GestureLongPress (ForeignPtr GestureLongPress)
noGestureLongPress :: Maybe GestureLongPress
noGestureLongPress = Nothing

foreign import ccall "gtk_gesture_long_press_get_type"
    c_gtk_gesture_long_press_get_type :: IO GType

type instance ParentTypes GestureLongPress = '[GestureSingle, Gesture, EventController, GObject.Object]

instance GObject GestureLongPress where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_gesture_long_press_get_type
    

class GObject o => GestureLongPressK o
instance (GObject o, IsDescendantOf GestureLongPress o) => GestureLongPressK o

toGestureLongPress :: GestureLongPressK o => o -> IO GestureLongPress
toGestureLongPress = unsafeCastTo GestureLongPress

-- method GestureLongPress::new
-- method type : Constructor
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "GestureLongPress"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_long_press_new" gtk_gesture_long_press_new :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO (Ptr GestureLongPress)


gestureLongPressNew ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m GestureLongPress
gestureLongPressNew widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_gesture_long_press_new widget'
    checkUnexpectedReturnNULL "gtk_gesture_long_press_new" result
    result' <- (wrapObject GestureLongPress) result
    touchManagedPtr widget
    return result'

-- signal GestureLongPress::cancelled
type GestureLongPressCancelledCallback =
    IO ()

noGestureLongPressCancelledCallback :: Maybe GestureLongPressCancelledCallback
noGestureLongPressCancelledCallback = Nothing

type GestureLongPressCancelledCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureLongPressCancelledCallback :: GestureLongPressCancelledCallbackC -> IO (FunPtr GestureLongPressCancelledCallbackC)

gestureLongPressCancelledClosure :: GestureLongPressCancelledCallback -> IO Closure
gestureLongPressCancelledClosure cb = newCClosure =<< mkGestureLongPressCancelledCallback wrapped
    where wrapped = gestureLongPressCancelledCallbackWrapper cb

gestureLongPressCancelledCallbackWrapper ::
    GestureLongPressCancelledCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
gestureLongPressCancelledCallbackWrapper _cb _ _ = do
    _cb 

onGestureLongPressCancelled :: (GObject a, MonadIO m) => a -> GestureLongPressCancelledCallback -> m SignalHandlerId
onGestureLongPressCancelled obj cb = liftIO $ connectGestureLongPressCancelled obj cb SignalConnectBefore
afterGestureLongPressCancelled :: (GObject a, MonadIO m) => a -> GestureLongPressCancelledCallback -> m SignalHandlerId
afterGestureLongPressCancelled obj cb = connectGestureLongPressCancelled obj cb SignalConnectAfter

connectGestureLongPressCancelled :: (GObject a, MonadIO m) =>
                                    a -> GestureLongPressCancelledCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureLongPressCancelled obj cb after = liftIO $ do
    cb' <- mkGestureLongPressCancelledCallback (gestureLongPressCancelledCallbackWrapper cb)
    connectSignalFunPtr obj "cancelled" cb' after

-- signal GestureLongPress::pressed
type GestureLongPressPressedCallback =
    Double ->
    Double ->
    IO ()

noGestureLongPressPressedCallback :: Maybe GestureLongPressPressedCallback
noGestureLongPressPressedCallback = Nothing

type GestureLongPressPressedCallbackC =
    Ptr () ->                               -- object
    CDouble ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureLongPressPressedCallback :: GestureLongPressPressedCallbackC -> IO (FunPtr GestureLongPressPressedCallbackC)

gestureLongPressPressedClosure :: GestureLongPressPressedCallback -> IO Closure
gestureLongPressPressedClosure cb = newCClosure =<< mkGestureLongPressPressedCallback wrapped
    where wrapped = gestureLongPressPressedCallbackWrapper cb

gestureLongPressPressedCallbackWrapper ::
    GestureLongPressPressedCallback ->
    Ptr () ->
    CDouble ->
    CDouble ->
    Ptr () ->
    IO ()
gestureLongPressPressedCallbackWrapper _cb _ x y _ = do
    let x' = realToFrac x
    let y' = realToFrac y
    _cb  x' y'

onGestureLongPressPressed :: (GObject a, MonadIO m) => a -> GestureLongPressPressedCallback -> m SignalHandlerId
onGestureLongPressPressed obj cb = liftIO $ connectGestureLongPressPressed obj cb SignalConnectBefore
afterGestureLongPressPressed :: (GObject a, MonadIO m) => a -> GestureLongPressPressedCallback -> m SignalHandlerId
afterGestureLongPressPressed obj cb = connectGestureLongPressPressed obj cb SignalConnectAfter

connectGestureLongPressPressed :: (GObject a, MonadIO m) =>
                                  a -> GestureLongPressPressedCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureLongPressPressed obj cb after = liftIO $ do
    cb' <- mkGestureLongPressPressedCallback (gestureLongPressPressedCallbackWrapper cb)
    connectSignalFunPtr obj "pressed" cb' after

-- object GestureMultiPress 
newtype GestureMultiPress = GestureMultiPress (ForeignPtr GestureMultiPress)
noGestureMultiPress :: Maybe GestureMultiPress
noGestureMultiPress = Nothing

foreign import ccall "gtk_gesture_multi_press_get_type"
    c_gtk_gesture_multi_press_get_type :: IO GType

type instance ParentTypes GestureMultiPress = '[GestureSingle, Gesture, EventController, GObject.Object]

instance GObject GestureMultiPress where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_gesture_multi_press_get_type
    

class GObject o => GestureMultiPressK o
instance (GObject o, IsDescendantOf GestureMultiPress o) => GestureMultiPressK o

toGestureMultiPress :: GestureMultiPressK o => o -> IO GestureMultiPress
toGestureMultiPress = unsafeCastTo GestureMultiPress

-- method GestureMultiPress::new
-- method type : Constructor
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "GestureMultiPress"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_multi_press_new" gtk_gesture_multi_press_new :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO (Ptr GestureMultiPress)


gestureMultiPressNew ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m GestureMultiPress
gestureMultiPressNew widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_gesture_multi_press_new widget'
    checkUnexpectedReturnNULL "gtk_gesture_multi_press_new" result
    result' <- (wrapObject GestureMultiPress) result
    touchManagedPtr widget
    return result'

-- method GestureMultiPress::get_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureMultiPress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureMultiPress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_multi_press_get_area" gtk_gesture_multi_press_get_area :: 
    Ptr GestureMultiPress ->                -- _obj : TInterface "Gtk" "GestureMultiPress"
    Ptr Gdk.Rectangle ->                    -- rect : TInterface "Gdk" "Rectangle"
    IO CInt


gestureMultiPressGetArea ::
    (MonadIO m, GestureMultiPressK a) =>
    a ->                                    -- _obj
    m (Bool,Gdk.Rectangle)
gestureMultiPressGetArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    rect <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    result <- gtk_gesture_multi_press_get_area _obj' rect
    let result' = (/= 0) result
    rect' <- (wrapBoxed Gdk.Rectangle) rect
    touchManagedPtr _obj
    return (result', rect')

-- method GestureMultiPress::set_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureMultiPress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureMultiPress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_multi_press_set_area" gtk_gesture_multi_press_set_area :: 
    Ptr GestureMultiPress ->                -- _obj : TInterface "Gtk" "GestureMultiPress"
    Ptr Gdk.Rectangle ->                    -- rect : TInterface "Gdk" "Rectangle"
    IO ()


gestureMultiPressSetArea ::
    (MonadIO m, GestureMultiPressK a) =>
    a ->                                    -- _obj
    Maybe (Gdk.Rectangle) ->                -- rect
    m ()
gestureMultiPressSetArea _obj rect = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeRect <- case rect of
        Nothing -> return nullPtr
        Just jRect -> do
            let jRect' = unsafeManagedPtrGetPtr jRect
            return jRect'
    gtk_gesture_multi_press_set_area _obj' maybeRect
    touchManagedPtr _obj
    whenJust rect touchManagedPtr
    return ()

-- signal GestureMultiPress::pressed
type GestureMultiPressPressedCallback =
    Int32 ->
    Double ->
    Double ->
    IO ()

noGestureMultiPressPressedCallback :: Maybe GestureMultiPressPressedCallback
noGestureMultiPressPressedCallback = Nothing

type GestureMultiPressPressedCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    CDouble ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureMultiPressPressedCallback :: GestureMultiPressPressedCallbackC -> IO (FunPtr GestureMultiPressPressedCallbackC)

gestureMultiPressPressedClosure :: GestureMultiPressPressedCallback -> IO Closure
gestureMultiPressPressedClosure cb = newCClosure =<< mkGestureMultiPressPressedCallback wrapped
    where wrapped = gestureMultiPressPressedCallbackWrapper cb

gestureMultiPressPressedCallbackWrapper ::
    GestureMultiPressPressedCallback ->
    Ptr () ->
    Int32 ->
    CDouble ->
    CDouble ->
    Ptr () ->
    IO ()
gestureMultiPressPressedCallbackWrapper _cb _ n_press x y _ = do
    let x' = realToFrac x
    let y' = realToFrac y
    _cb  n_press x' y'

onGestureMultiPressPressed :: (GObject a, MonadIO m) => a -> GestureMultiPressPressedCallback -> m SignalHandlerId
onGestureMultiPressPressed obj cb = liftIO $ connectGestureMultiPressPressed obj cb SignalConnectBefore
afterGestureMultiPressPressed :: (GObject a, MonadIO m) => a -> GestureMultiPressPressedCallback -> m SignalHandlerId
afterGestureMultiPressPressed obj cb = connectGestureMultiPressPressed obj cb SignalConnectAfter

connectGestureMultiPressPressed :: (GObject a, MonadIO m) =>
                                   a -> GestureMultiPressPressedCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureMultiPressPressed obj cb after = liftIO $ do
    cb' <- mkGestureMultiPressPressedCallback (gestureMultiPressPressedCallbackWrapper cb)
    connectSignalFunPtr obj "pressed" cb' after

-- signal GestureMultiPress::released
type GestureMultiPressReleasedCallback =
    Int32 ->
    Double ->
    Double ->
    IO ()

noGestureMultiPressReleasedCallback :: Maybe GestureMultiPressReleasedCallback
noGestureMultiPressReleasedCallback = Nothing

type GestureMultiPressReleasedCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    CDouble ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureMultiPressReleasedCallback :: GestureMultiPressReleasedCallbackC -> IO (FunPtr GestureMultiPressReleasedCallbackC)

gestureMultiPressReleasedClosure :: GestureMultiPressReleasedCallback -> IO Closure
gestureMultiPressReleasedClosure cb = newCClosure =<< mkGestureMultiPressReleasedCallback wrapped
    where wrapped = gestureMultiPressReleasedCallbackWrapper cb

gestureMultiPressReleasedCallbackWrapper ::
    GestureMultiPressReleasedCallback ->
    Ptr () ->
    Int32 ->
    CDouble ->
    CDouble ->
    Ptr () ->
    IO ()
gestureMultiPressReleasedCallbackWrapper _cb _ n_press x y _ = do
    let x' = realToFrac x
    let y' = realToFrac y
    _cb  n_press x' y'

onGestureMultiPressReleased :: (GObject a, MonadIO m) => a -> GestureMultiPressReleasedCallback -> m SignalHandlerId
onGestureMultiPressReleased obj cb = liftIO $ connectGestureMultiPressReleased obj cb SignalConnectBefore
afterGestureMultiPressReleased :: (GObject a, MonadIO m) => a -> GestureMultiPressReleasedCallback -> m SignalHandlerId
afterGestureMultiPressReleased obj cb = connectGestureMultiPressReleased obj cb SignalConnectAfter

connectGestureMultiPressReleased :: (GObject a, MonadIO m) =>
                                    a -> GestureMultiPressReleasedCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureMultiPressReleased obj cb after = liftIO $ do
    cb' <- mkGestureMultiPressReleasedCallback (gestureMultiPressReleasedCallbackWrapper cb)
    connectSignalFunPtr obj "released" cb' after

-- signal GestureMultiPress::stopped
type GestureMultiPressStoppedCallback =
    IO ()

noGestureMultiPressStoppedCallback :: Maybe GestureMultiPressStoppedCallback
noGestureMultiPressStoppedCallback = Nothing

type GestureMultiPressStoppedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureMultiPressStoppedCallback :: GestureMultiPressStoppedCallbackC -> IO (FunPtr GestureMultiPressStoppedCallbackC)

gestureMultiPressStoppedClosure :: GestureMultiPressStoppedCallback -> IO Closure
gestureMultiPressStoppedClosure cb = newCClosure =<< mkGestureMultiPressStoppedCallback wrapped
    where wrapped = gestureMultiPressStoppedCallbackWrapper cb

gestureMultiPressStoppedCallbackWrapper ::
    GestureMultiPressStoppedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
gestureMultiPressStoppedCallbackWrapper _cb _ _ = do
    _cb 

onGestureMultiPressStopped :: (GObject a, MonadIO m) => a -> GestureMultiPressStoppedCallback -> m SignalHandlerId
onGestureMultiPressStopped obj cb = liftIO $ connectGestureMultiPressStopped obj cb SignalConnectBefore
afterGestureMultiPressStopped :: (GObject a, MonadIO m) => a -> GestureMultiPressStoppedCallback -> m SignalHandlerId
afterGestureMultiPressStopped obj cb = connectGestureMultiPressStopped obj cb SignalConnectAfter

connectGestureMultiPressStopped :: (GObject a, MonadIO m) =>
                                   a -> GestureMultiPressStoppedCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureMultiPressStopped obj cb after = liftIO $ do
    cb' <- mkGestureMultiPressStoppedCallback (gestureMultiPressStoppedCallbackWrapper cb)
    connectSignalFunPtr obj "stopped" cb' after

-- object GesturePan 
newtype GesturePan = GesturePan (ForeignPtr GesturePan)
noGesturePan :: Maybe GesturePan
noGesturePan = Nothing

foreign import ccall "gtk_gesture_pan_get_type"
    c_gtk_gesture_pan_get_type :: IO GType

type instance ParentTypes GesturePan = '[GestureDrag, GestureSingle, Gesture, EventController, GObject.Object]

instance GObject GesturePan where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_gesture_pan_get_type
    

class GObject o => GesturePanK o
instance (GObject o, IsDescendantOf GesturePan o) => GesturePanK o

toGesturePan :: GesturePanK o => o -> IO GesturePan
toGesturePan = unsafeCastTo GesturePan

-- method GesturePan::new
-- method type : Constructor
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "GesturePan"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_pan_new" gtk_gesture_pan_new :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    IO (Ptr GesturePan)


gesturePanNew ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    Orientation ->                          -- orientation
    m GesturePan
gesturePanNew widget orientation = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    let orientation' = (fromIntegral . fromEnum) orientation
    result <- gtk_gesture_pan_new widget' orientation'
    checkUnexpectedReturnNULL "gtk_gesture_pan_new" result
    result' <- (wrapObject GesturePan) result
    touchManagedPtr widget
    return result'

-- method GesturePan::get_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GesturePan", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GesturePan", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Orientation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_pan_get_orientation" gtk_gesture_pan_get_orientation :: 
    Ptr GesturePan ->                       -- _obj : TInterface "Gtk" "GesturePan"
    IO CUInt


gesturePanGetOrientation ::
    (MonadIO m, GesturePanK a) =>
    a ->                                    -- _obj
    m Orientation
gesturePanGetOrientation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_pan_get_orientation _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method GesturePan::set_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GesturePan", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GesturePan", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_pan_set_orientation" gtk_gesture_pan_set_orientation :: 
    Ptr GesturePan ->                       -- _obj : TInterface "Gtk" "GesturePan"
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    IO ()


gesturePanSetOrientation ::
    (MonadIO m, GesturePanK a) =>
    a ->                                    -- _obj
    Orientation ->                          -- orientation
    m ()
gesturePanSetOrientation _obj orientation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let orientation' = (fromIntegral . fromEnum) orientation
    gtk_gesture_pan_set_orientation _obj' orientation'
    touchManagedPtr _obj
    return ()

-- signal GesturePan::pan
type GesturePanPanCallback =
    PanDirection ->
    Double ->
    IO ()

noGesturePanPanCallback :: Maybe GesturePanPanCallback
noGesturePanPanCallback = Nothing

type GesturePanPanCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGesturePanPanCallback :: GesturePanPanCallbackC -> IO (FunPtr GesturePanPanCallbackC)

gesturePanPanClosure :: GesturePanPanCallback -> IO Closure
gesturePanPanClosure cb = newCClosure =<< mkGesturePanPanCallback wrapped
    where wrapped = gesturePanPanCallbackWrapper cb

gesturePanPanCallbackWrapper ::
    GesturePanPanCallback ->
    Ptr () ->
    CUInt ->
    CDouble ->
    Ptr () ->
    IO ()
gesturePanPanCallbackWrapper _cb _ direction offset _ = do
    let direction' = (toEnum . fromIntegral) direction
    let offset' = realToFrac offset
    _cb  direction' offset'

onGesturePanPan :: (GObject a, MonadIO m) => a -> GesturePanPanCallback -> m SignalHandlerId
onGesturePanPan obj cb = liftIO $ connectGesturePanPan obj cb SignalConnectBefore
afterGesturePanPan :: (GObject a, MonadIO m) => a -> GesturePanPanCallback -> m SignalHandlerId
afterGesturePanPan obj cb = connectGesturePanPan obj cb SignalConnectAfter

connectGesturePanPan :: (GObject a, MonadIO m) =>
                        a -> GesturePanPanCallback -> SignalConnectMode -> m SignalHandlerId
connectGesturePanPan obj cb after = liftIO $ do
    cb' <- mkGesturePanPanCallback (gesturePanPanCallbackWrapper cb)
    connectSignalFunPtr obj "pan" cb' after

-- object GestureRotate 
newtype GestureRotate = GestureRotate (ForeignPtr GestureRotate)
noGestureRotate :: Maybe GestureRotate
noGestureRotate = Nothing

foreign import ccall "gtk_gesture_rotate_get_type"
    c_gtk_gesture_rotate_get_type :: IO GType

type instance ParentTypes GestureRotate = '[Gesture, EventController, GObject.Object]

instance GObject GestureRotate where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_gesture_rotate_get_type
    

class GObject o => GestureRotateK o
instance (GObject o, IsDescendantOf GestureRotate o) => GestureRotateK o

toGestureRotate :: GestureRotateK o => o -> IO GestureRotate
toGestureRotate = unsafeCastTo GestureRotate

-- method GestureRotate::new
-- method type : Constructor
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "GestureRotate"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_rotate_new" gtk_gesture_rotate_new :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO (Ptr GestureRotate)


gestureRotateNew ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m GestureRotate
gestureRotateNew widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_gesture_rotate_new widget'
    checkUnexpectedReturnNULL "gtk_gesture_rotate_new" result
    result' <- (wrapObject GestureRotate) result
    touchManagedPtr widget
    return result'

-- method GestureRotate::get_angle_delta
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureRotate", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureRotate", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_rotate_get_angle_delta" gtk_gesture_rotate_get_angle_delta :: 
    Ptr GestureRotate ->                    -- _obj : TInterface "Gtk" "GestureRotate"
    IO CDouble


gestureRotateGetAngleDelta ::
    (MonadIO m, GestureRotateK a) =>
    a ->                                    -- _obj
    m Double
gestureRotateGetAngleDelta _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_rotate_get_angle_delta _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- signal GestureRotate::angle-changed
type GestureRotateAngleChangedCallback =
    Double ->
    Double ->
    IO ()

noGestureRotateAngleChangedCallback :: Maybe GestureRotateAngleChangedCallback
noGestureRotateAngleChangedCallback = Nothing

type GestureRotateAngleChangedCallbackC =
    Ptr () ->                               -- object
    CDouble ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureRotateAngleChangedCallback :: GestureRotateAngleChangedCallbackC -> IO (FunPtr GestureRotateAngleChangedCallbackC)

gestureRotateAngleChangedClosure :: GestureRotateAngleChangedCallback -> IO Closure
gestureRotateAngleChangedClosure cb = newCClosure =<< mkGestureRotateAngleChangedCallback wrapped
    where wrapped = gestureRotateAngleChangedCallbackWrapper cb

gestureRotateAngleChangedCallbackWrapper ::
    GestureRotateAngleChangedCallback ->
    Ptr () ->
    CDouble ->
    CDouble ->
    Ptr () ->
    IO ()
gestureRotateAngleChangedCallbackWrapper _cb _ angle angle_delta _ = do
    let angle' = realToFrac angle
    let angle_delta' = realToFrac angle_delta
    _cb  angle' angle_delta'

onGestureRotateAngleChanged :: (GObject a, MonadIO m) => a -> GestureRotateAngleChangedCallback -> m SignalHandlerId
onGestureRotateAngleChanged obj cb = liftIO $ connectGestureRotateAngleChanged obj cb SignalConnectBefore
afterGestureRotateAngleChanged :: (GObject a, MonadIO m) => a -> GestureRotateAngleChangedCallback -> m SignalHandlerId
afterGestureRotateAngleChanged obj cb = connectGestureRotateAngleChanged obj cb SignalConnectAfter

connectGestureRotateAngleChanged :: (GObject a, MonadIO m) =>
                                    a -> GestureRotateAngleChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureRotateAngleChanged obj cb after = liftIO $ do
    cb' <- mkGestureRotateAngleChangedCallback (gestureRotateAngleChangedCallbackWrapper cb)
    connectSignalFunPtr obj "angle-changed" cb' after

-- object GestureSingle 
newtype GestureSingle = GestureSingle (ForeignPtr GestureSingle)
noGestureSingle :: Maybe GestureSingle
noGestureSingle = Nothing

foreign import ccall "gtk_gesture_single_get_type"
    c_gtk_gesture_single_get_type :: IO GType

type instance ParentTypes GestureSingle = '[Gesture, EventController, GObject.Object]

instance GObject GestureSingle where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_gesture_single_get_type
    

class GObject o => GestureSingleK o
instance (GObject o, IsDescendantOf GestureSingle o) => GestureSingleK o

toGestureSingle :: GestureSingleK o => o -> IO GestureSingle
toGestureSingle = unsafeCastTo GestureSingle

-- method GestureSingle::get_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_single_get_button" gtk_gesture_single_get_button :: 
    Ptr GestureSingle ->                    -- _obj : TInterface "Gtk" "GestureSingle"
    IO Word32


gestureSingleGetButton ::
    (MonadIO m, GestureSingleK a) =>
    a ->                                    -- _obj
    m Word32
gestureSingleGetButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_single_get_button _obj'
    touchManagedPtr _obj
    return result

-- method GestureSingle::get_current_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_single_get_current_button" gtk_gesture_single_get_current_button :: 
    Ptr GestureSingle ->                    -- _obj : TInterface "Gtk" "GestureSingle"
    IO Word32


gestureSingleGetCurrentButton ::
    (MonadIO m, GestureSingleK a) =>
    a ->                                    -- _obj
    m Word32
gestureSingleGetCurrentButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_single_get_current_button _obj'
    touchManagedPtr _obj
    return result

-- method GestureSingle::get_current_sequence
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "EventSequence"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_single_get_current_sequence" gtk_gesture_single_get_current_sequence :: 
    Ptr GestureSingle ->                    -- _obj : TInterface "Gtk" "GestureSingle"
    IO (Ptr Gdk.EventSequence)


gestureSingleGetCurrentSequence ::
    (MonadIO m, GestureSingleK a) =>
    a ->                                    -- _obj
    m Gdk.EventSequence
gestureSingleGetCurrentSequence _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_single_get_current_sequence _obj'
    checkUnexpectedReturnNULL "gtk_gesture_single_get_current_sequence" result
    result' <- (wrapBoxed Gdk.EventSequence) result
    touchManagedPtr _obj
    return result'

-- method GestureSingle::get_exclusive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_single_get_exclusive" gtk_gesture_single_get_exclusive :: 
    Ptr GestureSingle ->                    -- _obj : TInterface "Gtk" "GestureSingle"
    IO CInt


gestureSingleGetExclusive ::
    (MonadIO m, GestureSingleK a) =>
    a ->                                    -- _obj
    m Bool
gestureSingleGetExclusive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_single_get_exclusive _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method GestureSingle::get_touch_only
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_single_get_touch_only" gtk_gesture_single_get_touch_only :: 
    Ptr GestureSingle ->                    -- _obj : TInterface "Gtk" "GestureSingle"
    IO CInt


gestureSingleGetTouchOnly ::
    (MonadIO m, GestureSingleK a) =>
    a ->                                    -- _obj
    m Bool
gestureSingleGetTouchOnly _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_single_get_touch_only _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method GestureSingle::set_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_single_set_button" gtk_gesture_single_set_button :: 
    Ptr GestureSingle ->                    -- _obj : TInterface "Gtk" "GestureSingle"
    Word32 ->                               -- button : TBasicType TUInt32
    IO ()


gestureSingleSetButton ::
    (MonadIO m, GestureSingleK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- button
    m ()
gestureSingleSetButton _obj button = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_gesture_single_set_button _obj' button
    touchManagedPtr _obj
    return ()

-- method GestureSingle::set_exclusive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "exclusive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "exclusive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_single_set_exclusive" gtk_gesture_single_set_exclusive :: 
    Ptr GestureSingle ->                    -- _obj : TInterface "Gtk" "GestureSingle"
    CInt ->                                 -- exclusive : TBasicType TBoolean
    IO ()


gestureSingleSetExclusive ::
    (MonadIO m, GestureSingleK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- exclusive
    m ()
gestureSingleSetExclusive _obj exclusive = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let exclusive' = (fromIntegral . fromEnum) exclusive
    gtk_gesture_single_set_exclusive _obj' exclusive'
    touchManagedPtr _obj
    return ()

-- method GestureSingle::set_touch_only
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "touch_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSingle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "touch_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_single_set_touch_only" gtk_gesture_single_set_touch_only :: 
    Ptr GestureSingle ->                    -- _obj : TInterface "Gtk" "GestureSingle"
    CInt ->                                 -- touch_only : TBasicType TBoolean
    IO ()


gestureSingleSetTouchOnly ::
    (MonadIO m, GestureSingleK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- touch_only
    m ()
gestureSingleSetTouchOnly _obj touch_only = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let touch_only' = (fromIntegral . fromEnum) touch_only
    gtk_gesture_single_set_touch_only _obj' touch_only'
    touchManagedPtr _obj
    return ()

-- object GestureSwipe 
newtype GestureSwipe = GestureSwipe (ForeignPtr GestureSwipe)
noGestureSwipe :: Maybe GestureSwipe
noGestureSwipe = Nothing

foreign import ccall "gtk_gesture_swipe_get_type"
    c_gtk_gesture_swipe_get_type :: IO GType

type instance ParentTypes GestureSwipe = '[GestureSingle, Gesture, EventController, GObject.Object]

instance GObject GestureSwipe where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_gesture_swipe_get_type
    

class GObject o => GestureSwipeK o
instance (GObject o, IsDescendantOf GestureSwipe o) => GestureSwipeK o

toGestureSwipe :: GestureSwipeK o => o -> IO GestureSwipe
toGestureSwipe = unsafeCastTo GestureSwipe

-- method GestureSwipe::new
-- method type : Constructor
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "GestureSwipe"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_swipe_new" gtk_gesture_swipe_new :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO (Ptr GestureSwipe)


gestureSwipeNew ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m GestureSwipe
gestureSwipeNew widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_gesture_swipe_new widget'
    checkUnexpectedReturnNULL "gtk_gesture_swipe_new" result
    result' <- (wrapObject GestureSwipe) result
    touchManagedPtr widget
    return result'

-- method GestureSwipe::get_velocity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSwipe", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "velocity_x", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "velocity_y", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureSwipe", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_swipe_get_velocity" gtk_gesture_swipe_get_velocity :: 
    Ptr GestureSwipe ->                     -- _obj : TInterface "Gtk" "GestureSwipe"
    Ptr CDouble ->                          -- velocity_x : TBasicType TDouble
    Ptr CDouble ->                          -- velocity_y : TBasicType TDouble
    IO CInt


gestureSwipeGetVelocity ::
    (MonadIO m, GestureSwipeK a) =>
    a ->                                    -- _obj
    m (Bool,Double,Double)
gestureSwipeGetVelocity _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    velocity_x <- allocMem :: IO (Ptr CDouble)
    velocity_y <- allocMem :: IO (Ptr CDouble)
    result <- gtk_gesture_swipe_get_velocity _obj' velocity_x velocity_y
    let result' = (/= 0) result
    velocity_x' <- peek velocity_x
    let velocity_x'' = realToFrac velocity_x'
    velocity_y' <- peek velocity_y
    let velocity_y'' = realToFrac velocity_y'
    touchManagedPtr _obj
    freeMem velocity_x
    freeMem velocity_y
    return (result', velocity_x'', velocity_y'')

-- signal GestureSwipe::swipe
type GestureSwipeSwipeCallback =
    Double ->
    Double ->
    IO ()

noGestureSwipeSwipeCallback :: Maybe GestureSwipeSwipeCallback
noGestureSwipeSwipeCallback = Nothing

type GestureSwipeSwipeCallbackC =
    Ptr () ->                               -- object
    CDouble ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureSwipeSwipeCallback :: GestureSwipeSwipeCallbackC -> IO (FunPtr GestureSwipeSwipeCallbackC)

gestureSwipeSwipeClosure :: GestureSwipeSwipeCallback -> IO Closure
gestureSwipeSwipeClosure cb = newCClosure =<< mkGestureSwipeSwipeCallback wrapped
    where wrapped = gestureSwipeSwipeCallbackWrapper cb

gestureSwipeSwipeCallbackWrapper ::
    GestureSwipeSwipeCallback ->
    Ptr () ->
    CDouble ->
    CDouble ->
    Ptr () ->
    IO ()
gestureSwipeSwipeCallbackWrapper _cb _ velocity_x velocity_y _ = do
    let velocity_x' = realToFrac velocity_x
    let velocity_y' = realToFrac velocity_y
    _cb  velocity_x' velocity_y'

onGestureSwipeSwipe :: (GObject a, MonadIO m) => a -> GestureSwipeSwipeCallback -> m SignalHandlerId
onGestureSwipeSwipe obj cb = liftIO $ connectGestureSwipeSwipe obj cb SignalConnectBefore
afterGestureSwipeSwipe :: (GObject a, MonadIO m) => a -> GestureSwipeSwipeCallback -> m SignalHandlerId
afterGestureSwipeSwipe obj cb = connectGestureSwipeSwipe obj cb SignalConnectAfter

connectGestureSwipeSwipe :: (GObject a, MonadIO m) =>
                            a -> GestureSwipeSwipeCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureSwipeSwipe obj cb after = liftIO $ do
    cb' <- mkGestureSwipeSwipeCallback (gestureSwipeSwipeCallbackWrapper cb)
    connectSignalFunPtr obj "swipe" cb' after

-- object GestureZoom 
newtype GestureZoom = GestureZoom (ForeignPtr GestureZoom)
noGestureZoom :: Maybe GestureZoom
noGestureZoom = Nothing

foreign import ccall "gtk_gesture_zoom_get_type"
    c_gtk_gesture_zoom_get_type :: IO GType

type instance ParentTypes GestureZoom = '[Gesture, EventController, GObject.Object]

instance GObject GestureZoom where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_gesture_zoom_get_type
    

class GObject o => GestureZoomK o
instance (GObject o, IsDescendantOf GestureZoom o) => GestureZoomK o

toGestureZoom :: GestureZoomK o => o -> IO GestureZoom
toGestureZoom = unsafeCastTo GestureZoom

-- method GestureZoom::new
-- method type : Constructor
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "GestureZoom"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_zoom_new" gtk_gesture_zoom_new :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO (Ptr GestureZoom)


gestureZoomNew ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m GestureZoom
gestureZoomNew widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_gesture_zoom_new widget'
    checkUnexpectedReturnNULL "gtk_gesture_zoom_new" result
    result' <- (wrapObject GestureZoom) result
    touchManagedPtr widget
    return result'

-- method GestureZoom::get_scale_delta
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureZoom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GestureZoom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gesture_zoom_get_scale_delta" gtk_gesture_zoom_get_scale_delta :: 
    Ptr GestureZoom ->                      -- _obj : TInterface "Gtk" "GestureZoom"
    IO CDouble


gestureZoomGetScaleDelta ::
    (MonadIO m, GestureZoomK a) =>
    a ->                                    -- _obj
    m Double
gestureZoomGetScaleDelta _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gesture_zoom_get_scale_delta _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- signal GestureZoom::scale-changed
type GestureZoomScaleChangedCallback =
    Double ->
    IO ()

noGestureZoomScaleChangedCallback :: Maybe GestureZoomScaleChangedCallback
noGestureZoomScaleChangedCallback = Nothing

type GestureZoomScaleChangedCallbackC =
    Ptr () ->                               -- object
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGestureZoomScaleChangedCallback :: GestureZoomScaleChangedCallbackC -> IO (FunPtr GestureZoomScaleChangedCallbackC)

gestureZoomScaleChangedClosure :: GestureZoomScaleChangedCallback -> IO Closure
gestureZoomScaleChangedClosure cb = newCClosure =<< mkGestureZoomScaleChangedCallback wrapped
    where wrapped = gestureZoomScaleChangedCallbackWrapper cb

gestureZoomScaleChangedCallbackWrapper ::
    GestureZoomScaleChangedCallback ->
    Ptr () ->
    CDouble ->
    Ptr () ->
    IO ()
gestureZoomScaleChangedCallbackWrapper _cb _ scale _ = do
    let scale' = realToFrac scale
    _cb  scale'

onGestureZoomScaleChanged :: (GObject a, MonadIO m) => a -> GestureZoomScaleChangedCallback -> m SignalHandlerId
onGestureZoomScaleChanged obj cb = liftIO $ connectGestureZoomScaleChanged obj cb SignalConnectBefore
afterGestureZoomScaleChanged :: (GObject a, MonadIO m) => a -> GestureZoomScaleChangedCallback -> m SignalHandlerId
afterGestureZoomScaleChanged obj cb = connectGestureZoomScaleChanged obj cb SignalConnectAfter

connectGestureZoomScaleChanged :: (GObject a, MonadIO m) =>
                                  a -> GestureZoomScaleChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectGestureZoomScaleChanged obj cb after = liftIO $ do
    cb' <- mkGestureZoomScaleChangedCallback (gestureZoomScaleChangedCallbackWrapper cb)
    connectSignalFunPtr obj "scale-changed" cb' after

-- struct Gradient
newtype Gradient = Gradient (ForeignPtr Gradient)
noGradient :: Maybe Gradient
noGradient = Nothing

foreign import ccall "gtk_gradient_get_type" c_gtk_gradient_get_type :: 
    IO GType

instance BoxedObject Gradient where
    boxedType _ = c_gtk_gradient_get_type

-- method Gradient::new_linear
-- method type : Constructor
-- Args : [Arg {argName = "x0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "x0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Gradient"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gradient_new_linear" gtk_gradient_new_linear :: 
    CDouble ->                              -- x0 : TBasicType TDouble
    CDouble ->                              -- y0 : TBasicType TDouble
    CDouble ->                              -- x1 : TBasicType TDouble
    CDouble ->                              -- y1 : TBasicType TDouble
    IO (Ptr Gradient)

{-# DEPRECATED gradientNewLinear ["(Since version 3.8)","#GtkGradient is deprecated."]#-}
gradientNewLinear ::
    (MonadIO m) =>
    Double ->                               -- x0
    Double ->                               -- y0
    Double ->                               -- x1
    Double ->                               -- y1
    m Gradient
gradientNewLinear x0 y0 x1 y1 = liftIO $ do
    let x0' = realToFrac x0
    let y0' = realToFrac y0
    let x1' = realToFrac x1
    let y1' = realToFrac y1
    result <- gtk_gradient_new_linear x0' y0' x1' y1'
    checkUnexpectedReturnNULL "gtk_gradient_new_linear" result
    result' <- (wrapBoxed Gradient) result
    return result'

-- method Gradient::new_radial
-- method type : Constructor
-- Args : [Arg {argName = "x0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "radius0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "radius1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "x0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "radius0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "radius1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Gradient"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gradient_new_radial" gtk_gradient_new_radial :: 
    CDouble ->                              -- x0 : TBasicType TDouble
    CDouble ->                              -- y0 : TBasicType TDouble
    CDouble ->                              -- radius0 : TBasicType TDouble
    CDouble ->                              -- x1 : TBasicType TDouble
    CDouble ->                              -- y1 : TBasicType TDouble
    CDouble ->                              -- radius1 : TBasicType TDouble
    IO (Ptr Gradient)

{-# DEPRECATED gradientNewRadial ["(Since version 3.8)","#GtkGradient is deprecated."]#-}
gradientNewRadial ::
    (MonadIO m) =>
    Double ->                               -- x0
    Double ->                               -- y0
    Double ->                               -- radius0
    Double ->                               -- x1
    Double ->                               -- y1
    Double ->                               -- radius1
    m Gradient
gradientNewRadial x0 y0 radius0 x1 y1 radius1 = liftIO $ do
    let x0' = realToFrac x0
    let y0' = realToFrac y0
    let radius0' = realToFrac radius0
    let x1' = realToFrac x1
    let y1' = realToFrac y1
    let radius1' = realToFrac radius1
    result <- gtk_gradient_new_radial x0' y0' radius0' x1' y1' radius1'
    checkUnexpectedReturnNULL "gtk_gradient_new_radial" result
    result' <- (wrapBoxed Gradient) result
    return result'

-- method Gradient::add_color_stop
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gradient_add_color_stop" gtk_gradient_add_color_stop :: 
    Ptr Gradient ->                         -- _obj : TInterface "Gtk" "Gradient"
    CDouble ->                              -- offset : TBasicType TDouble
    Ptr SymbolicColor ->                    -- color : TInterface "Gtk" "SymbolicColor"
    IO ()

{-# DEPRECATED gradientAddColorStop ["(Since version 3.8)","#GtkGradient is deprecated."]#-}
gradientAddColorStop ::
    (MonadIO m) =>
    Gradient ->                             -- _obj
    Double ->                               -- offset
    SymbolicColor ->                        -- color
    m ()
gradientAddColorStop _obj offset color = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let offset' = realToFrac offset
    let color' = unsafeManagedPtrGetPtr color
    gtk_gradient_add_color_stop _obj' offset' color'
    touchManagedPtr _obj
    touchManagedPtr color
    return ()

-- method Gradient::ref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Gradient"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gradient_ref" gtk_gradient_ref :: 
    Ptr Gradient ->                         -- _obj : TInterface "Gtk" "Gradient"
    IO (Ptr Gradient)

{-# DEPRECATED gradientRef ["(Since version 3.8)","#GtkGradient is deprecated."]#-}
gradientRef ::
    (MonadIO m) =>
    Gradient ->                             -- _obj
    m Gradient
gradientRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_gradient_ref _obj'
    checkUnexpectedReturnNULL "gtk_gradient_ref" result
    result' <- (wrapBoxed Gradient) result
    touchManagedPtr _obj
    return result'

-- method Gradient::resolve
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "props", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resolved_gradient", argType = TInterface "cairo" "Pattern", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "props", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gradient_resolve" gtk_gradient_resolve :: 
    Ptr Gradient ->                         -- _obj : TInterface "Gtk" "Gradient"
    Ptr StyleProperties ->                  -- props : TInterface "Gtk" "StyleProperties"
    Ptr (Ptr Cairo.Pattern) ->              -- resolved_gradient : TInterface "cairo" "Pattern"
    IO CInt

{-# DEPRECATED gradientResolve ["(Since version 3.8)","#GtkGradient is deprecated."]#-}
gradientResolve ::
    (MonadIO m, StylePropertiesK a) =>
    Gradient ->                             -- _obj
    a ->                                    -- props
    m (Bool,Cairo.Pattern)
gradientResolve _obj props = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let props' = unsafeManagedPtrCastPtr props
    resolved_gradient <- allocMem :: IO (Ptr (Ptr Cairo.Pattern))
    result <- gtk_gradient_resolve _obj' props' resolved_gradient
    let result' = (/= 0) result
    resolved_gradient' <- peek resolved_gradient
    resolved_gradient'' <- (wrapBoxed Cairo.Pattern) resolved_gradient'
    touchManagedPtr _obj
    touchManagedPtr props
    freeMem resolved_gradient
    return (result', resolved_gradient'')

-- method Gradient::resolve_for_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Pattern"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gradient_resolve_for_context" gtk_gradient_resolve_for_context :: 
    Ptr Gradient ->                         -- _obj : TInterface "Gtk" "Gradient"
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    IO (Ptr Cairo.Pattern)


gradientResolveForContext ::
    (MonadIO m, StyleContextK a) =>
    Gradient ->                             -- _obj
    a ->                                    -- context
    m Cairo.Pattern
gradientResolveForContext _obj context = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    result <- gtk_gradient_resolve_for_context _obj' context'
    checkUnexpectedReturnNULL "gtk_gradient_resolve_for_context" result
    result' <- (wrapBoxed Cairo.Pattern) result
    touchManagedPtr _obj
    touchManagedPtr context
    return result'

-- method Gradient::to_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gradient_to_string" gtk_gradient_to_string :: 
    Ptr Gradient ->                         -- _obj : TInterface "Gtk" "Gradient"
    IO CString

{-# DEPRECATED gradientToString ["(Since version 3.8)","#GtkGradient is deprecated."]#-}
gradientToString ::
    (MonadIO m) =>
    Gradient ->                             -- _obj
    m T.Text
gradientToString _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_gradient_to_string _obj'
    checkUnexpectedReturnNULL "gtk_gradient_to_string" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Gradient::unref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Gradient", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gradient_unref" gtk_gradient_unref :: 
    Ptr Gradient ->                         -- _obj : TInterface "Gtk" "Gradient"
    IO ()

{-# DEPRECATED gradientUnref ["(Since version 3.8)","#GtkGradient is deprecated."]#-}
gradientUnref ::
    (MonadIO m) =>
    Gradient ->                             -- _obj
    m ()
gradientUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_gradient_unref _obj'
    touchManagedPtr _obj
    return ()

-- object Grid 
newtype Grid = Grid (ForeignPtr Grid)
noGrid :: Maybe Grid
noGrid = Nothing

foreign import ccall "gtk_grid_get_type"
    c_gtk_grid_get_type :: IO GType

type instance ParentTypes Grid = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject Grid where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_grid_get_type
    

class GObject o => GridK o
instance (GObject o, IsDescendantOf Grid o) => GridK o

toGrid :: GridK o => o -> IO Grid
toGrid = unsafeCastTo Grid

-- method Grid::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Grid"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_new" gtk_grid_new :: 
    IO (Ptr Grid)


gridNew ::
    (MonadIO m) =>
    m Grid
gridNew  = liftIO $ do
    result <- gtk_grid_new
    checkUnexpectedReturnNULL "gtk_grid_new" result
    result' <- (newObject Grid) result
    return result'

-- method Grid::attach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_attach" gtk_grid_attach :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Int32 ->                                -- left : TBasicType TInt32
    Int32 ->                                -- top : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


gridAttach ::
    (MonadIO m, GridK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Int32 ->                                -- left
    Int32 ->                                -- top
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
gridAttach _obj child left top width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_grid_attach _obj' child' left top width height
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Grid::attach_next_to
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_attach_next_to" gtk_grid_attach_next_to :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- sibling : TInterface "Gtk" "Widget"
    CUInt ->                                -- side : TInterface "Gtk" "PositionType"
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


gridAttachNextTo ::
    (MonadIO m, GridK a, WidgetK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Maybe (c) ->                            -- sibling
    PositionType ->                         -- side
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
gridAttachNextTo _obj child sibling side width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    maybeSibling <- case sibling of
        Nothing -> return nullPtr
        Just jSibling -> do
            let jSibling' = unsafeManagedPtrCastPtr jSibling
            return jSibling'
    let side' = (fromIntegral . fromEnum) side
    gtk_grid_attach_next_to _obj' child' maybeSibling side' width height
    touchManagedPtr _obj
    touchManagedPtr child
    whenJust sibling touchManagedPtr
    return ()

-- method Grid::get_baseline_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_get_baseline_row" gtk_grid_get_baseline_row :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    IO Int32


gridGetBaselineRow ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    m Int32
gridGetBaselineRow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_grid_get_baseline_row _obj'
    touchManagedPtr _obj
    return result

-- method Grid::get_child_at
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_get_child_at" gtk_grid_get_child_at :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Int32 ->                                -- left : TBasicType TInt32
    Int32 ->                                -- top : TBasicType TInt32
    IO (Ptr Widget)


gridGetChildAt ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- left
    Int32 ->                                -- top
    m Widget
gridGetChildAt _obj left top = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_grid_get_child_at _obj' left top
    checkUnexpectedReturnNULL "gtk_grid_get_child_at" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Grid::get_column_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_get_column_homogeneous" gtk_grid_get_column_homogeneous :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    IO CInt


gridGetColumnHomogeneous ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    m Bool
gridGetColumnHomogeneous _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_grid_get_column_homogeneous _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Grid::get_column_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_get_column_spacing" gtk_grid_get_column_spacing :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    IO Word32


gridGetColumnSpacing ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    m Word32
gridGetColumnSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_grid_get_column_spacing _obj'
    touchManagedPtr _obj
    return result

-- method Grid::get_row_baseline_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "BaselinePosition"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_get_row_baseline_position" gtk_grid_get_row_baseline_position :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Int32 ->                                -- row : TBasicType TInt32
    IO CUInt


gridGetRowBaselinePosition ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    m BaselinePosition
gridGetRowBaselinePosition _obj row = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_grid_get_row_baseline_position _obj' row
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Grid::get_row_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_get_row_homogeneous" gtk_grid_get_row_homogeneous :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    IO CInt


gridGetRowHomogeneous ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    m Bool
gridGetRowHomogeneous _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_grid_get_row_homogeneous _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Grid::get_row_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_get_row_spacing" gtk_grid_get_row_spacing :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    IO Word32


gridGetRowSpacing ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    m Word32
gridGetRowSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_grid_get_row_spacing _obj'
    touchManagedPtr _obj
    return result

-- method Grid::insert_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_insert_column" gtk_grid_insert_column :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


gridInsertColumn ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    m ()
gridInsertColumn _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_grid_insert_column _obj' position
    touchManagedPtr _obj
    return ()

-- method Grid::insert_next_to
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_insert_next_to" gtk_grid_insert_next_to :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Ptr Widget ->                           -- sibling : TInterface "Gtk" "Widget"
    CUInt ->                                -- side : TInterface "Gtk" "PositionType"
    IO ()


gridInsertNextTo ::
    (MonadIO m, GridK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- sibling
    PositionType ->                         -- side
    m ()
gridInsertNextTo _obj sibling side = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sibling' = unsafeManagedPtrCastPtr sibling
    let side' = (fromIntegral . fromEnum) side
    gtk_grid_insert_next_to _obj' sibling' side'
    touchManagedPtr _obj
    touchManagedPtr sibling
    return ()

-- method Grid::insert_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_insert_row" gtk_grid_insert_row :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


gridInsertRow ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    m ()
gridInsertRow _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_grid_insert_row _obj' position
    touchManagedPtr _obj
    return ()

-- method Grid::remove_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_remove_column" gtk_grid_remove_column :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


gridRemoveColumn ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    m ()
gridRemoveColumn _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_grid_remove_column _obj' position
    touchManagedPtr _obj
    return ()

-- method Grid::remove_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_remove_row" gtk_grid_remove_row :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


gridRemoveRow ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    m ()
gridRemoveRow _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_grid_remove_row _obj' position
    touchManagedPtr _obj
    return ()

-- method Grid::set_baseline_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_set_baseline_row" gtk_grid_set_baseline_row :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Int32 ->                                -- row : TBasicType TInt32
    IO ()


gridSetBaselineRow ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    m ()
gridSetBaselineRow _obj row = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_grid_set_baseline_row _obj' row
    touchManagedPtr _obj
    return ()

-- method Grid::set_column_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_set_column_homogeneous" gtk_grid_set_column_homogeneous :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    CInt ->                                 -- homogeneous : TBasicType TBoolean
    IO ()


gridSetColumnHomogeneous ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- homogeneous
    m ()
gridSetColumnHomogeneous _obj homogeneous = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let homogeneous' = (fromIntegral . fromEnum) homogeneous
    gtk_grid_set_column_homogeneous _obj' homogeneous'
    touchManagedPtr _obj
    return ()

-- method Grid::set_column_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_set_column_spacing" gtk_grid_set_column_spacing :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Word32 ->                               -- spacing : TBasicType TUInt32
    IO ()


gridSetColumnSpacing ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- spacing
    m ()
gridSetColumnSpacing _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_grid_set_column_spacing _obj' spacing
    touchManagedPtr _obj
    return ()

-- method Grid::set_row_baseline_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TInterface "Gtk" "BaselinePosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TInterface "Gtk" "BaselinePosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_set_row_baseline_position" gtk_grid_set_row_baseline_position :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Int32 ->                                -- row : TBasicType TInt32
    CUInt ->                                -- pos : TInterface "Gtk" "BaselinePosition"
    IO ()


gridSetRowBaselinePosition ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    BaselinePosition ->                     -- pos
    m ()
gridSetRowBaselinePosition _obj row pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let pos' = (fromIntegral . fromEnum) pos
    gtk_grid_set_row_baseline_position _obj' row pos'
    touchManagedPtr _obj
    return ()

-- method Grid::set_row_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_set_row_homogeneous" gtk_grid_set_row_homogeneous :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    CInt ->                                 -- homogeneous : TBasicType TBoolean
    IO ()


gridSetRowHomogeneous ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- homogeneous
    m ()
gridSetRowHomogeneous _obj homogeneous = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let homogeneous' = (fromIntegral . fromEnum) homogeneous
    gtk_grid_set_row_homogeneous _obj' homogeneous'
    touchManagedPtr _obj
    return ()

-- method Grid::set_row_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Grid", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grid_set_row_spacing" gtk_grid_set_row_spacing :: 
    Ptr Grid ->                             -- _obj : TInterface "Gtk" "Grid"
    Word32 ->                               -- spacing : TBasicType TUInt32
    IO ()


gridSetRowSpacing ::
    (MonadIO m, GridK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- spacing
    m ()
gridSetRowSpacing _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_grid_set_row_spacing _obj' spacing
    touchManagedPtr _obj
    return ()

-- object HBox 
newtype HBox = HBox (ForeignPtr HBox)
noHBox :: Maybe HBox
noHBox = Nothing

foreign import ccall "gtk_hbox_get_type"
    c_gtk_hbox_get_type :: IO GType

type instance ParentTypes HBox = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject HBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_hbox_get_type
    

class GObject o => HBoxK o
instance (GObject o, IsDescendantOf HBox o) => HBoxK o

toHBox :: HBoxK o => o -> IO HBox
toHBox = unsafeCastTo HBox

-- method HBox::new
-- method type : Constructor
-- Args : [Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "HBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hbox_new" gtk_hbox_new :: 
    CInt ->                                 -- homogeneous : TBasicType TBoolean
    Int32 ->                                -- spacing : TBasicType TInt32
    IO (Ptr HBox)

{-# DEPRECATED hBoxNew ["(Since version 3.2)","You can use gtk_box_new() with %GTK_ORIENTATION_HORIZONTAL instead,","  which is a quick and easy change. But the recommendation is to switch to","  #GtkGrid, since #GtkBox is going to go away eventually.","  See [Migrating from other containers to GtkGrid][gtk-migrating-GtkGrid]."]#-}
hBoxNew ::
    (MonadIO m) =>
    Bool ->                                 -- homogeneous
    Int32 ->                                -- spacing
    m HBox
hBoxNew homogeneous spacing = liftIO $ do
    let homogeneous' = (fromIntegral . fromEnum) homogeneous
    result <- gtk_hbox_new homogeneous' spacing
    checkUnexpectedReturnNULL "gtk_hbox_new" result
    result' <- (newObject HBox) result
    return result'

-- object HButtonBox 
newtype HButtonBox = HButtonBox (ForeignPtr HButtonBox)
noHButtonBox :: Maybe HButtonBox
noHButtonBox = Nothing

foreign import ccall "gtk_hbutton_box_get_type"
    c_gtk_hbutton_box_get_type :: IO GType

type instance ParentTypes HButtonBox = '[ButtonBox, Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject HButtonBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_hbutton_box_get_type
    

class GObject o => HButtonBoxK o
instance (GObject o, IsDescendantOf HButtonBox o) => HButtonBoxK o

toHButtonBox :: HButtonBoxK o => o -> IO HButtonBox
toHButtonBox = unsafeCastTo HButtonBox

-- method HButtonBox::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "HButtonBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hbutton_box_new" gtk_hbutton_box_new :: 
    IO (Ptr HButtonBox)

{-# DEPRECATED hButtonBoxNew ["(Since version 3.2)","Use gtk_button_box_new() with %GTK_ORIENTATION_HORIZONTAL instead"]#-}
hButtonBoxNew ::
    (MonadIO m) =>
    m HButtonBox
hButtonBoxNew  = liftIO $ do
    result <- gtk_hbutton_box_new
    checkUnexpectedReturnNULL "gtk_hbutton_box_new" result
    result' <- (newObject HButtonBox) result
    return result'

-- object HPaned 
newtype HPaned = HPaned (ForeignPtr HPaned)
noHPaned :: Maybe HPaned
noHPaned = Nothing

foreign import ccall "gtk_hpaned_get_type"
    c_gtk_hpaned_get_type :: IO GType

type instance ParentTypes HPaned = '[Paned, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject HPaned where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_hpaned_get_type
    

class GObject o => HPanedK o
instance (GObject o, IsDescendantOf HPaned o) => HPanedK o

toHPaned :: HPanedK o => o -> IO HPaned
toHPaned = unsafeCastTo HPaned

-- method HPaned::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "HPaned"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hpaned_new" gtk_hpaned_new :: 
    IO (Ptr HPaned)

{-# DEPRECATED hPanedNew ["(Since version 3.2)","Use gtk_paned_new() with %GTK_ORIENTATION_HORIZONTAL instead"]#-}
hPanedNew ::
    (MonadIO m) =>
    m HPaned
hPanedNew  = liftIO $ do
    result <- gtk_hpaned_new
    checkUnexpectedReturnNULL "gtk_hpaned_new" result
    result' <- (newObject HPaned) result
    return result'

-- object HSV 
newtype HSV = HSV (ForeignPtr HSV)
noHSV :: Maybe HSV
noHSV = Nothing

foreign import ccall "gtk_hsv_get_type"
    c_gtk_hsv_get_type :: IO GType

type instance ParentTypes HSV = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject HSV where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_hsv_get_type
    

class GObject o => HSVK o
instance (GObject o, IsDescendantOf HSV o) => HSVK o

toHSV :: HSVK o => o -> IO HSV
toHSV = unsafeCastTo HSV

-- method HSV::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "HSV"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hsv_new" gtk_hsv_new :: 
    IO (Ptr HSV)


hSVNew ::
    (MonadIO m) =>
    m HSV
hSVNew  = liftIO $ do
    result <- gtk_hsv_new
    checkUnexpectedReturnNULL "gtk_hsv_new" result
    result' <- (newObject HSV) result
    return result'

-- method HSV::get_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HSV", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "h", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "s", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "v", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HSV", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hsv_get_color" gtk_hsv_get_color :: 
    Ptr HSV ->                              -- _obj : TInterface "Gtk" "HSV"
    Ptr CDouble ->                          -- h : TBasicType TDouble
    Ptr CDouble ->                          -- s : TBasicType TDouble
    Ptr CDouble ->                          -- v : TBasicType TDouble
    IO ()


hSVGetColor ::
    (MonadIO m, HSVK a) =>
    a ->                                    -- _obj
    m (Double,Double,Double)
hSVGetColor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    h <- allocMem :: IO (Ptr CDouble)
    s <- allocMem :: IO (Ptr CDouble)
    v <- allocMem :: IO (Ptr CDouble)
    gtk_hsv_get_color _obj' h s v
    h' <- peek h
    let h'' = realToFrac h'
    s' <- peek s
    let s'' = realToFrac s'
    v' <- peek v
    let v'' = realToFrac v'
    touchManagedPtr _obj
    freeMem h
    freeMem s
    freeMem v
    return (h'', s'', v'')

-- method HSV::get_metrics
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HSV", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "ring_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HSV", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hsv_get_metrics" gtk_hsv_get_metrics :: 
    Ptr HSV ->                              -- _obj : TInterface "Gtk" "HSV"
    Ptr Int32 ->                            -- size : TBasicType TInt32
    Ptr Int32 ->                            -- ring_width : TBasicType TInt32
    IO ()


hSVGetMetrics ::
    (MonadIO m, HSVK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
hSVGetMetrics _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    size <- allocMem :: IO (Ptr Int32)
    ring_width <- allocMem :: IO (Ptr Int32)
    gtk_hsv_get_metrics _obj' size ring_width
    size' <- peek size
    ring_width' <- peek ring_width
    touchManagedPtr _obj
    freeMem size
    freeMem ring_width
    return (size', ring_width')

-- method HSV::is_adjusting
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HSV", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HSV", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hsv_is_adjusting" gtk_hsv_is_adjusting :: 
    Ptr HSV ->                              -- _obj : TInterface "Gtk" "HSV"
    IO CInt


hSVIsAdjusting ::
    (MonadIO m, HSVK a) =>
    a ->                                    -- _obj
    m Bool
hSVIsAdjusting _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_hsv_is_adjusting _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method HSV::set_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HSV", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "h", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "s", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "v", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HSV", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "h", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "s", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "v", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hsv_set_color" gtk_hsv_set_color :: 
    Ptr HSV ->                              -- _obj : TInterface "Gtk" "HSV"
    CDouble ->                              -- h : TBasicType TDouble
    CDouble ->                              -- s : TBasicType TDouble
    CDouble ->                              -- v : TBasicType TDouble
    IO ()


hSVSetColor ::
    (MonadIO m, HSVK a) =>
    a ->                                    -- _obj
    Double ->                               -- h
    Double ->                               -- s
    Double ->                               -- v
    m ()
hSVSetColor _obj h s v = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let h' = realToFrac h
    let s' = realToFrac s
    let v' = realToFrac v
    gtk_hsv_set_color _obj' h' s' v'
    touchManagedPtr _obj
    return ()

-- method HSV::set_metrics
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HSV", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ring_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HSV", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ring_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hsv_set_metrics" gtk_hsv_set_metrics :: 
    Ptr HSV ->                              -- _obj : TInterface "Gtk" "HSV"
    Int32 ->                                -- size : TBasicType TInt32
    Int32 ->                                -- ring_width : TBasicType TInt32
    IO ()


hSVSetMetrics ::
    (MonadIO m, HSVK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- size
    Int32 ->                                -- ring_width
    m ()
hSVSetMetrics _obj size ring_width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_hsv_set_metrics _obj' size ring_width
    touchManagedPtr _obj
    return ()

-- method HSV::to_rgb
-- method type : MemberFunction
-- Args : [Arg {argName = "h", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "s", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "v", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "r", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "g", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "b", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "h", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "s", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "v", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hsv_to_rgb" gtk_hsv_to_rgb :: 
    CDouble ->                              -- h : TBasicType TDouble
    CDouble ->                              -- s : TBasicType TDouble
    CDouble ->                              -- v : TBasicType TDouble
    Ptr CDouble ->                          -- r : TBasicType TDouble
    Ptr CDouble ->                          -- g : TBasicType TDouble
    Ptr CDouble ->                          -- b : TBasicType TDouble
    IO ()


hSVToRgb ::
    (MonadIO m) =>
    Double ->                               -- h
    Double ->                               -- s
    Double ->                               -- v
    m (Double,Double,Double)
hSVToRgb h s v = liftIO $ do
    let h' = realToFrac h
    let s' = realToFrac s
    let v' = realToFrac v
    r <- allocMem :: IO (Ptr CDouble)
    g <- allocMem :: IO (Ptr CDouble)
    b <- allocMem :: IO (Ptr CDouble)
    gtk_hsv_to_rgb h' s' v' r g b
    r' <- peek r
    let r'' = realToFrac r'
    g' <- peek g
    let g'' = realToFrac g'
    b' <- peek b
    let b'' = realToFrac b'
    freeMem r
    freeMem g
    freeMem b
    return (r'', g'', b'')

-- signal HSV::changed
type HSVChangedCallback =
    IO ()

noHSVChangedCallback :: Maybe HSVChangedCallback
noHSVChangedCallback = Nothing

type HSVChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkHSVChangedCallback :: HSVChangedCallbackC -> IO (FunPtr HSVChangedCallbackC)

hSVChangedClosure :: HSVChangedCallback -> IO Closure
hSVChangedClosure cb = newCClosure =<< mkHSVChangedCallback wrapped
    where wrapped = hSVChangedCallbackWrapper cb

hSVChangedCallbackWrapper ::
    HSVChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
hSVChangedCallbackWrapper _cb _ _ = do
    _cb 

onHSVChanged :: (GObject a, MonadIO m) => a -> HSVChangedCallback -> m SignalHandlerId
onHSVChanged obj cb = liftIO $ connectHSVChanged obj cb SignalConnectBefore
afterHSVChanged :: (GObject a, MonadIO m) => a -> HSVChangedCallback -> m SignalHandlerId
afterHSVChanged obj cb = connectHSVChanged obj cb SignalConnectAfter

connectHSVChanged :: (GObject a, MonadIO m) =>
                     a -> HSVChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectHSVChanged obj cb after = liftIO $ do
    cb' <- mkHSVChangedCallback (hSVChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- signal HSV::move
type HSVMoveCallback =
    DirectionType ->
    IO ()

noHSVMoveCallback :: Maybe HSVMoveCallback
noHSVMoveCallback = Nothing

type HSVMoveCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkHSVMoveCallback :: HSVMoveCallbackC -> IO (FunPtr HSVMoveCallbackC)

hSVMoveClosure :: HSVMoveCallback -> IO Closure
hSVMoveClosure cb = newCClosure =<< mkHSVMoveCallback wrapped
    where wrapped = hSVMoveCallbackWrapper cb

hSVMoveCallbackWrapper ::
    HSVMoveCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
hSVMoveCallbackWrapper _cb _ object _ = do
    let object' = (toEnum . fromIntegral) object
    _cb  object'

onHSVMove :: (GObject a, MonadIO m) => a -> HSVMoveCallback -> m SignalHandlerId
onHSVMove obj cb = liftIO $ connectHSVMove obj cb SignalConnectBefore
afterHSVMove :: (GObject a, MonadIO m) => a -> HSVMoveCallback -> m SignalHandlerId
afterHSVMove obj cb = connectHSVMove obj cb SignalConnectAfter

connectHSVMove :: (GObject a, MonadIO m) =>
                  a -> HSVMoveCallback -> SignalConnectMode -> m SignalHandlerId
connectHSVMove obj cb after = liftIO $ do
    cb' <- mkHSVMoveCallback (hSVMoveCallbackWrapper cb)
    connectSignalFunPtr obj "move" cb' after

-- object HScale 
newtype HScale = HScale (ForeignPtr HScale)
noHScale :: Maybe HScale
noHScale = Nothing

foreign import ccall "gtk_hscale_get_type"
    c_gtk_hscale_get_type :: IO GType

type instance ParentTypes HScale = '[Scale, Range, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject HScale where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_hscale_get_type
    

class GObject o => HScaleK o
instance (GObject o, IsDescendantOf HScale o) => HScaleK o

toHScale :: HScaleK o => o -> IO HScale
toHScale = unsafeCastTo HScale

-- method HScale::new
-- method type : Constructor
-- Args : [Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "HScale"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hscale_new" gtk_hscale_new :: 
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO (Ptr HScale)

{-# DEPRECATED hScaleNew ["(Since version 3.2)","Use gtk_scale_new() with %GTK_ORIENTATION_HORIZONTAL instead"]#-}
hScaleNew ::
    (MonadIO m, AdjustmentK a) =>
    Maybe (a) ->                            -- adjustment
    m HScale
hScaleNew adjustment = liftIO $ do
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    result <- gtk_hscale_new maybeAdjustment
    checkUnexpectedReturnNULL "gtk_hscale_new" result
    result' <- (newObject HScale) result
    whenJust adjustment touchManagedPtr
    return result'

-- method HScale::new_with_range
-- method type : Constructor
-- Args : [Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "HScale"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hscale_new_with_range" gtk_hscale_new_with_range :: 
    CDouble ->                              -- min : TBasicType TDouble
    CDouble ->                              -- max : TBasicType TDouble
    CDouble ->                              -- step : TBasicType TDouble
    IO (Ptr HScale)

{-# DEPRECATED hScaleNewWithRange ["(Since version 3.2)","Use gtk_scale_new_with_range() with %GTK_ORIENTATION_HORIZONTAL instead"]#-}
hScaleNewWithRange ::
    (MonadIO m) =>
    Double ->                               -- min
    Double ->                               -- max
    Double ->                               -- step
    m HScale
hScaleNewWithRange min max step = liftIO $ do
    let min' = realToFrac min
    let max' = realToFrac max
    let step' = realToFrac step
    result <- gtk_hscale_new_with_range min' max' step'
    checkUnexpectedReturnNULL "gtk_hscale_new_with_range" result
    result' <- (newObject HScale) result
    return result'

-- object HScrollbar 
newtype HScrollbar = HScrollbar (ForeignPtr HScrollbar)
noHScrollbar :: Maybe HScrollbar
noHScrollbar = Nothing

foreign import ccall "gtk_hscrollbar_get_type"
    c_gtk_hscrollbar_get_type :: IO GType

type instance ParentTypes HScrollbar = '[Scrollbar, Range, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject HScrollbar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_hscrollbar_get_type
    

class GObject o => HScrollbarK o
instance (GObject o, IsDescendantOf HScrollbar o) => HScrollbarK o

toHScrollbar :: HScrollbarK o => o -> IO HScrollbar
toHScrollbar = unsafeCastTo HScrollbar

-- method HScrollbar::new
-- method type : Constructor
-- Args : [Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "HScrollbar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hscrollbar_new" gtk_hscrollbar_new :: 
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO (Ptr HScrollbar)

{-# DEPRECATED hScrollbarNew ["(Since version 3.2)","Use gtk_scrollbar_new() with %GTK_ORIENTATION_HORIZONTAL instead"]#-}
hScrollbarNew ::
    (MonadIO m, AdjustmentK a) =>
    Maybe (a) ->                            -- adjustment
    m HScrollbar
hScrollbarNew adjustment = liftIO $ do
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    result <- gtk_hscrollbar_new maybeAdjustment
    checkUnexpectedReturnNULL "gtk_hscrollbar_new" result
    result' <- (newObject HScrollbar) result
    whenJust adjustment touchManagedPtr
    return result'

-- object HSeparator 
newtype HSeparator = HSeparator (ForeignPtr HSeparator)
noHSeparator :: Maybe HSeparator
noHSeparator = Nothing

foreign import ccall "gtk_hseparator_get_type"
    c_gtk_hseparator_get_type :: IO GType

type instance ParentTypes HSeparator = '[Separator, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject HSeparator where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_hseparator_get_type
    

class GObject o => HSeparatorK o
instance (GObject o, IsDescendantOf HSeparator o) => HSeparatorK o

toHSeparator :: HSeparatorK o => o -> IO HSeparator
toHSeparator = unsafeCastTo HSeparator

-- method HSeparator::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "HSeparator"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_hseparator_new" gtk_hseparator_new :: 
    IO (Ptr HSeparator)

{-# DEPRECATED hSeparatorNew ["(Since version 3.2)","Use gtk_separator_new() with %GTK_ORIENTATION_HORIZONTAL instead"]#-}
hSeparatorNew ::
    (MonadIO m) =>
    m HSeparator
hSeparatorNew  = liftIO $ do
    result <- gtk_hseparator_new
    checkUnexpectedReturnNULL "gtk_hseparator_new" result
    result' <- (newObject HSeparator) result
    return result'

-- object HandleBox 
newtype HandleBox = HandleBox (ForeignPtr HandleBox)
noHandleBox :: Maybe HandleBox
noHandleBox = Nothing

foreign import ccall "gtk_handle_box_get_type"
    c_gtk_handle_box_get_type :: IO GType

type instance ParentTypes HandleBox = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject HandleBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_handle_box_get_type
    

class GObject o => HandleBoxK o
instance (GObject o, IsDescendantOf HandleBox o) => HandleBoxK o

toHandleBox :: HandleBoxK o => o -> IO HandleBox
toHandleBox = unsafeCastTo HandleBox

-- method HandleBox::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "HandleBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_handle_box_new" gtk_handle_box_new :: 
    IO (Ptr HandleBox)

{-# DEPRECATED handleBoxNew ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxNew ::
    (MonadIO m) =>
    m HandleBox
handleBoxNew  = liftIO $ do
    result <- gtk_handle_box_new
    checkUnexpectedReturnNULL "gtk_handle_box_new" result
    result' <- (newObject HandleBox) result
    return result'

-- method HandleBox::get_child_detached
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_handle_box_get_child_detached" gtk_handle_box_get_child_detached :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    IO CInt

{-# DEPRECATED handleBoxGetChildDetached ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxGetChildDetached ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    m Bool
handleBoxGetChildDetached _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_handle_box_get_child_detached _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method HandleBox::get_handle_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PositionType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_handle_box_get_handle_position" gtk_handle_box_get_handle_position :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    IO CUInt

{-# DEPRECATED handleBoxGetHandlePosition ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxGetHandlePosition ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    m PositionType
handleBoxGetHandlePosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_handle_box_get_handle_position _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method HandleBox::get_shadow_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ShadowType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_handle_box_get_shadow_type" gtk_handle_box_get_shadow_type :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    IO CUInt

{-# DEPRECATED handleBoxGetShadowType ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxGetShadowType ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    m ShadowType
handleBoxGetShadowType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_handle_box_get_shadow_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method HandleBox::get_snap_edge
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PositionType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_handle_box_get_snap_edge" gtk_handle_box_get_snap_edge :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    IO CUInt

{-# DEPRECATED handleBoxGetSnapEdge ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxGetSnapEdge ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    m PositionType
handleBoxGetSnapEdge _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_handle_box_get_snap_edge _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method HandleBox::set_handle_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_handle_box_set_handle_position" gtk_handle_box_set_handle_position :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    CUInt ->                                -- position : TInterface "Gtk" "PositionType"
    IO ()

{-# DEPRECATED handleBoxSetHandlePosition ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxSetHandlePosition ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    PositionType ->                         -- position
    m ()
handleBoxSetHandlePosition _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let position' = (fromIntegral . fromEnum) position
    gtk_handle_box_set_handle_position _obj' position'
    touchManagedPtr _obj
    return ()

-- method HandleBox::set_shadow_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_handle_box_set_shadow_type" gtk_handle_box_set_shadow_type :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    CUInt ->                                -- type : TInterface "Gtk" "ShadowType"
    IO ()

{-# DEPRECATED handleBoxSetShadowType ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxSetShadowType ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    ShadowType ->                           -- type
    m ()
handleBoxSetShadowType _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    gtk_handle_box_set_shadow_type _obj' type_'
    touchManagedPtr _obj
    return ()

-- method HandleBox::set_snap_edge
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "edge", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HandleBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "edge", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_handle_box_set_snap_edge" gtk_handle_box_set_snap_edge :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    CUInt ->                                -- edge : TInterface "Gtk" "PositionType"
    IO ()

{-# DEPRECATED handleBoxSetSnapEdge ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxSetSnapEdge ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    PositionType ->                         -- edge
    m ()
handleBoxSetSnapEdge _obj edge = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let edge' = (fromIntegral . fromEnum) edge
    gtk_handle_box_set_snap_edge _obj' edge'
    touchManagedPtr _obj
    return ()

-- signal HandleBox::child-attached
type HandleBoxChildAttachedCallback =
    Widget ->
    IO ()

noHandleBoxChildAttachedCallback :: Maybe HandleBoxChildAttachedCallback
noHandleBoxChildAttachedCallback = Nothing

type HandleBoxChildAttachedCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkHandleBoxChildAttachedCallback :: HandleBoxChildAttachedCallbackC -> IO (FunPtr HandleBoxChildAttachedCallbackC)

handleBoxChildAttachedClosure :: HandleBoxChildAttachedCallback -> IO Closure
handleBoxChildAttachedClosure cb = newCClosure =<< mkHandleBoxChildAttachedCallback wrapped
    where wrapped = handleBoxChildAttachedCallbackWrapper cb

handleBoxChildAttachedCallbackWrapper ::
    HandleBoxChildAttachedCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
handleBoxChildAttachedCallbackWrapper _cb _ widget _ = do
    widget' <- (newObject Widget) widget
    _cb  widget'

onHandleBoxChildAttached :: (GObject a, MonadIO m) => a -> HandleBoxChildAttachedCallback -> m SignalHandlerId
onHandleBoxChildAttached obj cb = liftIO $ connectHandleBoxChildAttached obj cb SignalConnectBefore
afterHandleBoxChildAttached :: (GObject a, MonadIO m) => a -> HandleBoxChildAttachedCallback -> m SignalHandlerId
afterHandleBoxChildAttached obj cb = connectHandleBoxChildAttached obj cb SignalConnectAfter

connectHandleBoxChildAttached :: (GObject a, MonadIO m) =>
                                 a -> HandleBoxChildAttachedCallback -> SignalConnectMode -> m SignalHandlerId
connectHandleBoxChildAttached obj cb after = liftIO $ do
    cb' <- mkHandleBoxChildAttachedCallback (handleBoxChildAttachedCallbackWrapper cb)
    connectSignalFunPtr obj "child-attached" cb' after

-- signal HandleBox::child-detached
type HandleBoxChildDetachedCallback =
    Widget ->
    IO ()

noHandleBoxChildDetachedCallback :: Maybe HandleBoxChildDetachedCallback
noHandleBoxChildDetachedCallback = Nothing

type HandleBoxChildDetachedCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkHandleBoxChildDetachedCallback :: HandleBoxChildDetachedCallbackC -> IO (FunPtr HandleBoxChildDetachedCallbackC)

handleBoxChildDetachedClosure :: HandleBoxChildDetachedCallback -> IO Closure
handleBoxChildDetachedClosure cb = newCClosure =<< mkHandleBoxChildDetachedCallback wrapped
    where wrapped = handleBoxChildDetachedCallbackWrapper cb

handleBoxChildDetachedCallbackWrapper ::
    HandleBoxChildDetachedCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
handleBoxChildDetachedCallbackWrapper _cb _ widget _ = do
    widget' <- (newObject Widget) widget
    _cb  widget'

onHandleBoxChildDetached :: (GObject a, MonadIO m) => a -> HandleBoxChildDetachedCallback -> m SignalHandlerId
onHandleBoxChildDetached obj cb = liftIO $ connectHandleBoxChildDetached obj cb SignalConnectBefore
afterHandleBoxChildDetached :: (GObject a, MonadIO m) => a -> HandleBoxChildDetachedCallback -> m SignalHandlerId
afterHandleBoxChildDetached obj cb = connectHandleBoxChildDetached obj cb SignalConnectAfter

connectHandleBoxChildDetached :: (GObject a, MonadIO m) =>
                                 a -> HandleBoxChildDetachedCallback -> SignalConnectMode -> m SignalHandlerId
connectHandleBoxChildDetached obj cb after = liftIO $ do
    cb' <- mkHandleBoxChildDetachedCallback (handleBoxChildDetachedCallbackWrapper cb)
    connectSignalFunPtr obj "child-detached" cb' after

-- object HeaderBar 
newtype HeaderBar = HeaderBar (ForeignPtr HeaderBar)
noHeaderBar :: Maybe HeaderBar
noHeaderBar = Nothing

foreign import ccall "gtk_header_bar_get_type"
    c_gtk_header_bar_get_type :: IO GType

type instance ParentTypes HeaderBar = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject HeaderBar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_header_bar_get_type
    

class GObject o => HeaderBarK o
instance (GObject o, IsDescendantOf HeaderBar o) => HeaderBarK o

toHeaderBar :: HeaderBarK o => o -> IO HeaderBar
toHeaderBar = unsafeCastTo HeaderBar

-- method HeaderBar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "HeaderBar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_new" gtk_header_bar_new :: 
    IO (Ptr HeaderBar)


headerBarNew ::
    (MonadIO m) =>
    m HeaderBar
headerBarNew  = liftIO $ do
    result <- gtk_header_bar_new
    checkUnexpectedReturnNULL "gtk_header_bar_new" result
    result' <- (newObject HeaderBar) result
    return result'

-- method HeaderBar::get_custom_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_get_custom_title" gtk_header_bar_get_custom_title :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    IO (Ptr Widget)


headerBarGetCustomTitle ::
    (MonadIO m, HeaderBarK a) =>
    a ->                                    -- _obj
    m Widget
headerBarGetCustomTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_header_bar_get_custom_title _obj'
    checkUnexpectedReturnNULL "gtk_header_bar_get_custom_title" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method HeaderBar::get_decoration_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_get_decoration_layout" gtk_header_bar_get_decoration_layout :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    IO CString


headerBarGetDecorationLayout ::
    (MonadIO m, HeaderBarK a) =>
    a ->                                    -- _obj
    m T.Text
headerBarGetDecorationLayout _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_header_bar_get_decoration_layout _obj'
    checkUnexpectedReturnNULL "gtk_header_bar_get_decoration_layout" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method HeaderBar::get_has_subtitle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_get_has_subtitle" gtk_header_bar_get_has_subtitle :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    IO CInt


headerBarGetHasSubtitle ::
    (MonadIO m, HeaderBarK a) =>
    a ->                                    -- _obj
    m Bool
headerBarGetHasSubtitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_header_bar_get_has_subtitle _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method HeaderBar::get_show_close_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_get_show_close_button" gtk_header_bar_get_show_close_button :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    IO CInt


headerBarGetShowCloseButton ::
    (MonadIO m, HeaderBarK a) =>
    a ->                                    -- _obj
    m Bool
headerBarGetShowCloseButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_header_bar_get_show_close_button _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method HeaderBar::get_subtitle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_get_subtitle" gtk_header_bar_get_subtitle :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    IO CString


headerBarGetSubtitle ::
    (MonadIO m, HeaderBarK a) =>
    a ->                                    -- _obj
    m T.Text
headerBarGetSubtitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_header_bar_get_subtitle _obj'
    checkUnexpectedReturnNULL "gtk_header_bar_get_subtitle" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method HeaderBar::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_get_title" gtk_header_bar_get_title :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    IO CString


headerBarGetTitle ::
    (MonadIO m, HeaderBarK a) =>
    a ->                                    -- _obj
    m T.Text
headerBarGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_header_bar_get_title _obj'
    checkUnexpectedReturnNULL "gtk_header_bar_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method HeaderBar::pack_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_pack_end" gtk_header_bar_pack_end :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


headerBarPackEnd ::
    (MonadIO m, HeaderBarK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
headerBarPackEnd _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_header_bar_pack_end _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method HeaderBar::pack_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_pack_start" gtk_header_bar_pack_start :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


headerBarPackStart ::
    (MonadIO m, HeaderBarK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
headerBarPackStart _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_header_bar_pack_start _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method HeaderBar::set_custom_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_set_custom_title" gtk_header_bar_set_custom_title :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    Ptr Widget ->                           -- title_widget : TInterface "Gtk" "Widget"
    IO ()


headerBarSetCustomTitle ::
    (MonadIO m, HeaderBarK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- title_widget
    m ()
headerBarSetCustomTitle _obj title_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeTitle_widget <- case title_widget of
        Nothing -> return nullPtr
        Just jTitle_widget -> do
            let jTitle_widget' = unsafeManagedPtrCastPtr jTitle_widget
            return jTitle_widget'
    gtk_header_bar_set_custom_title _obj' maybeTitle_widget
    touchManagedPtr _obj
    whenJust title_widget touchManagedPtr
    return ()

-- method HeaderBar::set_decoration_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_set_decoration_layout" gtk_header_bar_set_decoration_layout :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    CString ->                              -- layout : TBasicType TUTF8
    IO ()


headerBarSetDecorationLayout ::
    (MonadIO m, HeaderBarK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- layout
    m ()
headerBarSetDecorationLayout _obj layout = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLayout <- case layout of
        Nothing -> return nullPtr
        Just jLayout -> do
            jLayout' <- textToCString jLayout
            return jLayout'
    gtk_header_bar_set_decoration_layout _obj' maybeLayout
    touchManagedPtr _obj
    freeMem maybeLayout
    return ()

-- method HeaderBar::set_has_subtitle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_set_has_subtitle" gtk_header_bar_set_has_subtitle :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


headerBarSetHasSubtitle ::
    (MonadIO m, HeaderBarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
headerBarSetHasSubtitle _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_header_bar_set_has_subtitle _obj' setting'
    touchManagedPtr _obj
    return ()

-- method HeaderBar::set_show_close_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_set_show_close_button" gtk_header_bar_set_show_close_button :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


headerBarSetShowCloseButton ::
    (MonadIO m, HeaderBarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
headerBarSetShowCloseButton _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_header_bar_set_show_close_button _obj' setting'
    touchManagedPtr _obj
    return ()

-- method HeaderBar::set_subtitle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "subtitle", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "subtitle", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_set_subtitle" gtk_header_bar_set_subtitle :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    CString ->                              -- subtitle : TBasicType TUTF8
    IO ()


headerBarSetSubtitle ::
    (MonadIO m, HeaderBarK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- subtitle
    m ()
headerBarSetSubtitle _obj subtitle = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeSubtitle <- case subtitle of
        Nothing -> return nullPtr
        Just jSubtitle -> do
            jSubtitle' <- textToCString jSubtitle
            return jSubtitle'
    gtk_header_bar_set_subtitle _obj' maybeSubtitle
    touchManagedPtr _obj
    freeMem maybeSubtitle
    return ()

-- method HeaderBar::set_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "HeaderBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_set_title" gtk_header_bar_set_title :: 
    Ptr HeaderBar ->                        -- _obj : TInterface "Gtk" "HeaderBar"
    CString ->                              -- title : TBasicType TUTF8
    IO ()


headerBarSetTitle ::
    (MonadIO m, HeaderBarK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- title
    m ()
headerBarSetTitle _obj title = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeTitle <- case title of
        Nothing -> return nullPtr
        Just jTitle -> do
            jTitle' <- textToCString jTitle
            return jTitle'
    gtk_header_bar_set_title _obj' maybeTitle
    touchManagedPtr _obj
    freeMem maybeTitle
    return ()

-- object IMContext 
newtype IMContext = IMContext (ForeignPtr IMContext)
noIMContext :: Maybe IMContext
noIMContext = Nothing

foreign import ccall "gtk_im_context_get_type"
    c_gtk_im_context_get_type :: IO GType

type instance ParentTypes IMContext = '[GObject.Object]

instance GObject IMContext where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_im_context_get_type
    

class GObject o => IMContextK o
instance (GObject o, IsDescendantOf IMContext o) => IMContextK o

toIMContext :: IMContextK o => o -> IO IMContext
toIMContext = unsafeCastTo IMContext

-- method IMContext::delete_surrounding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_delete_surrounding" gtk_im_context_delete_surrounding :: 
    Ptr IMContext ->                        -- _obj : TInterface "Gtk" "IMContext"
    Int32 ->                                -- offset : TBasicType TInt32
    Int32 ->                                -- n_chars : TBasicType TInt32
    IO CInt


iMContextDeleteSurrounding ::
    (MonadIO m, IMContextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- offset
    Int32 ->                                -- n_chars
    m Bool
iMContextDeleteSurrounding _obj offset n_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_im_context_delete_surrounding _obj' offset n_chars
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method IMContext::filter_keypress
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_filter_keypress" gtk_im_context_filter_keypress :: 
    Ptr IMContext ->                        -- _obj : TInterface "Gtk" "IMContext"
    Ptr Gdk.EventKey ->                     -- event : TInterface "Gdk" "EventKey"
    IO CInt


iMContextFilterKeypress ::
    (MonadIO m, IMContextK a) =>
    a ->                                    -- _obj
    Gdk.EventKey ->                         -- event
    m Bool
iMContextFilterKeypress _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_im_context_filter_keypress _obj' event'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event
    return result'

-- method IMContext::focus_in
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_focus_in" gtk_im_context_focus_in :: 
    Ptr IMContext ->                        -- _obj : TInterface "Gtk" "IMContext"
    IO ()


iMContextFocusIn ::
    (MonadIO m, IMContextK a) =>
    a ->                                    -- _obj
    m ()
iMContextFocusIn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_im_context_focus_in _obj'
    touchManagedPtr _obj
    return ()

-- method IMContext::focus_out
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_focus_out" gtk_im_context_focus_out :: 
    Ptr IMContext ->                        -- _obj : TInterface "Gtk" "IMContext"
    IO ()


iMContextFocusOut ::
    (MonadIO m, IMContextK a) =>
    a ->                                    -- _obj
    m ()
iMContextFocusOut _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_im_context_focus_out _obj'
    touchManagedPtr _obj
    return ()

-- method IMContext::get_preedit_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "attrs", argType = TInterface "Pango" "AttrList", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "cursor_pos", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_get_preedit_string" gtk_im_context_get_preedit_string :: 
    Ptr IMContext ->                        -- _obj : TInterface "Gtk" "IMContext"
    Ptr CString ->                          -- str : TBasicType TUTF8
    Ptr (Ptr Pango.AttrList) ->             -- attrs : TInterface "Pango" "AttrList"
    Ptr Int32 ->                            -- cursor_pos : TBasicType TInt32
    IO ()


iMContextGetPreeditString ::
    (MonadIO m, IMContextK a) =>
    a ->                                    -- _obj
    m (T.Text,Pango.AttrList,Int32)
iMContextGetPreeditString _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    str <- allocMem :: IO (Ptr CString)
    attrs <- allocMem :: IO (Ptr (Ptr Pango.AttrList))
    cursor_pos <- allocMem :: IO (Ptr Int32)
    gtk_im_context_get_preedit_string _obj' str attrs cursor_pos
    str' <- peek str
    str'' <- cstringToText str'
    freeMem str'
    attrs' <- peek attrs
    attrs'' <- (wrapBoxed Pango.AttrList) attrs'
    cursor_pos' <- peek cursor_pos
    touchManagedPtr _obj
    freeMem str
    freeMem attrs
    freeMem cursor_pos
    return (str'', attrs'', cursor_pos')

-- method IMContext::get_surrounding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "cursor_index", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_get_surrounding" gtk_im_context_get_surrounding :: 
    Ptr IMContext ->                        -- _obj : TInterface "Gtk" "IMContext"
    Ptr CString ->                          -- text : TBasicType TUTF8
    Ptr Int32 ->                            -- cursor_index : TBasicType TInt32
    IO CInt


iMContextGetSurrounding ::
    (MonadIO m, IMContextK a) =>
    a ->                                    -- _obj
    m (Bool,T.Text,Int32)
iMContextGetSurrounding _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text <- allocMem :: IO (Ptr CString)
    cursor_index <- allocMem :: IO (Ptr Int32)
    result <- gtk_im_context_get_surrounding _obj' text cursor_index
    let result' = (/= 0) result
    text' <- peek text
    text'' <- cstringToText text'
    freeMem text'
    cursor_index' <- peek cursor_index
    touchManagedPtr _obj
    freeMem text
    freeMem cursor_index
    return (result', text'', cursor_index')

-- method IMContext::reset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_reset" gtk_im_context_reset :: 
    Ptr IMContext ->                        -- _obj : TInterface "Gtk" "IMContext"
    IO ()


iMContextReset ::
    (MonadIO m, IMContextK a) =>
    a ->                                    -- _obj
    m ()
iMContextReset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_im_context_reset _obj'
    touchManagedPtr _obj
    return ()

-- method IMContext::set_client_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_set_client_window" gtk_im_context_set_client_window :: 
    Ptr IMContext ->                        -- _obj : TInterface "Gtk" "IMContext"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    IO ()


iMContextSetClientWindow ::
    (MonadIO m, IMContextK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- window
    m ()
iMContextSetClientWindow _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeWindow <- case window of
        Nothing -> return nullPtr
        Just jWindow -> do
            let jWindow' = unsafeManagedPtrCastPtr jWindow
            return jWindow'
    gtk_im_context_set_client_window _obj' maybeWindow
    touchManagedPtr _obj
    whenJust window touchManagedPtr
    return ()

-- method IMContext::set_cursor_location
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_set_cursor_location" gtk_im_context_set_cursor_location :: 
    Ptr IMContext ->                        -- _obj : TInterface "Gtk" "IMContext"
    Ptr Gdk.Rectangle ->                    -- area : TInterface "Gdk" "Rectangle"
    IO ()


iMContextSetCursorLocation ::
    (MonadIO m, IMContextK a) =>
    a ->                                    -- _obj
    Gdk.Rectangle ->                        -- area
    m ()
iMContextSetCursorLocation _obj area = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let area' = unsafeManagedPtrGetPtr area
    gtk_im_context_set_cursor_location _obj' area'
    touchManagedPtr _obj
    touchManagedPtr area
    return ()

-- method IMContext::set_surrounding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cursor_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cursor_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_set_surrounding" gtk_im_context_set_surrounding :: 
    Ptr IMContext ->                        -- _obj : TInterface "Gtk" "IMContext"
    CString ->                              -- text : TBasicType TUTF8
    Int32 ->                                -- len : TBasicType TInt32
    Int32 ->                                -- cursor_index : TBasicType TInt32
    IO ()


iMContextSetSurrounding ::
    (MonadIO m, IMContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    Int32 ->                                -- len
    Int32 ->                                -- cursor_index
    m ()
iMContextSetSurrounding _obj text len cursor_index = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_im_context_set_surrounding _obj' text' len cursor_index
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method IMContext::set_use_preedit
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_preedit", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_preedit", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_set_use_preedit" gtk_im_context_set_use_preedit :: 
    Ptr IMContext ->                        -- _obj : TInterface "Gtk" "IMContext"
    CInt ->                                 -- use_preedit : TBasicType TBoolean
    IO ()


iMContextSetUsePreedit ::
    (MonadIO m, IMContextK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_preedit
    m ()
iMContextSetUsePreedit _obj use_preedit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_preedit' = (fromIntegral . fromEnum) use_preedit
    gtk_im_context_set_use_preedit _obj' use_preedit'
    touchManagedPtr _obj
    return ()

-- signal IMContext::commit
type IMContextCommitCallback =
    T.Text ->
    IO ()

noIMContextCommitCallback :: Maybe IMContextCommitCallback
noIMContextCommitCallback = Nothing

type IMContextCommitCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkIMContextCommitCallback :: IMContextCommitCallbackC -> IO (FunPtr IMContextCommitCallbackC)

iMContextCommitClosure :: IMContextCommitCallback -> IO Closure
iMContextCommitClosure cb = newCClosure =<< mkIMContextCommitCallback wrapped
    where wrapped = iMContextCommitCallbackWrapper cb

iMContextCommitCallbackWrapper ::
    IMContextCommitCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
iMContextCommitCallbackWrapper _cb _ str _ = do
    str' <- cstringToText str
    _cb  str'

onIMContextCommit :: (GObject a, MonadIO m) => a -> IMContextCommitCallback -> m SignalHandlerId
onIMContextCommit obj cb = liftIO $ connectIMContextCommit obj cb SignalConnectBefore
afterIMContextCommit :: (GObject a, MonadIO m) => a -> IMContextCommitCallback -> m SignalHandlerId
afterIMContextCommit obj cb = connectIMContextCommit obj cb SignalConnectAfter

connectIMContextCommit :: (GObject a, MonadIO m) =>
                          a -> IMContextCommitCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextCommit obj cb after = liftIO $ do
    cb' <- mkIMContextCommitCallback (iMContextCommitCallbackWrapper cb)
    connectSignalFunPtr obj "commit" cb' after

-- signal IMContext::delete-surrounding
type IMContextDeleteSurroundingCallback =
    Int32 ->
    Int32 ->
    IO Bool

noIMContextDeleteSurroundingCallback :: Maybe IMContextDeleteSurroundingCallback
noIMContextDeleteSurroundingCallback = Nothing

type IMContextDeleteSurroundingCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkIMContextDeleteSurroundingCallback :: IMContextDeleteSurroundingCallbackC -> IO (FunPtr IMContextDeleteSurroundingCallbackC)

iMContextDeleteSurroundingClosure :: IMContextDeleteSurroundingCallback -> IO Closure
iMContextDeleteSurroundingClosure cb = newCClosure =<< mkIMContextDeleteSurroundingCallback wrapped
    where wrapped = iMContextDeleteSurroundingCallbackWrapper cb

iMContextDeleteSurroundingCallbackWrapper ::
    IMContextDeleteSurroundingCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO CInt
iMContextDeleteSurroundingCallbackWrapper _cb _ offset n_chars _ = do
    result <- _cb  offset n_chars
    let result' = (fromIntegral . fromEnum) result
    return result'

onIMContextDeleteSurrounding :: (GObject a, MonadIO m) => a -> IMContextDeleteSurroundingCallback -> m SignalHandlerId
onIMContextDeleteSurrounding obj cb = liftIO $ connectIMContextDeleteSurrounding obj cb SignalConnectBefore
afterIMContextDeleteSurrounding :: (GObject a, MonadIO m) => a -> IMContextDeleteSurroundingCallback -> m SignalHandlerId
afterIMContextDeleteSurrounding obj cb = connectIMContextDeleteSurrounding obj cb SignalConnectAfter

connectIMContextDeleteSurrounding :: (GObject a, MonadIO m) =>
                                     a -> IMContextDeleteSurroundingCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextDeleteSurrounding obj cb after = liftIO $ do
    cb' <- mkIMContextDeleteSurroundingCallback (iMContextDeleteSurroundingCallbackWrapper cb)
    connectSignalFunPtr obj "delete-surrounding" cb' after

-- signal IMContext::preedit-changed
type IMContextPreeditChangedCallback =
    IO ()

noIMContextPreeditChangedCallback :: Maybe IMContextPreeditChangedCallback
noIMContextPreeditChangedCallback = Nothing

type IMContextPreeditChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkIMContextPreeditChangedCallback :: IMContextPreeditChangedCallbackC -> IO (FunPtr IMContextPreeditChangedCallbackC)

iMContextPreeditChangedClosure :: IMContextPreeditChangedCallback -> IO Closure
iMContextPreeditChangedClosure cb = newCClosure =<< mkIMContextPreeditChangedCallback wrapped
    where wrapped = iMContextPreeditChangedCallbackWrapper cb

iMContextPreeditChangedCallbackWrapper ::
    IMContextPreeditChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
iMContextPreeditChangedCallbackWrapper _cb _ _ = do
    _cb 

onIMContextPreeditChanged :: (GObject a, MonadIO m) => a -> IMContextPreeditChangedCallback -> m SignalHandlerId
onIMContextPreeditChanged obj cb = liftIO $ connectIMContextPreeditChanged obj cb SignalConnectBefore
afterIMContextPreeditChanged :: (GObject a, MonadIO m) => a -> IMContextPreeditChangedCallback -> m SignalHandlerId
afterIMContextPreeditChanged obj cb = connectIMContextPreeditChanged obj cb SignalConnectAfter

connectIMContextPreeditChanged :: (GObject a, MonadIO m) =>
                                  a -> IMContextPreeditChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextPreeditChanged obj cb after = liftIO $ do
    cb' <- mkIMContextPreeditChangedCallback (iMContextPreeditChangedCallbackWrapper cb)
    connectSignalFunPtr obj "preedit-changed" cb' after

-- signal IMContext::preedit-end
type IMContextPreeditEndCallback =
    IO ()

noIMContextPreeditEndCallback :: Maybe IMContextPreeditEndCallback
noIMContextPreeditEndCallback = Nothing

type IMContextPreeditEndCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkIMContextPreeditEndCallback :: IMContextPreeditEndCallbackC -> IO (FunPtr IMContextPreeditEndCallbackC)

iMContextPreeditEndClosure :: IMContextPreeditEndCallback -> IO Closure
iMContextPreeditEndClosure cb = newCClosure =<< mkIMContextPreeditEndCallback wrapped
    where wrapped = iMContextPreeditEndCallbackWrapper cb

iMContextPreeditEndCallbackWrapper ::
    IMContextPreeditEndCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
iMContextPreeditEndCallbackWrapper _cb _ _ = do
    _cb 

onIMContextPreeditEnd :: (GObject a, MonadIO m) => a -> IMContextPreeditEndCallback -> m SignalHandlerId
onIMContextPreeditEnd obj cb = liftIO $ connectIMContextPreeditEnd obj cb SignalConnectBefore
afterIMContextPreeditEnd :: (GObject a, MonadIO m) => a -> IMContextPreeditEndCallback -> m SignalHandlerId
afterIMContextPreeditEnd obj cb = connectIMContextPreeditEnd obj cb SignalConnectAfter

connectIMContextPreeditEnd :: (GObject a, MonadIO m) =>
                              a -> IMContextPreeditEndCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextPreeditEnd obj cb after = liftIO $ do
    cb' <- mkIMContextPreeditEndCallback (iMContextPreeditEndCallbackWrapper cb)
    connectSignalFunPtr obj "preedit-end" cb' after

-- signal IMContext::preedit-start
type IMContextPreeditStartCallback =
    IO ()

noIMContextPreeditStartCallback :: Maybe IMContextPreeditStartCallback
noIMContextPreeditStartCallback = Nothing

type IMContextPreeditStartCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkIMContextPreeditStartCallback :: IMContextPreeditStartCallbackC -> IO (FunPtr IMContextPreeditStartCallbackC)

iMContextPreeditStartClosure :: IMContextPreeditStartCallback -> IO Closure
iMContextPreeditStartClosure cb = newCClosure =<< mkIMContextPreeditStartCallback wrapped
    where wrapped = iMContextPreeditStartCallbackWrapper cb

iMContextPreeditStartCallbackWrapper ::
    IMContextPreeditStartCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
iMContextPreeditStartCallbackWrapper _cb _ _ = do
    _cb 

onIMContextPreeditStart :: (GObject a, MonadIO m) => a -> IMContextPreeditStartCallback -> m SignalHandlerId
onIMContextPreeditStart obj cb = liftIO $ connectIMContextPreeditStart obj cb SignalConnectBefore
afterIMContextPreeditStart :: (GObject a, MonadIO m) => a -> IMContextPreeditStartCallback -> m SignalHandlerId
afterIMContextPreeditStart obj cb = connectIMContextPreeditStart obj cb SignalConnectAfter

connectIMContextPreeditStart :: (GObject a, MonadIO m) =>
                                a -> IMContextPreeditStartCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextPreeditStart obj cb after = liftIO $ do
    cb' <- mkIMContextPreeditStartCallback (iMContextPreeditStartCallbackWrapper cb)
    connectSignalFunPtr obj "preedit-start" cb' after

-- signal IMContext::retrieve-surrounding
type IMContextRetrieveSurroundingCallback =
    IO Bool

noIMContextRetrieveSurroundingCallback :: Maybe IMContextRetrieveSurroundingCallback
noIMContextRetrieveSurroundingCallback = Nothing

type IMContextRetrieveSurroundingCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkIMContextRetrieveSurroundingCallback :: IMContextRetrieveSurroundingCallbackC -> IO (FunPtr IMContextRetrieveSurroundingCallbackC)

iMContextRetrieveSurroundingClosure :: IMContextRetrieveSurroundingCallback -> IO Closure
iMContextRetrieveSurroundingClosure cb = newCClosure =<< mkIMContextRetrieveSurroundingCallback wrapped
    where wrapped = iMContextRetrieveSurroundingCallbackWrapper cb

iMContextRetrieveSurroundingCallbackWrapper ::
    IMContextRetrieveSurroundingCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
iMContextRetrieveSurroundingCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onIMContextRetrieveSurrounding :: (GObject a, MonadIO m) => a -> IMContextRetrieveSurroundingCallback -> m SignalHandlerId
onIMContextRetrieveSurrounding obj cb = liftIO $ connectIMContextRetrieveSurrounding obj cb SignalConnectBefore
afterIMContextRetrieveSurrounding :: (GObject a, MonadIO m) => a -> IMContextRetrieveSurroundingCallback -> m SignalHandlerId
afterIMContextRetrieveSurrounding obj cb = connectIMContextRetrieveSurrounding obj cb SignalConnectAfter

connectIMContextRetrieveSurrounding :: (GObject a, MonadIO m) =>
                                       a -> IMContextRetrieveSurroundingCallback -> SignalConnectMode -> m SignalHandlerId
connectIMContextRetrieveSurrounding obj cb after = liftIO $ do
    cb' <- mkIMContextRetrieveSurroundingCallback (iMContextRetrieveSurroundingCallbackWrapper cb)
    connectSignalFunPtr obj "retrieve-surrounding" cb' after

-- struct IMContextInfo
newtype IMContextInfo = IMContextInfo (ForeignPtr IMContextInfo)
noIMContextInfo :: Maybe IMContextInfo
noIMContextInfo = Nothing

iMContextInfoReadContextId :: IMContextInfo -> IO T.Text
iMContextInfoReadContextId s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

iMContextInfoReadContextName :: IMContextInfo -> IO T.Text
iMContextInfoReadContextName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

iMContextInfoReadDomain :: IMContextInfo -> IO T.Text
iMContextInfoReadDomain s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO CString
    val' <- cstringToText val
    return val'

iMContextInfoReadDomainDirname :: IMContextInfo -> IO T.Text
iMContextInfoReadDomainDirname s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO CString
    val' <- cstringToText val
    return val'

iMContextInfoReadDefaultLocales :: IMContextInfo -> IO T.Text
iMContextInfoReadDefaultLocales s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO CString
    val' <- cstringToText val
    return val'

-- object IMContextSimple 
newtype IMContextSimple = IMContextSimple (ForeignPtr IMContextSimple)
noIMContextSimple :: Maybe IMContextSimple
noIMContextSimple = Nothing

foreign import ccall "gtk_im_context_simple_get_type"
    c_gtk_im_context_simple_get_type :: IO GType

type instance ParentTypes IMContextSimple = '[IMContext, GObject.Object]

instance GObject IMContextSimple where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_im_context_simple_get_type
    

class GObject o => IMContextSimpleK o
instance (GObject o, IsDescendantOf IMContextSimple o) => IMContextSimpleK o

toIMContextSimple :: IMContextSimpleK o => o -> IO IMContextSimple
toIMContextSimple = unsafeCastTo IMContextSimple

-- method IMContextSimple::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "IMContextSimple"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_simple_new" gtk_im_context_simple_new :: 
    IO (Ptr IMContextSimple)


iMContextSimpleNew ::
    (MonadIO m) =>
    m IMContextSimple
iMContextSimpleNew  = liftIO $ do
    result <- gtk_im_context_simple_new
    checkUnexpectedReturnNULL "gtk_im_context_simple_new" result
    result' <- (wrapObject IMContextSimple) result
    return result'

-- object IMMulticontext 
newtype IMMulticontext = IMMulticontext (ForeignPtr IMMulticontext)
noIMMulticontext :: Maybe IMMulticontext
noIMMulticontext = Nothing

foreign import ccall "gtk_im_multicontext_get_type"
    c_gtk_im_multicontext_get_type :: IO GType

type instance ParentTypes IMMulticontext = '[IMContext, GObject.Object]

instance GObject IMMulticontext where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_im_multicontext_get_type
    

class GObject o => IMMulticontextK o
instance (GObject o, IsDescendantOf IMMulticontext o) => IMMulticontextK o

toIMMulticontext :: IMMulticontextK o => o -> IO IMMulticontext
toIMMulticontext = unsafeCastTo IMMulticontext

-- method IMMulticontext::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "IMMulticontext"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_multicontext_new" gtk_im_multicontext_new :: 
    IO (Ptr IMMulticontext)


iMMulticontextNew ::
    (MonadIO m) =>
    m IMMulticontext
iMMulticontextNew  = liftIO $ do
    result <- gtk_im_multicontext_new
    checkUnexpectedReturnNULL "gtk_im_multicontext_new" result
    result' <- (wrapObject IMMulticontext) result
    return result'

-- method IMMulticontext::append_menuitems
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMMulticontext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menushell", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMMulticontext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menushell", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_multicontext_append_menuitems" gtk_im_multicontext_append_menuitems :: 
    Ptr IMMulticontext ->                   -- _obj : TInterface "Gtk" "IMMulticontext"
    Ptr MenuShell ->                        -- menushell : TInterface "Gtk" "MenuShell"
    IO ()

{-# DEPRECATED iMMulticontextAppendMenuitems ["(Since version 3.10)","It is better to use the system-wide input","    method framework for changing input methods. Modern","    desktop shells offer on-screen displays for this that","    can triggered with a keyboard shortcut, e.g. Super-Space."]#-}
iMMulticontextAppendMenuitems ::
    (MonadIO m, IMMulticontextK a, MenuShellK b) =>
    a ->                                    -- _obj
    b ->                                    -- menushell
    m ()
iMMulticontextAppendMenuitems _obj menushell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let menushell' = unsafeManagedPtrCastPtr menushell
    gtk_im_multicontext_append_menuitems _obj' menushell'
    touchManagedPtr _obj
    touchManagedPtr menushell
    return ()

-- method IMMulticontext::get_context_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMMulticontext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMMulticontext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_multicontext_get_context_id" gtk_im_multicontext_get_context_id :: 
    Ptr IMMulticontext ->                   -- _obj : TInterface "Gtk" "IMMulticontext"
    IO CString


iMMulticontextGetContextId ::
    (MonadIO m, IMMulticontextK a) =>
    a ->                                    -- _obj
    m T.Text
iMMulticontextGetContextId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_im_multicontext_get_context_id _obj'
    checkUnexpectedReturnNULL "gtk_im_multicontext_get_context_id" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method IMMulticontext::set_context_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMMulticontext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IMMulticontext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_multicontext_set_context_id" gtk_im_multicontext_set_context_id :: 
    Ptr IMMulticontext ->                   -- _obj : TInterface "Gtk" "IMMulticontext"
    CString ->                              -- context_id : TBasicType TUTF8
    IO ()


iMMulticontextSetContextId ::
    (MonadIO m, IMMulticontextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- context_id
    m ()
iMMulticontextSetContextId _obj context_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    context_id' <- textToCString context_id
    gtk_im_multicontext_set_context_id _obj' context_id'
    touchManagedPtr _obj
    freeMem context_id'
    return ()

-- Enum IMPreeditStyle
{-# DEPRECATED IMPreeditStyle ["(Since version 3.10)"]#-}
data IMPreeditStyle = 
      IMPreeditStyleNothing
    | IMPreeditStyleCallback
    | IMPreeditStyleNone
    | AnotherIMPreeditStyle Int
    deriving (Show, Eq)

instance Enum IMPreeditStyle where
    fromEnum IMPreeditStyleNothing = 0
    fromEnum IMPreeditStyleCallback = 1
    fromEnum IMPreeditStyleNone = 2
    fromEnum (AnotherIMPreeditStyle k) = k

    toEnum 0 = IMPreeditStyleNothing
    toEnum 1 = IMPreeditStyleCallback
    toEnum 2 = IMPreeditStyleNone
    toEnum k = AnotherIMPreeditStyle k

foreign import ccall "gtk_im_preedit_style_get_type" c_gtk_im_preedit_style_get_type :: 
    IO GType

instance BoxedEnum IMPreeditStyle where
    boxedEnumType _ = c_gtk_im_preedit_style_get_type

-- Enum IMStatusStyle
{-# DEPRECATED IMStatusStyle ["(Since version 3.10)"]#-}
data IMStatusStyle = 
      IMStatusStyleNothing
    | IMStatusStyleCallback
    | IMStatusStyleNone
    | AnotherIMStatusStyle Int
    deriving (Show, Eq)

instance Enum IMStatusStyle where
    fromEnum IMStatusStyleNothing = 0
    fromEnum IMStatusStyleCallback = 1
    fromEnum IMStatusStyleNone = 2
    fromEnum (AnotherIMStatusStyle k) = k

    toEnum 0 = IMStatusStyleNothing
    toEnum 1 = IMStatusStyleCallback
    toEnum 2 = IMStatusStyleNone
    toEnum k = AnotherIMStatusStyle k

foreign import ccall "gtk_im_status_style_get_type" c_gtk_im_status_style_get_type :: 
    IO GType

instance BoxedEnum IMStatusStyle where
    boxedEnumType _ = c_gtk_im_status_style_get_type

-- object IconFactory 
newtype IconFactory = IconFactory (ForeignPtr IconFactory)
noIconFactory :: Maybe IconFactory
noIconFactory = Nothing

foreign import ccall "gtk_icon_factory_get_type"
    c_gtk_icon_factory_get_type :: IO GType

type instance ParentTypes IconFactory = '[GObject.Object, Buildable]

instance GObject IconFactory where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_icon_factory_get_type
    

class GObject o => IconFactoryK o
instance (GObject o, IsDescendantOf IconFactory o) => IconFactoryK o

toIconFactory :: IconFactoryK o => o -> IO IconFactory
toIconFactory = unsafeCastTo IconFactory

-- method IconFactory::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "IconFactory"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_factory_new" gtk_icon_factory_new :: 
    IO (Ptr IconFactory)

{-# DEPRECATED iconFactoryNew ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconFactoryNew ::
    (MonadIO m) =>
    m IconFactory
iconFactoryNew  = liftIO $ do
    result <- gtk_icon_factory_new
    checkUnexpectedReturnNULL "gtk_icon_factory_new" result
    result' <- (wrapObject IconFactory) result
    return result'

-- method IconFactory::add
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconFactory", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_set", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconFactory", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_set", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_factory_add" gtk_icon_factory_add :: 
    Ptr IconFactory ->                      -- _obj : TInterface "Gtk" "IconFactory"
    CString ->                              -- stock_id : TBasicType TUTF8
    Ptr IconSet ->                          -- icon_set : TInterface "Gtk" "IconSet"
    IO ()

{-# DEPRECATED iconFactoryAdd ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconFactoryAdd ::
    (MonadIO m, IconFactoryK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- stock_id
    IconSet ->                              -- icon_set
    m ()
iconFactoryAdd _obj stock_id icon_set = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    stock_id' <- textToCString stock_id
    let icon_set' = unsafeManagedPtrGetPtr icon_set
    gtk_icon_factory_add _obj' stock_id' icon_set'
    touchManagedPtr _obj
    touchManagedPtr icon_set
    freeMem stock_id'
    return ()

-- method IconFactory::add_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconFactory", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconFactory", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_factory_add_default" gtk_icon_factory_add_default :: 
    Ptr IconFactory ->                      -- _obj : TInterface "Gtk" "IconFactory"
    IO ()

{-# DEPRECATED iconFactoryAddDefault ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconFactoryAddDefault ::
    (MonadIO m, IconFactoryK a) =>
    a ->                                    -- _obj
    m ()
iconFactoryAddDefault _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_factory_add_default _obj'
    touchManagedPtr _obj
    return ()

-- method IconFactory::lookup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconFactory", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconFactory", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconSet"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_factory_lookup" gtk_icon_factory_lookup :: 
    Ptr IconFactory ->                      -- _obj : TInterface "Gtk" "IconFactory"
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr IconSet)

{-# DEPRECATED iconFactoryLookup ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconFactoryLookup ::
    (MonadIO m, IconFactoryK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- stock_id
    m IconSet
iconFactoryLookup _obj stock_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    stock_id' <- textToCString stock_id
    result <- gtk_icon_factory_lookup _obj' stock_id'
    checkUnexpectedReturnNULL "gtk_icon_factory_lookup" result
    result' <- (newBoxed IconSet) result
    touchManagedPtr _obj
    freeMem stock_id'
    return result'

-- method IconFactory::remove_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconFactory", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconFactory", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_factory_remove_default" gtk_icon_factory_remove_default :: 
    Ptr IconFactory ->                      -- _obj : TInterface "Gtk" "IconFactory"
    IO ()

{-# DEPRECATED iconFactoryRemoveDefault ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconFactoryRemoveDefault ::
    (MonadIO m, IconFactoryK a) =>
    a ->                                    -- _obj
    m ()
iconFactoryRemoveDefault _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_factory_remove_default _obj'
    touchManagedPtr _obj
    return ()

-- method IconFactory::lookup_default
-- method type : MemberFunction
-- Args : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconSet"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_factory_lookup_default" gtk_icon_factory_lookup_default :: 
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr IconSet)

{-# DEPRECATED iconFactoryLookupDefault ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconFactoryLookupDefault ::
    (MonadIO m) =>
    T.Text ->                               -- stock_id
    m IconSet
iconFactoryLookupDefault stock_id = liftIO $ do
    stock_id' <- textToCString stock_id
    result <- gtk_icon_factory_lookup_default stock_id'
    checkUnexpectedReturnNULL "gtk_icon_factory_lookup_default" result
    result' <- (newBoxed IconSet) result
    freeMem stock_id'
    return result'

-- object IconInfo 
newtype IconInfo = IconInfo (ForeignPtr IconInfo)
noIconInfo :: Maybe IconInfo
noIconInfo = Nothing

foreign import ccall "gtk_icon_info_get_type"
    c_gtk_icon_info_get_type :: IO GType

type instance ParentTypes IconInfo = '[GObject.Object]

instance GObject IconInfo where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_icon_info_get_type
    

class GObject o => IconInfoK o
instance (GObject o, IsDescendantOf IconInfo o) => IconInfoK o

toIconInfo :: IconInfoK o => o -> IO IconInfo
toIconInfo = unsafeCastTo IconInfo

-- method IconInfo::new_for_pixbuf
-- method type : Constructor
-- Args : [Arg {argName = "icon_theme", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon_theme", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconInfo"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_new_for_pixbuf" gtk_icon_info_new_for_pixbuf :: 
    Ptr IconTheme ->                        -- icon_theme : TInterface "Gtk" "IconTheme"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO (Ptr IconInfo)


iconInfoNewForPixbuf ::
    (MonadIO m, IconThemeK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- icon_theme
    b ->                                    -- pixbuf
    m IconInfo
iconInfoNewForPixbuf icon_theme pixbuf = liftIO $ do
    let icon_theme' = unsafeManagedPtrCastPtr icon_theme
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    result <- gtk_icon_info_new_for_pixbuf icon_theme' pixbuf'
    checkUnexpectedReturnNULL "gtk_icon_info_new_for_pixbuf" result
    result' <- (wrapObject IconInfo) result
    touchManagedPtr icon_theme
    touchManagedPtr pixbuf
    return result'

-- method IconInfo::get_attach_points
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "points", argType = TCArray False (-1) 2 (TInterface "Gdk" "Point"), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "n_points", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_points", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_get_attach_points" gtk_icon_info_get_attach_points :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr (Ptr Gdk.Point) ->                  -- points : TCArray False (-1) 2 (TInterface "Gdk" "Point")
    Ptr Int32 ->                            -- n_points : TBasicType TInt32
    IO CInt

{-# DEPRECATED iconInfoGetAttachPoints ["(Since version 3.14)","Attachment points are deprecated"]#-}
iconInfoGetAttachPoints ::
    (MonadIO m, IconInfoK a) =>
    a ->                                    -- _obj
    m (Bool,[Gdk.Point])
iconInfoGetAttachPoints _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    points <- allocMem :: IO (Ptr (Ptr Gdk.Point))
    n_points <- allocMem :: IO (Ptr Int32)
    result <- gtk_icon_info_get_attach_points _obj' points n_points
    n_points' <- peek n_points
    let result' = (/= 0) result
    points' <- peek points
    points'' <- (unpackBlockArrayWithLength 8 n_points') points'
    points''' <- mapM (wrapPtr Gdk.Point) points''
    freeMem points'
    touchManagedPtr _obj
    freeMem points
    freeMem n_points
    return (result', points''')

-- method IconInfo::get_base_scale
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_get_base_scale" gtk_icon_info_get_base_scale :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    IO Int32


iconInfoGetBaseScale ::
    (MonadIO m, IconInfoK a) =>
    a ->                                    -- _obj
    m Int32
iconInfoGetBaseScale _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_info_get_base_scale _obj'
    touchManagedPtr _obj
    return result

-- method IconInfo::get_base_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_get_base_size" gtk_icon_info_get_base_size :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    IO Int32


iconInfoGetBaseSize ::
    (MonadIO m, IconInfoK a) =>
    a ->                                    -- _obj
    m Int32
iconInfoGetBaseSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_info_get_base_size _obj'
    touchManagedPtr _obj
    return result

-- method IconInfo::get_builtin_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_get_builtin_pixbuf" gtk_icon_info_get_builtin_pixbuf :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED iconInfoGetBuiltinPixbuf ["(Since version 3.14)","This function is deprecated, use","    gtk_icon_theme_add_resource_path() instead of builtin icons."]#-}
iconInfoGetBuiltinPixbuf ::
    (MonadIO m, IconInfoK a) =>
    a ->                                    -- _obj
    m GdkPixbuf.Pixbuf
iconInfoGetBuiltinPixbuf _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_info_get_builtin_pixbuf _obj'
    checkUnexpectedReturnNULL "gtk_icon_info_get_builtin_pixbuf" result
    result' <- (newObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method IconInfo::get_display_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_get_display_name" gtk_icon_info_get_display_name :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    IO CString

{-# DEPRECATED iconInfoGetDisplayName ["(Since version 3.14)","Display names are deprecated"]#-}
iconInfoGetDisplayName ::
    (MonadIO m, IconInfoK a) =>
    a ->                                    -- _obj
    m T.Text
iconInfoGetDisplayName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_info_get_display_name _obj'
    checkUnexpectedReturnNULL "gtk_icon_info_get_display_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method IconInfo::get_embedded_rect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rectangle", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_get_embedded_rect" gtk_icon_info_get_embedded_rect :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr Gdk.Rectangle ->                    -- rectangle : TInterface "Gdk" "Rectangle"
    IO CInt

{-# DEPRECATED iconInfoGetEmbeddedRect ["(Since version 3.14)","Embedded rectangles are deprecated"]#-}
iconInfoGetEmbeddedRect ::
    (MonadIO m, IconInfoK a) =>
    a ->                                    -- _obj
    m (Bool,Gdk.Rectangle)
iconInfoGetEmbeddedRect _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    rectangle <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    result <- gtk_icon_info_get_embedded_rect _obj' rectangle
    let result' = (/= 0) result
    rectangle' <- (wrapBoxed Gdk.Rectangle) rectangle
    touchManagedPtr _obj
    return (result', rectangle')

-- method IconInfo::get_filename
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFileName
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_get_filename" gtk_icon_info_get_filename :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    IO CString


iconInfoGetFilename ::
    (MonadIO m, IconInfoK a) =>
    a ->                                    -- _obj
    m [Char]
iconInfoGetFilename _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_info_get_filename _obj'
    checkUnexpectedReturnNULL "gtk_icon_info_get_filename" result
    result' <- cstringToString result
    touchManagedPtr _obj
    return result'

-- method IconInfo::is_symbolic
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_is_symbolic" gtk_icon_info_is_symbolic :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    IO CInt


iconInfoIsSymbolic ::
    (MonadIO m, IconInfoK a) =>
    a ->                                    -- _obj
    m Bool
iconInfoIsSymbolic _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_info_is_symbolic _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method IconInfo::load_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_icon_info_load_icon" gtk_icon_info_load_icon :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr GdkPixbuf.Pixbuf)


iconInfoLoadIcon ::
    (MonadIO m, IconInfoK a) =>
    a ->                                    -- _obj
    m GdkPixbuf.Pixbuf
iconInfoLoadIcon _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    onException (do
        result <- propagateGError $ gtk_icon_info_load_icon _obj'
        checkUnexpectedReturnNULL "gtk_icon_info_load_icon" result
        result' <- (wrapObject GdkPixbuf.Pixbuf) result
        touchManagedPtr _obj
        return result'
     ) (do
        return ()
     )

-- method IconInfo::load_icon_async
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_load_icon_async" gtk_icon_info_load_icon_async :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


iconInfoLoadIconAsync ::
    (MonadIO m, IconInfoK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
iconInfoLoadIconAsync _obj cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    gtk_icon_info_load_icon_async _obj' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    whenJust cancellable touchManagedPtr
    return ()

-- method IconInfo::load_icon_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_icon_info_load_icon_finish" gtk_icon_info_load_icon_finish :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr Gio.AsyncResult ->                  -- res : TInterface "Gio" "AsyncResult"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr GdkPixbuf.Pixbuf)


iconInfoLoadIconFinish ::
    (MonadIO m, IconInfoK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- res
    m GdkPixbuf.Pixbuf
iconInfoLoadIconFinish _obj res = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let res' = unsafeManagedPtrCastPtr res
    onException (do
        result <- propagateGError $ gtk_icon_info_load_icon_finish _obj' res'
        checkUnexpectedReturnNULL "gtk_icon_info_load_icon_finish" result
        result' <- (wrapObject GdkPixbuf.Pixbuf) result
        touchManagedPtr _obj
        touchManagedPtr res
        return result'
     ) (do
        return ()
     )

-- method IconInfo::load_surface
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "for_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "for_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Surface"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_icon_info_load_surface" gtk_icon_info_load_surface :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr Gdk.Window ->                       -- for_window : TInterface "Gdk" "Window"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Cairo.Surface)


iconInfoLoadSurface ::
    (MonadIO m, IconInfoK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- for_window
    m Cairo.Surface
iconInfoLoadSurface _obj for_window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFor_window <- case for_window of
        Nothing -> return nullPtr
        Just jFor_window -> do
            let jFor_window' = unsafeManagedPtrCastPtr jFor_window
            return jFor_window'
    onException (do
        result <- propagateGError $ gtk_icon_info_load_surface _obj' maybeFor_window
        checkUnexpectedReturnNULL "gtk_icon_info_load_surface" result
        result' <- (wrapBoxed Cairo.Surface) result
        touchManagedPtr _obj
        whenJust for_window touchManagedPtr
        return result'
     ) (do
        return ()
     )

-- method IconInfo::load_symbolic
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fg", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "success_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "warning_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "was_symbolic", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fg", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "success_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "warning_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_icon_info_load_symbolic" gtk_icon_info_load_symbolic :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr Gdk.RGBA ->                         -- fg : TInterface "Gdk" "RGBA"
    Ptr Gdk.RGBA ->                         -- success_color : TInterface "Gdk" "RGBA"
    Ptr Gdk.RGBA ->                         -- warning_color : TInterface "Gdk" "RGBA"
    Ptr Gdk.RGBA ->                         -- error_color : TInterface "Gdk" "RGBA"
    Ptr CInt ->                             -- was_symbolic : TBasicType TBoolean
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr GdkPixbuf.Pixbuf)


iconInfoLoadSymbolic ::
    (MonadIO m, IconInfoK a) =>
    a ->                                    -- _obj
    Gdk.RGBA ->                             -- fg
    Maybe (Gdk.RGBA) ->                     -- success_color
    Maybe (Gdk.RGBA) ->                     -- warning_color
    Maybe (Gdk.RGBA) ->                     -- error_color
    m (GdkPixbuf.Pixbuf,Bool)
iconInfoLoadSymbolic _obj fg success_color warning_color error_color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let fg' = unsafeManagedPtrGetPtr fg
    maybeSuccess_color <- case success_color of
        Nothing -> return nullPtr
        Just jSuccess_color -> do
            let jSuccess_color' = unsafeManagedPtrGetPtr jSuccess_color
            return jSuccess_color'
    maybeWarning_color <- case warning_color of
        Nothing -> return nullPtr
        Just jWarning_color -> do
            let jWarning_color' = unsafeManagedPtrGetPtr jWarning_color
            return jWarning_color'
    maybeError_color <- case error_color of
        Nothing -> return nullPtr
        Just jError_color -> do
            let jError_color' = unsafeManagedPtrGetPtr jError_color
            return jError_color'
    was_symbolic <- allocMem :: IO (Ptr CInt)
    onException (do
        result <- propagateGError $ gtk_icon_info_load_symbolic _obj' fg' maybeSuccess_color maybeWarning_color maybeError_color was_symbolic
        checkUnexpectedReturnNULL "gtk_icon_info_load_symbolic" result
        result' <- (wrapObject GdkPixbuf.Pixbuf) result
        was_symbolic' <- peek was_symbolic
        let was_symbolic'' = (/= 0) was_symbolic'
        touchManagedPtr _obj
        touchManagedPtr fg
        whenJust success_color touchManagedPtr
        whenJust warning_color touchManagedPtr
        whenJust error_color touchManagedPtr
        freeMem was_symbolic
        return (result', was_symbolic'')
     ) (do
        freeMem was_symbolic
     )

-- method IconInfo::load_symbolic_async
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fg", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "success_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "warning_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 7, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fg", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "success_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "warning_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 7, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_load_symbolic_async" gtk_icon_info_load_symbolic_async :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr Gdk.RGBA ->                         -- fg : TInterface "Gdk" "RGBA"
    Ptr Gdk.RGBA ->                         -- success_color : TInterface "Gdk" "RGBA"
    Ptr Gdk.RGBA ->                         -- warning_color : TInterface "Gdk" "RGBA"
    Ptr Gdk.RGBA ->                         -- error_color : TInterface "Gdk" "RGBA"
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


iconInfoLoadSymbolicAsync ::
    (MonadIO m, IconInfoK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    Gdk.RGBA ->                             -- fg
    Maybe (Gdk.RGBA) ->                     -- success_color
    Maybe (Gdk.RGBA) ->                     -- warning_color
    Maybe (Gdk.RGBA) ->                     -- error_color
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
iconInfoLoadSymbolicAsync _obj fg success_color warning_color error_color cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let fg' = unsafeManagedPtrGetPtr fg
    maybeSuccess_color <- case success_color of
        Nothing -> return nullPtr
        Just jSuccess_color -> do
            let jSuccess_color' = unsafeManagedPtrGetPtr jSuccess_color
            return jSuccess_color'
    maybeWarning_color <- case warning_color of
        Nothing -> return nullPtr
        Just jWarning_color -> do
            let jWarning_color' = unsafeManagedPtrGetPtr jWarning_color
            return jWarning_color'
    maybeError_color <- case error_color of
        Nothing -> return nullPtr
        Just jError_color -> do
            let jError_color' = unsafeManagedPtrGetPtr jError_color
            return jError_color'
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    gtk_icon_info_load_symbolic_async _obj' fg' maybeSuccess_color maybeWarning_color maybeError_color maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    touchManagedPtr fg
    whenJust success_color touchManagedPtr
    whenJust warning_color touchManagedPtr
    whenJust error_color touchManagedPtr
    whenJust cancellable touchManagedPtr
    return ()

-- method IconInfo::load_symbolic_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "was_symbolic", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_icon_info_load_symbolic_finish" gtk_icon_info_load_symbolic_finish :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr Gio.AsyncResult ->                  -- res : TInterface "Gio" "AsyncResult"
    Ptr CInt ->                             -- was_symbolic : TBasicType TBoolean
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr GdkPixbuf.Pixbuf)


iconInfoLoadSymbolicFinish ::
    (MonadIO m, IconInfoK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- res
    m (GdkPixbuf.Pixbuf,Bool)
iconInfoLoadSymbolicFinish _obj res = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let res' = unsafeManagedPtrCastPtr res
    was_symbolic <- allocMem :: IO (Ptr CInt)
    onException (do
        result <- propagateGError $ gtk_icon_info_load_symbolic_finish _obj' res' was_symbolic
        checkUnexpectedReturnNULL "gtk_icon_info_load_symbolic_finish" result
        result' <- (wrapObject GdkPixbuf.Pixbuf) result
        was_symbolic' <- peek was_symbolic
        let was_symbolic'' = (/= 0) was_symbolic'
        touchManagedPtr _obj
        touchManagedPtr res
        freeMem was_symbolic
        return (result', was_symbolic'')
     ) (do
        freeMem was_symbolic
     )

-- method IconInfo::load_symbolic_for_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "was_symbolic", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_icon_info_load_symbolic_for_context" gtk_icon_info_load_symbolic_for_context :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr CInt ->                             -- was_symbolic : TBasicType TBoolean
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr GdkPixbuf.Pixbuf)


iconInfoLoadSymbolicForContext ::
    (MonadIO m, IconInfoK a, StyleContextK b) =>
    a ->                                    -- _obj
    b ->                                    -- context
    m (GdkPixbuf.Pixbuf,Bool)
iconInfoLoadSymbolicForContext _obj context = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    was_symbolic <- allocMem :: IO (Ptr CInt)
    onException (do
        result <- propagateGError $ gtk_icon_info_load_symbolic_for_context _obj' context' was_symbolic
        checkUnexpectedReturnNULL "gtk_icon_info_load_symbolic_for_context" result
        result' <- (wrapObject GdkPixbuf.Pixbuf) result
        was_symbolic' <- peek was_symbolic
        let was_symbolic'' = (/= 0) was_symbolic'
        touchManagedPtr _obj
        touchManagedPtr context
        freeMem was_symbolic
        return (result', was_symbolic'')
     ) (do
        freeMem was_symbolic
     )

-- method IconInfo::load_symbolic_for_context_async
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_load_symbolic_for_context_async" gtk_icon_info_load_symbolic_for_context_async :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


iconInfoLoadSymbolicForContextAsync ::
    (MonadIO m, IconInfoK a, StyleContextK b, Gio.CancellableK c) =>
    a ->                                    -- _obj
    b ->                                    -- context
    Maybe (c) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
iconInfoLoadSymbolicForContextAsync _obj context cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    gtk_icon_info_load_symbolic_for_context_async _obj' context' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    touchManagedPtr context
    whenJust cancellable touchManagedPtr
    return ()

-- method IconInfo::load_symbolic_for_context_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "was_symbolic", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_icon_info_load_symbolic_for_context_finish" gtk_icon_info_load_symbolic_for_context_finish :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr Gio.AsyncResult ->                  -- res : TInterface "Gio" "AsyncResult"
    Ptr CInt ->                             -- was_symbolic : TBasicType TBoolean
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr GdkPixbuf.Pixbuf)


iconInfoLoadSymbolicForContextFinish ::
    (MonadIO m, IconInfoK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- res
    m (GdkPixbuf.Pixbuf,Bool)
iconInfoLoadSymbolicForContextFinish _obj res = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let res' = unsafeManagedPtrCastPtr res
    was_symbolic <- allocMem :: IO (Ptr CInt)
    onException (do
        result <- propagateGError $ gtk_icon_info_load_symbolic_for_context_finish _obj' res' was_symbolic
        checkUnexpectedReturnNULL "gtk_icon_info_load_symbolic_for_context_finish" result
        result' <- (wrapObject GdkPixbuf.Pixbuf) result
        was_symbolic' <- peek was_symbolic
        let was_symbolic'' = (/= 0) was_symbolic'
        touchManagedPtr _obj
        touchManagedPtr res
        freeMem was_symbolic
        return (result', was_symbolic'')
     ) (do
        freeMem was_symbolic
     )

-- method IconInfo::load_symbolic_for_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "was_symbolic", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_icon_info_load_symbolic_for_style" gtk_icon_info_load_symbolic_for_style :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    Ptr CInt ->                             -- was_symbolic : TBasicType TBoolean
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED iconInfoLoadSymbolicForStyle ["(Since version 3.0)","Use gtk_icon_info_load_symbolic_for_context() instead"]#-}
iconInfoLoadSymbolicForStyle ::
    (MonadIO m, IconInfoK a, StyleK b) =>
    a ->                                    -- _obj
    b ->                                    -- style
    StateType ->                            -- state
    m (GdkPixbuf.Pixbuf,Bool)
iconInfoLoadSymbolicForStyle _obj style state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let style' = unsafeManagedPtrCastPtr style
    let state' = (fromIntegral . fromEnum) state
    was_symbolic <- allocMem :: IO (Ptr CInt)
    onException (do
        result <- propagateGError $ gtk_icon_info_load_symbolic_for_style _obj' style' state' was_symbolic
        checkUnexpectedReturnNULL "gtk_icon_info_load_symbolic_for_style" result
        result' <- (wrapObject GdkPixbuf.Pixbuf) result
        was_symbolic' <- peek was_symbolic
        let was_symbolic'' = (/= 0) was_symbolic'
        touchManagedPtr _obj
        touchManagedPtr style
        freeMem was_symbolic
        return (result', was_symbolic'')
     ) (do
        freeMem was_symbolic
     )

-- method IconInfo::set_raw_coordinates
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "raw_coordinates", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "raw_coordinates", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_info_set_raw_coordinates" gtk_icon_info_set_raw_coordinates :: 
    Ptr IconInfo ->                         -- _obj : TInterface "Gtk" "IconInfo"
    CInt ->                                 -- raw_coordinates : TBasicType TBoolean
    IO ()

{-# DEPRECATED iconInfoSetRawCoordinates ["(Since version 3.14)","Embedded rectangles and attachment points are deprecated"]#-}
iconInfoSetRawCoordinates ::
    (MonadIO m, IconInfoK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- raw_coordinates
    m ()
iconInfoSetRawCoordinates _obj raw_coordinates = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let raw_coordinates' = (fromIntegral . fromEnum) raw_coordinates
    gtk_icon_info_set_raw_coordinates _obj' raw_coordinates'
    touchManagedPtr _obj
    return ()

-- Flags IconLookupFlags

data IconLookupFlags = 
      IconLookupFlagsNoSvg
    | IconLookupFlagsForceSvg
    | IconLookupFlagsUseBuiltin
    | IconLookupFlagsGenericFallback
    | IconLookupFlagsForceSize
    | IconLookupFlagsForceRegular
    | IconLookupFlagsForceSymbolic
    | IconLookupFlagsDirLtr
    | IconLookupFlagsDirRtl
    | AnotherIconLookupFlags Int
    deriving (Show, Eq)

instance Enum IconLookupFlags where
    fromEnum IconLookupFlagsNoSvg = 1
    fromEnum IconLookupFlagsForceSvg = 2
    fromEnum IconLookupFlagsUseBuiltin = 4
    fromEnum IconLookupFlagsGenericFallback = 8
    fromEnum IconLookupFlagsForceSize = 16
    fromEnum IconLookupFlagsForceRegular = 32
    fromEnum IconLookupFlagsForceSymbolic = 64
    fromEnum IconLookupFlagsDirLtr = 128
    fromEnum IconLookupFlagsDirRtl = 256
    fromEnum (AnotherIconLookupFlags k) = k

    toEnum 1 = IconLookupFlagsNoSvg
    toEnum 2 = IconLookupFlagsForceSvg
    toEnum 4 = IconLookupFlagsUseBuiltin
    toEnum 8 = IconLookupFlagsGenericFallback
    toEnum 16 = IconLookupFlagsForceSize
    toEnum 32 = IconLookupFlagsForceRegular
    toEnum 64 = IconLookupFlagsForceSymbolic
    toEnum 128 = IconLookupFlagsDirLtr
    toEnum 256 = IconLookupFlagsDirRtl
    toEnum k = AnotherIconLookupFlags k

foreign import ccall "gtk_icon_lookup_flags_get_type" c_gtk_icon_lookup_flags_get_type :: 
    IO GType

instance BoxedEnum IconLookupFlags where
    boxedEnumType _ = c_gtk_icon_lookup_flags_get_type

instance IsGFlag IconLookupFlags

-- struct IconSet
newtype IconSet = IconSet (ForeignPtr IconSet)
noIconSet :: Maybe IconSet
noIconSet = Nothing

foreign import ccall "gtk_icon_set_get_type" c_gtk_icon_set_get_type :: 
    IO GType

instance BoxedObject IconSet where
    boxedType _ = c_gtk_icon_set_get_type

-- method IconSet::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "IconSet"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_set_new" gtk_icon_set_new :: 
    IO (Ptr IconSet)

{-# DEPRECATED iconSetNew ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSetNew ::
    (MonadIO m) =>
    m IconSet
iconSetNew  = liftIO $ do
    result <- gtk_icon_set_new
    checkUnexpectedReturnNULL "gtk_icon_set_new" result
    result' <- (wrapBoxed IconSet) result
    return result'

-- method IconSet::new_from_pixbuf
-- method type : Constructor
-- Args : [Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconSet"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_set_new_from_pixbuf" gtk_icon_set_new_from_pixbuf :: 
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO (Ptr IconSet)

{-# DEPRECATED iconSetNewFromPixbuf ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSetNewFromPixbuf ::
    (MonadIO m, GdkPixbuf.PixbufK a) =>
    a ->                                    -- pixbuf
    m IconSet
iconSetNewFromPixbuf pixbuf = liftIO $ do
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    result <- gtk_icon_set_new_from_pixbuf pixbuf'
    checkUnexpectedReturnNULL "gtk_icon_set_new_from_pixbuf" result
    result' <- (wrapBoxed IconSet) result
    touchManagedPtr pixbuf
    return result'

-- method IconSet::add_source
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "source", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "source", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_set_add_source" gtk_icon_set_add_source :: 
    Ptr IconSet ->                          -- _obj : TInterface "Gtk" "IconSet"
    Ptr IconSource ->                       -- source : TInterface "Gtk" "IconSource"
    IO ()

{-# DEPRECATED iconSetAddSource ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSetAddSource ::
    (MonadIO m) =>
    IconSet ->                              -- _obj
    IconSource ->                           -- source
    m ()
iconSetAddSource _obj source = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let source' = unsafeManagedPtrGetPtr source
    gtk_icon_set_add_source _obj' source'
    touchManagedPtr _obj
    touchManagedPtr source
    return ()

-- method IconSet::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconSet"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_set_copy" gtk_icon_set_copy :: 
    Ptr IconSet ->                          -- _obj : TInterface "Gtk" "IconSet"
    IO (Ptr IconSet)

{-# DEPRECATED iconSetCopy ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSetCopy ::
    (MonadIO m) =>
    IconSet ->                              -- _obj
    m IconSet
iconSetCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_set_copy _obj'
    checkUnexpectedReturnNULL "gtk_icon_set_copy" result
    result' <- (wrapBoxed IconSet) result
    touchManagedPtr _obj
    return result'

-- method IconSet::get_sizes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sizes", argType = TCArray False (-1) 2 (TBasicType TInt32), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "n_sizes", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_sizes", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_set_get_sizes" gtk_icon_set_get_sizes :: 
    Ptr IconSet ->                          -- _obj : TInterface "Gtk" "IconSet"
    Ptr (Ptr Int32) ->                      -- sizes : TCArray False (-1) 2 (TBasicType TInt32)
    Ptr Int32 ->                            -- n_sizes : TBasicType TInt32
    IO ()

{-# DEPRECATED iconSetGetSizes ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSetGetSizes ::
    (MonadIO m) =>
    IconSet ->                              -- _obj
    m ([Int32])
iconSetGetSizes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    sizes <- allocMem :: IO (Ptr (Ptr Int32))
    n_sizes <- allocMem :: IO (Ptr Int32)
    gtk_icon_set_get_sizes _obj' sizes n_sizes
    n_sizes' <- peek n_sizes
    sizes' <- peek sizes
    sizes'' <- (unpackStorableArrayWithLength n_sizes') sizes'
    freeMem sizes'
    touchManagedPtr _obj
    freeMem sizes
    freeMem n_sizes
    return sizes''

-- method IconSet::ref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconSet"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_set_ref" gtk_icon_set_ref :: 
    Ptr IconSet ->                          -- _obj : TInterface "Gtk" "IconSet"
    IO (Ptr IconSet)

{-# DEPRECATED iconSetRef ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSetRef ::
    (MonadIO m) =>
    IconSet ->                              -- _obj
    m IconSet
iconSetRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_set_ref _obj'
    checkUnexpectedReturnNULL "gtk_icon_set_ref" result
    result' <- (wrapBoxed IconSet) result
    touchManagedPtr _obj
    return result'

-- method IconSet::render_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_set_render_icon" gtk_icon_set_render_icon :: 
    Ptr IconSet ->                          -- _obj : TInterface "Gtk" "IconSet"
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    CUInt ->                                -- direction : TInterface "Gtk" "TextDirection"
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    Int32 ->                                -- size : TBasicType TInt32
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED iconSetRenderIcon ["(Since version 3.0)","Use gtk_icon_set_render_icon_pixbuf() instead"]#-}
iconSetRenderIcon ::
    (MonadIO m, StyleK a, WidgetK b) =>
    IconSet ->                              -- _obj
    Maybe (a) ->                            -- style
    TextDirection ->                        -- direction
    StateType ->                            -- state
    Int32 ->                                -- size
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    m GdkPixbuf.Pixbuf
iconSetRenderIcon _obj style direction state size widget detail = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    maybeStyle <- case style of
        Nothing -> return nullPtr
        Just jStyle -> do
            let jStyle' = unsafeManagedPtrCastPtr jStyle
            return jStyle'
    let direction' = (fromIntegral . fromEnum) direction
    let state' = (fromIntegral . fromEnum) state
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    result <- gtk_icon_set_render_icon _obj' maybeStyle direction' state' size maybeWidget maybeDetail
    checkUnexpectedReturnNULL "gtk_icon_set_render_icon" result
    result' <- (wrapObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    whenJust style touchManagedPtr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return result'

-- method IconSet::render_icon_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_set_render_icon_pixbuf" gtk_icon_set_render_icon_pixbuf :: 
    Ptr IconSet ->                          -- _obj : TInterface "Gtk" "IconSet"
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Int32 ->                                -- size : TBasicType TInt32
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED iconSetRenderIconPixbuf ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSetRenderIconPixbuf ::
    (MonadIO m, StyleContextK a) =>
    IconSet ->                              -- _obj
    a ->                                    -- context
    Int32 ->                                -- size
    m GdkPixbuf.Pixbuf
iconSetRenderIconPixbuf _obj context size = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    result <- gtk_icon_set_render_icon_pixbuf _obj' context' size
    checkUnexpectedReturnNULL "gtk_icon_set_render_icon_pixbuf" result
    result' <- (wrapObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    touchManagedPtr context
    return result'

-- method IconSet::render_icon_surface
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "for_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "for_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Surface"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_set_render_icon_surface" gtk_icon_set_render_icon_surface :: 
    Ptr IconSet ->                          -- _obj : TInterface "Gtk" "IconSet"
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Int32 ->                                -- size : TBasicType TInt32
    Int32 ->                                -- scale : TBasicType TInt32
    Ptr Gdk.Window ->                       -- for_window : TInterface "Gdk" "Window"
    IO (Ptr Cairo.Surface)

{-# DEPRECATED iconSetRenderIconSurface ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSetRenderIconSurface ::
    (MonadIO m, StyleContextK a, Gdk.WindowK b) =>
    IconSet ->                              -- _obj
    a ->                                    -- context
    Int32 ->                                -- size
    Int32 ->                                -- scale
    Maybe (b) ->                            -- for_window
    m Cairo.Surface
iconSetRenderIconSurface _obj context size scale for_window = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    maybeFor_window <- case for_window of
        Nothing -> return nullPtr
        Just jFor_window -> do
            let jFor_window' = unsafeManagedPtrCastPtr jFor_window
            return jFor_window'
    result <- gtk_icon_set_render_icon_surface _obj' context' size scale maybeFor_window
    checkUnexpectedReturnNULL "gtk_icon_set_render_icon_surface" result
    result' <- (wrapBoxed Cairo.Surface) result
    touchManagedPtr _obj
    touchManagedPtr context
    whenJust for_window touchManagedPtr
    return result'

-- method IconSet::unref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_set_unref" gtk_icon_set_unref :: 
    Ptr IconSet ->                          -- _obj : TInterface "Gtk" "IconSet"
    IO ()

{-# DEPRECATED iconSetUnref ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSetUnref ::
    (MonadIO m) =>
    IconSet ->                              -- _obj
    m ()
iconSetUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_icon_set_unref _obj'
    touchManagedPtr _obj
    return ()

-- Enum IconSize

data IconSize = 
      IconSizeInvalid
    | IconSizeMenu
    | IconSizeSmallToolbar
    | IconSizeLargeToolbar
    | IconSizeButton
    | IconSizeDnd
    | IconSizeDialog
    | AnotherIconSize Int
    deriving (Show, Eq)

instance Enum IconSize where
    fromEnum IconSizeInvalid = 0
    fromEnum IconSizeMenu = 1
    fromEnum IconSizeSmallToolbar = 2
    fromEnum IconSizeLargeToolbar = 3
    fromEnum IconSizeButton = 4
    fromEnum IconSizeDnd = 5
    fromEnum IconSizeDialog = 6
    fromEnum (AnotherIconSize k) = k

    toEnum 0 = IconSizeInvalid
    toEnum 1 = IconSizeMenu
    toEnum 2 = IconSizeSmallToolbar
    toEnum 3 = IconSizeLargeToolbar
    toEnum 4 = IconSizeButton
    toEnum 5 = IconSizeDnd
    toEnum 6 = IconSizeDialog
    toEnum k = AnotherIconSize k

foreign import ccall "gtk_icon_size_get_type" c_gtk_icon_size_get_type :: 
    IO GType

instance BoxedEnum IconSize where
    boxedEnumType _ = c_gtk_icon_size_get_type

-- struct IconSource
newtype IconSource = IconSource (ForeignPtr IconSource)
noIconSource :: Maybe IconSource
noIconSource = Nothing

foreign import ccall "gtk_icon_source_get_type" c_gtk_icon_source_get_type :: 
    IO GType

instance BoxedObject IconSource where
    boxedType _ = c_gtk_icon_source_get_type

-- method IconSource::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "IconSource"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_new" gtk_icon_source_new :: 
    IO (Ptr IconSource)

{-# DEPRECATED iconSourceNew ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceNew ::
    (MonadIO m) =>
    m IconSource
iconSourceNew  = liftIO $ do
    result <- gtk_icon_source_new
    checkUnexpectedReturnNULL "gtk_icon_source_new" result
    result' <- (wrapBoxed IconSource) result
    return result'

-- method IconSource::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconSource"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_copy" gtk_icon_source_copy :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    IO (Ptr IconSource)

{-# DEPRECATED iconSourceCopy ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceCopy ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    m IconSource
iconSourceCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_source_copy _obj'
    checkUnexpectedReturnNULL "gtk_icon_source_copy" result
    result' <- (wrapBoxed IconSource) result
    touchManagedPtr _obj
    return result'

-- method IconSource::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_free" gtk_icon_source_free :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    IO ()

{-# DEPRECATED iconSourceFree ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceFree ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    m ()
iconSourceFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_icon_source_free _obj'
    touchManagedPtr _obj
    return ()

-- method IconSource::get_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextDirection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_get_direction" gtk_icon_source_get_direction :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    IO CUInt

{-# DEPRECATED iconSourceGetDirection ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceGetDirection ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    m TextDirection
iconSourceGetDirection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_source_get_direction _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method IconSource::get_direction_wildcarded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_get_direction_wildcarded" gtk_icon_source_get_direction_wildcarded :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    IO CInt

{-# DEPRECATED iconSourceGetDirectionWildcarded ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceGetDirectionWildcarded ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    m Bool
iconSourceGetDirectionWildcarded _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_source_get_direction_wildcarded _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method IconSource::get_filename
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFileName
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_get_filename" gtk_icon_source_get_filename :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    IO CString

{-# DEPRECATED iconSourceGetFilename ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceGetFilename ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    m [Char]
iconSourceGetFilename _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_source_get_filename _obj'
    checkUnexpectedReturnNULL "gtk_icon_source_get_filename" result
    result' <- cstringToString result
    touchManagedPtr _obj
    return result'

-- method IconSource::get_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_get_icon_name" gtk_icon_source_get_icon_name :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    IO CString

{-# DEPRECATED iconSourceGetIconName ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceGetIconName ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    m T.Text
iconSourceGetIconName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_source_get_icon_name _obj'
    checkUnexpectedReturnNULL "gtk_icon_source_get_icon_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method IconSource::get_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_get_pixbuf" gtk_icon_source_get_pixbuf :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED iconSourceGetPixbuf ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceGetPixbuf ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    m GdkPixbuf.Pixbuf
iconSourceGetPixbuf _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_source_get_pixbuf _obj'
    checkUnexpectedReturnNULL "gtk_icon_source_get_pixbuf" result
    result' <- (newObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method IconSource::get_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_get_size" gtk_icon_source_get_size :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    IO Int32

{-# DEPRECATED iconSourceGetSize ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceGetSize ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    m Int32
iconSourceGetSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_source_get_size _obj'
    touchManagedPtr _obj
    return result

-- method IconSource::get_size_wildcarded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_get_size_wildcarded" gtk_icon_source_get_size_wildcarded :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    IO CInt

{-# DEPRECATED iconSourceGetSizeWildcarded ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceGetSizeWildcarded ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    m Bool
iconSourceGetSizeWildcarded _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_source_get_size_wildcarded _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method IconSource::get_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StateType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_get_state" gtk_icon_source_get_state :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    IO CUInt

{-# DEPRECATED iconSourceGetState ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceGetState ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    m StateType
iconSourceGetState _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_source_get_state _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method IconSource::get_state_wildcarded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_get_state_wildcarded" gtk_icon_source_get_state_wildcarded :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    IO CInt

{-# DEPRECATED iconSourceGetStateWildcarded ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceGetStateWildcarded ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    m Bool
iconSourceGetStateWildcarded _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_icon_source_get_state_wildcarded _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method IconSource::set_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_set_direction" gtk_icon_source_set_direction :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    CUInt ->                                -- direction : TInterface "Gtk" "TextDirection"
    IO ()

{-# DEPRECATED iconSourceSetDirection ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceSetDirection ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    TextDirection ->                        -- direction
    m ()
iconSourceSetDirection _obj direction = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let direction' = (fromIntegral . fromEnum) direction
    gtk_icon_source_set_direction _obj' direction'
    touchManagedPtr _obj
    return ()

-- method IconSource::set_direction_wildcarded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_set_direction_wildcarded" gtk_icon_source_set_direction_wildcarded :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()

{-# DEPRECATED iconSourceSetDirectionWildcarded ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceSetDirectionWildcarded ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    Bool ->                                 -- setting
    m ()
iconSourceSetDirectionWildcarded _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_icon_source_set_direction_wildcarded _obj' setting'
    touchManagedPtr _obj
    return ()

-- method IconSource::set_filename
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_set_filename" gtk_icon_source_set_filename :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    CString ->                              -- filename : TBasicType TFileName
    IO ()

{-# DEPRECATED iconSourceSetFilename ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceSetFilename ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    [Char] ->                               -- filename
    m ()
iconSourceSetFilename _obj filename = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    filename' <- stringToCString filename
    gtk_icon_source_set_filename _obj' filename'
    touchManagedPtr _obj
    freeMem filename'
    return ()

-- method IconSource::set_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_set_icon_name" gtk_icon_source_set_icon_name :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()

{-# DEPRECATED iconSourceSetIconName ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceSetIconName ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    Maybe (T.Text) ->                       -- icon_name
    m ()
iconSourceSetIconName _obj icon_name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    maybeIcon_name <- case icon_name of
        Nothing -> return nullPtr
        Just jIcon_name -> do
            jIcon_name' <- textToCString jIcon_name
            return jIcon_name'
    gtk_icon_source_set_icon_name _obj' maybeIcon_name
    touchManagedPtr _obj
    freeMem maybeIcon_name
    return ()

-- method IconSource::set_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_set_pixbuf" gtk_icon_source_set_pixbuf :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO ()

{-# DEPRECATED iconSourceSetPixbuf ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceSetPixbuf ::
    (MonadIO m, GdkPixbuf.PixbufK a) =>
    IconSource ->                           -- _obj
    a ->                                    -- pixbuf
    m ()
iconSourceSetPixbuf _obj pixbuf = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    gtk_icon_source_set_pixbuf _obj' pixbuf'
    touchManagedPtr _obj
    touchManagedPtr pixbuf
    return ()

-- method IconSource::set_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_set_size" gtk_icon_source_set_size :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    Int32 ->                                -- size : TBasicType TInt32
    IO ()

{-# DEPRECATED iconSourceSetSize ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceSetSize ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    Int32 ->                                -- size
    m ()
iconSourceSetSize _obj size = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_icon_source_set_size _obj' size
    touchManagedPtr _obj
    return ()

-- method IconSource::set_size_wildcarded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_set_size_wildcarded" gtk_icon_source_set_size_wildcarded :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()

{-# DEPRECATED iconSourceSetSizeWildcarded ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceSetSizeWildcarded ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    Bool ->                                 -- setting
    m ()
iconSourceSetSizeWildcarded _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_icon_source_set_size_wildcarded _obj' setting'
    touchManagedPtr _obj
    return ()

-- method IconSource::set_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_set_state" gtk_icon_source_set_state :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    IO ()

{-# DEPRECATED iconSourceSetState ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceSetState ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    StateType ->                            -- state
    m ()
iconSourceSetState _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let state' = (fromIntegral . fromEnum) state
    gtk_icon_source_set_state _obj' state'
    touchManagedPtr _obj
    return ()

-- method IconSource::set_state_wildcarded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_source_set_state_wildcarded" gtk_icon_source_set_state_wildcarded :: 
    Ptr IconSource ->                       -- _obj : TInterface "Gtk" "IconSource"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()

{-# DEPRECATED iconSourceSetStateWildcarded ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSourceSetStateWildcarded ::
    (MonadIO m) =>
    IconSource ->                           -- _obj
    Bool ->                                 -- setting
    m ()
iconSourceSetStateWildcarded _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_icon_source_set_state_wildcarded _obj' setting'
    touchManagedPtr _obj
    return ()

-- object IconTheme 
newtype IconTheme = IconTheme (ForeignPtr IconTheme)
noIconTheme :: Maybe IconTheme
noIconTheme = Nothing

foreign import ccall "gtk_icon_theme_get_type"
    c_gtk_icon_theme_get_type :: IO GType

type instance ParentTypes IconTheme = '[GObject.Object]

instance GObject IconTheme where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_icon_theme_get_type
    

class GObject o => IconThemeK o
instance (GObject o, IsDescendantOf IconTheme o) => IconThemeK o

toIconTheme :: IconThemeK o => o -> IO IconTheme
toIconTheme = unsafeCastTo IconTheme

-- method IconTheme::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "IconTheme"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_new" gtk_icon_theme_new :: 
    IO (Ptr IconTheme)


iconThemeNew ::
    (MonadIO m) =>
    m IconTheme
iconThemeNew  = liftIO $ do
    result <- gtk_icon_theme_new
    checkUnexpectedReturnNULL "gtk_icon_theme_new" result
    result' <- (wrapObject IconTheme) result
    return result'

-- method IconTheme::add_resource_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_add_resource_path" gtk_icon_theme_add_resource_path :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- path : TBasicType TUTF8
    IO ()


iconThemeAddResourcePath ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- path
    m ()
iconThemeAddResourcePath _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path' <- textToCString path
    gtk_icon_theme_add_resource_path _obj' path'
    touchManagedPtr _obj
    freeMem path'
    return ()

-- method IconTheme::append_search_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_append_search_path" gtk_icon_theme_append_search_path :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- path : TBasicType TFileName
    IO ()


iconThemeAppendSearchPath ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- path
    m ()
iconThemeAppendSearchPath _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path' <- stringToCString path
    gtk_icon_theme_append_search_path _obj' path'
    touchManagedPtr _obj
    freeMem path'
    return ()

-- method IconTheme::choose_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_names", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_names", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconInfo"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_choose_icon" gtk_icon_theme_choose_icon :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    Ptr CString ->                          -- icon_names : TCArray True (-1) (-1) (TBasicType TUTF8)
    Int32 ->                                -- size : TBasicType TInt32
    CUInt ->                                -- flags : TInterface "Gtk" "IconLookupFlags"
    IO (Ptr IconInfo)


iconThemeChooseIcon ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    [T.Text] ->                             -- icon_names
    Int32 ->                                -- size
    [IconLookupFlags] ->                    -- flags
    m IconInfo
iconThemeChooseIcon _obj icon_names size flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_names' <- packZeroTerminatedUTF8CArray icon_names
    let flags' = gflagsToWord flags
    result <- gtk_icon_theme_choose_icon _obj' icon_names' size flags'
    checkUnexpectedReturnNULL "gtk_icon_theme_choose_icon" result
    result' <- (wrapObject IconInfo) result
    touchManagedPtr _obj
    mapZeroTerminatedCArray freeMem icon_names'
    freeMem icon_names'
    return result'

-- method IconTheme::choose_icon_for_scale
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_names", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_names", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconInfo"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_choose_icon_for_scale" gtk_icon_theme_choose_icon_for_scale :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    Ptr CString ->                          -- icon_names : TCArray True (-1) (-1) (TBasicType TUTF8)
    Int32 ->                                -- size : TBasicType TInt32
    Int32 ->                                -- scale : TBasicType TInt32
    CUInt ->                                -- flags : TInterface "Gtk" "IconLookupFlags"
    IO (Ptr IconInfo)


iconThemeChooseIconForScale ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    [T.Text] ->                             -- icon_names
    Int32 ->                                -- size
    Int32 ->                                -- scale
    [IconLookupFlags] ->                    -- flags
    m IconInfo
iconThemeChooseIconForScale _obj icon_names size scale flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_names' <- packZeroTerminatedUTF8CArray icon_names
    let flags' = gflagsToWord flags
    result <- gtk_icon_theme_choose_icon_for_scale _obj' icon_names' size scale flags'
    checkUnexpectedReturnNULL "gtk_icon_theme_choose_icon_for_scale" result
    result' <- (wrapObject IconInfo) result
    touchManagedPtr _obj
    mapZeroTerminatedCArray freeMem icon_names'
    freeMem icon_names'
    return result'

-- method IconTheme::get_example_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_get_example_icon_name" gtk_icon_theme_get_example_icon_name :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    IO CString


iconThemeGetExampleIconName ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    m T.Text
iconThemeGetExampleIconName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_theme_get_example_icon_name _obj'
    checkUnexpectedReturnNULL "gtk_icon_theme_get_example_icon_name" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method IconTheme::get_icon_sizes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_get_icon_sizes" gtk_icon_theme_get_icon_sizes :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- icon_name : TBasicType TUTF8
    IO (Ptr Int32)


iconThemeGetIconSizes ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- icon_name
    m [Int32]
iconThemeGetIconSizes _obj icon_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name' <- textToCString icon_name
    result <- gtk_icon_theme_get_icon_sizes _obj' icon_name'
    checkUnexpectedReturnNULL "gtk_icon_theme_get_icon_sizes" result
    result' <- unpackZeroTerminatedStorableArray result
    freeMem result
    touchManagedPtr _obj
    freeMem icon_name'
    return result'

-- method IconTheme::get_search_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TCArray False (-1) 2 (TBasicType TFileName), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "n_elements", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_elements", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_get_search_path" gtk_icon_theme_get_search_path :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    Ptr (Ptr CString) ->                    -- path : TCArray False (-1) 2 (TBasicType TFileName)
    Ptr Int32 ->                            -- n_elements : TBasicType TInt32
    IO ()


iconThemeGetSearchPath ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    m ([[Char]])
iconThemeGetSearchPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path <- allocMem :: IO (Ptr (Ptr CString))
    n_elements <- allocMem :: IO (Ptr Int32)
    gtk_icon_theme_get_search_path _obj' path n_elements
    n_elements' <- peek n_elements
    path' <- peek path
    path'' <- (unpackFileNameArrayWithLength n_elements') path'
    (mapCArrayWithLength n_elements') freeMem path'
    freeMem path'
    touchManagedPtr _obj
    freeMem path
    freeMem n_elements
    return path''

-- method IconTheme::has_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_has_icon" gtk_icon_theme_has_icon :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- icon_name : TBasicType TUTF8
    IO CInt


iconThemeHasIcon ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- icon_name
    m Bool
iconThemeHasIcon _obj icon_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name' <- textToCString icon_name
    result <- gtk_icon_theme_has_icon _obj' icon_name'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem icon_name'
    return result'

-- method IconTheme::list_contexts
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_list_contexts" gtk_icon_theme_list_contexts :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    IO (Ptr (GList CString))


iconThemeListContexts ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    m [T.Text]
iconThemeListContexts _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_theme_list_contexts _obj'
    checkUnexpectedReturnNULL "gtk_icon_theme_list_contexts" result
    result' <- unpackGList result
    result'' <- mapM cstringToText result'
    mapGList freeMem result
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method IconTheme::list_icons
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_list_icons" gtk_icon_theme_list_icons :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- context : TBasicType TUTF8
    IO (Ptr (GList CString))


iconThemeListIcons ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- context
    m [T.Text]
iconThemeListIcons _obj context = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeContext <- case context of
        Nothing -> return nullPtr
        Just jContext -> do
            jContext' <- textToCString jContext
            return jContext'
    result <- gtk_icon_theme_list_icons _obj' maybeContext
    checkUnexpectedReturnNULL "gtk_icon_theme_list_icons" result
    result' <- unpackGList result
    result'' <- mapM cstringToText result'
    mapGList freeMem result
    g_list_free result
    touchManagedPtr _obj
    freeMem maybeContext
    return result''

-- method IconTheme::load_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_icon_theme_load_icon" gtk_icon_theme_load_icon :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- icon_name : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    CUInt ->                                -- flags : TInterface "Gtk" "IconLookupFlags"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr GdkPixbuf.Pixbuf)


iconThemeLoadIcon ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- icon_name
    Int32 ->                                -- size
    [IconLookupFlags] ->                    -- flags
    m GdkPixbuf.Pixbuf
iconThemeLoadIcon _obj icon_name size flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name' <- textToCString icon_name
    let flags' = gflagsToWord flags
    onException (do
        result <- propagateGError $ gtk_icon_theme_load_icon _obj' icon_name' size flags'
        checkUnexpectedReturnNULL "gtk_icon_theme_load_icon" result
        result' <- (wrapObject GdkPixbuf.Pixbuf) result
        touchManagedPtr _obj
        freeMem icon_name'
        return result'
     ) (do
        freeMem icon_name'
     )

-- method IconTheme::load_icon_for_scale
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_icon_theme_load_icon_for_scale" gtk_icon_theme_load_icon_for_scale :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- icon_name : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    Int32 ->                                -- scale : TBasicType TInt32
    CUInt ->                                -- flags : TInterface "Gtk" "IconLookupFlags"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr GdkPixbuf.Pixbuf)


iconThemeLoadIconForScale ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- icon_name
    Int32 ->                                -- size
    Int32 ->                                -- scale
    [IconLookupFlags] ->                    -- flags
    m GdkPixbuf.Pixbuf
iconThemeLoadIconForScale _obj icon_name size scale flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name' <- textToCString icon_name
    let flags' = gflagsToWord flags
    onException (do
        result <- propagateGError $ gtk_icon_theme_load_icon_for_scale _obj' icon_name' size scale flags'
        checkUnexpectedReturnNULL "gtk_icon_theme_load_icon_for_scale" result
        result' <- (wrapObject GdkPixbuf.Pixbuf) result
        touchManagedPtr _obj
        freeMem icon_name'
        return result'
     ) (do
        freeMem icon_name'
     )

-- method IconTheme::load_surface
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "for_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "for_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Surface"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_icon_theme_load_surface" gtk_icon_theme_load_surface :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- icon_name : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    Int32 ->                                -- scale : TBasicType TInt32
    Ptr Gdk.Window ->                       -- for_window : TInterface "Gdk" "Window"
    CUInt ->                                -- flags : TInterface "Gtk" "IconLookupFlags"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Cairo.Surface)


iconThemeLoadSurface ::
    (MonadIO m, IconThemeK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    T.Text ->                               -- icon_name
    Int32 ->                                -- size
    Int32 ->                                -- scale
    Maybe (b) ->                            -- for_window
    [IconLookupFlags] ->                    -- flags
    m Cairo.Surface
iconThemeLoadSurface _obj icon_name size scale for_window flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name' <- textToCString icon_name
    maybeFor_window <- case for_window of
        Nothing -> return nullPtr
        Just jFor_window -> do
            let jFor_window' = unsafeManagedPtrCastPtr jFor_window
            return jFor_window'
    let flags' = gflagsToWord flags
    onException (do
        result <- propagateGError $ gtk_icon_theme_load_surface _obj' icon_name' size scale maybeFor_window flags'
        checkUnexpectedReturnNULL "gtk_icon_theme_load_surface" result
        result' <- (wrapBoxed Cairo.Surface) result
        touchManagedPtr _obj
        whenJust for_window touchManagedPtr
        freeMem icon_name'
        return result'
     ) (do
        freeMem icon_name'
     )

-- method IconTheme::lookup_by_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconInfo"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_lookup_by_gicon" gtk_icon_theme_lookup_by_gicon :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    Int32 ->                                -- size : TBasicType TInt32
    CUInt ->                                -- flags : TInterface "Gtk" "IconLookupFlags"
    IO (Ptr IconInfo)


iconThemeLookupByGicon ::
    (MonadIO m, IconThemeK a, Gio.IconK b) =>
    a ->                                    -- _obj
    b ->                                    -- icon
    Int32 ->                                -- size
    [IconLookupFlags] ->                    -- flags
    m IconInfo
iconThemeLookupByGicon _obj icon size flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon' = unsafeManagedPtrCastPtr icon
    let flags' = gflagsToWord flags
    result <- gtk_icon_theme_lookup_by_gicon _obj' icon' size flags'
    checkUnexpectedReturnNULL "gtk_icon_theme_lookup_by_gicon" result
    result' <- (wrapObject IconInfo) result
    touchManagedPtr _obj
    touchManagedPtr icon
    return result'

-- method IconTheme::lookup_by_gicon_for_scale
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconInfo"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_lookup_by_gicon_for_scale" gtk_icon_theme_lookup_by_gicon_for_scale :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    Int32 ->                                -- size : TBasicType TInt32
    Int32 ->                                -- scale : TBasicType TInt32
    CUInt ->                                -- flags : TInterface "Gtk" "IconLookupFlags"
    IO (Ptr IconInfo)


iconThemeLookupByGiconForScale ::
    (MonadIO m, IconThemeK a, Gio.IconK b) =>
    a ->                                    -- _obj
    b ->                                    -- icon
    Int32 ->                                -- size
    Int32 ->                                -- scale
    [IconLookupFlags] ->                    -- flags
    m IconInfo
iconThemeLookupByGiconForScale _obj icon size scale flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon' = unsafeManagedPtrCastPtr icon
    let flags' = gflagsToWord flags
    result <- gtk_icon_theme_lookup_by_gicon_for_scale _obj' icon' size scale flags'
    checkUnexpectedReturnNULL "gtk_icon_theme_lookup_by_gicon_for_scale" result
    result' <- (wrapObject IconInfo) result
    touchManagedPtr _obj
    touchManagedPtr icon
    return result'

-- method IconTheme::lookup_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconInfo"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_lookup_icon" gtk_icon_theme_lookup_icon :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- icon_name : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    CUInt ->                                -- flags : TInterface "Gtk" "IconLookupFlags"
    IO (Ptr IconInfo)


iconThemeLookupIcon ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- icon_name
    Int32 ->                                -- size
    [IconLookupFlags] ->                    -- flags
    m IconInfo
iconThemeLookupIcon _obj icon_name size flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name' <- textToCString icon_name
    let flags' = gflagsToWord flags
    result <- gtk_icon_theme_lookup_icon _obj' icon_name' size flags'
    checkUnexpectedReturnNULL "gtk_icon_theme_lookup_icon" result
    result' <- (wrapObject IconInfo) result
    touchManagedPtr _obj
    freeMem icon_name'
    return result'

-- method IconTheme::lookup_icon_for_scale
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "IconLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconInfo"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_lookup_icon_for_scale" gtk_icon_theme_lookup_icon_for_scale :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- icon_name : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    Int32 ->                                -- scale : TBasicType TInt32
    CUInt ->                                -- flags : TInterface "Gtk" "IconLookupFlags"
    IO (Ptr IconInfo)


iconThemeLookupIconForScale ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- icon_name
    Int32 ->                                -- size
    Int32 ->                                -- scale
    [IconLookupFlags] ->                    -- flags
    m IconInfo
iconThemeLookupIconForScale _obj icon_name size scale flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name' <- textToCString icon_name
    let flags' = gflagsToWord flags
    result <- gtk_icon_theme_lookup_icon_for_scale _obj' icon_name' size scale flags'
    checkUnexpectedReturnNULL "gtk_icon_theme_lookup_icon_for_scale" result
    result' <- (wrapObject IconInfo) result
    touchManagedPtr _obj
    freeMem icon_name'
    return result'

-- method IconTheme::prepend_search_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_prepend_search_path" gtk_icon_theme_prepend_search_path :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- path : TBasicType TFileName
    IO ()


iconThemePrependSearchPath ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- path
    m ()
iconThemePrependSearchPath _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path' <- stringToCString path
    gtk_icon_theme_prepend_search_path _obj' path'
    touchManagedPtr _obj
    freeMem path'
    return ()

-- method IconTheme::rescan_if_needed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_rescan_if_needed" gtk_icon_theme_rescan_if_needed :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    IO CInt


iconThemeRescanIfNeeded ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    m Bool
iconThemeRescanIfNeeded _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_theme_rescan_if_needed _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method IconTheme::set_custom_theme
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "theme_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "theme_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_set_custom_theme" gtk_icon_theme_set_custom_theme :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    CString ->                              -- theme_name : TBasicType TUTF8
    IO ()


iconThemeSetCustomTheme ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- theme_name
    m ()
iconThemeSetCustomTheme _obj theme_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeTheme_name <- case theme_name of
        Nothing -> return nullPtr
        Just jTheme_name -> do
            jTheme_name' <- textToCString jTheme_name
            return jTheme_name'
    gtk_icon_theme_set_custom_theme _obj' maybeTheme_name
    touchManagedPtr _obj
    freeMem maybeTheme_name
    return ()

-- method IconTheme::set_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_set_screen" gtk_icon_theme_set_screen :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO ()


iconThemeSetScreen ::
    (MonadIO m, IconThemeK a, Gdk.ScreenK b) =>
    a ->                                    -- _obj
    b ->                                    -- screen
    m ()
iconThemeSetScreen _obj screen = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let screen' = unsafeManagedPtrCastPtr screen
    gtk_icon_theme_set_screen _obj' screen'
    touchManagedPtr _obj
    touchManagedPtr screen
    return ()

-- method IconTheme::set_search_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TCArray False (-1) 2 (TBasicType TFileName), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_elements", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_elements", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TCArray False (-1) 2 (TBasicType TFileName), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_set_search_path" gtk_icon_theme_set_search_path :: 
    Ptr IconTheme ->                        -- _obj : TInterface "Gtk" "IconTheme"
    Ptr CString ->                          -- path : TCArray False (-1) 2 (TBasicType TFileName)
    Int32 ->                                -- n_elements : TBasicType TInt32
    IO ()


iconThemeSetSearchPath ::
    (MonadIO m, IconThemeK a) =>
    a ->                                    -- _obj
    [[Char]] ->                             -- path
    m ()
iconThemeSetSearchPath _obj path = liftIO $ do
    let n_elements = fromIntegral $ length path
    let _obj' = unsafeManagedPtrCastPtr _obj
    path' <- packFileNameArray path
    gtk_icon_theme_set_search_path _obj' path' n_elements
    touchManagedPtr _obj
    (mapCArrayWithLength n_elements) freeMem path'
    freeMem path'
    return ()

-- method IconTheme::add_builtin_icon
-- method type : MemberFunction
-- Args : [Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_add_builtin_icon" gtk_icon_theme_add_builtin_icon :: 
    CString ->                              -- icon_name : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO ()

{-# DEPRECATED iconThemeAddBuiltinIcon ["(Since version 3.14)","Use gtk_icon_theme_add_resource_path()","    to add application-specific icons to the icon theme."]#-}
iconThemeAddBuiltinIcon ::
    (MonadIO m, GdkPixbuf.PixbufK a) =>
    T.Text ->                               -- icon_name
    Int32 ->                                -- size
    a ->                                    -- pixbuf
    m ()
iconThemeAddBuiltinIcon icon_name size pixbuf = liftIO $ do
    icon_name' <- textToCString icon_name
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    gtk_icon_theme_add_builtin_icon icon_name' size pixbuf'
    touchManagedPtr pixbuf
    freeMem icon_name'
    return ()

-- method IconTheme::get_default
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "IconTheme"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_get_default" gtk_icon_theme_get_default :: 
    IO (Ptr IconTheme)


iconThemeGetDefault ::
    (MonadIO m) =>
    m IconTheme
iconThemeGetDefault  = liftIO $ do
    result <- gtk_icon_theme_get_default
    checkUnexpectedReturnNULL "gtk_icon_theme_get_default" result
    result' <- (newObject IconTheme) result
    return result'

-- method IconTheme::get_for_screen
-- method type : MemberFunction
-- Args : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconTheme"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_get_for_screen" gtk_icon_theme_get_for_screen :: 
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO (Ptr IconTheme)


iconThemeGetForScreen ::
    (MonadIO m, Gdk.ScreenK a) =>
    a ->                                    -- screen
    m IconTheme
iconThemeGetForScreen screen = liftIO $ do
    let screen' = unsafeManagedPtrCastPtr screen
    result <- gtk_icon_theme_get_for_screen screen'
    checkUnexpectedReturnNULL "gtk_icon_theme_get_for_screen" result
    result' <- (newObject IconTheme) result
    touchManagedPtr screen
    return result'

-- signal IconTheme::changed
type IconThemeChangedCallback =
    IO ()

noIconThemeChangedCallback :: Maybe IconThemeChangedCallback
noIconThemeChangedCallback = Nothing

type IconThemeChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkIconThemeChangedCallback :: IconThemeChangedCallbackC -> IO (FunPtr IconThemeChangedCallbackC)

iconThemeChangedClosure :: IconThemeChangedCallback -> IO Closure
iconThemeChangedClosure cb = newCClosure =<< mkIconThemeChangedCallback wrapped
    where wrapped = iconThemeChangedCallbackWrapper cb

iconThemeChangedCallbackWrapper ::
    IconThemeChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
iconThemeChangedCallbackWrapper _cb _ _ = do
    _cb 

onIconThemeChanged :: (GObject a, MonadIO m) => a -> IconThemeChangedCallback -> m SignalHandlerId
onIconThemeChanged obj cb = liftIO $ connectIconThemeChanged obj cb SignalConnectBefore
afterIconThemeChanged :: (GObject a, MonadIO m) => a -> IconThemeChangedCallback -> m SignalHandlerId
afterIconThemeChanged obj cb = connectIconThemeChanged obj cb SignalConnectAfter

connectIconThemeChanged :: (GObject a, MonadIO m) =>
                           a -> IconThemeChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectIconThemeChanged obj cb after = liftIO $ do
    cb' <- mkIconThemeChangedCallback (iconThemeChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- Enum IconThemeError

data IconThemeError = 
      IconThemeErrorNotFound
    | IconThemeErrorFailed
    | AnotherIconThemeError Int
    deriving (Show, Eq)

instance Enum IconThemeError where
    fromEnum IconThemeErrorNotFound = 0
    fromEnum IconThemeErrorFailed = 1
    fromEnum (AnotherIconThemeError k) = k

    toEnum 0 = IconThemeErrorNotFound
    toEnum 1 = IconThemeErrorFailed
    toEnum k = AnotherIconThemeError k

instance GErrorClass IconThemeError where
    gerrorClassDomain _ = "gtk-icon-theme-error-quark"

catchIconThemeError ::
    IO a ->
    (IconThemeError -> GErrorMessage -> IO a) ->
    IO a
catchIconThemeError = catchGErrorJustDomain

handleIconThemeError ::
    (IconThemeError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleIconThemeError = handleGErrorJustDomain

foreign import ccall "gtk_icon_theme_error_get_type" c_gtk_icon_theme_error_get_type :: 
    IO GType

instance BoxedEnum IconThemeError where
    boxedEnumType _ = c_gtk_icon_theme_error_get_type

-- object IconView 
newtype IconView = IconView (ForeignPtr IconView)
noIconView :: Maybe IconView
noIconView = Nothing

foreign import ccall "gtk_icon_view_get_type"
    c_gtk_icon_view_get_type :: IO GType

type instance ParentTypes IconView = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, CellLayout, Scrollable]

instance GObject IconView where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_icon_view_get_type
    

class GObject o => IconViewK o
instance (GObject o, IsDescendantOf IconView o) => IconViewK o

toIconView :: IconViewK o => o -> IO IconView
toIconView = unsafeCastTo IconView

-- method IconView::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "IconView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_new" gtk_icon_view_new :: 
    IO (Ptr IconView)


iconViewNew ::
    (MonadIO m) =>
    m IconView
iconViewNew  = liftIO $ do
    result <- gtk_icon_view_new
    checkUnexpectedReturnNULL "gtk_icon_view_new" result
    result' <- (newObject IconView) result
    return result'

-- method IconView::new_with_area
-- method type : Constructor
-- Args : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_new_with_area" gtk_icon_view_new_with_area :: 
    Ptr CellArea ->                         -- area : TInterface "Gtk" "CellArea"
    IO (Ptr IconView)


iconViewNewWithArea ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- area
    m IconView
iconViewNewWithArea area = liftIO $ do
    let area' = unsafeManagedPtrCastPtr area
    result <- gtk_icon_view_new_with_area area'
    checkUnexpectedReturnNULL "gtk_icon_view_new_with_area" result
    result' <- (newObject IconView) result
    touchManagedPtr area
    return result'

-- method IconView::new_with_model
-- method type : Constructor
-- Args : [Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_new_with_model" gtk_icon_view_new_with_model :: 
    Ptr TreeModel ->                        -- model : TInterface "Gtk" "TreeModel"
    IO (Ptr IconView)


iconViewNewWithModel ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- model
    m IconView
iconViewNewWithModel model = liftIO $ do
    let model' = unsafeManagedPtrCastPtr model
    result <- gtk_icon_view_new_with_model model'
    checkUnexpectedReturnNULL "gtk_icon_view_new_with_model" result
    result' <- (newObject IconView) result
    touchManagedPtr model
    return result'

-- method IconView::convert_widget_to_bin_window_coords
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wy", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bx", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "by", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wy", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_convert_widget_to_bin_window_coords" gtk_icon_view_convert_widget_to_bin_window_coords :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- wx : TBasicType TInt32
    Int32 ->                                -- wy : TBasicType TInt32
    Ptr Int32 ->                            -- bx : TBasicType TInt32
    Ptr Int32 ->                            -- by : TBasicType TInt32
    IO ()


iconViewConvertWidgetToBinWindowCoords ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- wx
    Int32 ->                                -- wy
    m (Int32,Int32)
iconViewConvertWidgetToBinWindowCoords _obj wx wy = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    bx <- allocMem :: IO (Ptr Int32)
    by <- allocMem :: IO (Ptr Int32)
    gtk_icon_view_convert_widget_to_bin_window_coords _obj' wx wy bx by
    bx' <- peek bx
    by' <- peek by
    touchManagedPtr _obj
    freeMem bx
    freeMem by
    return (bx', by')

-- method IconView::create_drag_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Surface"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_create_drag_icon" gtk_icon_view_create_drag_icon :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO (Ptr Cairo.Surface)


iconViewCreateDragIcon ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m Cairo.Surface
iconViewCreateDragIcon _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_icon_view_create_drag_icon _obj' path'
    checkUnexpectedReturnNULL "gtk_icon_view_create_drag_icon" result
    result' <- (wrapBoxed Cairo.Surface) result
    touchManagedPtr _obj
    touchManagedPtr path
    return result'

-- method IconView::enable_model_drag_dest
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_enable_model_drag_dest" gtk_icon_view_enable_model_drag_dest :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TargetEntry ->                      -- targets : TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry")
    Int32 ->                                -- n_targets : TBasicType TInt32
    CUInt ->                                -- actions : TInterface "Gdk" "DragAction"
    IO ()


iconViewEnableModelDragDest ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    [TargetEntry] ->                        -- targets
    [Gdk.DragAction] ->                     -- actions
    m ()
iconViewEnableModelDragDest _obj targets actions = liftIO $ do
    let n_targets = fromIntegral $ length targets
    let _obj' = unsafeManagedPtrCastPtr _obj
    let targets' = map unsafeManagedPtrGetPtr targets
    targets'' <- packBlockArray 16 targets'
    let actions' = gflagsToWord actions
    gtk_icon_view_enable_model_drag_dest _obj' targets'' n_targets actions'
    touchManagedPtr _obj
    mapM_ touchManagedPtr targets
    freeMem targets''
    return ()

-- method IconView::enable_model_drag_source
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_button_mask", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_button_mask", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_enable_model_drag_source" gtk_icon_view_enable_model_drag_source :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    CUInt ->                                -- start_button_mask : TInterface "Gdk" "ModifierType"
    Ptr TargetEntry ->                      -- targets : TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry")
    Int32 ->                                -- n_targets : TBasicType TInt32
    CUInt ->                                -- actions : TInterface "Gdk" "DragAction"
    IO ()


iconViewEnableModelDragSource ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    [Gdk.ModifierType] ->                   -- start_button_mask
    [TargetEntry] ->                        -- targets
    [Gdk.DragAction] ->                     -- actions
    m ()
iconViewEnableModelDragSource _obj start_button_mask targets actions = liftIO $ do
    let n_targets = fromIntegral $ length targets
    let _obj' = unsafeManagedPtrCastPtr _obj
    let start_button_mask' = gflagsToWord start_button_mask
    let targets' = map unsafeManagedPtrGetPtr targets
    targets'' <- packBlockArray 16 targets'
    let actions' = gflagsToWord actions
    gtk_icon_view_enable_model_drag_source _obj' start_button_mask' targets'' n_targets actions'
    touchManagedPtr _obj
    mapM_ touchManagedPtr targets
    freeMem targets''
    return ()

-- method IconView::get_activate_on_single_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_activate_on_single_click" gtk_icon_view_get_activate_on_single_click :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO CInt


iconViewGetActivateOnSingleClick ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Bool
iconViewGetActivateOnSingleClick _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_activate_on_single_click _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method IconView::get_cell_rect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_cell_rect" gtk_icon_view_get_cell_rect :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    Ptr Gdk.Rectangle ->                    -- rect : TInterface "Gdk" "Rectangle"
    IO CInt


iconViewGetCellRect ::
    (MonadIO m, IconViewK a, CellRendererK b) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    Maybe (b) ->                            -- cell
    m (Bool,Gdk.Rectangle)
iconViewGetCellRect _obj path cell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    maybeCell <- case cell of
        Nothing -> return nullPtr
        Just jCell -> do
            let jCell' = unsafeManagedPtrCastPtr jCell
            return jCell'
    rect <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    result <- gtk_icon_view_get_cell_rect _obj' path' maybeCell rect
    let result' = (/= 0) result
    rect' <- (wrapBoxed Gdk.Rectangle) rect
    touchManagedPtr _obj
    touchManagedPtr path
    whenJust cell touchManagedPtr
    return (result', rect')

-- method IconView::get_column_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_column_spacing" gtk_icon_view_get_column_spacing :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO Int32


iconViewGetColumnSpacing ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Int32
iconViewGetColumnSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_column_spacing _obj'
    touchManagedPtr _obj
    return result

-- method IconView::get_columns
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_columns" gtk_icon_view_get_columns :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO Int32


iconViewGetColumns ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Int32
iconViewGetColumns _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_columns _obj'
    touchManagedPtr _obj
    return result

-- method IconView::get_cursor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_cursor" gtk_icon_view_get_cursor :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    Ptr (Ptr CellRenderer) ->               -- cell : TInterface "Gtk" "CellRenderer"
    IO CInt


iconViewGetCursor ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m (Bool,TreePath,CellRenderer)
iconViewGetCursor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    cell <- allocMem :: IO (Ptr (Ptr CellRenderer))
    result <- gtk_icon_view_get_cursor _obj' path cell
    let result' = (/= 0) result
    path' <- peek path
    path'' <- (wrapBoxed TreePath) path'
    cell' <- peek cell
    cell'' <- (newObject CellRenderer) cell'
    touchManagedPtr _obj
    freeMem path
    freeMem cell
    return (result', path'', cell'')

-- method IconView::get_dest_item_at_pos
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "drag_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "drag_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "pos", argType = TInterface "Gtk" "IconViewDropPosition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "drag_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "drag_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_dest_item_at_pos" gtk_icon_view_get_dest_item_at_pos :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- drag_x : TBasicType TInt32
    Int32 ->                                -- drag_y : TBasicType TInt32
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    Ptr CUInt ->                            -- pos : TInterface "Gtk" "IconViewDropPosition"
    IO CInt


iconViewGetDestItemAtPos ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- drag_x
    Int32 ->                                -- drag_y
    m (Bool,TreePath,IconViewDropPosition)
iconViewGetDestItemAtPos _obj drag_x drag_y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    pos <- allocMem :: IO (Ptr CUInt)
    result <- gtk_icon_view_get_dest_item_at_pos _obj' drag_x drag_y path pos
    let result' = (/= 0) result
    path' <- peek path
    path'' <- (wrapBoxed TreePath) path'
    pos' <- peek pos
    let pos'' = (toEnum . fromIntegral) pos'
    touchManagedPtr _obj
    freeMem path
    freeMem pos
    return (result', path'', pos'')

-- method IconView::get_drag_dest_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "pos", argType = TInterface "Gtk" "IconViewDropPosition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_drag_dest_item" gtk_icon_view_get_drag_dest_item :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    Ptr CUInt ->                            -- pos : TInterface "Gtk" "IconViewDropPosition"
    IO ()


iconViewGetDragDestItem ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m (TreePath,IconViewDropPosition)
iconViewGetDragDestItem _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    pos <- allocMem :: IO (Ptr CUInt)
    gtk_icon_view_get_drag_dest_item _obj' path pos
    path' <- peek path
    path'' <- (wrapBoxed TreePath) path'
    pos' <- peek pos
    let pos'' = (toEnum . fromIntegral) pos'
    touchManagedPtr _obj
    freeMem path
    freeMem pos
    return (path'', pos'')

-- method IconView::get_item_at_pos
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_item_at_pos" gtk_icon_view_get_item_at_pos :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    Ptr (Ptr CellRenderer) ->               -- cell : TInterface "Gtk" "CellRenderer"
    IO CInt


iconViewGetItemAtPos ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m (Bool,TreePath,CellRenderer)
iconViewGetItemAtPos _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    cell <- allocMem :: IO (Ptr (Ptr CellRenderer))
    result <- gtk_icon_view_get_item_at_pos _obj' x y path cell
    let result' = (/= 0) result
    path' <- peek path
    path'' <- (wrapBoxed TreePath) path'
    cell' <- peek cell
    cell'' <- (wrapObject CellRenderer) cell'
    touchManagedPtr _obj
    freeMem path
    freeMem cell
    return (result', path'', cell'')

-- method IconView::get_item_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_item_column" gtk_icon_view_get_item_column :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO Int32


iconViewGetItemColumn ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m Int32
iconViewGetItemColumn _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_icon_view_get_item_column _obj' path'
    touchManagedPtr _obj
    touchManagedPtr path
    return result

-- method IconView::get_item_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Orientation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_item_orientation" gtk_icon_view_get_item_orientation :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO CUInt


iconViewGetItemOrientation ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Orientation
iconViewGetItemOrientation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_item_orientation _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method IconView::get_item_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_item_padding" gtk_icon_view_get_item_padding :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO Int32


iconViewGetItemPadding ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Int32
iconViewGetItemPadding _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_item_padding _obj'
    touchManagedPtr _obj
    return result

-- method IconView::get_item_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_item_row" gtk_icon_view_get_item_row :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO Int32


iconViewGetItemRow ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m Int32
iconViewGetItemRow _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_icon_view_get_item_row _obj' path'
    touchManagedPtr _obj
    touchManagedPtr path
    return result

-- method IconView::get_item_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_item_width" gtk_icon_view_get_item_width :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO Int32


iconViewGetItemWidth ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Int32
iconViewGetItemWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_item_width _obj'
    touchManagedPtr _obj
    return result

-- method IconView::get_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_margin" gtk_icon_view_get_margin :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO Int32


iconViewGetMargin ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Int32
iconViewGetMargin _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_margin _obj'
    touchManagedPtr _obj
    return result

-- method IconView::get_markup_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_markup_column" gtk_icon_view_get_markup_column :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO Int32


iconViewGetMarkupColumn ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Int32
iconViewGetMarkupColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_markup_column _obj'
    touchManagedPtr _obj
    return result

-- method IconView::get_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_model" gtk_icon_view_get_model :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO (Ptr TreeModel)


iconViewGetModel ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m TreeModel
iconViewGetModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_model _obj'
    checkUnexpectedReturnNULL "gtk_icon_view_get_model" result
    result' <- (newObject TreeModel) result
    touchManagedPtr _obj
    return result'

-- method IconView::get_path_at_pos
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_path_at_pos" gtk_icon_view_get_path_at_pos :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO (Ptr TreePath)


iconViewGetPathAtPos ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m TreePath
iconViewGetPathAtPos _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_path_at_pos _obj' x y
    checkUnexpectedReturnNULL "gtk_icon_view_get_path_at_pos" result
    result' <- (wrapBoxed TreePath) result
    touchManagedPtr _obj
    return result'

-- method IconView::get_pixbuf_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_pixbuf_column" gtk_icon_view_get_pixbuf_column :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO Int32


iconViewGetPixbufColumn ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Int32
iconViewGetPixbufColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_pixbuf_column _obj'
    touchManagedPtr _obj
    return result

-- method IconView::get_reorderable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_reorderable" gtk_icon_view_get_reorderable :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO CInt


iconViewGetReorderable ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Bool
iconViewGetReorderable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_reorderable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method IconView::get_row_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_row_spacing" gtk_icon_view_get_row_spacing :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO Int32


iconViewGetRowSpacing ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Int32
iconViewGetRowSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_row_spacing _obj'
    touchManagedPtr _obj
    return result

-- method IconView::get_selected_items
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "TreePath")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_selected_items" gtk_icon_view_get_selected_items :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO (Ptr (GList (Ptr TreePath)))


iconViewGetSelectedItems ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m [TreePath]
iconViewGetSelectedItems _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_selected_items _obj'
    checkUnexpectedReturnNULL "gtk_icon_view_get_selected_items" result
    result' <- unpackGList result
    result'' <- mapM (wrapBoxed TreePath) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method IconView::get_selection_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SelectionMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_selection_mode" gtk_icon_view_get_selection_mode :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO CUInt


iconViewGetSelectionMode ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m SelectionMode
iconViewGetSelectionMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_selection_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method IconView::get_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_spacing" gtk_icon_view_get_spacing :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO Int32


iconViewGetSpacing ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Int32
iconViewGetSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_spacing _obj'
    touchManagedPtr _obj
    return result

-- method IconView::get_text_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_text_column" gtk_icon_view_get_text_column :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO Int32


iconViewGetTextColumn ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Int32
iconViewGetTextColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_text_column _obj'
    touchManagedPtr _obj
    return result

-- method IconView::get_tooltip_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_tooltip_column" gtk_icon_view_get_tooltip_column :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO Int32


iconViewGetTooltipColumn ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m Int32
iconViewGetTooltipColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_icon_view_get_tooltip_column _obj'
    touchManagedPtr _obj
    return result

-- method IconView::get_tooltip_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "keyboard_tip", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "keyboard_tip", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_tooltip_context" gtk_icon_view_get_tooltip_context :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    CInt ->                                 -- keyboard_tip : TBasicType TBoolean
    Ptr (Ptr TreeModel) ->                  -- model : TInterface "Gtk" "TreeModel"
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


iconViewGetTooltipContext ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    Bool ->                                 -- keyboard_tip
    m (Bool,Int32,Int32,TreeModel,TreePath,TreeIter)
iconViewGetTooltipContext _obj x y keyboard_tip = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    x' <- allocMem :: IO (Ptr Int32)
    poke x' x
    y' <- allocMem :: IO (Ptr Int32)
    poke y' y
    let keyboard_tip' = (fromIntegral . fromEnum) keyboard_tip
    model <- allocMem :: IO (Ptr (Ptr TreeModel))
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    result <- gtk_icon_view_get_tooltip_context _obj' x' y' keyboard_tip' model path iter
    let result' = (/= 0) result
    x'' <- peek x'
    y'' <- peek y'
    model' <- peek model
    model'' <- (newObject TreeModel) model'
    path' <- peek path
    path'' <- (wrapBoxed TreePath) path'
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    freeMem x'
    freeMem y'
    freeMem model
    freeMem path
    return (result', x'', y'', model'', path'', iter')

-- method IconView::get_visible_range
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "end_path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_get_visible_range" gtk_icon_view_get_visible_range :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr (Ptr TreePath) ->                   -- start_path : TInterface "Gtk" "TreePath"
    Ptr (Ptr TreePath) ->                   -- end_path : TInterface "Gtk" "TreePath"
    IO CInt


iconViewGetVisibleRange ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m (Bool,TreePath,TreePath)
iconViewGetVisibleRange _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    start_path <- allocMem :: IO (Ptr (Ptr TreePath))
    end_path <- allocMem :: IO (Ptr (Ptr TreePath))
    result <- gtk_icon_view_get_visible_range _obj' start_path end_path
    let result' = (/= 0) result
    start_path' <- peek start_path
    start_path'' <- (wrapBoxed TreePath) start_path'
    end_path' <- peek end_path
    end_path'' <- (wrapBoxed TreePath) end_path'
    touchManagedPtr _obj
    freeMem start_path
    freeMem end_path
    return (result', start_path'', end_path'')

-- method IconView::item_activated
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_item_activated" gtk_icon_view_item_activated :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


iconViewItemActivated ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m ()
iconViewItemActivated _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    gtk_icon_view_item_activated _obj' path'
    touchManagedPtr _obj
    touchManagedPtr path
    return ()

-- method IconView::path_is_selected
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_path_is_selected" gtk_icon_view_path_is_selected :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO CInt


iconViewPathIsSelected ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m Bool
iconViewPathIsSelected _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_icon_view_path_is_selected _obj' path'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr path
    return result'

-- method IconView::scroll_to_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row_align", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "col_align", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row_align", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "col_align", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_scroll_to_path" gtk_icon_view_scroll_to_path :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    CInt ->                                 -- use_align : TBasicType TBoolean
    CFloat ->                               -- row_align : TBasicType TFloat
    CFloat ->                               -- col_align : TBasicType TFloat
    IO ()


iconViewScrollToPath ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    Bool ->                                 -- use_align
    Float ->                                -- row_align
    Float ->                                -- col_align
    m ()
iconViewScrollToPath _obj path use_align row_align col_align = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    let use_align' = (fromIntegral . fromEnum) use_align
    let row_align' = realToFrac row_align
    let col_align' = realToFrac col_align
    gtk_icon_view_scroll_to_path _obj' path' use_align' row_align' col_align'
    touchManagedPtr _obj
    touchManagedPtr path
    return ()

-- method IconView::select_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_select_all" gtk_icon_view_select_all :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO ()


iconViewSelectAll ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m ()
iconViewSelectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_select_all _obj'
    touchManagedPtr _obj
    return ()

-- method IconView::select_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_select_path" gtk_icon_view_select_path :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


iconViewSelectPath ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m ()
iconViewSelectPath _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    gtk_icon_view_select_path _obj' path'
    touchManagedPtr _obj
    touchManagedPtr path
    return ()

-- method IconView::selected_foreach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "IconViewForeachFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "IconViewForeachFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_selected_foreach" gtk_icon_view_selected_foreach :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    FunPtr IconViewForeachFuncC ->          -- func : TInterface "Gtk" "IconViewForeachFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    IO ()


iconViewSelectedForeach ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    IconViewForeachFunc ->                  -- func
    m ()
iconViewSelectedForeach _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkIconViewForeachFunc (iconViewForeachFuncWrapper Nothing func)
    let data_ = nullPtr
    gtk_icon_view_selected_foreach _obj' func' data_
    safeFreeFunPtr $ castFunPtrToPtr func'
    touchManagedPtr _obj
    return ()

-- method IconView::set_activate_on_single_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "single", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "single", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_activate_on_single_click" gtk_icon_view_set_activate_on_single_click :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    CInt ->                                 -- single : TBasicType TBoolean
    IO ()


iconViewSetActivateOnSingleClick ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- single
    m ()
iconViewSetActivateOnSingleClick _obj single = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let single' = (fromIntegral . fromEnum) single
    gtk_icon_view_set_activate_on_single_click _obj' single'
    touchManagedPtr _obj
    return ()

-- method IconView::set_column_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column_spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column_spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_column_spacing" gtk_icon_view_set_column_spacing :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- column_spacing : TBasicType TInt32
    IO ()


iconViewSetColumnSpacing ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column_spacing
    m ()
iconViewSetColumnSpacing _obj column_spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_set_column_spacing _obj' column_spacing
    touchManagedPtr _obj
    return ()

-- method IconView::set_columns
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_columns" gtk_icon_view_set_columns :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- columns : TBasicType TInt32
    IO ()


iconViewSetColumns ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- columns
    m ()
iconViewSetColumns _obj columns = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_set_columns _obj' columns
    touchManagedPtr _obj
    return ()

-- method IconView::set_cursor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_editing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_editing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_cursor" gtk_icon_view_set_cursor :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- start_editing : TBasicType TBoolean
    IO ()


iconViewSetCursor ::
    (MonadIO m, IconViewK a, CellRendererK b) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    Maybe (b) ->                            -- cell
    Bool ->                                 -- start_editing
    m ()
iconViewSetCursor _obj path cell start_editing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    maybeCell <- case cell of
        Nothing -> return nullPtr
        Just jCell -> do
            let jCell' = unsafeManagedPtrCastPtr jCell
            return jCell'
    let start_editing' = (fromIntegral . fromEnum) start_editing
    gtk_icon_view_set_cursor _obj' path' maybeCell start_editing'
    touchManagedPtr _obj
    touchManagedPtr path
    whenJust cell touchManagedPtr
    return ()

-- method IconView::set_drag_dest_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TInterface "Gtk" "IconViewDropPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TInterface "Gtk" "IconViewDropPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_drag_dest_item" gtk_icon_view_set_drag_dest_item :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    CUInt ->                                -- pos : TInterface "Gtk" "IconViewDropPosition"
    IO ()


iconViewSetDragDestItem ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Maybe (TreePath) ->                     -- path
    IconViewDropPosition ->                 -- pos
    m ()
iconViewSetDragDestItem _obj path pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePath <- case path of
        Nothing -> return nullPtr
        Just jPath -> do
            let jPath' = unsafeManagedPtrGetPtr jPath
            return jPath'
    let pos' = (fromIntegral . fromEnum) pos
    gtk_icon_view_set_drag_dest_item _obj' maybePath pos'
    touchManagedPtr _obj
    whenJust path touchManagedPtr
    return ()

-- method IconView::set_item_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_item_orientation" gtk_icon_view_set_item_orientation :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    IO ()


iconViewSetItemOrientation ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Orientation ->                          -- orientation
    m ()
iconViewSetItemOrientation _obj orientation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let orientation' = (fromIntegral . fromEnum) orientation
    gtk_icon_view_set_item_orientation _obj' orientation'
    touchManagedPtr _obj
    return ()

-- method IconView::set_item_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item_padding", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item_padding", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_item_padding" gtk_icon_view_set_item_padding :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- item_padding : TBasicType TInt32
    IO ()


iconViewSetItemPadding ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- item_padding
    m ()
iconViewSetItemPadding _obj item_padding = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_set_item_padding _obj' item_padding
    touchManagedPtr _obj
    return ()

-- method IconView::set_item_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_item_width" gtk_icon_view_set_item_width :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- item_width : TBasicType TInt32
    IO ()


iconViewSetItemWidth ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- item_width
    m ()
iconViewSetItemWidth _obj item_width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_set_item_width _obj' item_width
    touchManagedPtr _obj
    return ()

-- method IconView::set_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_margin" gtk_icon_view_set_margin :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- margin : TBasicType TInt32
    IO ()


iconViewSetMargin ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- margin
    m ()
iconViewSetMargin _obj margin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_set_margin _obj' margin
    touchManagedPtr _obj
    return ()

-- method IconView::set_markup_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_markup_column" gtk_icon_view_set_markup_column :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


iconViewSetMarkupColumn ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m ()
iconViewSetMarkupColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_set_markup_column _obj' column
    touchManagedPtr _obj
    return ()

-- method IconView::set_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_model" gtk_icon_view_set_model :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreeModel ->                        -- model : TInterface "Gtk" "TreeModel"
    IO ()


iconViewSetModel ::
    (MonadIO m, IconViewK a, TreeModelK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- model
    m ()
iconViewSetModel _obj model = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeModel <- case model of
        Nothing -> return nullPtr
        Just jModel -> do
            let jModel' = unsafeManagedPtrCastPtr jModel
            return jModel'
    gtk_icon_view_set_model _obj' maybeModel
    touchManagedPtr _obj
    whenJust model touchManagedPtr
    return ()

-- method IconView::set_pixbuf_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_pixbuf_column" gtk_icon_view_set_pixbuf_column :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


iconViewSetPixbufColumn ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m ()
iconViewSetPixbufColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_set_pixbuf_column _obj' column
    touchManagedPtr _obj
    return ()

-- method IconView::set_reorderable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reorderable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reorderable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_reorderable" gtk_icon_view_set_reorderable :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    CInt ->                                 -- reorderable : TBasicType TBoolean
    IO ()


iconViewSetReorderable ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- reorderable
    m ()
iconViewSetReorderable _obj reorderable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let reorderable' = (fromIntegral . fromEnum) reorderable
    gtk_icon_view_set_reorderable _obj' reorderable'
    touchManagedPtr _obj
    return ()

-- method IconView::set_row_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row_spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row_spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_row_spacing" gtk_icon_view_set_row_spacing :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- row_spacing : TBasicType TInt32
    IO ()


iconViewSetRowSpacing ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row_spacing
    m ()
iconViewSetRowSpacing _obj row_spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_set_row_spacing _obj' row_spacing
    touchManagedPtr _obj
    return ()

-- method IconView::set_selection_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Gtk" "SelectionMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Gtk" "SelectionMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_selection_mode" gtk_icon_view_set_selection_mode :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    CUInt ->                                -- mode : TInterface "Gtk" "SelectionMode"
    IO ()


iconViewSetSelectionMode ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    SelectionMode ->                        -- mode
    m ()
iconViewSetSelectionMode _obj mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mode' = (fromIntegral . fromEnum) mode
    gtk_icon_view_set_selection_mode _obj' mode'
    touchManagedPtr _obj
    return ()

-- method IconView::set_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_spacing" gtk_icon_view_set_spacing :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- spacing : TBasicType TInt32
    IO ()


iconViewSetSpacing ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- spacing
    m ()
iconViewSetSpacing _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_set_spacing _obj' spacing
    touchManagedPtr _obj
    return ()

-- method IconView::set_text_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_text_column" gtk_icon_view_set_text_column :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


iconViewSetTextColumn ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m ()
iconViewSetTextColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_set_text_column _obj' column
    touchManagedPtr _obj
    return ()

-- method IconView::set_tooltip_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_tooltip_cell" gtk_icon_view_set_tooltip_cell :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr Tooltip ->                          -- tooltip : TInterface "Gtk" "Tooltip"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    IO ()


iconViewSetTooltipCell ::
    (MonadIO m, IconViewK a, TooltipK b, CellRendererK c) =>
    a ->                                    -- _obj
    b ->                                    -- tooltip
    TreePath ->                             -- path
    Maybe (c) ->                            -- cell
    m ()
iconViewSetTooltipCell _obj tooltip path cell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tooltip' = unsafeManagedPtrCastPtr tooltip
    let path' = unsafeManagedPtrGetPtr path
    maybeCell <- case cell of
        Nothing -> return nullPtr
        Just jCell -> do
            let jCell' = unsafeManagedPtrCastPtr jCell
            return jCell'
    gtk_icon_view_set_tooltip_cell _obj' tooltip' path' maybeCell
    touchManagedPtr _obj
    touchManagedPtr tooltip
    touchManagedPtr path
    whenJust cell touchManagedPtr
    return ()

-- method IconView::set_tooltip_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_tooltip_column" gtk_icon_view_set_tooltip_column :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


iconViewSetTooltipColumn ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m ()
iconViewSetTooltipColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_set_tooltip_column _obj' column
    touchManagedPtr _obj
    return ()

-- method IconView::set_tooltip_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_set_tooltip_item" gtk_icon_view_set_tooltip_item :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr Tooltip ->                          -- tooltip : TInterface "Gtk" "Tooltip"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


iconViewSetTooltipItem ::
    (MonadIO m, IconViewK a, TooltipK b) =>
    a ->                                    -- _obj
    b ->                                    -- tooltip
    TreePath ->                             -- path
    m ()
iconViewSetTooltipItem _obj tooltip path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tooltip' = unsafeManagedPtrCastPtr tooltip
    let path' = unsafeManagedPtrGetPtr path
    gtk_icon_view_set_tooltip_item _obj' tooltip' path'
    touchManagedPtr _obj
    touchManagedPtr tooltip
    touchManagedPtr path
    return ()

-- method IconView::unselect_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_unselect_all" gtk_icon_view_unselect_all :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO ()


iconViewUnselectAll ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m ()
iconViewUnselectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_unselect_all _obj'
    touchManagedPtr _obj
    return ()

-- method IconView::unselect_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_unselect_path" gtk_icon_view_unselect_path :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


iconViewUnselectPath ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m ()
iconViewUnselectPath _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    gtk_icon_view_unselect_path _obj' path'
    touchManagedPtr _obj
    touchManagedPtr path
    return ()

-- method IconView::unset_model_drag_dest
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_unset_model_drag_dest" gtk_icon_view_unset_model_drag_dest :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO ()


iconViewUnsetModelDragDest ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m ()
iconViewUnsetModelDragDest _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_unset_model_drag_dest _obj'
    touchManagedPtr _obj
    return ()

-- method IconView::unset_model_drag_source
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_view_unset_model_drag_source" gtk_icon_view_unset_model_drag_source :: 
    Ptr IconView ->                         -- _obj : TInterface "Gtk" "IconView"
    IO ()


iconViewUnsetModelDragSource ::
    (MonadIO m, IconViewK a) =>
    a ->                                    -- _obj
    m ()
iconViewUnsetModelDragSource _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_icon_view_unset_model_drag_source _obj'
    touchManagedPtr _obj
    return ()

-- signal IconView::activate-cursor-item
type IconViewActivateCursorItemCallback =
    IO Bool

noIconViewActivateCursorItemCallback :: Maybe IconViewActivateCursorItemCallback
noIconViewActivateCursorItemCallback = Nothing

type IconViewActivateCursorItemCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkIconViewActivateCursorItemCallback :: IconViewActivateCursorItemCallbackC -> IO (FunPtr IconViewActivateCursorItemCallbackC)

iconViewActivateCursorItemClosure :: IconViewActivateCursorItemCallback -> IO Closure
iconViewActivateCursorItemClosure cb = newCClosure =<< mkIconViewActivateCursorItemCallback wrapped
    where wrapped = iconViewActivateCursorItemCallbackWrapper cb

iconViewActivateCursorItemCallbackWrapper ::
    IconViewActivateCursorItemCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
iconViewActivateCursorItemCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onIconViewActivateCursorItem :: (GObject a, MonadIO m) => a -> IconViewActivateCursorItemCallback -> m SignalHandlerId
onIconViewActivateCursorItem obj cb = liftIO $ connectIconViewActivateCursorItem obj cb SignalConnectBefore
afterIconViewActivateCursorItem :: (GObject a, MonadIO m) => a -> IconViewActivateCursorItemCallback -> m SignalHandlerId
afterIconViewActivateCursorItem obj cb = connectIconViewActivateCursorItem obj cb SignalConnectAfter

connectIconViewActivateCursorItem :: (GObject a, MonadIO m) =>
                                     a -> IconViewActivateCursorItemCallback -> SignalConnectMode -> m SignalHandlerId
connectIconViewActivateCursorItem obj cb after = liftIO $ do
    cb' <- mkIconViewActivateCursorItemCallback (iconViewActivateCursorItemCallbackWrapper cb)
    connectSignalFunPtr obj "activate-cursor-item" cb' after

-- signal IconView::item-activated
type IconViewItemActivatedCallback =
    TreePath ->
    IO ()

noIconViewItemActivatedCallback :: Maybe IconViewItemActivatedCallback
noIconViewItemActivatedCallback = Nothing

type IconViewItemActivatedCallbackC =
    Ptr () ->                               -- object
    Ptr TreePath ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkIconViewItemActivatedCallback :: IconViewItemActivatedCallbackC -> IO (FunPtr IconViewItemActivatedCallbackC)

iconViewItemActivatedClosure :: IconViewItemActivatedCallback -> IO Closure
iconViewItemActivatedClosure cb = newCClosure =<< mkIconViewItemActivatedCallback wrapped
    where wrapped = iconViewItemActivatedCallbackWrapper cb

iconViewItemActivatedCallbackWrapper ::
    IconViewItemActivatedCallback ->
    Ptr () ->
    Ptr TreePath ->
    Ptr () ->
    IO ()
iconViewItemActivatedCallbackWrapper _cb _ path _ = do
    path' <- (newBoxed TreePath) path
    _cb  path'

onIconViewItemActivated :: (GObject a, MonadIO m) => a -> IconViewItemActivatedCallback -> m SignalHandlerId
onIconViewItemActivated obj cb = liftIO $ connectIconViewItemActivated obj cb SignalConnectBefore
afterIconViewItemActivated :: (GObject a, MonadIO m) => a -> IconViewItemActivatedCallback -> m SignalHandlerId
afterIconViewItemActivated obj cb = connectIconViewItemActivated obj cb SignalConnectAfter

connectIconViewItemActivated :: (GObject a, MonadIO m) =>
                                a -> IconViewItemActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectIconViewItemActivated obj cb after = liftIO $ do
    cb' <- mkIconViewItemActivatedCallback (iconViewItemActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "item-activated" cb' after

-- signal IconView::move-cursor
type IconViewMoveCursorCallback =
    MovementStep ->
    Int32 ->
    IO Bool

noIconViewMoveCursorCallback :: Maybe IconViewMoveCursorCallback
noIconViewMoveCursorCallback = Nothing

type IconViewMoveCursorCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkIconViewMoveCursorCallback :: IconViewMoveCursorCallbackC -> IO (FunPtr IconViewMoveCursorCallbackC)

iconViewMoveCursorClosure :: IconViewMoveCursorCallback -> IO Closure
iconViewMoveCursorClosure cb = newCClosure =<< mkIconViewMoveCursorCallback wrapped
    where wrapped = iconViewMoveCursorCallbackWrapper cb

iconViewMoveCursorCallbackWrapper ::
    IconViewMoveCursorCallback ->
    Ptr () ->
    CUInt ->
    Int32 ->
    Ptr () ->
    IO CInt
iconViewMoveCursorCallbackWrapper _cb _ step count _ = do
    let step' = (toEnum . fromIntegral) step
    result <- _cb  step' count
    let result' = (fromIntegral . fromEnum) result
    return result'

onIconViewMoveCursor :: (GObject a, MonadIO m) => a -> IconViewMoveCursorCallback -> m SignalHandlerId
onIconViewMoveCursor obj cb = liftIO $ connectIconViewMoveCursor obj cb SignalConnectBefore
afterIconViewMoveCursor :: (GObject a, MonadIO m) => a -> IconViewMoveCursorCallback -> m SignalHandlerId
afterIconViewMoveCursor obj cb = connectIconViewMoveCursor obj cb SignalConnectAfter

connectIconViewMoveCursor :: (GObject a, MonadIO m) =>
                             a -> IconViewMoveCursorCallback -> SignalConnectMode -> m SignalHandlerId
connectIconViewMoveCursor obj cb after = liftIO $ do
    cb' <- mkIconViewMoveCursorCallback (iconViewMoveCursorCallbackWrapper cb)
    connectSignalFunPtr obj "move-cursor" cb' after

-- signal IconView::select-all
type IconViewSelectAllCallback =
    IO ()

noIconViewSelectAllCallback :: Maybe IconViewSelectAllCallback
noIconViewSelectAllCallback = Nothing

type IconViewSelectAllCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkIconViewSelectAllCallback :: IconViewSelectAllCallbackC -> IO (FunPtr IconViewSelectAllCallbackC)

iconViewSelectAllClosure :: IconViewSelectAllCallback -> IO Closure
iconViewSelectAllClosure cb = newCClosure =<< mkIconViewSelectAllCallback wrapped
    where wrapped = iconViewSelectAllCallbackWrapper cb

iconViewSelectAllCallbackWrapper ::
    IconViewSelectAllCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
iconViewSelectAllCallbackWrapper _cb _ _ = do
    _cb 

onIconViewSelectAll :: (GObject a, MonadIO m) => a -> IconViewSelectAllCallback -> m SignalHandlerId
onIconViewSelectAll obj cb = liftIO $ connectIconViewSelectAll obj cb SignalConnectBefore
afterIconViewSelectAll :: (GObject a, MonadIO m) => a -> IconViewSelectAllCallback -> m SignalHandlerId
afterIconViewSelectAll obj cb = connectIconViewSelectAll obj cb SignalConnectAfter

connectIconViewSelectAll :: (GObject a, MonadIO m) =>
                            a -> IconViewSelectAllCallback -> SignalConnectMode -> m SignalHandlerId
connectIconViewSelectAll obj cb after = liftIO $ do
    cb' <- mkIconViewSelectAllCallback (iconViewSelectAllCallbackWrapper cb)
    connectSignalFunPtr obj "select-all" cb' after

-- signal IconView::select-cursor-item
type IconViewSelectCursorItemCallback =
    IO ()

noIconViewSelectCursorItemCallback :: Maybe IconViewSelectCursorItemCallback
noIconViewSelectCursorItemCallback = Nothing

type IconViewSelectCursorItemCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkIconViewSelectCursorItemCallback :: IconViewSelectCursorItemCallbackC -> IO (FunPtr IconViewSelectCursorItemCallbackC)

iconViewSelectCursorItemClosure :: IconViewSelectCursorItemCallback -> IO Closure
iconViewSelectCursorItemClosure cb = newCClosure =<< mkIconViewSelectCursorItemCallback wrapped
    where wrapped = iconViewSelectCursorItemCallbackWrapper cb

iconViewSelectCursorItemCallbackWrapper ::
    IconViewSelectCursorItemCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
iconViewSelectCursorItemCallbackWrapper _cb _ _ = do
    _cb 

onIconViewSelectCursorItem :: (GObject a, MonadIO m) => a -> IconViewSelectCursorItemCallback -> m SignalHandlerId
onIconViewSelectCursorItem obj cb = liftIO $ connectIconViewSelectCursorItem obj cb SignalConnectBefore
afterIconViewSelectCursorItem :: (GObject a, MonadIO m) => a -> IconViewSelectCursorItemCallback -> m SignalHandlerId
afterIconViewSelectCursorItem obj cb = connectIconViewSelectCursorItem obj cb SignalConnectAfter

connectIconViewSelectCursorItem :: (GObject a, MonadIO m) =>
                                   a -> IconViewSelectCursorItemCallback -> SignalConnectMode -> m SignalHandlerId
connectIconViewSelectCursorItem obj cb after = liftIO $ do
    cb' <- mkIconViewSelectCursorItemCallback (iconViewSelectCursorItemCallbackWrapper cb)
    connectSignalFunPtr obj "select-cursor-item" cb' after

-- signal IconView::selection-changed
type IconViewSelectionChangedCallback =
    IO ()

noIconViewSelectionChangedCallback :: Maybe IconViewSelectionChangedCallback
noIconViewSelectionChangedCallback = Nothing

type IconViewSelectionChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkIconViewSelectionChangedCallback :: IconViewSelectionChangedCallbackC -> IO (FunPtr IconViewSelectionChangedCallbackC)

iconViewSelectionChangedClosure :: IconViewSelectionChangedCallback -> IO Closure
iconViewSelectionChangedClosure cb = newCClosure =<< mkIconViewSelectionChangedCallback wrapped
    where wrapped = iconViewSelectionChangedCallbackWrapper cb

iconViewSelectionChangedCallbackWrapper ::
    IconViewSelectionChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
iconViewSelectionChangedCallbackWrapper _cb _ _ = do
    _cb 

onIconViewSelectionChanged :: (GObject a, MonadIO m) => a -> IconViewSelectionChangedCallback -> m SignalHandlerId
onIconViewSelectionChanged obj cb = liftIO $ connectIconViewSelectionChanged obj cb SignalConnectBefore
afterIconViewSelectionChanged :: (GObject a, MonadIO m) => a -> IconViewSelectionChangedCallback -> m SignalHandlerId
afterIconViewSelectionChanged obj cb = connectIconViewSelectionChanged obj cb SignalConnectAfter

connectIconViewSelectionChanged :: (GObject a, MonadIO m) =>
                                   a -> IconViewSelectionChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectIconViewSelectionChanged obj cb after = liftIO $ do
    cb' <- mkIconViewSelectionChangedCallback (iconViewSelectionChangedCallbackWrapper cb)
    connectSignalFunPtr obj "selection-changed" cb' after

-- signal IconView::toggle-cursor-item
type IconViewToggleCursorItemCallback =
    IO ()

noIconViewToggleCursorItemCallback :: Maybe IconViewToggleCursorItemCallback
noIconViewToggleCursorItemCallback = Nothing

type IconViewToggleCursorItemCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkIconViewToggleCursorItemCallback :: IconViewToggleCursorItemCallbackC -> IO (FunPtr IconViewToggleCursorItemCallbackC)

iconViewToggleCursorItemClosure :: IconViewToggleCursorItemCallback -> IO Closure
iconViewToggleCursorItemClosure cb = newCClosure =<< mkIconViewToggleCursorItemCallback wrapped
    where wrapped = iconViewToggleCursorItemCallbackWrapper cb

iconViewToggleCursorItemCallbackWrapper ::
    IconViewToggleCursorItemCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
iconViewToggleCursorItemCallbackWrapper _cb _ _ = do
    _cb 

onIconViewToggleCursorItem :: (GObject a, MonadIO m) => a -> IconViewToggleCursorItemCallback -> m SignalHandlerId
onIconViewToggleCursorItem obj cb = liftIO $ connectIconViewToggleCursorItem obj cb SignalConnectBefore
afterIconViewToggleCursorItem :: (GObject a, MonadIO m) => a -> IconViewToggleCursorItemCallback -> m SignalHandlerId
afterIconViewToggleCursorItem obj cb = connectIconViewToggleCursorItem obj cb SignalConnectAfter

connectIconViewToggleCursorItem :: (GObject a, MonadIO m) =>
                                   a -> IconViewToggleCursorItemCallback -> SignalConnectMode -> m SignalHandlerId
connectIconViewToggleCursorItem obj cb after = liftIO $ do
    cb' <- mkIconViewToggleCursorItemCallback (iconViewToggleCursorItemCallbackWrapper cb)
    connectSignalFunPtr obj "toggle-cursor-item" cb' after

-- signal IconView::unselect-all
type IconViewUnselectAllCallback =
    IO ()

noIconViewUnselectAllCallback :: Maybe IconViewUnselectAllCallback
noIconViewUnselectAllCallback = Nothing

type IconViewUnselectAllCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkIconViewUnselectAllCallback :: IconViewUnselectAllCallbackC -> IO (FunPtr IconViewUnselectAllCallbackC)

iconViewUnselectAllClosure :: IconViewUnselectAllCallback -> IO Closure
iconViewUnselectAllClosure cb = newCClosure =<< mkIconViewUnselectAllCallback wrapped
    where wrapped = iconViewUnselectAllCallbackWrapper cb

iconViewUnselectAllCallbackWrapper ::
    IconViewUnselectAllCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
iconViewUnselectAllCallbackWrapper _cb _ _ = do
    _cb 

onIconViewUnselectAll :: (GObject a, MonadIO m) => a -> IconViewUnselectAllCallback -> m SignalHandlerId
onIconViewUnselectAll obj cb = liftIO $ connectIconViewUnselectAll obj cb SignalConnectBefore
afterIconViewUnselectAll :: (GObject a, MonadIO m) => a -> IconViewUnselectAllCallback -> m SignalHandlerId
afterIconViewUnselectAll obj cb = connectIconViewUnselectAll obj cb SignalConnectAfter

connectIconViewUnselectAll :: (GObject a, MonadIO m) =>
                              a -> IconViewUnselectAllCallback -> SignalConnectMode -> m SignalHandlerId
connectIconViewUnselectAll obj cb after = liftIO $ do
    cb' <- mkIconViewUnselectAllCallback (iconViewUnselectAllCallbackWrapper cb)
    connectSignalFunPtr obj "unselect-all" cb' after

-- object IconViewAccessible 
newtype IconViewAccessible = IconViewAccessible (ForeignPtr IconViewAccessible)
noIconViewAccessible :: Maybe IconViewAccessible
noIconViewAccessible = Nothing

foreign import ccall "gtk_icon_view_accessible_get_type"
    c_gtk_icon_view_accessible_get_type :: IO GType

type instance ParentTypes IconViewAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Selection]

instance GObject IconViewAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_icon_view_accessible_get_type
    

class GObject o => IconViewAccessibleK o
instance (GObject o, IsDescendantOf IconViewAccessible o) => IconViewAccessibleK o

toIconViewAccessible :: IconViewAccessibleK o => o -> IO IconViewAccessible
toIconViewAccessible = unsafeCastTo IconViewAccessible

-- Enum IconViewDropPosition

data IconViewDropPosition = 
      IconViewDropPositionNoDrop
    | IconViewDropPositionDropInto
    | IconViewDropPositionDropLeft
    | IconViewDropPositionDropRight
    | IconViewDropPositionDropAbove
    | IconViewDropPositionDropBelow
    | AnotherIconViewDropPosition Int
    deriving (Show, Eq)

instance Enum IconViewDropPosition where
    fromEnum IconViewDropPositionNoDrop = 0
    fromEnum IconViewDropPositionDropInto = 1
    fromEnum IconViewDropPositionDropLeft = 2
    fromEnum IconViewDropPositionDropRight = 3
    fromEnum IconViewDropPositionDropAbove = 4
    fromEnum IconViewDropPositionDropBelow = 5
    fromEnum (AnotherIconViewDropPosition k) = k

    toEnum 0 = IconViewDropPositionNoDrop
    toEnum 1 = IconViewDropPositionDropInto
    toEnum 2 = IconViewDropPositionDropLeft
    toEnum 3 = IconViewDropPositionDropRight
    toEnum 4 = IconViewDropPositionDropAbove
    toEnum 5 = IconViewDropPositionDropBelow
    toEnum k = AnotherIconViewDropPosition k

foreign import ccall "gtk_icon_view_drop_position_get_type" c_gtk_icon_view_drop_position_get_type :: 
    IO GType

instance BoxedEnum IconViewDropPosition where
    boxedEnumType _ = c_gtk_icon_view_drop_position_get_type

-- callback IconViewForeachFunc
iconViewForeachFuncClosure :: IconViewForeachFunc -> IO Closure
iconViewForeachFuncClosure cb = newCClosure =<< mkIconViewForeachFunc wrapped
    where wrapped = iconViewForeachFuncWrapper Nothing cb

type IconViewForeachFuncC =
    Ptr IconView ->
    Ptr TreePath ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkIconViewForeachFunc :: IconViewForeachFuncC -> IO (FunPtr IconViewForeachFuncC)

type IconViewForeachFunc =
    IconView ->
    TreePath ->
    IO ()

noIconViewForeachFunc :: Maybe IconViewForeachFunc
noIconViewForeachFunc = Nothing

iconViewForeachFuncWrapper ::
    Maybe (Ptr (FunPtr (IconViewForeachFuncC))) ->
    IconViewForeachFunc ->
    Ptr IconView ->
    Ptr TreePath ->
    Ptr () ->
    IO ()
iconViewForeachFuncWrapper funptrptr _cb icon_view path _ = do
    icon_view' <- (newObject IconView) icon_view
    path' <- (newBoxed TreePath) path
    _cb  icon_view' path'
    maybeReleaseFunPtr funptrptr

-- object Image 
newtype Image = Image (ForeignPtr Image)
noImage :: Maybe Image
noImage = Nothing

foreign import ccall "gtk_image_get_type"
    c_gtk_image_get_type :: IO GType

type instance ParentTypes Image = '[Misc, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Image where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_image_get_type
    

class GObject o => ImageK o
instance (GObject o, IsDescendantOf Image o) => ImageK o

toImage :: ImageK o => o -> IO Image
toImage = unsafeCastTo Image

-- method Image::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Image"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new" gtk_image_new :: 
    IO (Ptr Image)


imageNew ::
    (MonadIO m) =>
    m Image
imageNew  = liftIO $ do
    result <- gtk_image_new
    checkUnexpectedReturnNULL "gtk_image_new" result
    result' <- (newObject Image) result
    return result'

-- method Image::new_from_animation
-- method type : Constructor
-- Args : [Arg {argName = "animation", argType = TInterface "GdkPixbuf" "PixbufAnimation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "animation", argType = TInterface "GdkPixbuf" "PixbufAnimation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Image"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_animation" gtk_image_new_from_animation :: 
    Ptr GdkPixbuf.PixbufAnimation ->        -- animation : TInterface "GdkPixbuf" "PixbufAnimation"
    IO (Ptr Image)


imageNewFromAnimation ::
    (MonadIO m, GdkPixbuf.PixbufAnimationK a) =>
    a ->                                    -- animation
    m Image
imageNewFromAnimation animation = liftIO $ do
    let animation' = unsafeManagedPtrCastPtr animation
    result <- gtk_image_new_from_animation animation'
    checkUnexpectedReturnNULL "gtk_image_new_from_animation" result
    result' <- (newObject Image) result
    touchManagedPtr animation
    return result'

-- method Image::new_from_file
-- method type : Constructor
-- Args : [Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Image"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_file" gtk_image_new_from_file :: 
    CString ->                              -- filename : TBasicType TFileName
    IO (Ptr Image)


imageNewFromFile ::
    (MonadIO m) =>
    [Char] ->                               -- filename
    m Image
imageNewFromFile filename = liftIO $ do
    filename' <- stringToCString filename
    result <- gtk_image_new_from_file filename'
    checkUnexpectedReturnNULL "gtk_image_new_from_file" result
    result' <- (newObject Image) result
    freeMem filename'
    return result'

-- method Image::new_from_gicon
-- method type : Constructor
-- Args : [Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Image"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_gicon" gtk_image_new_from_gicon :: 
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    Int32 ->                                -- size : TBasicType TInt32
    IO (Ptr Image)


imageNewFromGicon ::
    (MonadIO m, Gio.IconK a) =>
    a ->                                    -- icon
    Int32 ->                                -- size
    m Image
imageNewFromGicon icon size = liftIO $ do
    let icon' = unsafeManagedPtrCastPtr icon
    result <- gtk_image_new_from_gicon icon' size
    checkUnexpectedReturnNULL "gtk_image_new_from_gicon" result
    result' <- (newObject Image) result
    touchManagedPtr icon
    return result'

-- method Image::new_from_icon_name
-- method type : Constructor
-- Args : [Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Image"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_icon_name" gtk_image_new_from_icon_name :: 
    CString ->                              -- icon_name : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    IO (Ptr Image)


imageNewFromIconName ::
    (MonadIO m) =>
    T.Text ->                               -- icon_name
    Int32 ->                                -- size
    m Image
imageNewFromIconName icon_name size = liftIO $ do
    icon_name' <- textToCString icon_name
    result <- gtk_image_new_from_icon_name icon_name' size
    checkUnexpectedReturnNULL "gtk_image_new_from_icon_name" result
    result' <- (newObject Image) result
    freeMem icon_name'
    return result'

-- method Image::new_from_icon_set
-- method type : Constructor
-- Args : [Arg {argName = "icon_set", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon_set", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Image"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_icon_set" gtk_image_new_from_icon_set :: 
    Ptr IconSet ->                          -- icon_set : TInterface "Gtk" "IconSet"
    Int32 ->                                -- size : TBasicType TInt32
    IO (Ptr Image)

{-# DEPRECATED imageNewFromIconSet ["(Since version 3.10)","Use gtk_image_new_from_icon_name() instead."]#-}
imageNewFromIconSet ::
    (MonadIO m) =>
    IconSet ->                              -- icon_set
    Int32 ->                                -- size
    m Image
imageNewFromIconSet icon_set size = liftIO $ do
    let icon_set' = unsafeManagedPtrGetPtr icon_set
    result <- gtk_image_new_from_icon_set icon_set' size
    checkUnexpectedReturnNULL "gtk_image_new_from_icon_set" result
    result' <- (newObject Image) result
    touchManagedPtr icon_set
    return result'

-- method Image::new_from_pixbuf
-- method type : Constructor
-- Args : [Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Image"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_pixbuf" gtk_image_new_from_pixbuf :: 
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO (Ptr Image)


imageNewFromPixbuf ::
    (MonadIO m, GdkPixbuf.PixbufK a) =>
    Maybe (a) ->                            -- pixbuf
    m Image
imageNewFromPixbuf pixbuf = liftIO $ do
    maybePixbuf <- case pixbuf of
        Nothing -> return nullPtr
        Just jPixbuf -> do
            let jPixbuf' = unsafeManagedPtrCastPtr jPixbuf
            return jPixbuf'
    result <- gtk_image_new_from_pixbuf maybePixbuf
    checkUnexpectedReturnNULL "gtk_image_new_from_pixbuf" result
    result' <- (newObject Image) result
    whenJust pixbuf touchManagedPtr
    return result'

-- method Image::new_from_resource
-- method type : Constructor
-- Args : [Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Image"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_resource" gtk_image_new_from_resource :: 
    CString ->                              -- resource_path : TBasicType TUTF8
    IO (Ptr Image)


imageNewFromResource ::
    (MonadIO m) =>
    T.Text ->                               -- resource_path
    m Image
imageNewFromResource resource_path = liftIO $ do
    resource_path' <- textToCString resource_path
    result <- gtk_image_new_from_resource resource_path'
    checkUnexpectedReturnNULL "gtk_image_new_from_resource" result
    result' <- (newObject Image) result
    freeMem resource_path'
    return result'

-- method Image::new_from_stock
-- method type : Constructor
-- Args : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Image"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_stock" gtk_image_new_from_stock :: 
    CString ->                              -- stock_id : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    IO (Ptr Image)

{-# DEPRECATED imageNewFromStock ["(Since version 3.10)","Use gtk_image_new_from_icon_name() instead."]#-}
imageNewFromStock ::
    (MonadIO m) =>
    T.Text ->                               -- stock_id
    Int32 ->                                -- size
    m Image
imageNewFromStock stock_id size = liftIO $ do
    stock_id' <- textToCString stock_id
    result <- gtk_image_new_from_stock stock_id' size
    checkUnexpectedReturnNULL "gtk_image_new_from_stock" result
    result' <- (newObject Image) result
    freeMem stock_id'
    return result'

-- method Image::new_from_surface
-- method type : Constructor
-- Args : [Arg {argName = "surface", argType = TInterface "cairo" "Surface", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "surface", argType = TInterface "cairo" "Surface", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Image"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_new_from_surface" gtk_image_new_from_surface :: 
    Ptr Cairo.Surface ->                    -- surface : TInterface "cairo" "Surface"
    IO (Ptr Image)


imageNewFromSurface ::
    (MonadIO m) =>
    Maybe (Cairo.Surface) ->                -- surface
    m Image
imageNewFromSurface surface = liftIO $ do
    maybeSurface <- case surface of
        Nothing -> return nullPtr
        Just jSurface -> do
            let jSurface' = unsafeManagedPtrGetPtr jSurface
            return jSurface'
    result <- gtk_image_new_from_surface maybeSurface
    checkUnexpectedReturnNULL "gtk_image_new_from_surface" result
    result' <- (newObject Image) result
    whenJust surface touchManagedPtr
    return result'

-- method Image::clear
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_clear" gtk_image_clear :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    IO ()


imageClear ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    m ()
imageClear _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_image_clear _obj'
    touchManagedPtr _obj
    return ()

-- method Image::get_animation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "PixbufAnimation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_get_animation" gtk_image_get_animation :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    IO (Ptr GdkPixbuf.PixbufAnimation)


imageGetAnimation ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    m GdkPixbuf.PixbufAnimation
imageGetAnimation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_image_get_animation _obj'
    checkUnexpectedReturnNULL "gtk_image_get_animation" result
    result' <- (newObject GdkPixbuf.PixbufAnimation) result
    touchManagedPtr _obj
    return result'

-- method Image::get_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gicon", argType = TInterface "Gio" "Icon", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_get_gicon" gtk_image_get_gicon :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    Ptr (Ptr Gio.Icon) ->                   -- gicon : TInterface "Gio" "Icon"
    Ptr Int32 ->                            -- size : TBasicType TInt32
    IO ()


imageGetGicon ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    m (Gio.Icon,Int32)
imageGetGicon _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gicon <- allocMem :: IO (Ptr (Ptr Gio.Icon))
    size <- allocMem :: IO (Ptr Int32)
    gtk_image_get_gicon _obj' gicon size
    gicon' <- peek gicon
    gicon'' <- (newObject Gio.Icon) gicon'
    size' <- peek size
    touchManagedPtr _obj
    freeMem gicon
    freeMem size
    return (gicon'', size')

-- method Image::get_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_get_icon_name" gtk_image_get_icon_name :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    Ptr CString ->                          -- icon_name : TBasicType TUTF8
    Ptr Int32 ->                            -- size : TBasicType TInt32
    IO ()


imageGetIconName ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    m (T.Text,Int32)
imageGetIconName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name <- allocMem :: IO (Ptr CString)
    size <- allocMem :: IO (Ptr Int32)
    gtk_image_get_icon_name _obj' icon_name size
    icon_name' <- peek icon_name
    icon_name'' <- cstringToText icon_name'
    size' <- peek size
    touchManagedPtr _obj
    freeMem icon_name
    freeMem size
    return (icon_name'', size')

-- method Image::get_icon_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_set", argType = TInterface "Gtk" "IconSet", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_get_icon_set" gtk_image_get_icon_set :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    Ptr (Ptr IconSet) ->                    -- icon_set : TInterface "Gtk" "IconSet"
    Ptr Int32 ->                            -- size : TBasicType TInt32
    IO ()

{-# DEPRECATED imageGetIconSet ["(Since version 3.10)","Use gtk_image_get_icon_name() instead."]#-}
imageGetIconSet ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    m (IconSet,Int32)
imageGetIconSet _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_set <- allocMem :: IO (Ptr (Ptr IconSet))
    size <- allocMem :: IO (Ptr Int32)
    gtk_image_get_icon_set _obj' icon_set size
    icon_set' <- peek icon_set
    icon_set'' <- (newBoxed IconSet) icon_set'
    size' <- peek size
    touchManagedPtr _obj
    freeMem icon_set
    freeMem size
    return (icon_set'', size')

-- method Image::get_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_get_pixbuf" gtk_image_get_pixbuf :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    IO (Ptr GdkPixbuf.Pixbuf)


imageGetPixbuf ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    m GdkPixbuf.Pixbuf
imageGetPixbuf _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_image_get_pixbuf _obj'
    checkUnexpectedReturnNULL "gtk_image_get_pixbuf" result
    result' <- (newObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method Image::get_pixel_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_get_pixel_size" gtk_image_get_pixel_size :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    IO Int32


imageGetPixelSize ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    m Int32
imageGetPixelSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_image_get_pixel_size _obj'
    touchManagedPtr _obj
    return result

-- method Image::get_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_get_stock" gtk_image_get_stock :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    Ptr CString ->                          -- stock_id : TBasicType TUTF8
    Ptr Int32 ->                            -- size : TBasicType TInt32
    IO ()

{-# DEPRECATED imageGetStock ["(Since version 3.10)","Use gtk_image_get_icon_name() instead."]#-}
imageGetStock ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    m (T.Text,Int32)
imageGetStock _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    stock_id <- allocMem :: IO (Ptr CString)
    size <- allocMem :: IO (Ptr Int32)
    gtk_image_get_stock _obj' stock_id size
    stock_id' <- peek stock_id
    stock_id'' <- cstringToText stock_id'
    size' <- peek size
    touchManagedPtr _obj
    freeMem stock_id
    freeMem size
    return (stock_id'', size')

-- method Image::get_storage_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ImageType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_get_storage_type" gtk_image_get_storage_type :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    IO CUInt


imageGetStorageType ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    m ImageType
imageGetStorageType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_image_get_storage_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Image::set_from_animation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "animation", argType = TInterface "GdkPixbuf" "PixbufAnimation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "animation", argType = TInterface "GdkPixbuf" "PixbufAnimation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_animation" gtk_image_set_from_animation :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    Ptr GdkPixbuf.PixbufAnimation ->        -- animation : TInterface "GdkPixbuf" "PixbufAnimation"
    IO ()


imageSetFromAnimation ::
    (MonadIO m, ImageK a, GdkPixbuf.PixbufAnimationK b) =>
    a ->                                    -- _obj
    b ->                                    -- animation
    m ()
imageSetFromAnimation _obj animation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let animation' = unsafeManagedPtrCastPtr animation
    gtk_image_set_from_animation _obj' animation'
    touchManagedPtr _obj
    touchManagedPtr animation
    return ()

-- method Image::set_from_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_file" gtk_image_set_from_file :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    CString ->                              -- filename : TBasicType TFileName
    IO ()


imageSetFromFile ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    Maybe ([Char]) ->                       -- filename
    m ()
imageSetFromFile _obj filename = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFilename <- case filename of
        Nothing -> return nullPtr
        Just jFilename -> do
            jFilename' <- stringToCString jFilename
            return jFilename'
    gtk_image_set_from_file _obj' maybeFilename
    touchManagedPtr _obj
    freeMem maybeFilename
    return ()

-- method Image::set_from_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_gicon" gtk_image_set_from_gicon :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    Int32 ->                                -- size : TBasicType TInt32
    IO ()


imageSetFromGicon ::
    (MonadIO m, ImageK a, Gio.IconK b) =>
    a ->                                    -- _obj
    b ->                                    -- icon
    Int32 ->                                -- size
    m ()
imageSetFromGicon _obj icon size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon' = unsafeManagedPtrCastPtr icon
    gtk_image_set_from_gicon _obj' icon' size
    touchManagedPtr _obj
    touchManagedPtr icon
    return ()

-- method Image::set_from_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_icon_name" gtk_image_set_from_icon_name :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    CString ->                              -- icon_name : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    IO ()


imageSetFromIconName ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- icon_name
    Int32 ->                                -- size
    m ()
imageSetFromIconName _obj icon_name size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name' <- textToCString icon_name
    gtk_image_set_from_icon_name _obj' icon_name' size
    touchManagedPtr _obj
    freeMem icon_name'
    return ()

-- method Image::set_from_icon_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_set", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_set", argType = TInterface "Gtk" "IconSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_icon_set" gtk_image_set_from_icon_set :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    Ptr IconSet ->                          -- icon_set : TInterface "Gtk" "IconSet"
    Int32 ->                                -- size : TBasicType TInt32
    IO ()

{-# DEPRECATED imageSetFromIconSet ["(Since version 3.10)","Use gtk_image_set_from_icon_name() instead."]#-}
imageSetFromIconSet ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    IconSet ->                              -- icon_set
    Int32 ->                                -- size
    m ()
imageSetFromIconSet _obj icon_set size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_set' = unsafeManagedPtrGetPtr icon_set
    gtk_image_set_from_icon_set _obj' icon_set' size
    touchManagedPtr _obj
    touchManagedPtr icon_set
    return ()

-- method Image::set_from_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_pixbuf" gtk_image_set_from_pixbuf :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO ()


imageSetFromPixbuf ::
    (MonadIO m, ImageK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- pixbuf
    m ()
imageSetFromPixbuf _obj pixbuf = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePixbuf <- case pixbuf of
        Nothing -> return nullPtr
        Just jPixbuf -> do
            let jPixbuf' = unsafeManagedPtrCastPtr jPixbuf
            return jPixbuf'
    gtk_image_set_from_pixbuf _obj' maybePixbuf
    touchManagedPtr _obj
    whenJust pixbuf touchManagedPtr
    return ()

-- method Image::set_from_resource
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_resource" gtk_image_set_from_resource :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    CString ->                              -- resource_path : TBasicType TUTF8
    IO ()


imageSetFromResource ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- resource_path
    m ()
imageSetFromResource _obj resource_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeResource_path <- case resource_path of
        Nothing -> return nullPtr
        Just jResource_path -> do
            jResource_path' <- textToCString jResource_path
            return jResource_path'
    gtk_image_set_from_resource _obj' maybeResource_path
    touchManagedPtr _obj
    freeMem maybeResource_path
    return ()

-- method Image::set_from_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_stock" gtk_image_set_from_stock :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    CString ->                              -- stock_id : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    IO ()

{-# DEPRECATED imageSetFromStock ["(Since version 3.10)","Use gtk_image_set_from_icon_name() instead."]#-}
imageSetFromStock ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- stock_id
    Int32 ->                                -- size
    m ()
imageSetFromStock _obj stock_id size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    stock_id' <- textToCString stock_id
    gtk_image_set_from_stock _obj' stock_id' size
    touchManagedPtr _obj
    freeMem stock_id'
    return ()

-- method Image::set_from_surface
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "surface", argType = TInterface "cairo" "Surface", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "surface", argType = TInterface "cairo" "Surface", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_from_surface" gtk_image_set_from_surface :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    Ptr Cairo.Surface ->                    -- surface : TInterface "cairo" "Surface"
    IO ()


imageSetFromSurface ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    Cairo.Surface ->                        -- surface
    m ()
imageSetFromSurface _obj surface = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let surface' = unsafeManagedPtrGetPtr surface
    gtk_image_set_from_surface _obj' surface'
    touchManagedPtr _obj
    touchManagedPtr surface
    return ()

-- method Image::set_pixel_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixel_size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixel_size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_set_pixel_size" gtk_image_set_pixel_size :: 
    Ptr Image ->                            -- _obj : TInterface "Gtk" "Image"
    Int32 ->                                -- pixel_size : TBasicType TInt32
    IO ()


imageSetPixelSize ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- pixel_size
    m ()
imageSetPixelSize _obj pixel_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_image_set_pixel_size _obj' pixel_size
    touchManagedPtr _obj
    return ()

-- object ImageAccessible 
newtype ImageAccessible = ImageAccessible (ForeignPtr ImageAccessible)
noImageAccessible :: Maybe ImageAccessible
noImageAccessible = Nothing

foreign import ccall "gtk_image_accessible_get_type"
    c_gtk_image_accessible_get_type :: IO GType

type instance ParentTypes ImageAccessible = '[WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Image]

instance GObject ImageAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_image_accessible_get_type
    

class GObject o => ImageAccessibleK o
instance (GObject o, IsDescendantOf ImageAccessible o) => ImageAccessibleK o

toImageAccessible :: ImageAccessibleK o => o -> IO ImageAccessible
toImageAccessible = unsafeCastTo ImageAccessible

-- object ImageCellAccessible 
newtype ImageCellAccessible = ImageCellAccessible (ForeignPtr ImageCellAccessible)
noImageCellAccessible :: Maybe ImageCellAccessible
noImageCellAccessible = Nothing

foreign import ccall "gtk_image_cell_accessible_get_type"
    c_gtk_image_cell_accessible_get_type :: IO GType

type instance ParentTypes ImageCellAccessible = '[RendererCellAccessible, CellAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Image]

instance GObject ImageCellAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_image_cell_accessible_get_type
    

class GObject o => ImageCellAccessibleK o
instance (GObject o, IsDescendantOf ImageCellAccessible o) => ImageCellAccessibleK o

toImageCellAccessible :: ImageCellAccessibleK o => o -> IO ImageCellAccessible
toImageCellAccessible = unsafeCastTo ImageCellAccessible

-- object ImageMenuItem 
newtype ImageMenuItem = ImageMenuItem (ForeignPtr ImageMenuItem)
noImageMenuItem :: Maybe ImageMenuItem
noImageMenuItem = Nothing

foreign import ccall "gtk_image_menu_item_get_type"
    c_gtk_image_menu_item_get_type :: IO GType

type instance ParentTypes ImageMenuItem = '[MenuItem, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject ImageMenuItem where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_image_menu_item_get_type
    

class GObject o => ImageMenuItemK o
instance (GObject o, IsDescendantOf ImageMenuItem o) => ImageMenuItemK o

toImageMenuItem :: ImageMenuItemK o => o -> IO ImageMenuItem
toImageMenuItem = unsafeCastTo ImageMenuItem

-- method ImageMenuItem::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ImageMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_menu_item_new" gtk_image_menu_item_new :: 
    IO (Ptr ImageMenuItem)

{-# DEPRECATED imageMenuItemNew ["(Since version 3.10)","Use gtk_menu_item_new() instead."]#-}
imageMenuItemNew ::
    (MonadIO m) =>
    m ImageMenuItem
imageMenuItemNew  = liftIO $ do
    result <- gtk_image_menu_item_new
    checkUnexpectedReturnNULL "gtk_image_menu_item_new" result
    result' <- (newObject ImageMenuItem) result
    return result'

-- method ImageMenuItem::new_from_stock
-- method type : Constructor
-- Args : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ImageMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_menu_item_new_from_stock" gtk_image_menu_item_new_from_stock :: 
    CString ->                              -- stock_id : TBasicType TUTF8
    Ptr AccelGroup ->                       -- accel_group : TInterface "Gtk" "AccelGroup"
    IO (Ptr ImageMenuItem)

{-# DEPRECATED imageMenuItemNewFromStock ["(Since version 3.10)","Use gtk_menu_item_new_with_mnemonic() instead."]#-}
imageMenuItemNewFromStock ::
    (MonadIO m, AccelGroupK a) =>
    T.Text ->                               -- stock_id
    Maybe (a) ->                            -- accel_group
    m ImageMenuItem
imageMenuItemNewFromStock stock_id accel_group = liftIO $ do
    stock_id' <- textToCString stock_id
    maybeAccel_group <- case accel_group of
        Nothing -> return nullPtr
        Just jAccel_group -> do
            let jAccel_group' = unsafeManagedPtrCastPtr jAccel_group
            return jAccel_group'
    result <- gtk_image_menu_item_new_from_stock stock_id' maybeAccel_group
    checkUnexpectedReturnNULL "gtk_image_menu_item_new_from_stock" result
    result' <- (newObject ImageMenuItem) result
    whenJust accel_group touchManagedPtr
    freeMem stock_id'
    return result'

-- method ImageMenuItem::new_with_label
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ImageMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_menu_item_new_with_label" gtk_image_menu_item_new_with_label :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr ImageMenuItem)

{-# DEPRECATED imageMenuItemNewWithLabel ["(Since version 3.10)","Use gtk_menu_item_new_with_label() instead."]#-}
imageMenuItemNewWithLabel ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m ImageMenuItem
imageMenuItemNewWithLabel label = liftIO $ do
    label' <- textToCString label
    result <- gtk_image_menu_item_new_with_label label'
    checkUnexpectedReturnNULL "gtk_image_menu_item_new_with_label" result
    result' <- (newObject ImageMenuItem) result
    freeMem label'
    return result'

-- method ImageMenuItem::new_with_mnemonic
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ImageMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_menu_item_new_with_mnemonic" gtk_image_menu_item_new_with_mnemonic :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr ImageMenuItem)

{-# DEPRECATED imageMenuItemNewWithMnemonic ["(Since version 3.10)","Use gtk_menu_item_new_with_mnemonic() instead."]#-}
imageMenuItemNewWithMnemonic ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m ImageMenuItem
imageMenuItemNewWithMnemonic label = liftIO $ do
    label' <- textToCString label
    result <- gtk_image_menu_item_new_with_mnemonic label'
    checkUnexpectedReturnNULL "gtk_image_menu_item_new_with_mnemonic" result
    result' <- (newObject ImageMenuItem) result
    freeMem label'
    return result'

-- method ImageMenuItem::get_always_show_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_menu_item_get_always_show_image" gtk_image_menu_item_get_always_show_image :: 
    Ptr ImageMenuItem ->                    -- _obj : TInterface "Gtk" "ImageMenuItem"
    IO CInt

{-# DEPRECATED imageMenuItemGetAlwaysShowImage ["(Since version 3.10)"]#-}
imageMenuItemGetAlwaysShowImage ::
    (MonadIO m, ImageMenuItemK a) =>
    a ->                                    -- _obj
    m Bool
imageMenuItemGetAlwaysShowImage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_image_menu_item_get_always_show_image _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ImageMenuItem::get_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_menu_item_get_image" gtk_image_menu_item_get_image :: 
    Ptr ImageMenuItem ->                    -- _obj : TInterface "Gtk" "ImageMenuItem"
    IO (Ptr Widget)

{-# DEPRECATED imageMenuItemGetImage ["(Since version 3.10)"]#-}
imageMenuItemGetImage ::
    (MonadIO m, ImageMenuItemK a) =>
    a ->                                    -- _obj
    m Widget
imageMenuItemGetImage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_image_menu_item_get_image _obj'
    checkUnexpectedReturnNULL "gtk_image_menu_item_get_image" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method ImageMenuItem::get_use_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_menu_item_get_use_stock" gtk_image_menu_item_get_use_stock :: 
    Ptr ImageMenuItem ->                    -- _obj : TInterface "Gtk" "ImageMenuItem"
    IO CInt

{-# DEPRECATED imageMenuItemGetUseStock ["(Since version 3.10)"]#-}
imageMenuItemGetUseStock ::
    (MonadIO m, ImageMenuItemK a) =>
    a ->                                    -- _obj
    m Bool
imageMenuItemGetUseStock _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_image_menu_item_get_use_stock _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ImageMenuItem::set_accel_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_menu_item_set_accel_group" gtk_image_menu_item_set_accel_group :: 
    Ptr ImageMenuItem ->                    -- _obj : TInterface "Gtk" "ImageMenuItem"
    Ptr AccelGroup ->                       -- accel_group : TInterface "Gtk" "AccelGroup"
    IO ()

{-# DEPRECATED imageMenuItemSetAccelGroup ["(Since version 3.10)"]#-}
imageMenuItemSetAccelGroup ::
    (MonadIO m, ImageMenuItemK a, AccelGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- accel_group
    m ()
imageMenuItemSetAccelGroup _obj accel_group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accel_group' = unsafeManagedPtrCastPtr accel_group
    gtk_image_menu_item_set_accel_group _obj' accel_group'
    touchManagedPtr _obj
    touchManagedPtr accel_group
    return ()

-- method ImageMenuItem::set_always_show_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "always_show", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "always_show", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_menu_item_set_always_show_image" gtk_image_menu_item_set_always_show_image :: 
    Ptr ImageMenuItem ->                    -- _obj : TInterface "Gtk" "ImageMenuItem"
    CInt ->                                 -- always_show : TBasicType TBoolean
    IO ()

{-# DEPRECATED imageMenuItemSetAlwaysShowImage ["(Since version 3.10)"]#-}
imageMenuItemSetAlwaysShowImage ::
    (MonadIO m, ImageMenuItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- always_show
    m ()
imageMenuItemSetAlwaysShowImage _obj always_show = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let always_show' = (fromIntegral . fromEnum) always_show
    gtk_image_menu_item_set_always_show_image _obj' always_show'
    touchManagedPtr _obj
    return ()

-- method ImageMenuItem::set_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "image", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "image", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_menu_item_set_image" gtk_image_menu_item_set_image :: 
    Ptr ImageMenuItem ->                    -- _obj : TInterface "Gtk" "ImageMenuItem"
    Ptr Widget ->                           -- image : TInterface "Gtk" "Widget"
    IO ()

{-# DEPRECATED imageMenuItemSetImage ["(Since version 3.10)"]#-}
imageMenuItemSetImage ::
    (MonadIO m, ImageMenuItemK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- image
    m ()
imageMenuItemSetImage _obj image = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeImage <- case image of
        Nothing -> return nullPtr
        Just jImage -> do
            let jImage' = unsafeManagedPtrCastPtr jImage
            return jImage'
    gtk_image_menu_item_set_image _obj' maybeImage
    touchManagedPtr _obj
    whenJust image touchManagedPtr
    return ()

-- method ImageMenuItem::set_use_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_stock", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ImageMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_stock", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_image_menu_item_set_use_stock" gtk_image_menu_item_set_use_stock :: 
    Ptr ImageMenuItem ->                    -- _obj : TInterface "Gtk" "ImageMenuItem"
    CInt ->                                 -- use_stock : TBasicType TBoolean
    IO ()

{-# DEPRECATED imageMenuItemSetUseStock ["(Since version 3.10)"]#-}
imageMenuItemSetUseStock ::
    (MonadIO m, ImageMenuItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_stock
    m ()
imageMenuItemSetUseStock _obj use_stock = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_stock' = (fromIntegral . fromEnum) use_stock
    gtk_image_menu_item_set_use_stock _obj' use_stock'
    touchManagedPtr _obj
    return ()

-- Enum ImageType

data ImageType = 
      ImageTypeEmpty
    | ImageTypePixbuf
    | ImageTypeStock
    | ImageTypeIconSet
    | ImageTypeAnimation
    | ImageTypeIconName
    | ImageTypeGicon
    | ImageTypeSurface
    | AnotherImageType Int
    deriving (Show, Eq)

instance Enum ImageType where
    fromEnum ImageTypeEmpty = 0
    fromEnum ImageTypePixbuf = 1
    fromEnum ImageTypeStock = 2
    fromEnum ImageTypeIconSet = 3
    fromEnum ImageTypeAnimation = 4
    fromEnum ImageTypeIconName = 5
    fromEnum ImageTypeGicon = 6
    fromEnum ImageTypeSurface = 7
    fromEnum (AnotherImageType k) = k

    toEnum 0 = ImageTypeEmpty
    toEnum 1 = ImageTypePixbuf
    toEnum 2 = ImageTypeStock
    toEnum 3 = ImageTypeIconSet
    toEnum 4 = ImageTypeAnimation
    toEnum 5 = ImageTypeIconName
    toEnum 6 = ImageTypeGicon
    toEnum 7 = ImageTypeSurface
    toEnum k = AnotherImageType k

foreign import ccall "gtk_image_type_get_type" c_gtk_image_type_get_type :: 
    IO GType

instance BoxedEnum ImageType where
    boxedEnumType _ = c_gtk_image_type_get_type

-- object InfoBar 
newtype InfoBar = InfoBar (ForeignPtr InfoBar)
noInfoBar :: Maybe InfoBar
noInfoBar = Nothing

foreign import ccall "gtk_info_bar_get_type"
    c_gtk_info_bar_get_type :: IO GType

type instance ParentTypes InfoBar = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject InfoBar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_info_bar_get_type
    

class GObject o => InfoBarK o
instance (GObject o, IsDescendantOf InfoBar o) => InfoBarK o

toInfoBar :: InfoBarK o => o -> IO InfoBar
toInfoBar = unsafeCastTo InfoBar

-- method InfoBar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "InfoBar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_new" gtk_info_bar_new :: 
    IO (Ptr InfoBar)


infoBarNew ::
    (MonadIO m) =>
    m InfoBar
infoBarNew  = liftIO $ do
    result <- gtk_info_bar_new
    checkUnexpectedReturnNULL "gtk_info_bar_new" result
    result' <- (newObject InfoBar) result
    return result'

-- method InfoBar::add_action_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_add_action_widget" gtk_info_bar_add_action_widget :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Int32 ->                                -- response_id : TBasicType TInt32
    IO ()


infoBarAddActionWidget ::
    (MonadIO m, InfoBarK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Int32 ->                                -- response_id
    m ()
infoBarAddActionWidget _obj child response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_info_bar_add_action_widget _obj' child' response_id
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method InfoBar::add_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Button"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_add_button" gtk_info_bar_add_button :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    CString ->                              -- button_text : TBasicType TUTF8
    Int32 ->                                -- response_id : TBasicType TInt32
    IO (Ptr Button)


infoBarAddButton ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- button_text
    Int32 ->                                -- response_id
    m Button
infoBarAddButton _obj button_text response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    button_text' <- textToCString button_text
    result <- gtk_info_bar_add_button _obj' button_text' response_id
    checkUnexpectedReturnNULL "gtk_info_bar_add_button" result
    result' <- (newObject Button) result
    touchManagedPtr _obj
    freeMem button_text'
    return result'

-- method InfoBar::get_action_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_get_action_area" gtk_info_bar_get_action_area :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    IO (Ptr Widget)


infoBarGetActionArea ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    m Widget
infoBarGetActionArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_info_bar_get_action_area _obj'
    checkUnexpectedReturnNULL "gtk_info_bar_get_action_area" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method InfoBar::get_content_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_get_content_area" gtk_info_bar_get_content_area :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    IO (Ptr Widget)


infoBarGetContentArea ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    m Widget
infoBarGetContentArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_info_bar_get_content_area _obj'
    checkUnexpectedReturnNULL "gtk_info_bar_get_content_area" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method InfoBar::get_message_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "MessageType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_get_message_type" gtk_info_bar_get_message_type :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    IO CUInt


infoBarGetMessageType ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    m MessageType
infoBarGetMessageType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_info_bar_get_message_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method InfoBar::get_show_close_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_get_show_close_button" gtk_info_bar_get_show_close_button :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    IO CInt


infoBarGetShowCloseButton ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    m Bool
infoBarGetShowCloseButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_info_bar_get_show_close_button _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method InfoBar::response
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_response" gtk_info_bar_response :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    Int32 ->                                -- response_id : TBasicType TInt32
    IO ()


infoBarResponse ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- response_id
    m ()
infoBarResponse _obj response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_info_bar_response _obj' response_id
    touchManagedPtr _obj
    return ()

-- method InfoBar::set_default_response
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_set_default_response" gtk_info_bar_set_default_response :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    Int32 ->                                -- response_id : TBasicType TInt32
    IO ()


infoBarSetDefaultResponse ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- response_id
    m ()
infoBarSetDefaultResponse _obj response_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_info_bar_set_default_response _obj' response_id
    touchManagedPtr _obj
    return ()

-- method InfoBar::set_message_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "message_type", argType = TInterface "Gtk" "MessageType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "message_type", argType = TInterface "Gtk" "MessageType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_set_message_type" gtk_info_bar_set_message_type :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    CUInt ->                                -- message_type : TInterface "Gtk" "MessageType"
    IO ()


infoBarSetMessageType ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    MessageType ->                          -- message_type
    m ()
infoBarSetMessageType _obj message_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let message_type' = (fromIntegral . fromEnum) message_type
    gtk_info_bar_set_message_type _obj' message_type'
    touchManagedPtr _obj
    return ()

-- method InfoBar::set_response_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "response_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_set_response_sensitive" gtk_info_bar_set_response_sensitive :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    Int32 ->                                -- response_id : TBasicType TInt32
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


infoBarSetResponseSensitive ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- response_id
    Bool ->                                 -- setting
    m ()
infoBarSetResponseSensitive _obj response_id setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_info_bar_set_response_sensitive _obj' response_id setting'
    touchManagedPtr _obj
    return ()

-- method InfoBar::set_show_close_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "InfoBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_info_bar_set_show_close_button" gtk_info_bar_set_show_close_button :: 
    Ptr InfoBar ->                          -- _obj : TInterface "Gtk" "InfoBar"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


infoBarSetShowCloseButton ::
    (MonadIO m, InfoBarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
infoBarSetShowCloseButton _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_info_bar_set_show_close_button _obj' setting'
    touchManagedPtr _obj
    return ()

-- signal InfoBar::close
type InfoBarCloseCallback =
    IO ()

noInfoBarCloseCallback :: Maybe InfoBarCloseCallback
noInfoBarCloseCallback = Nothing

type InfoBarCloseCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkInfoBarCloseCallback :: InfoBarCloseCallbackC -> IO (FunPtr InfoBarCloseCallbackC)

infoBarCloseClosure :: InfoBarCloseCallback -> IO Closure
infoBarCloseClosure cb = newCClosure =<< mkInfoBarCloseCallback wrapped
    where wrapped = infoBarCloseCallbackWrapper cb

infoBarCloseCallbackWrapper ::
    InfoBarCloseCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
infoBarCloseCallbackWrapper _cb _ _ = do
    _cb 

onInfoBarClose :: (GObject a, MonadIO m) => a -> InfoBarCloseCallback -> m SignalHandlerId
onInfoBarClose obj cb = liftIO $ connectInfoBarClose obj cb SignalConnectBefore
afterInfoBarClose :: (GObject a, MonadIO m) => a -> InfoBarCloseCallback -> m SignalHandlerId
afterInfoBarClose obj cb = connectInfoBarClose obj cb SignalConnectAfter

connectInfoBarClose :: (GObject a, MonadIO m) =>
                       a -> InfoBarCloseCallback -> SignalConnectMode -> m SignalHandlerId
connectInfoBarClose obj cb after = liftIO $ do
    cb' <- mkInfoBarCloseCallback (infoBarCloseCallbackWrapper cb)
    connectSignalFunPtr obj "close" cb' after

-- signal InfoBar::response
type InfoBarResponseCallback =
    Int32 ->
    IO ()

noInfoBarResponseCallback :: Maybe InfoBarResponseCallback
noInfoBarResponseCallback = Nothing

type InfoBarResponseCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkInfoBarResponseCallback :: InfoBarResponseCallbackC -> IO (FunPtr InfoBarResponseCallbackC)

infoBarResponseClosure :: InfoBarResponseCallback -> IO Closure
infoBarResponseClosure cb = newCClosure =<< mkInfoBarResponseCallback wrapped
    where wrapped = infoBarResponseCallbackWrapper cb

infoBarResponseCallbackWrapper ::
    InfoBarResponseCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO ()
infoBarResponseCallbackWrapper _cb _ response_id _ = do
    _cb  response_id

onInfoBarResponse :: (GObject a, MonadIO m) => a -> InfoBarResponseCallback -> m SignalHandlerId
onInfoBarResponse obj cb = liftIO $ connectInfoBarResponse obj cb SignalConnectBefore
afterInfoBarResponse :: (GObject a, MonadIO m) => a -> InfoBarResponseCallback -> m SignalHandlerId
afterInfoBarResponse obj cb = connectInfoBarResponse obj cb SignalConnectAfter

connectInfoBarResponse :: (GObject a, MonadIO m) =>
                          a -> InfoBarResponseCallback -> SignalConnectMode -> m SignalHandlerId
connectInfoBarResponse obj cb after = liftIO $ do
    cb' <- mkInfoBarResponseCallback (infoBarResponseCallbackWrapper cb)
    connectSignalFunPtr obj "response" cb' after

-- Flags InputHints

data InputHints = 
      InputHintsNone
    | InputHintsSpellcheck
    | InputHintsNoSpellcheck
    | InputHintsWordCompletion
    | InputHintsLowercase
    | InputHintsUppercaseChars
    | InputHintsUppercaseWords
    | InputHintsUppercaseSentences
    | InputHintsInhibitOsk
    | InputHintsVerticalWriting
    | AnotherInputHints Int
    deriving (Show, Eq)

instance Enum InputHints where
    fromEnum InputHintsNone = 0
    fromEnum InputHintsSpellcheck = 1
    fromEnum InputHintsNoSpellcheck = 2
    fromEnum InputHintsWordCompletion = 4
    fromEnum InputHintsLowercase = 8
    fromEnum InputHintsUppercaseChars = 16
    fromEnum InputHintsUppercaseWords = 32
    fromEnum InputHintsUppercaseSentences = 64
    fromEnum InputHintsInhibitOsk = 128
    fromEnum InputHintsVerticalWriting = 256
    fromEnum (AnotherInputHints k) = k

    toEnum 0 = InputHintsNone
    toEnum 1 = InputHintsSpellcheck
    toEnum 2 = InputHintsNoSpellcheck
    toEnum 4 = InputHintsWordCompletion
    toEnum 8 = InputHintsLowercase
    toEnum 16 = InputHintsUppercaseChars
    toEnum 32 = InputHintsUppercaseWords
    toEnum 64 = InputHintsUppercaseSentences
    toEnum 128 = InputHintsInhibitOsk
    toEnum 256 = InputHintsVerticalWriting
    toEnum k = AnotherInputHints k

foreign import ccall "gtk_input_hints_get_type" c_gtk_input_hints_get_type :: 
    IO GType

instance BoxedEnum InputHints where
    boxedEnumType _ = c_gtk_input_hints_get_type

instance IsGFlag InputHints

-- Enum InputPurpose

data InputPurpose = 
      InputPurposeFreeForm
    | InputPurposeAlpha
    | InputPurposeDigits
    | InputPurposeNumber
    | InputPurposePhone
    | InputPurposeUrl
    | InputPurposeEmail
    | InputPurposeName
    | InputPurposePassword
    | InputPurposePin
    | AnotherInputPurpose Int
    deriving (Show, Eq)

instance Enum InputPurpose where
    fromEnum InputPurposeFreeForm = 0
    fromEnum InputPurposeAlpha = 1
    fromEnum InputPurposeDigits = 2
    fromEnum InputPurposeNumber = 3
    fromEnum InputPurposePhone = 4
    fromEnum InputPurposeUrl = 5
    fromEnum InputPurposeEmail = 6
    fromEnum InputPurposeName = 7
    fromEnum InputPurposePassword = 8
    fromEnum InputPurposePin = 9
    fromEnum (AnotherInputPurpose k) = k

    toEnum 0 = InputPurposeFreeForm
    toEnum 1 = InputPurposeAlpha
    toEnum 2 = InputPurposeDigits
    toEnum 3 = InputPurposeNumber
    toEnum 4 = InputPurposePhone
    toEnum 5 = InputPurposeUrl
    toEnum 6 = InputPurposeEmail
    toEnum 7 = InputPurposeName
    toEnum 8 = InputPurposePassword
    toEnum 9 = InputPurposePin
    toEnum k = AnotherInputPurpose k

foreign import ccall "gtk_input_purpose_get_type" c_gtk_input_purpose_get_type :: 
    IO GType

instance BoxedEnum InputPurpose where
    boxedEnumType _ = c_gtk_input_purpose_get_type

-- object Invisible 
newtype Invisible = Invisible (ForeignPtr Invisible)
noInvisible :: Maybe Invisible
noInvisible = Nothing

foreign import ccall "gtk_invisible_get_type"
    c_gtk_invisible_get_type :: IO GType

type instance ParentTypes Invisible = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Invisible where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_invisible_get_type
    

class GObject o => InvisibleK o
instance (GObject o, IsDescendantOf Invisible o) => InvisibleK o

toInvisible :: InvisibleK o => o -> IO Invisible
toInvisible = unsafeCastTo Invisible

-- method Invisible::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Invisible"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_invisible_new" gtk_invisible_new :: 
    IO (Ptr Invisible)


invisibleNew ::
    (MonadIO m) =>
    m Invisible
invisibleNew  = liftIO $ do
    result <- gtk_invisible_new
    checkUnexpectedReturnNULL "gtk_invisible_new" result
    result' <- (newObject Invisible) result
    return result'

-- method Invisible::new_for_screen
-- method type : Constructor
-- Args : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Invisible"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_invisible_new_for_screen" gtk_invisible_new_for_screen :: 
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO (Ptr Invisible)


invisibleNewForScreen ::
    (MonadIO m, Gdk.ScreenK a) =>
    a ->                                    -- screen
    m Invisible
invisibleNewForScreen screen = liftIO $ do
    let screen' = unsafeManagedPtrCastPtr screen
    result <- gtk_invisible_new_for_screen screen'
    checkUnexpectedReturnNULL "gtk_invisible_new_for_screen" result
    result' <- (newObject Invisible) result
    touchManagedPtr screen
    return result'

-- method Invisible::get_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Invisible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Invisible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Screen"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_invisible_get_screen" gtk_invisible_get_screen :: 
    Ptr Invisible ->                        -- _obj : TInterface "Gtk" "Invisible"
    IO (Ptr Gdk.Screen)


invisibleGetScreen ::
    (MonadIO m, InvisibleK a) =>
    a ->                                    -- _obj
    m Gdk.Screen
invisibleGetScreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_invisible_get_screen _obj'
    checkUnexpectedReturnNULL "gtk_invisible_get_screen" result
    result' <- (newObject Gdk.Screen) result
    touchManagedPtr _obj
    return result'

-- method Invisible::set_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Invisible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Invisible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_invisible_set_screen" gtk_invisible_set_screen :: 
    Ptr Invisible ->                        -- _obj : TInterface "Gtk" "Invisible"
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO ()


invisibleSetScreen ::
    (MonadIO m, InvisibleK a, Gdk.ScreenK b) =>
    a ->                                    -- _obj
    b ->                                    -- screen
    m ()
invisibleSetScreen _obj screen = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let screen' = unsafeManagedPtrCastPtr screen
    gtk_invisible_set_screen _obj' screen'
    touchManagedPtr _obj
    touchManagedPtr screen
    return ()

-- Flags JunctionSides

data JunctionSides = 
      JunctionSidesNone
    | JunctionSidesCornerTopleft
    | JunctionSidesCornerTopright
    | JunctionSidesCornerBottomleft
    | JunctionSidesCornerBottomright
    | JunctionSidesTop
    | JunctionSidesBottom
    | JunctionSidesLeft
    | JunctionSidesRight
    | AnotherJunctionSides Int
    deriving (Show, Eq)

instance Enum JunctionSides where
    fromEnum JunctionSidesNone = 0
    fromEnum JunctionSidesCornerTopleft = 1
    fromEnum JunctionSidesCornerTopright = 2
    fromEnum JunctionSidesCornerBottomleft = 4
    fromEnum JunctionSidesCornerBottomright = 8
    fromEnum JunctionSidesTop = 3
    fromEnum JunctionSidesBottom = 12
    fromEnum JunctionSidesLeft = 5
    fromEnum JunctionSidesRight = 10
    fromEnum (AnotherJunctionSides k) = k

    toEnum 0 = JunctionSidesNone
    toEnum 1 = JunctionSidesCornerTopleft
    toEnum 2 = JunctionSidesCornerTopright
    toEnum 3 = JunctionSidesTop
    toEnum 4 = JunctionSidesCornerBottomleft
    toEnum 5 = JunctionSidesLeft
    toEnum 8 = JunctionSidesCornerBottomright
    toEnum 10 = JunctionSidesRight
    toEnum 12 = JunctionSidesBottom
    toEnum k = AnotherJunctionSides k

foreign import ccall "gtk_junction_sides_get_type" c_gtk_junction_sides_get_type :: 
    IO GType

instance BoxedEnum JunctionSides where
    boxedEnumType _ = c_gtk_junction_sides_get_type

instance IsGFlag JunctionSides

-- Enum Justification

data Justification = 
      JustificationLeft
    | JustificationRight
    | JustificationCenter
    | JustificationFill
    | AnotherJustification Int
    deriving (Show, Eq)

instance Enum Justification where
    fromEnum JustificationLeft = 0
    fromEnum JustificationRight = 1
    fromEnum JustificationCenter = 2
    fromEnum JustificationFill = 3
    fromEnum (AnotherJustification k) = k

    toEnum 0 = JustificationLeft
    toEnum 1 = JustificationRight
    toEnum 2 = JustificationCenter
    toEnum 3 = JustificationFill
    toEnum k = AnotherJustification k

foreign import ccall "gtk_justification_get_type" c_gtk_justification_get_type :: 
    IO GType

instance BoxedEnum Justification where
    boxedEnumType _ = c_gtk_justification_get_type

-- callback KeySnoopFunc
keySnoopFuncClosure :: KeySnoopFunc -> IO Closure
keySnoopFuncClosure cb = newCClosure =<< mkKeySnoopFunc wrapped
    where wrapped = keySnoopFuncWrapper Nothing cb

type KeySnoopFuncC =
    Ptr Widget ->
    Ptr Gdk.EventKey ->
    Ptr () ->
    IO Int32

foreign import ccall "wrapper"
    mkKeySnoopFunc :: KeySnoopFuncC -> IO (FunPtr KeySnoopFuncC)

type KeySnoopFunc =
    Widget ->
    Gdk.EventKey ->
    IO Int32

noKeySnoopFunc :: Maybe KeySnoopFunc
noKeySnoopFunc = Nothing

keySnoopFuncWrapper ::
    Maybe (Ptr (FunPtr (KeySnoopFuncC))) ->
    KeySnoopFunc ->
    Ptr Widget ->
    Ptr Gdk.EventKey ->
    Ptr () ->
    IO Int32
keySnoopFuncWrapper funptrptr _cb grab_widget event _ = do
    grab_widget' <- (newObject Widget) grab_widget
    event' <- (newPtr 56 Gdk.EventKey) event
    result <- _cb  grab_widget' event'
    maybeReleaseFunPtr funptrptr
    return result

-- object Label 
newtype Label = Label (ForeignPtr Label)
noLabel :: Maybe Label
noLabel = Nothing

foreign import ccall "gtk_label_get_type"
    c_gtk_label_get_type :: IO GType

type instance ParentTypes Label = '[Misc, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Label where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_label_get_type
    

class GObject o => LabelK o
instance (GObject o, IsDescendantOf Label o) => LabelK o

toLabel :: LabelK o => o -> IO Label
toLabel = unsafeCastTo Label

-- method Label::new
-- method type : Constructor
-- Args : [Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Label"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_new" gtk_label_new :: 
    CString ->                              -- str : TBasicType TUTF8
    IO (Ptr Label)


labelNew ::
    (MonadIO m) =>
    Maybe (T.Text) ->                       -- str
    m Label
labelNew str = liftIO $ do
    maybeStr <- case str of
        Nothing -> return nullPtr
        Just jStr -> do
            jStr' <- textToCString jStr
            return jStr'
    result <- gtk_label_new maybeStr
    checkUnexpectedReturnNULL "gtk_label_new" result
    result' <- (newObject Label) result
    freeMem maybeStr
    return result'

-- method Label::new_with_mnemonic
-- method type : Constructor
-- Args : [Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Label"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_new_with_mnemonic" gtk_label_new_with_mnemonic :: 
    CString ->                              -- str : TBasicType TUTF8
    IO (Ptr Label)


labelNewWithMnemonic ::
    (MonadIO m) =>
    Maybe (T.Text) ->                       -- str
    m Label
labelNewWithMnemonic str = liftIO $ do
    maybeStr <- case str of
        Nothing -> return nullPtr
        Just jStr -> do
            jStr' <- textToCString jStr
            return jStr'
    result <- gtk_label_new_with_mnemonic maybeStr
    checkUnexpectedReturnNULL "gtk_label_new_with_mnemonic" result
    result' <- (newObject Label) result
    freeMem maybeStr
    return result'

-- method Label::get_angle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_angle" gtk_label_get_angle :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CDouble


labelGetAngle ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Double
labelGetAngle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_angle _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Label::get_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "AttrList"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_attributes" gtk_label_get_attributes :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO (Ptr Pango.AttrList)


labelGetAttributes ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Pango.AttrList
labelGetAttributes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_attributes _obj'
    checkUnexpectedReturnNULL "gtk_label_get_attributes" result
    result' <- (newBoxed Pango.AttrList) result
    touchManagedPtr _obj
    return result'

-- method Label::get_current_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_current_uri" gtk_label_get_current_uri :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CString


labelGetCurrentUri ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m T.Text
labelGetCurrentUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_current_uri _obj'
    checkUnexpectedReturnNULL "gtk_label_get_current_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Label::get_ellipsize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "EllipsizeMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_ellipsize" gtk_label_get_ellipsize :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CUInt


labelGetEllipsize ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Pango.EllipsizeMode
labelGetEllipsize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_ellipsize _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Label::get_justify
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Justification"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_justify" gtk_label_get_justify :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CUInt


labelGetJustify ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Justification
labelGetJustify _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_justify _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Label::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_label" gtk_label_get_label :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CString


labelGetLabel ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m T.Text
labelGetLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_label _obj'
    checkUnexpectedReturnNULL "gtk_label_get_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Label::get_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Layout"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_layout" gtk_label_get_layout :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO (Ptr Pango.Layout)


labelGetLayout ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Pango.Layout
labelGetLayout _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_layout _obj'
    checkUnexpectedReturnNULL "gtk_label_get_layout" result
    result' <- (newObject Pango.Layout) result
    touchManagedPtr _obj
    return result'

-- method Label::get_layout_offsets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_layout_offsets" gtk_label_get_layout_offsets :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO ()


labelGetLayoutOffsets ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
labelGetLayoutOffsets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    x <- allocMem :: IO (Ptr Int32)
    y <- allocMem :: IO (Ptr Int32)
    gtk_label_get_layout_offsets _obj' x y
    x' <- peek x
    y' <- peek y
    touchManagedPtr _obj
    freeMem x
    freeMem y
    return (x', y')

-- method Label::get_line_wrap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_line_wrap" gtk_label_get_line_wrap :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CInt


labelGetLineWrap ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Bool
labelGetLineWrap _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_line_wrap _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Label::get_line_wrap_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "WrapMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_line_wrap_mode" gtk_label_get_line_wrap_mode :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CUInt


labelGetLineWrapMode ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Pango.WrapMode
labelGetLineWrapMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_line_wrap_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Label::get_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_lines" gtk_label_get_lines :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO Int32


labelGetLines ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Int32
labelGetLines _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_lines _obj'
    touchManagedPtr _obj
    return result

-- method Label::get_max_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_max_width_chars" gtk_label_get_max_width_chars :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO Int32


labelGetMaxWidthChars ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Int32
labelGetMaxWidthChars _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_max_width_chars _obj'
    touchManagedPtr _obj
    return result

-- method Label::get_mnemonic_keyval
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_mnemonic_keyval" gtk_label_get_mnemonic_keyval :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO Word32


labelGetMnemonicKeyval ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Word32
labelGetMnemonicKeyval _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_mnemonic_keyval _obj'
    touchManagedPtr _obj
    return result

-- method Label::get_mnemonic_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_mnemonic_widget" gtk_label_get_mnemonic_widget :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO (Ptr Widget)


labelGetMnemonicWidget ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Widget
labelGetMnemonicWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_mnemonic_widget _obj'
    checkUnexpectedReturnNULL "gtk_label_get_mnemonic_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Label::get_selectable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_selectable" gtk_label_get_selectable :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CInt


labelGetSelectable ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Bool
labelGetSelectable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_selectable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Label::get_selection_bounds
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "end", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_selection_bounds" gtk_label_get_selection_bounds :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    Ptr Int32 ->                            -- start : TBasicType TInt32
    Ptr Int32 ->                            -- end : TBasicType TInt32
    IO CInt


labelGetSelectionBounds ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m (Bool,Int32,Int32)
labelGetSelectionBounds _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    start <- allocMem :: IO (Ptr Int32)
    end <- allocMem :: IO (Ptr Int32)
    result <- gtk_label_get_selection_bounds _obj' start end
    let result' = (/= 0) result
    start' <- peek start
    end' <- peek end
    touchManagedPtr _obj
    freeMem start
    freeMem end
    return (result', start', end')

-- method Label::get_single_line_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_single_line_mode" gtk_label_get_single_line_mode :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CInt


labelGetSingleLineMode ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Bool
labelGetSingleLineMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_single_line_mode _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Label::get_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_text" gtk_label_get_text :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CString


labelGetText ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m T.Text
labelGetText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_text _obj'
    checkUnexpectedReturnNULL "gtk_label_get_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Label::get_track_visited_links
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_track_visited_links" gtk_label_get_track_visited_links :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CInt


labelGetTrackVisitedLinks ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Bool
labelGetTrackVisitedLinks _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_track_visited_links _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Label::get_use_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_use_markup" gtk_label_get_use_markup :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CInt


labelGetUseMarkup ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Bool
labelGetUseMarkup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_use_markup _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Label::get_use_underline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_use_underline" gtk_label_get_use_underline :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CInt


labelGetUseUnderline ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Bool
labelGetUseUnderline _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_use_underline _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Label::get_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_width_chars" gtk_label_get_width_chars :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO Int32


labelGetWidthChars ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Int32
labelGetWidthChars _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_width_chars _obj'
    touchManagedPtr _obj
    return result

-- method Label::get_xalign
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFloat
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_xalign" gtk_label_get_xalign :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CFloat


labelGetXalign ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Float
labelGetXalign _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_xalign _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Label::get_yalign
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFloat
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_get_yalign" gtk_label_get_yalign :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    IO CFloat


labelGetYalign ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    m Float
labelGetYalign _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_label_get_yalign _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Label::select_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_select_region" gtk_label_select_region :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    Int32 ->                                -- start_offset : TBasicType TInt32
    Int32 ->                                -- end_offset : TBasicType TInt32
    IO ()


labelSelectRegion ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- start_offset
    Int32 ->                                -- end_offset
    m ()
labelSelectRegion _obj start_offset end_offset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_label_select_region _obj' start_offset end_offset
    touchManagedPtr _obj
    return ()

-- method Label::set_angle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "angle", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "angle", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_angle" gtk_label_set_angle :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CDouble ->                              -- angle : TBasicType TDouble
    IO ()


labelSetAngle ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Double ->                               -- angle
    m ()
labelSetAngle _obj angle = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let angle' = realToFrac angle
    gtk_label_set_angle _obj' angle'
    touchManagedPtr _obj
    return ()

-- method Label::set_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attrs", argType = TInterface "Pango" "AttrList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attrs", argType = TInterface "Pango" "AttrList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_attributes" gtk_label_set_attributes :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    Ptr Pango.AttrList ->                   -- attrs : TInterface "Pango" "AttrList"
    IO ()


labelSetAttributes ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Maybe (Pango.AttrList) ->               -- attrs
    m ()
labelSetAttributes _obj attrs = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAttrs <- case attrs of
        Nothing -> return nullPtr
        Just jAttrs -> do
            let jAttrs' = unsafeManagedPtrGetPtr jAttrs
            return jAttrs'
    gtk_label_set_attributes _obj' maybeAttrs
    touchManagedPtr _obj
    whenJust attrs touchManagedPtr
    return ()

-- method Label::set_ellipsize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Pango" "EllipsizeMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Pango" "EllipsizeMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_ellipsize" gtk_label_set_ellipsize :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CUInt ->                                -- mode : TInterface "Pango" "EllipsizeMode"
    IO ()


labelSetEllipsize ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Pango.EllipsizeMode ->                  -- mode
    m ()
labelSetEllipsize _obj mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mode' = (fromIntegral . fromEnum) mode
    gtk_label_set_ellipsize _obj' mode'
    touchManagedPtr _obj
    return ()

-- method Label::set_justify
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "jtype", argType = TInterface "Gtk" "Justification", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "jtype", argType = TInterface "Gtk" "Justification", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_justify" gtk_label_set_justify :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CUInt ->                                -- jtype : TInterface "Gtk" "Justification"
    IO ()


labelSetJustify ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Justification ->                        -- jtype
    m ()
labelSetJustify _obj jtype = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let jtype' = (fromIntegral . fromEnum) jtype
    gtk_label_set_justify _obj' jtype'
    touchManagedPtr _obj
    return ()

-- method Label::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_label" gtk_label_set_label :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CString ->                              -- str : TBasicType TUTF8
    IO ()


labelSetLabel ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- str
    m ()
labelSetLabel _obj str = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    str' <- textToCString str
    gtk_label_set_label _obj' str'
    touchManagedPtr _obj
    freeMem str'
    return ()

-- method Label::set_line_wrap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_line_wrap" gtk_label_set_line_wrap :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CInt ->                                 -- wrap : TBasicType TBoolean
    IO ()


labelSetLineWrap ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- wrap
    m ()
labelSetLineWrap _obj wrap = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let wrap' = (fromIntegral . fromEnum) wrap
    gtk_label_set_line_wrap _obj' wrap'
    touchManagedPtr _obj
    return ()

-- method Label::set_line_wrap_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap_mode", argType = TInterface "Pango" "WrapMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap_mode", argType = TInterface "Pango" "WrapMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_line_wrap_mode" gtk_label_set_line_wrap_mode :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CUInt ->                                -- wrap_mode : TInterface "Pango" "WrapMode"
    IO ()


labelSetLineWrapMode ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Pango.WrapMode ->                       -- wrap_mode
    m ()
labelSetLineWrapMode _obj wrap_mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let wrap_mode' = (fromIntegral . fromEnum) wrap_mode
    gtk_label_set_line_wrap_mode _obj' wrap_mode'
    touchManagedPtr _obj
    return ()

-- method Label::set_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lines", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lines", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_lines" gtk_label_set_lines :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    Int32 ->                                -- lines : TBasicType TInt32
    IO ()


labelSetLines ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- lines
    m ()
labelSetLines _obj lines = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_label_set_lines _obj' lines
    touchManagedPtr _obj
    return ()

-- method Label::set_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_markup" gtk_label_set_markup :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CString ->                              -- str : TBasicType TUTF8
    IO ()


labelSetMarkup ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- str
    m ()
labelSetMarkup _obj str = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    str' <- textToCString str
    gtk_label_set_markup _obj' str'
    touchManagedPtr _obj
    freeMem str'
    return ()

-- method Label::set_markup_with_mnemonic
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_markup_with_mnemonic" gtk_label_set_markup_with_mnemonic :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CString ->                              -- str : TBasicType TUTF8
    IO ()


labelSetMarkupWithMnemonic ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- str
    m ()
labelSetMarkupWithMnemonic _obj str = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    str' <- textToCString str
    gtk_label_set_markup_with_mnemonic _obj' str'
    touchManagedPtr _obj
    freeMem str'
    return ()

-- method Label::set_max_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_max_width_chars" gtk_label_set_max_width_chars :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    Int32 ->                                -- n_chars : TBasicType TInt32
    IO ()


labelSetMaxWidthChars ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- n_chars
    m ()
labelSetMaxWidthChars _obj n_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_label_set_max_width_chars _obj' n_chars
    touchManagedPtr _obj
    return ()

-- method Label::set_mnemonic_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_mnemonic_widget" gtk_label_set_mnemonic_widget :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


labelSetMnemonicWidget ::
    (MonadIO m, LabelK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- widget
    m ()
labelSetMnemonicWidget _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    gtk_label_set_mnemonic_widget _obj' maybeWidget
    touchManagedPtr _obj
    whenJust widget touchManagedPtr
    return ()

-- method Label::set_pattern
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_pattern" gtk_label_set_pattern :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CString ->                              -- pattern : TBasicType TUTF8
    IO ()


labelSetPattern ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- pattern
    m ()
labelSetPattern _obj pattern = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    pattern' <- textToCString pattern
    gtk_label_set_pattern _obj' pattern'
    touchManagedPtr _obj
    freeMem pattern'
    return ()

-- method Label::set_selectable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_selectable" gtk_label_set_selectable :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


labelSetSelectable ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
labelSetSelectable _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_label_set_selectable _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Label::set_single_line_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "single_line_mode", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "single_line_mode", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_single_line_mode" gtk_label_set_single_line_mode :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CInt ->                                 -- single_line_mode : TBasicType TBoolean
    IO ()


labelSetSingleLineMode ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- single_line_mode
    m ()
labelSetSingleLineMode _obj single_line_mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let single_line_mode' = (fromIntegral . fromEnum) single_line_mode
    gtk_label_set_single_line_mode _obj' single_line_mode'
    touchManagedPtr _obj
    return ()

-- method Label::set_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_text" gtk_label_set_text :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CString ->                              -- str : TBasicType TUTF8
    IO ()


labelSetText ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- str
    m ()
labelSetText _obj str = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    str' <- textToCString str
    gtk_label_set_text _obj' str'
    touchManagedPtr _obj
    freeMem str'
    return ()

-- method Label::set_text_with_mnemonic
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_text_with_mnemonic" gtk_label_set_text_with_mnemonic :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CString ->                              -- str : TBasicType TUTF8
    IO ()


labelSetTextWithMnemonic ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- str
    m ()
labelSetTextWithMnemonic _obj str = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    str' <- textToCString str
    gtk_label_set_text_with_mnemonic _obj' str'
    touchManagedPtr _obj
    freeMem str'
    return ()

-- method Label::set_track_visited_links
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "track_links", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "track_links", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_track_visited_links" gtk_label_set_track_visited_links :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CInt ->                                 -- track_links : TBasicType TBoolean
    IO ()


labelSetTrackVisitedLinks ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- track_links
    m ()
labelSetTrackVisitedLinks _obj track_links = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let track_links' = (fromIntegral . fromEnum) track_links
    gtk_label_set_track_visited_links _obj' track_links'
    touchManagedPtr _obj
    return ()

-- method Label::set_use_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_use_markup" gtk_label_set_use_markup :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


labelSetUseMarkup ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
labelSetUseMarkup _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_label_set_use_markup _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Label::set_use_underline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_use_underline" gtk_label_set_use_underline :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


labelSetUseUnderline ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
labelSetUseUnderline _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_label_set_use_underline _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Label::set_width_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_chars", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_width_chars" gtk_label_set_width_chars :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    Int32 ->                                -- n_chars : TBasicType TInt32
    IO ()


labelSetWidthChars ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- n_chars
    m ()
labelSetWidthChars _obj n_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_label_set_width_chars _obj' n_chars
    touchManagedPtr _obj
    return ()

-- method Label::set_xalign
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_xalign" gtk_label_set_xalign :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CFloat ->                               -- xalign : TBasicType TFloat
    IO ()


labelSetXalign ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Float ->                                -- xalign
    m ()
labelSetXalign _obj xalign = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let xalign' = realToFrac xalign
    gtk_label_set_xalign _obj' xalign'
    touchManagedPtr _obj
    return ()

-- method Label::set_yalign
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Label", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_label_set_yalign" gtk_label_set_yalign :: 
    Ptr Label ->                            -- _obj : TInterface "Gtk" "Label"
    CFloat ->                               -- yalign : TBasicType TFloat
    IO ()


labelSetYalign ::
    (MonadIO m, LabelK a) =>
    a ->                                    -- _obj
    Float ->                                -- yalign
    m ()
labelSetYalign _obj yalign = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let yalign' = realToFrac yalign
    gtk_label_set_yalign _obj' yalign'
    touchManagedPtr _obj
    return ()

-- signal Label::activate-current-link
type LabelActivateCurrentLinkCallback =
    IO ()

noLabelActivateCurrentLinkCallback :: Maybe LabelActivateCurrentLinkCallback
noLabelActivateCurrentLinkCallback = Nothing

type LabelActivateCurrentLinkCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkLabelActivateCurrentLinkCallback :: LabelActivateCurrentLinkCallbackC -> IO (FunPtr LabelActivateCurrentLinkCallbackC)

labelActivateCurrentLinkClosure :: LabelActivateCurrentLinkCallback -> IO Closure
labelActivateCurrentLinkClosure cb = newCClosure =<< mkLabelActivateCurrentLinkCallback wrapped
    where wrapped = labelActivateCurrentLinkCallbackWrapper cb

labelActivateCurrentLinkCallbackWrapper ::
    LabelActivateCurrentLinkCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
labelActivateCurrentLinkCallbackWrapper _cb _ _ = do
    _cb 

onLabelActivateCurrentLink :: (GObject a, MonadIO m) => a -> LabelActivateCurrentLinkCallback -> m SignalHandlerId
onLabelActivateCurrentLink obj cb = liftIO $ connectLabelActivateCurrentLink obj cb SignalConnectBefore
afterLabelActivateCurrentLink :: (GObject a, MonadIO m) => a -> LabelActivateCurrentLinkCallback -> m SignalHandlerId
afterLabelActivateCurrentLink obj cb = connectLabelActivateCurrentLink obj cb SignalConnectAfter

connectLabelActivateCurrentLink :: (GObject a, MonadIO m) =>
                                   a -> LabelActivateCurrentLinkCallback -> SignalConnectMode -> m SignalHandlerId
connectLabelActivateCurrentLink obj cb after = liftIO $ do
    cb' <- mkLabelActivateCurrentLinkCallback (labelActivateCurrentLinkCallbackWrapper cb)
    connectSignalFunPtr obj "activate-current-link" cb' after

-- signal Label::activate-link
type LabelActivateLinkCallback =
    T.Text ->
    IO Bool

noLabelActivateLinkCallback :: Maybe LabelActivateLinkCallback
noLabelActivateLinkCallback = Nothing

type LabelActivateLinkCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkLabelActivateLinkCallback :: LabelActivateLinkCallbackC -> IO (FunPtr LabelActivateLinkCallbackC)

labelActivateLinkClosure :: LabelActivateLinkCallback -> IO Closure
labelActivateLinkClosure cb = newCClosure =<< mkLabelActivateLinkCallback wrapped
    where wrapped = labelActivateLinkCallbackWrapper cb

labelActivateLinkCallbackWrapper ::
    LabelActivateLinkCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO CInt
labelActivateLinkCallbackWrapper _cb _ uri _ = do
    uri' <- cstringToText uri
    result <- _cb  uri'
    let result' = (fromIntegral . fromEnum) result
    return result'

onLabelActivateLink :: (GObject a, MonadIO m) => a -> LabelActivateLinkCallback -> m SignalHandlerId
onLabelActivateLink obj cb = liftIO $ connectLabelActivateLink obj cb SignalConnectBefore
afterLabelActivateLink :: (GObject a, MonadIO m) => a -> LabelActivateLinkCallback -> m SignalHandlerId
afterLabelActivateLink obj cb = connectLabelActivateLink obj cb SignalConnectAfter

connectLabelActivateLink :: (GObject a, MonadIO m) =>
                            a -> LabelActivateLinkCallback -> SignalConnectMode -> m SignalHandlerId
connectLabelActivateLink obj cb after = liftIO $ do
    cb' <- mkLabelActivateLinkCallback (labelActivateLinkCallbackWrapper cb)
    connectSignalFunPtr obj "activate-link" cb' after

-- signal Label::copy-clipboard
type LabelCopyClipboardCallback =
    IO ()

noLabelCopyClipboardCallback :: Maybe LabelCopyClipboardCallback
noLabelCopyClipboardCallback = Nothing

type LabelCopyClipboardCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkLabelCopyClipboardCallback :: LabelCopyClipboardCallbackC -> IO (FunPtr LabelCopyClipboardCallbackC)

labelCopyClipboardClosure :: LabelCopyClipboardCallback -> IO Closure
labelCopyClipboardClosure cb = newCClosure =<< mkLabelCopyClipboardCallback wrapped
    where wrapped = labelCopyClipboardCallbackWrapper cb

labelCopyClipboardCallbackWrapper ::
    LabelCopyClipboardCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
labelCopyClipboardCallbackWrapper _cb _ _ = do
    _cb 

onLabelCopyClipboard :: (GObject a, MonadIO m) => a -> LabelCopyClipboardCallback -> m SignalHandlerId
onLabelCopyClipboard obj cb = liftIO $ connectLabelCopyClipboard obj cb SignalConnectBefore
afterLabelCopyClipboard :: (GObject a, MonadIO m) => a -> LabelCopyClipboardCallback -> m SignalHandlerId
afterLabelCopyClipboard obj cb = connectLabelCopyClipboard obj cb SignalConnectAfter

connectLabelCopyClipboard :: (GObject a, MonadIO m) =>
                             a -> LabelCopyClipboardCallback -> SignalConnectMode -> m SignalHandlerId
connectLabelCopyClipboard obj cb after = liftIO $ do
    cb' <- mkLabelCopyClipboardCallback (labelCopyClipboardCallbackWrapper cb)
    connectSignalFunPtr obj "copy-clipboard" cb' after

-- signal Label::move-cursor
type LabelMoveCursorCallback =
    MovementStep ->
    Int32 ->
    Bool ->
    IO ()

noLabelMoveCursorCallback :: Maybe LabelMoveCursorCallback
noLabelMoveCursorCallback = Nothing

type LabelMoveCursorCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Int32 ->
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkLabelMoveCursorCallback :: LabelMoveCursorCallbackC -> IO (FunPtr LabelMoveCursorCallbackC)

labelMoveCursorClosure :: LabelMoveCursorCallback -> IO Closure
labelMoveCursorClosure cb = newCClosure =<< mkLabelMoveCursorCallback wrapped
    where wrapped = labelMoveCursorCallbackWrapper cb

labelMoveCursorCallbackWrapper ::
    LabelMoveCursorCallback ->
    Ptr () ->
    CUInt ->
    Int32 ->
    CInt ->
    Ptr () ->
    IO ()
labelMoveCursorCallbackWrapper _cb _ step count extend_selection _ = do
    let step' = (toEnum . fromIntegral) step
    let extend_selection' = (/= 0) extend_selection
    _cb  step' count extend_selection'

onLabelMoveCursor :: (GObject a, MonadIO m) => a -> LabelMoveCursorCallback -> m SignalHandlerId
onLabelMoveCursor obj cb = liftIO $ connectLabelMoveCursor obj cb SignalConnectBefore
afterLabelMoveCursor :: (GObject a, MonadIO m) => a -> LabelMoveCursorCallback -> m SignalHandlerId
afterLabelMoveCursor obj cb = connectLabelMoveCursor obj cb SignalConnectAfter

connectLabelMoveCursor :: (GObject a, MonadIO m) =>
                          a -> LabelMoveCursorCallback -> SignalConnectMode -> m SignalHandlerId
connectLabelMoveCursor obj cb after = liftIO $ do
    cb' <- mkLabelMoveCursorCallback (labelMoveCursorCallbackWrapper cb)
    connectSignalFunPtr obj "move-cursor" cb' after

-- signal Label::populate-popup
type LabelPopulatePopupCallback =
    Menu ->
    IO ()

noLabelPopulatePopupCallback :: Maybe LabelPopulatePopupCallback
noLabelPopulatePopupCallback = Nothing

type LabelPopulatePopupCallbackC =
    Ptr () ->                               -- object
    Ptr Menu ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkLabelPopulatePopupCallback :: LabelPopulatePopupCallbackC -> IO (FunPtr LabelPopulatePopupCallbackC)

labelPopulatePopupClosure :: LabelPopulatePopupCallback -> IO Closure
labelPopulatePopupClosure cb = newCClosure =<< mkLabelPopulatePopupCallback wrapped
    where wrapped = labelPopulatePopupCallbackWrapper cb

labelPopulatePopupCallbackWrapper ::
    LabelPopulatePopupCallback ->
    Ptr () ->
    Ptr Menu ->
    Ptr () ->
    IO ()
labelPopulatePopupCallbackWrapper _cb _ menu _ = do
    menu' <- (newObject Menu) menu
    _cb  menu'

onLabelPopulatePopup :: (GObject a, MonadIO m) => a -> LabelPopulatePopupCallback -> m SignalHandlerId
onLabelPopulatePopup obj cb = liftIO $ connectLabelPopulatePopup obj cb SignalConnectBefore
afterLabelPopulatePopup :: (GObject a, MonadIO m) => a -> LabelPopulatePopupCallback -> m SignalHandlerId
afterLabelPopulatePopup obj cb = connectLabelPopulatePopup obj cb SignalConnectAfter

connectLabelPopulatePopup :: (GObject a, MonadIO m) =>
                             a -> LabelPopulatePopupCallback -> SignalConnectMode -> m SignalHandlerId
connectLabelPopulatePopup obj cb after = liftIO $ do
    cb' <- mkLabelPopulatePopupCallback (labelPopulatePopupCallbackWrapper cb)
    connectSignalFunPtr obj "populate-popup" cb' after

-- object LabelAccessible 
newtype LabelAccessible = LabelAccessible (ForeignPtr LabelAccessible)
noLabelAccessible :: Maybe LabelAccessible
noLabelAccessible = Nothing

foreign import ccall "gtk_label_accessible_get_type"
    c_gtk_label_accessible_get_type :: IO GType

type instance ParentTypes LabelAccessible = '[WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Hypertext, Atk.Text]

instance GObject LabelAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_label_accessible_get_type
    

class GObject o => LabelAccessibleK o
instance (GObject o, IsDescendantOf LabelAccessible o) => LabelAccessibleK o

toLabelAccessible :: LabelAccessibleK o => o -> IO LabelAccessible
toLabelAccessible = unsafeCastTo LabelAccessible

-- struct LabelSelectionInfo
newtype LabelSelectionInfo = LabelSelectionInfo (ForeignPtr LabelSelectionInfo)
noLabelSelectionInfo :: Maybe LabelSelectionInfo
noLabelSelectionInfo = Nothing

-- object Layout 
newtype Layout = Layout (ForeignPtr Layout)
noLayout :: Maybe Layout
noLayout = Nothing

foreign import ccall "gtk_layout_get_type"
    c_gtk_layout_get_type :: IO GType

type instance ParentTypes Layout = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Scrollable]

instance GObject Layout where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_layout_get_type
    

class GObject o => LayoutK o
instance (GObject o, IsDescendantOf Layout o) => LayoutK o

toLayout :: LayoutK o => o -> IO Layout
toLayout = unsafeCastTo Layout

-- method Layout::new
-- method type : Constructor
-- Args : [Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Layout"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layout_new" gtk_layout_new :: 
    Ptr Adjustment ->                       -- hadjustment : TInterface "Gtk" "Adjustment"
    Ptr Adjustment ->                       -- vadjustment : TInterface "Gtk" "Adjustment"
    IO (Ptr Layout)


layoutNew ::
    (MonadIO m, AdjustmentK a, AdjustmentK b) =>
    Maybe (a) ->                            -- hadjustment
    Maybe (b) ->                            -- vadjustment
    m Layout
layoutNew hadjustment vadjustment = liftIO $ do
    maybeHadjustment <- case hadjustment of
        Nothing -> return nullPtr
        Just jHadjustment -> do
            let jHadjustment' = unsafeManagedPtrCastPtr jHadjustment
            return jHadjustment'
    maybeVadjustment <- case vadjustment of
        Nothing -> return nullPtr
        Just jVadjustment -> do
            let jVadjustment' = unsafeManagedPtrCastPtr jVadjustment
            return jVadjustment'
    result <- gtk_layout_new maybeHadjustment maybeVadjustment
    checkUnexpectedReturnNULL "gtk_layout_new" result
    result' <- (newObject Layout) result
    whenJust hadjustment touchManagedPtr
    whenJust vadjustment touchManagedPtr
    return result'

-- method Layout::get_bin_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layout_get_bin_window" gtk_layout_get_bin_window :: 
    Ptr Layout ->                           -- _obj : TInterface "Gtk" "Layout"
    IO (Ptr Gdk.Window)


layoutGetBinWindow ::
    (MonadIO m, LayoutK a) =>
    a ->                                    -- _obj
    m Gdk.Window
layoutGetBinWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_layout_get_bin_window _obj'
    checkUnexpectedReturnNULL "gtk_layout_get_bin_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- method Layout::get_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layout_get_hadjustment" gtk_layout_get_hadjustment :: 
    Ptr Layout ->                           -- _obj : TInterface "Gtk" "Layout"
    IO (Ptr Adjustment)

{-# DEPRECATED layoutGetHadjustment ["(Since version 3.0)","Use gtk_scrollable_get_hadjustment()"]#-}
layoutGetHadjustment ::
    (MonadIO m, LayoutK a) =>
    a ->                                    -- _obj
    m Adjustment
layoutGetHadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_layout_get_hadjustment _obj'
    checkUnexpectedReturnNULL "gtk_layout_get_hadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method Layout::get_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layout_get_size" gtk_layout_get_size :: 
    Ptr Layout ->                           -- _obj : TInterface "Gtk" "Layout"
    Ptr Word32 ->                           -- width : TBasicType TUInt32
    Ptr Word32 ->                           -- height : TBasicType TUInt32
    IO ()


layoutGetSize ::
    (MonadIO m, LayoutK a) =>
    a ->                                    -- _obj
    m (Word32,Word32)
layoutGetSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    width <- allocMem :: IO (Ptr Word32)
    height <- allocMem :: IO (Ptr Word32)
    gtk_layout_get_size _obj' width height
    width' <- peek width
    height' <- peek height
    touchManagedPtr _obj
    freeMem width
    freeMem height
    return (width', height')

-- method Layout::get_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layout_get_vadjustment" gtk_layout_get_vadjustment :: 
    Ptr Layout ->                           -- _obj : TInterface "Gtk" "Layout"
    IO (Ptr Adjustment)

{-# DEPRECATED layoutGetVadjustment ["(Since version 3.0)","Use gtk_scrollable_get_vadjustment()"]#-}
layoutGetVadjustment ::
    (MonadIO m, LayoutK a) =>
    a ->                                    -- _obj
    m Adjustment
layoutGetVadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_layout_get_vadjustment _obj'
    checkUnexpectedReturnNULL "gtk_layout_get_vadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method Layout::move
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layout_move" gtk_layout_move :: 
    Ptr Layout ->                           -- _obj : TInterface "Gtk" "Layout"
    Ptr Widget ->                           -- child_widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO ()


layoutMove ::
    (MonadIO m, LayoutK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child_widget
    Int32 ->                                -- x
    Int32 ->                                -- y
    m ()
layoutMove _obj child_widget x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child_widget' = unsafeManagedPtrCastPtr child_widget
    gtk_layout_move _obj' child_widget' x y
    touchManagedPtr _obj
    touchManagedPtr child_widget
    return ()

-- method Layout::put
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layout_put" gtk_layout_put :: 
    Ptr Layout ->                           -- _obj : TInterface "Gtk" "Layout"
    Ptr Widget ->                           -- child_widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO ()


layoutPut ::
    (MonadIO m, LayoutK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child_widget
    Int32 ->                                -- x
    Int32 ->                                -- y
    m ()
layoutPut _obj child_widget x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child_widget' = unsafeManagedPtrCastPtr child_widget
    gtk_layout_put _obj' child_widget' x y
    touchManagedPtr _obj
    touchManagedPtr child_widget
    return ()

-- method Layout::set_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layout_set_hadjustment" gtk_layout_set_hadjustment :: 
    Ptr Layout ->                           -- _obj : TInterface "Gtk" "Layout"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()

{-# DEPRECATED layoutSetHadjustment ["(Since version 3.0)","Use gtk_scrollable_set_hadjustment()"]#-}
layoutSetHadjustment ::
    (MonadIO m, LayoutK a, AdjustmentK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- adjustment
    m ()
layoutSetHadjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    gtk_layout_set_hadjustment _obj' maybeAdjustment
    touchManagedPtr _obj
    whenJust adjustment touchManagedPtr
    return ()

-- method Layout::set_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layout_set_size" gtk_layout_set_size :: 
    Ptr Layout ->                           -- _obj : TInterface "Gtk" "Layout"
    Word32 ->                               -- width : TBasicType TUInt32
    Word32 ->                               -- height : TBasicType TUInt32
    IO ()


layoutSetSize ::
    (MonadIO m, LayoutK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- width
    Word32 ->                               -- height
    m ()
layoutSetSize _obj width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_layout_set_size _obj' width height
    touchManagedPtr _obj
    return ()

-- method Layout::set_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_layout_set_vadjustment" gtk_layout_set_vadjustment :: 
    Ptr Layout ->                           -- _obj : TInterface "Gtk" "Layout"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()

{-# DEPRECATED layoutSetVadjustment ["(Since version 3.0)","Use gtk_scrollable_set_vadjustment()"]#-}
layoutSetVadjustment ::
    (MonadIO m, LayoutK a, AdjustmentK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- adjustment
    m ()
layoutSetVadjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    gtk_layout_set_vadjustment _obj' maybeAdjustment
    touchManagedPtr _obj
    whenJust adjustment touchManagedPtr
    return ()

-- object LevelBar 
newtype LevelBar = LevelBar (ForeignPtr LevelBar)
noLevelBar :: Maybe LevelBar
noLevelBar = Nothing

foreign import ccall "gtk_level_bar_get_type"
    c_gtk_level_bar_get_type :: IO GType

type instance ParentTypes LevelBar = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject LevelBar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_level_bar_get_type
    

class GObject o => LevelBarK o
instance (GObject o, IsDescendantOf LevelBar o) => LevelBarK o

toLevelBar :: LevelBarK o => o -> IO LevelBar
toLevelBar = unsafeCastTo LevelBar

-- method LevelBar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "LevelBar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_new" gtk_level_bar_new :: 
    IO (Ptr LevelBar)


levelBarNew ::
    (MonadIO m) =>
    m LevelBar
levelBarNew  = liftIO $ do
    result <- gtk_level_bar_new
    checkUnexpectedReturnNULL "gtk_level_bar_new" result
    result' <- (newObject LevelBar) result
    return result'

-- method LevelBar::new_for_interval
-- method type : Constructor
-- Args : [Arg {argName = "min_value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max_value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "min_value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max_value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "LevelBar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_new_for_interval" gtk_level_bar_new_for_interval :: 
    CDouble ->                              -- min_value : TBasicType TDouble
    CDouble ->                              -- max_value : TBasicType TDouble
    IO (Ptr LevelBar)


levelBarNewForInterval ::
    (MonadIO m) =>
    Double ->                               -- min_value
    Double ->                               -- max_value
    m LevelBar
levelBarNewForInterval min_value max_value = liftIO $ do
    let min_value' = realToFrac min_value
    let max_value' = realToFrac max_value
    result <- gtk_level_bar_new_for_interval min_value' max_value'
    checkUnexpectedReturnNULL "gtk_level_bar_new_for_interval" result
    result' <- (newObject LevelBar) result
    return result'

-- method LevelBar::add_offset_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_add_offset_value" gtk_level_bar_add_offset_value :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    CString ->                              -- name : TBasicType TUTF8
    CDouble ->                              -- value : TBasicType TDouble
    IO ()


levelBarAddOffsetValue ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    Double ->                               -- value
    m ()
levelBarAddOffsetValue _obj name value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    let value' = realToFrac value
    gtk_level_bar_add_offset_value _obj' name' value'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method LevelBar::get_inverted
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_get_inverted" gtk_level_bar_get_inverted :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    IO CInt


levelBarGetInverted ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    m Bool
levelBarGetInverted _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_level_bar_get_inverted _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method LevelBar::get_max_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_get_max_value" gtk_level_bar_get_max_value :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    IO CDouble


levelBarGetMaxValue ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    m Double
levelBarGetMaxValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_level_bar_get_max_value _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method LevelBar::get_min_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_get_min_value" gtk_level_bar_get_min_value :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    IO CDouble


levelBarGetMinValue ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    m Double
levelBarGetMinValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_level_bar_get_min_value _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method LevelBar::get_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "LevelBarMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_get_mode" gtk_level_bar_get_mode :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    IO CUInt


levelBarGetMode ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    m LevelBarMode
levelBarGetMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_level_bar_get_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method LevelBar::get_offset_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_get_offset_value" gtk_level_bar_get_offset_value :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    CString ->                              -- name : TBasicType TUTF8
    Ptr CDouble ->                          -- value : TBasicType TDouble
    IO CInt


levelBarGetOffsetValue ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- name
    m (Bool,Double)
levelBarGetOffsetValue _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeName <- case name of
        Nothing -> return nullPtr
        Just jName -> do
            jName' <- textToCString jName
            return jName'
    value <- allocMem :: IO (Ptr CDouble)
    result <- gtk_level_bar_get_offset_value _obj' maybeName value
    let result' = (/= 0) result
    value' <- peek value
    let value'' = realToFrac value'
    touchManagedPtr _obj
    freeMem maybeName
    freeMem value
    return (result', value'')

-- method LevelBar::get_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_get_value" gtk_level_bar_get_value :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    IO CDouble


levelBarGetValue ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    m Double
levelBarGetValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_level_bar_get_value _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method LevelBar::remove_offset_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_remove_offset_value" gtk_level_bar_remove_offset_value :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


levelBarRemoveOffsetValue ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- name
    m ()
levelBarRemoveOffsetValue _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeName <- case name of
        Nothing -> return nullPtr
        Just jName -> do
            jName' <- textToCString jName
            return jName'
    gtk_level_bar_remove_offset_value _obj' maybeName
    touchManagedPtr _obj
    freeMem maybeName
    return ()

-- method LevelBar::set_inverted
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "inverted", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "inverted", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_set_inverted" gtk_level_bar_set_inverted :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    CInt ->                                 -- inverted : TBasicType TBoolean
    IO ()


levelBarSetInverted ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- inverted
    m ()
levelBarSetInverted _obj inverted = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let inverted' = (fromIntegral . fromEnum) inverted
    gtk_level_bar_set_inverted _obj' inverted'
    touchManagedPtr _obj
    return ()

-- method LevelBar::set_max_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_set_max_value" gtk_level_bar_set_max_value :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    CDouble ->                              -- value : TBasicType TDouble
    IO ()


levelBarSetMaxValue ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    Double ->                               -- value
    m ()
levelBarSetMaxValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = realToFrac value
    gtk_level_bar_set_max_value _obj' value'
    touchManagedPtr _obj
    return ()

-- method LevelBar::set_min_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_set_min_value" gtk_level_bar_set_min_value :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    CDouble ->                              -- value : TBasicType TDouble
    IO ()


levelBarSetMinValue ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    Double ->                               -- value
    m ()
levelBarSetMinValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = realToFrac value
    gtk_level_bar_set_min_value _obj' value'
    touchManagedPtr _obj
    return ()

-- method LevelBar::set_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Gtk" "LevelBarMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Gtk" "LevelBarMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_set_mode" gtk_level_bar_set_mode :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    CUInt ->                                -- mode : TInterface "Gtk" "LevelBarMode"
    IO ()


levelBarSetMode ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    LevelBarMode ->                         -- mode
    m ()
levelBarSetMode _obj mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mode' = (fromIntegral . fromEnum) mode
    gtk_level_bar_set_mode _obj' mode'
    touchManagedPtr _obj
    return ()

-- method LevelBar::set_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LevelBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_level_bar_set_value" gtk_level_bar_set_value :: 
    Ptr LevelBar ->                         -- _obj : TInterface "Gtk" "LevelBar"
    CDouble ->                              -- value : TBasicType TDouble
    IO ()


levelBarSetValue ::
    (MonadIO m, LevelBarK a) =>
    a ->                                    -- _obj
    Double ->                               -- value
    m ()
levelBarSetValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = realToFrac value
    gtk_level_bar_set_value _obj' value'
    touchManagedPtr _obj
    return ()

-- signal LevelBar::offset-changed
type LevelBarOffsetChangedCallback =
    T.Text ->
    IO ()

noLevelBarOffsetChangedCallback :: Maybe LevelBarOffsetChangedCallback
noLevelBarOffsetChangedCallback = Nothing

type LevelBarOffsetChangedCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkLevelBarOffsetChangedCallback :: LevelBarOffsetChangedCallbackC -> IO (FunPtr LevelBarOffsetChangedCallbackC)

levelBarOffsetChangedClosure :: LevelBarOffsetChangedCallback -> IO Closure
levelBarOffsetChangedClosure cb = newCClosure =<< mkLevelBarOffsetChangedCallback wrapped
    where wrapped = levelBarOffsetChangedCallbackWrapper cb

levelBarOffsetChangedCallbackWrapper ::
    LevelBarOffsetChangedCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
levelBarOffsetChangedCallbackWrapper _cb _ name _ = do
    name' <- cstringToText name
    _cb  name'

onLevelBarOffsetChanged :: (GObject a, MonadIO m) => a -> LevelBarOffsetChangedCallback -> m SignalHandlerId
onLevelBarOffsetChanged obj cb = liftIO $ connectLevelBarOffsetChanged obj cb SignalConnectBefore
afterLevelBarOffsetChanged :: (GObject a, MonadIO m) => a -> LevelBarOffsetChangedCallback -> m SignalHandlerId
afterLevelBarOffsetChanged obj cb = connectLevelBarOffsetChanged obj cb SignalConnectAfter

connectLevelBarOffsetChanged :: (GObject a, MonadIO m) =>
                                a -> LevelBarOffsetChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectLevelBarOffsetChanged obj cb after = liftIO $ do
    cb' <- mkLevelBarOffsetChangedCallback (levelBarOffsetChangedCallbackWrapper cb)
    connectSignalFunPtr obj "offset-changed" cb' after

-- object LevelBarAccessible 
newtype LevelBarAccessible = LevelBarAccessible (ForeignPtr LevelBarAccessible)
noLevelBarAccessible :: Maybe LevelBarAccessible
noLevelBarAccessible = Nothing

foreign import ccall "gtk_level_bar_accessible_get_type"
    c_gtk_level_bar_accessible_get_type :: IO GType

type instance ParentTypes LevelBarAccessible = '[WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Value]

instance GObject LevelBarAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_level_bar_accessible_get_type
    

class GObject o => LevelBarAccessibleK o
instance (GObject o, IsDescendantOf LevelBarAccessible o) => LevelBarAccessibleK o

toLevelBarAccessible :: LevelBarAccessibleK o => o -> IO LevelBarAccessible
toLevelBarAccessible = unsafeCastTo LevelBarAccessible

-- Enum LevelBarMode

data LevelBarMode = 
      LevelBarModeContinuous
    | LevelBarModeDiscrete
    | AnotherLevelBarMode Int
    deriving (Show, Eq)

instance Enum LevelBarMode where
    fromEnum LevelBarModeContinuous = 0
    fromEnum LevelBarModeDiscrete = 1
    fromEnum (AnotherLevelBarMode k) = k

    toEnum 0 = LevelBarModeContinuous
    toEnum 1 = LevelBarModeDiscrete
    toEnum k = AnotherLevelBarMode k

foreign import ccall "gtk_level_bar_mode_get_type" c_gtk_level_bar_mode_get_type :: 
    IO GType

instance BoxedEnum LevelBarMode where
    boxedEnumType _ = c_gtk_level_bar_mode_get_type

-- Enum License

data License = 
      LicenseUnknown
    | LicenseCustom
    | LicenseGpl20
    | LicenseGpl30
    | LicenseLgpl21
    | LicenseLgpl30
    | LicenseBsd
    | LicenseMitX11
    | LicenseArtistic
    | LicenseGpl20Only
    | LicenseGpl30Only
    | LicenseLgpl21Only
    | LicenseLgpl30Only
    | AnotherLicense Int
    deriving (Show, Eq)

instance Enum License where
    fromEnum LicenseUnknown = 0
    fromEnum LicenseCustom = 1
    fromEnum LicenseGpl20 = 2
    fromEnum LicenseGpl30 = 3
    fromEnum LicenseLgpl21 = 4
    fromEnum LicenseLgpl30 = 5
    fromEnum LicenseBsd = 6
    fromEnum LicenseMitX11 = 7
    fromEnum LicenseArtistic = 8
    fromEnum LicenseGpl20Only = 9
    fromEnum LicenseGpl30Only = 10
    fromEnum LicenseLgpl21Only = 11
    fromEnum LicenseLgpl30Only = 12
    fromEnum (AnotherLicense k) = k

    toEnum 0 = LicenseUnknown
    toEnum 1 = LicenseCustom
    toEnum 2 = LicenseGpl20
    toEnum 3 = LicenseGpl30
    toEnum 4 = LicenseLgpl21
    toEnum 5 = LicenseLgpl30
    toEnum 6 = LicenseBsd
    toEnum 7 = LicenseMitX11
    toEnum 8 = LicenseArtistic
    toEnum 9 = LicenseGpl20Only
    toEnum 10 = LicenseGpl30Only
    toEnum 11 = LicenseLgpl21Only
    toEnum 12 = LicenseLgpl30Only
    toEnum k = AnotherLicense k

foreign import ccall "gtk_license_get_type" c_gtk_license_get_type :: 
    IO GType

instance BoxedEnum License where
    boxedEnumType _ = c_gtk_license_get_type

-- object LinkButton 
newtype LinkButton = LinkButton (ForeignPtr LinkButton)
noLinkButton :: Maybe LinkButton
noLinkButton = Nothing

foreign import ccall "gtk_link_button_get_type"
    c_gtk_link_button_get_type :: IO GType

type instance ParentTypes LinkButton = '[Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject LinkButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_link_button_get_type
    

class GObject o => LinkButtonK o
instance (GObject o, IsDescendantOf LinkButton o) => LinkButtonK o

toLinkButton :: LinkButtonK o => o -> IO LinkButton
toLinkButton = unsafeCastTo LinkButton

-- method LinkButton::new
-- method type : Constructor
-- Args : [Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "LinkButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_link_button_new" gtk_link_button_new :: 
    CString ->                              -- uri : TBasicType TUTF8
    IO (Ptr LinkButton)


linkButtonNew ::
    (MonadIO m) =>
    T.Text ->                               -- uri
    m LinkButton
linkButtonNew uri = liftIO $ do
    uri' <- textToCString uri
    result <- gtk_link_button_new uri'
    checkUnexpectedReturnNULL "gtk_link_button_new" result
    result' <- (newObject LinkButton) result
    freeMem uri'
    return result'

-- method LinkButton::new_with_label
-- method type : Constructor
-- Args : [Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "LinkButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_link_button_new_with_label" gtk_link_button_new_with_label :: 
    CString ->                              -- uri : TBasicType TUTF8
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr LinkButton)


linkButtonNewWithLabel ::
    (MonadIO m) =>
    T.Text ->                               -- uri
    Maybe (T.Text) ->                       -- label
    m LinkButton
linkButtonNewWithLabel uri label = liftIO $ do
    uri' <- textToCString uri
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    result <- gtk_link_button_new_with_label uri' maybeLabel
    checkUnexpectedReturnNULL "gtk_link_button_new_with_label" result
    result' <- (newObject LinkButton) result
    freeMem uri'
    freeMem maybeLabel
    return result'

-- method LinkButton::get_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LinkButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LinkButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_link_button_get_uri" gtk_link_button_get_uri :: 
    Ptr LinkButton ->                       -- _obj : TInterface "Gtk" "LinkButton"
    IO CString


linkButtonGetUri ::
    (MonadIO m, LinkButtonK a) =>
    a ->                                    -- _obj
    m T.Text
linkButtonGetUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_link_button_get_uri _obj'
    checkUnexpectedReturnNULL "gtk_link_button_get_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method LinkButton::get_visited
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LinkButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LinkButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_link_button_get_visited" gtk_link_button_get_visited :: 
    Ptr LinkButton ->                       -- _obj : TInterface "Gtk" "LinkButton"
    IO CInt


linkButtonGetVisited ::
    (MonadIO m, LinkButtonK a) =>
    a ->                                    -- _obj
    m Bool
linkButtonGetVisited _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_link_button_get_visited _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method LinkButton::set_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LinkButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LinkButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_link_button_set_uri" gtk_link_button_set_uri :: 
    Ptr LinkButton ->                       -- _obj : TInterface "Gtk" "LinkButton"
    CString ->                              -- uri : TBasicType TUTF8
    IO ()


linkButtonSetUri ::
    (MonadIO m, LinkButtonK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m ()
linkButtonSetUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    gtk_link_button_set_uri _obj' uri'
    touchManagedPtr _obj
    freeMem uri'
    return ()

-- method LinkButton::set_visited
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LinkButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visited", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LinkButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visited", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_link_button_set_visited" gtk_link_button_set_visited :: 
    Ptr LinkButton ->                       -- _obj : TInterface "Gtk" "LinkButton"
    CInt ->                                 -- visited : TBasicType TBoolean
    IO ()


linkButtonSetVisited ::
    (MonadIO m, LinkButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visited
    m ()
linkButtonSetVisited _obj visited = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visited' = (fromIntegral . fromEnum) visited
    gtk_link_button_set_visited _obj' visited'
    touchManagedPtr _obj
    return ()

-- signal LinkButton::activate-link
type LinkButtonActivateLinkCallback =
    IO Bool

noLinkButtonActivateLinkCallback :: Maybe LinkButtonActivateLinkCallback
noLinkButtonActivateLinkCallback = Nothing

type LinkButtonActivateLinkCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkLinkButtonActivateLinkCallback :: LinkButtonActivateLinkCallbackC -> IO (FunPtr LinkButtonActivateLinkCallbackC)

linkButtonActivateLinkClosure :: LinkButtonActivateLinkCallback -> IO Closure
linkButtonActivateLinkClosure cb = newCClosure =<< mkLinkButtonActivateLinkCallback wrapped
    where wrapped = linkButtonActivateLinkCallbackWrapper cb

linkButtonActivateLinkCallbackWrapper ::
    LinkButtonActivateLinkCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
linkButtonActivateLinkCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onLinkButtonActivateLink :: (GObject a, MonadIO m) => a -> LinkButtonActivateLinkCallback -> m SignalHandlerId
onLinkButtonActivateLink obj cb = liftIO $ connectLinkButtonActivateLink obj cb SignalConnectBefore
afterLinkButtonActivateLink :: (GObject a, MonadIO m) => a -> LinkButtonActivateLinkCallback -> m SignalHandlerId
afterLinkButtonActivateLink obj cb = connectLinkButtonActivateLink obj cb SignalConnectAfter

connectLinkButtonActivateLink :: (GObject a, MonadIO m) =>
                                 a -> LinkButtonActivateLinkCallback -> SignalConnectMode -> m SignalHandlerId
connectLinkButtonActivateLink obj cb after = liftIO $ do
    cb' <- mkLinkButtonActivateLinkCallback (linkButtonActivateLinkCallbackWrapper cb)
    connectSignalFunPtr obj "activate-link" cb' after

-- object LinkButtonAccessible 
newtype LinkButtonAccessible = LinkButtonAccessible (ForeignPtr LinkButtonAccessible)
noLinkButtonAccessible :: Maybe LinkButtonAccessible
noLinkButtonAccessible = Nothing

foreign import ccall "gtk_link_button_accessible_get_type"
    c_gtk_link_button_accessible_get_type :: IO GType

type instance ParentTypes LinkButtonAccessible = '[ButtonAccessible, ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.HyperlinkImpl, Atk.Image]

instance GObject LinkButtonAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_link_button_accessible_get_type
    

class GObject o => LinkButtonAccessibleK o
instance (GObject o, IsDescendantOf LinkButtonAccessible o) => LinkButtonAccessibleK o

toLinkButtonAccessible :: LinkButtonAccessibleK o => o -> IO LinkButtonAccessible
toLinkButtonAccessible = unsafeCastTo LinkButtonAccessible

-- object ListBox 
newtype ListBox = ListBox (ForeignPtr ListBox)
noListBox :: Maybe ListBox
noListBox = Nothing

foreign import ccall "gtk_list_box_get_type"
    c_gtk_list_box_get_type :: IO GType

type instance ParentTypes ListBox = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject ListBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_list_box_get_type
    

class GObject o => ListBoxK o
instance (GObject o, IsDescendantOf ListBox o) => ListBoxK o

toListBox :: ListBoxK o => o -> IO ListBox
toListBox = unsafeCastTo ListBox

-- method ListBox::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ListBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_new" gtk_list_box_new :: 
    IO (Ptr ListBox)


listBoxNew ::
    (MonadIO m) =>
    m ListBox
listBoxNew  = liftIO $ do
    result <- gtk_list_box_new
    checkUnexpectedReturnNULL "gtk_list_box_new" result
    result' <- (newObject ListBox) result
    return result'

-- method ListBox::bind_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gio" "ListModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "create_widget_func", argType = TInterface "Gtk" "ListBoxCreateWidgetFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data_free_func", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gio" "ListModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "create_widget_func", argType = TInterface "Gtk" "ListBoxCreateWidgetFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_bind_model" gtk_list_box_bind_model :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    Ptr Gio.ListModel ->                    -- model : TInterface "Gio" "ListModel"
    FunPtr ListBoxCreateWidgetFuncC ->      -- create_widget_func : TInterface "Gtk" "ListBoxCreateWidgetFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- user_data_free_func : TInterface "GLib" "DestroyNotify"
    IO ()


listBoxBindModel ::
    (MonadIO m, ListBoxK a, Gio.ListModelK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- model
    Maybe (ListBoxCreateWidgetFunc) ->      -- create_widget_func
    m ()
listBoxBindModel _obj model create_widget_func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeModel <- case model of
        Nothing -> return nullPtr
        Just jModel -> do
            let jModel' = unsafeManagedPtrCastPtr jModel
            return jModel'
    maybeCreate_widget_func <- case create_widget_func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCreate_widget_func -> do
            jCreate_widget_func' <- mkListBoxCreateWidgetFunc (listBoxCreateWidgetFuncWrapper Nothing jCreate_widget_func)
            return jCreate_widget_func'
    let user_data = castFunPtrToPtr maybeCreate_widget_func
    let user_data_free_func = safeFreeFunPtrPtr
    gtk_list_box_bind_model _obj' maybeModel maybeCreate_widget_func user_data user_data_free_func
    touchManagedPtr _obj
    whenJust model touchManagedPtr
    return ()

-- method ListBox::drag_highlight_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_drag_highlight_row" gtk_list_box_drag_highlight_row :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    Ptr ListBoxRow ->                       -- row : TInterface "Gtk" "ListBoxRow"
    IO ()


listBoxDragHighlightRow ::
    (MonadIO m, ListBoxK a, ListBoxRowK b) =>
    a ->                                    -- _obj
    b ->                                    -- row
    m ()
listBoxDragHighlightRow _obj row = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let row' = unsafeManagedPtrCastPtr row
    gtk_list_box_drag_highlight_row _obj' row'
    touchManagedPtr _obj
    touchManagedPtr row
    return ()

-- method ListBox::drag_unhighlight_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_drag_unhighlight_row" gtk_list_box_drag_unhighlight_row :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    IO ()


listBoxDragUnhighlightRow ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    m ()
listBoxDragUnhighlightRow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_list_box_drag_unhighlight_row _obj'
    touchManagedPtr _obj
    return ()

-- method ListBox::get_activate_on_single_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_activate_on_single_click" gtk_list_box_get_activate_on_single_click :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    IO CInt


listBoxGetActivateOnSingleClick ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    m Bool
listBoxGetActivateOnSingleClick _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_get_activate_on_single_click _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ListBox::get_adjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_adjustment" gtk_list_box_get_adjustment :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    IO (Ptr Adjustment)


listBoxGetAdjustment ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    m Adjustment
listBoxGetAdjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_get_adjustment _obj'
    checkUnexpectedReturnNULL "gtk_list_box_get_adjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method ListBox::get_row_at_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ListBoxRow"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_row_at_index" gtk_list_box_get_row_at_index :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    Int32 ->                                -- index_ : TBasicType TInt32
    IO (Ptr ListBoxRow)


listBoxGetRowAtIndex ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- index_
    m ListBoxRow
listBoxGetRowAtIndex _obj index_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_get_row_at_index _obj' index_
    checkUnexpectedReturnNULL "gtk_list_box_get_row_at_index" result
    result' <- (newObject ListBoxRow) result
    touchManagedPtr _obj
    return result'

-- method ListBox::get_row_at_y
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ListBoxRow"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_row_at_y" gtk_list_box_get_row_at_y :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    Int32 ->                                -- y : TBasicType TInt32
    IO (Ptr ListBoxRow)


listBoxGetRowAtY ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- y
    m ListBoxRow
listBoxGetRowAtY _obj y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_get_row_at_y _obj' y
    checkUnexpectedReturnNULL "gtk_list_box_get_row_at_y" result
    result' <- (newObject ListBoxRow) result
    touchManagedPtr _obj
    return result'

-- method ListBox::get_selected_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ListBoxRow"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_selected_row" gtk_list_box_get_selected_row :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    IO (Ptr ListBoxRow)


listBoxGetSelectedRow ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    m ListBoxRow
listBoxGetSelectedRow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_get_selected_row _obj'
    checkUnexpectedReturnNULL "gtk_list_box_get_selected_row" result
    result' <- (newObject ListBoxRow) result
    touchManagedPtr _obj
    return result'

-- method ListBox::get_selected_rows
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "ListBoxRow")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_selected_rows" gtk_list_box_get_selected_rows :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    IO (Ptr (GList (Ptr ListBoxRow)))


listBoxGetSelectedRows ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    m [ListBoxRow]
listBoxGetSelectedRows _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_get_selected_rows _obj'
    checkUnexpectedReturnNULL "gtk_list_box_get_selected_rows" result
    result' <- unpackGList result
    result'' <- mapM (newObject ListBoxRow) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method ListBox::get_selection_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SelectionMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_selection_mode" gtk_list_box_get_selection_mode :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    IO CUInt


listBoxGetSelectionMode ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    m SelectionMode
listBoxGetSelectionMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_get_selection_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ListBox::insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_insert" gtk_list_box_insert :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


listBoxInsert ::
    (MonadIO m, ListBoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Int32 ->                                -- position
    m ()
listBoxInsert _obj child position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_list_box_insert _obj' child' position
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method ListBox::invalidate_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_invalidate_filter" gtk_list_box_invalidate_filter :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    IO ()


listBoxInvalidateFilter ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    m ()
listBoxInvalidateFilter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_list_box_invalidate_filter _obj'
    touchManagedPtr _obj
    return ()

-- method ListBox::invalidate_headers
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_invalidate_headers" gtk_list_box_invalidate_headers :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    IO ()


listBoxInvalidateHeaders ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    m ()
listBoxInvalidateHeaders _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_list_box_invalidate_headers _obj'
    touchManagedPtr _obj
    return ()

-- method ListBox::invalidate_sort
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_invalidate_sort" gtk_list_box_invalidate_sort :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    IO ()


listBoxInvalidateSort ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    m ()
listBoxInvalidateSort _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_list_box_invalidate_sort _obj'
    touchManagedPtr _obj
    return ()

-- method ListBox::prepend
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_prepend" gtk_list_box_prepend :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


listBoxPrepend ::
    (MonadIO m, ListBoxK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
listBoxPrepend _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_list_box_prepend _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method ListBox::select_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_select_all" gtk_list_box_select_all :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    IO ()


listBoxSelectAll ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    m ()
listBoxSelectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_list_box_select_all _obj'
    touchManagedPtr _obj
    return ()

-- method ListBox::select_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_select_row" gtk_list_box_select_row :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    Ptr ListBoxRow ->                       -- row : TInterface "Gtk" "ListBoxRow"
    IO ()


listBoxSelectRow ::
    (MonadIO m, ListBoxK a, ListBoxRowK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- row
    m ()
listBoxSelectRow _obj row = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeRow <- case row of
        Nothing -> return nullPtr
        Just jRow -> do
            let jRow' = unsafeManagedPtrCastPtr jRow
            return jRow'
    gtk_list_box_select_row _obj' maybeRow
    touchManagedPtr _obj
    whenJust row touchManagedPtr
    return ()

-- method ListBox::selected_foreach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "ListBoxForeachFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "ListBoxForeachFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_selected_foreach" gtk_list_box_selected_foreach :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    FunPtr ListBoxForeachFuncC ->           -- func : TInterface "Gtk" "ListBoxForeachFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    IO ()


listBoxSelectedForeach ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    ListBoxForeachFunc ->                   -- func
    m ()
listBoxSelectedForeach _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkListBoxForeachFunc (listBoxForeachFuncWrapper Nothing func)
    let data_ = nullPtr
    gtk_list_box_selected_foreach _obj' func' data_
    safeFreeFunPtr $ castFunPtrToPtr func'
    touchManagedPtr _obj
    return ()

-- method ListBox::set_activate_on_single_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "single", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "single", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_activate_on_single_click" gtk_list_box_set_activate_on_single_click :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    CInt ->                                 -- single : TBasicType TBoolean
    IO ()


listBoxSetActivateOnSingleClick ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- single
    m ()
listBoxSetActivateOnSingleClick _obj single = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let single' = (fromIntegral . fromEnum) single
    gtk_list_box_set_activate_on_single_click _obj' single'
    touchManagedPtr _obj
    return ()

-- method ListBox::set_adjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_adjustment" gtk_list_box_set_adjustment :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()


listBoxSetAdjustment ::
    (MonadIO m, ListBoxK a, AdjustmentK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- adjustment
    m ()
listBoxSetAdjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    gtk_list_box_set_adjustment _obj' maybeAdjustment
    touchManagedPtr _obj
    whenJust adjustment touchManagedPtr
    return ()

-- method ListBox::set_filter_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_func", argType = TInterface "Gtk" "ListBoxFilterFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_func", argType = TInterface "Gtk" "ListBoxFilterFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_filter_func" gtk_list_box_set_filter_func :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    FunPtr ListBoxFilterFuncC ->            -- filter_func : TInterface "Gtk" "ListBoxFilterFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


listBoxSetFilterFunc ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    Maybe (ListBoxFilterFunc) ->            -- filter_func
    m ()
listBoxSetFilterFunc _obj filter_func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFilter_func <- case filter_func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jFilter_func -> do
            jFilter_func' <- mkListBoxFilterFunc (listBoxFilterFuncWrapper Nothing jFilter_func)
            return jFilter_func'
    let user_data = castFunPtrToPtr maybeFilter_func
    let destroy = safeFreeFunPtrPtr
    gtk_list_box_set_filter_func _obj' maybeFilter_func user_data destroy
    touchManagedPtr _obj
    return ()

-- method ListBox::set_header_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "update_header", argType = TInterface "Gtk" "ListBoxUpdateHeaderFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "update_header", argType = TInterface "Gtk" "ListBoxUpdateHeaderFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_header_func" gtk_list_box_set_header_func :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    FunPtr ListBoxUpdateHeaderFuncC ->      -- update_header : TInterface "Gtk" "ListBoxUpdateHeaderFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


listBoxSetHeaderFunc ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    Maybe (ListBoxUpdateHeaderFunc) ->      -- update_header
    m ()
listBoxSetHeaderFunc _obj update_header = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeUpdate_header <- case update_header of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jUpdate_header -> do
            jUpdate_header' <- mkListBoxUpdateHeaderFunc (listBoxUpdateHeaderFuncWrapper Nothing jUpdate_header)
            return jUpdate_header'
    let user_data = castFunPtrToPtr maybeUpdate_header
    let destroy = safeFreeFunPtrPtr
    gtk_list_box_set_header_func _obj' maybeUpdate_header user_data destroy
    touchManagedPtr _obj
    return ()

-- method ListBox::set_placeholder
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "placeholder", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "placeholder", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_placeholder" gtk_list_box_set_placeholder :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    Ptr Widget ->                           -- placeholder : TInterface "Gtk" "Widget"
    IO ()


listBoxSetPlaceholder ::
    (MonadIO m, ListBoxK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- placeholder
    m ()
listBoxSetPlaceholder _obj placeholder = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePlaceholder <- case placeholder of
        Nothing -> return nullPtr
        Just jPlaceholder -> do
            let jPlaceholder' = unsafeManagedPtrCastPtr jPlaceholder
            return jPlaceholder'
    gtk_list_box_set_placeholder _obj' maybePlaceholder
    touchManagedPtr _obj
    whenJust placeholder touchManagedPtr
    return ()

-- method ListBox::set_selection_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Gtk" "SelectionMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Gtk" "SelectionMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_selection_mode" gtk_list_box_set_selection_mode :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    CUInt ->                                -- mode : TInterface "Gtk" "SelectionMode"
    IO ()


listBoxSetSelectionMode ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    SelectionMode ->                        -- mode
    m ()
listBoxSetSelectionMode _obj mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mode' = (fromIntegral . fromEnum) mode
    gtk_list_box_set_selection_mode _obj' mode'
    touchManagedPtr _obj
    return ()

-- method ListBox::set_sort_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_func", argType = TInterface "Gtk" "ListBoxSortFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_func", argType = TInterface "Gtk" "ListBoxSortFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_sort_func" gtk_list_box_set_sort_func :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    FunPtr ListBoxSortFuncC ->              -- sort_func : TInterface "Gtk" "ListBoxSortFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


listBoxSetSortFunc ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    Maybe (ListBoxSortFunc) ->              -- sort_func
    m ()
listBoxSetSortFunc _obj sort_func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeSort_func <- case sort_func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jSort_func -> do
            jSort_func' <- mkListBoxSortFunc (listBoxSortFuncWrapper Nothing jSort_func)
            return jSort_func'
    let user_data = castFunPtrToPtr maybeSort_func
    let destroy = safeFreeFunPtrPtr
    gtk_list_box_set_sort_func _obj' maybeSort_func user_data destroy
    touchManagedPtr _obj
    return ()

-- method ListBox::unselect_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_unselect_all" gtk_list_box_unselect_all :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    IO ()


listBoxUnselectAll ::
    (MonadIO m, ListBoxK a) =>
    a ->                                    -- _obj
    m ()
listBoxUnselectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_list_box_unselect_all _obj'
    touchManagedPtr _obj
    return ()

-- method ListBox::unselect_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_unselect_row" gtk_list_box_unselect_row :: 
    Ptr ListBox ->                          -- _obj : TInterface "Gtk" "ListBox"
    Ptr ListBoxRow ->                       -- row : TInterface "Gtk" "ListBoxRow"
    IO ()


listBoxUnselectRow ::
    (MonadIO m, ListBoxK a, ListBoxRowK b) =>
    a ->                                    -- _obj
    b ->                                    -- row
    m ()
listBoxUnselectRow _obj row = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let row' = unsafeManagedPtrCastPtr row
    gtk_list_box_unselect_row _obj' row'
    touchManagedPtr _obj
    touchManagedPtr row
    return ()

-- signal ListBox::activate-cursor-row
type ListBoxActivateCursorRowCallback =
    IO ()

noListBoxActivateCursorRowCallback :: Maybe ListBoxActivateCursorRowCallback
noListBoxActivateCursorRowCallback = Nothing

type ListBoxActivateCursorRowCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkListBoxActivateCursorRowCallback :: ListBoxActivateCursorRowCallbackC -> IO (FunPtr ListBoxActivateCursorRowCallbackC)

listBoxActivateCursorRowClosure :: ListBoxActivateCursorRowCallback -> IO Closure
listBoxActivateCursorRowClosure cb = newCClosure =<< mkListBoxActivateCursorRowCallback wrapped
    where wrapped = listBoxActivateCursorRowCallbackWrapper cb

listBoxActivateCursorRowCallbackWrapper ::
    ListBoxActivateCursorRowCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
listBoxActivateCursorRowCallbackWrapper _cb _ _ = do
    _cb 

onListBoxActivateCursorRow :: (GObject a, MonadIO m) => a -> ListBoxActivateCursorRowCallback -> m SignalHandlerId
onListBoxActivateCursorRow obj cb = liftIO $ connectListBoxActivateCursorRow obj cb SignalConnectBefore
afterListBoxActivateCursorRow :: (GObject a, MonadIO m) => a -> ListBoxActivateCursorRowCallback -> m SignalHandlerId
afterListBoxActivateCursorRow obj cb = connectListBoxActivateCursorRow obj cb SignalConnectAfter

connectListBoxActivateCursorRow :: (GObject a, MonadIO m) =>
                                   a -> ListBoxActivateCursorRowCallback -> SignalConnectMode -> m SignalHandlerId
connectListBoxActivateCursorRow obj cb after = liftIO $ do
    cb' <- mkListBoxActivateCursorRowCallback (listBoxActivateCursorRowCallbackWrapper cb)
    connectSignalFunPtr obj "activate-cursor-row" cb' after

-- signal ListBox::move-cursor
type ListBoxMoveCursorCallback =
    MovementStep ->
    Int32 ->
    IO ()

noListBoxMoveCursorCallback :: Maybe ListBoxMoveCursorCallback
noListBoxMoveCursorCallback = Nothing

type ListBoxMoveCursorCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkListBoxMoveCursorCallback :: ListBoxMoveCursorCallbackC -> IO (FunPtr ListBoxMoveCursorCallbackC)

listBoxMoveCursorClosure :: ListBoxMoveCursorCallback -> IO Closure
listBoxMoveCursorClosure cb = newCClosure =<< mkListBoxMoveCursorCallback wrapped
    where wrapped = listBoxMoveCursorCallbackWrapper cb

listBoxMoveCursorCallbackWrapper ::
    ListBoxMoveCursorCallback ->
    Ptr () ->
    CUInt ->
    Int32 ->
    Ptr () ->
    IO ()
listBoxMoveCursorCallbackWrapper _cb _ object p0 _ = do
    let object' = (toEnum . fromIntegral) object
    _cb  object' p0

onListBoxMoveCursor :: (GObject a, MonadIO m) => a -> ListBoxMoveCursorCallback -> m SignalHandlerId
onListBoxMoveCursor obj cb = liftIO $ connectListBoxMoveCursor obj cb SignalConnectBefore
afterListBoxMoveCursor :: (GObject a, MonadIO m) => a -> ListBoxMoveCursorCallback -> m SignalHandlerId
afterListBoxMoveCursor obj cb = connectListBoxMoveCursor obj cb SignalConnectAfter

connectListBoxMoveCursor :: (GObject a, MonadIO m) =>
                            a -> ListBoxMoveCursorCallback -> SignalConnectMode -> m SignalHandlerId
connectListBoxMoveCursor obj cb after = liftIO $ do
    cb' <- mkListBoxMoveCursorCallback (listBoxMoveCursorCallbackWrapper cb)
    connectSignalFunPtr obj "move-cursor" cb' after

-- signal ListBox::row-activated
type ListBoxRowActivatedCallback =
    ListBoxRow ->
    IO ()

noListBoxRowActivatedCallback :: Maybe ListBoxRowActivatedCallback
noListBoxRowActivatedCallback = Nothing

type ListBoxRowActivatedCallbackC =
    Ptr () ->                               -- object
    Ptr ListBoxRow ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkListBoxRowActivatedCallback :: ListBoxRowActivatedCallbackC -> IO (FunPtr ListBoxRowActivatedCallbackC)

listBoxRowActivatedClosure :: ListBoxRowActivatedCallback -> IO Closure
listBoxRowActivatedClosure cb = newCClosure =<< mkListBoxRowActivatedCallback wrapped
    where wrapped = listBoxRowActivatedCallbackWrapper cb

listBoxRowActivatedCallbackWrapper ::
    ListBoxRowActivatedCallback ->
    Ptr () ->
    Ptr ListBoxRow ->
    Ptr () ->
    IO ()
listBoxRowActivatedCallbackWrapper _cb _ row _ = do
    row' <- (newObject ListBoxRow) row
    _cb  row'

onListBoxRowActivated :: (GObject a, MonadIO m) => a -> ListBoxRowActivatedCallback -> m SignalHandlerId
onListBoxRowActivated obj cb = liftIO $ connectListBoxRowActivated obj cb SignalConnectBefore
afterListBoxRowActivated :: (GObject a, MonadIO m) => a -> ListBoxRowActivatedCallback -> m SignalHandlerId
afterListBoxRowActivated obj cb = connectListBoxRowActivated obj cb SignalConnectAfter

connectListBoxRowActivated :: (GObject a, MonadIO m) =>
                              a -> ListBoxRowActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectListBoxRowActivated obj cb after = liftIO $ do
    cb' <- mkListBoxRowActivatedCallback (listBoxRowActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "row-activated" cb' after

-- signal ListBox::row-selected
type ListBoxRowSelectedCallback =
    Maybe ListBoxRow ->
    IO ()

noListBoxRowSelectedCallback :: Maybe ListBoxRowSelectedCallback
noListBoxRowSelectedCallback = Nothing

type ListBoxRowSelectedCallbackC =
    Ptr () ->                               -- object
    Ptr ListBoxRow ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkListBoxRowSelectedCallback :: ListBoxRowSelectedCallbackC -> IO (FunPtr ListBoxRowSelectedCallbackC)

listBoxRowSelectedClosure :: ListBoxRowSelectedCallback -> IO Closure
listBoxRowSelectedClosure cb = newCClosure =<< mkListBoxRowSelectedCallback wrapped
    where wrapped = listBoxRowSelectedCallbackWrapper cb

listBoxRowSelectedCallbackWrapper ::
    ListBoxRowSelectedCallback ->
    Ptr () ->
    Ptr ListBoxRow ->
    Ptr () ->
    IO ()
listBoxRowSelectedCallbackWrapper _cb _ row _ = do
    maybeRow <-
        if row == nullPtr
        then return Nothing
        else do
            row' <- (newObject ListBoxRow) row
            return $ Just row'
    _cb  maybeRow

onListBoxRowSelected :: (GObject a, MonadIO m) => a -> ListBoxRowSelectedCallback -> m SignalHandlerId
onListBoxRowSelected obj cb = liftIO $ connectListBoxRowSelected obj cb SignalConnectBefore
afterListBoxRowSelected :: (GObject a, MonadIO m) => a -> ListBoxRowSelectedCallback -> m SignalHandlerId
afterListBoxRowSelected obj cb = connectListBoxRowSelected obj cb SignalConnectAfter

connectListBoxRowSelected :: (GObject a, MonadIO m) =>
                             a -> ListBoxRowSelectedCallback -> SignalConnectMode -> m SignalHandlerId
connectListBoxRowSelected obj cb after = liftIO $ do
    cb' <- mkListBoxRowSelectedCallback (listBoxRowSelectedCallbackWrapper cb)
    connectSignalFunPtr obj "row-selected" cb' after

-- signal ListBox::select-all
type ListBoxSelectAllCallback =
    IO ()

noListBoxSelectAllCallback :: Maybe ListBoxSelectAllCallback
noListBoxSelectAllCallback = Nothing

type ListBoxSelectAllCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkListBoxSelectAllCallback :: ListBoxSelectAllCallbackC -> IO (FunPtr ListBoxSelectAllCallbackC)

listBoxSelectAllClosure :: ListBoxSelectAllCallback -> IO Closure
listBoxSelectAllClosure cb = newCClosure =<< mkListBoxSelectAllCallback wrapped
    where wrapped = listBoxSelectAllCallbackWrapper cb

listBoxSelectAllCallbackWrapper ::
    ListBoxSelectAllCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
listBoxSelectAllCallbackWrapper _cb _ _ = do
    _cb 

onListBoxSelectAll :: (GObject a, MonadIO m) => a -> ListBoxSelectAllCallback -> m SignalHandlerId
onListBoxSelectAll obj cb = liftIO $ connectListBoxSelectAll obj cb SignalConnectBefore
afterListBoxSelectAll :: (GObject a, MonadIO m) => a -> ListBoxSelectAllCallback -> m SignalHandlerId
afterListBoxSelectAll obj cb = connectListBoxSelectAll obj cb SignalConnectAfter

connectListBoxSelectAll :: (GObject a, MonadIO m) =>
                           a -> ListBoxSelectAllCallback -> SignalConnectMode -> m SignalHandlerId
connectListBoxSelectAll obj cb after = liftIO $ do
    cb' <- mkListBoxSelectAllCallback (listBoxSelectAllCallbackWrapper cb)
    connectSignalFunPtr obj "select-all" cb' after

-- signal ListBox::selected-rows-changed
type ListBoxSelectedRowsChangedCallback =
    IO ()

noListBoxSelectedRowsChangedCallback :: Maybe ListBoxSelectedRowsChangedCallback
noListBoxSelectedRowsChangedCallback = Nothing

type ListBoxSelectedRowsChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkListBoxSelectedRowsChangedCallback :: ListBoxSelectedRowsChangedCallbackC -> IO (FunPtr ListBoxSelectedRowsChangedCallbackC)

listBoxSelectedRowsChangedClosure :: ListBoxSelectedRowsChangedCallback -> IO Closure
listBoxSelectedRowsChangedClosure cb = newCClosure =<< mkListBoxSelectedRowsChangedCallback wrapped
    where wrapped = listBoxSelectedRowsChangedCallbackWrapper cb

listBoxSelectedRowsChangedCallbackWrapper ::
    ListBoxSelectedRowsChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
listBoxSelectedRowsChangedCallbackWrapper _cb _ _ = do
    _cb 

onListBoxSelectedRowsChanged :: (GObject a, MonadIO m) => a -> ListBoxSelectedRowsChangedCallback -> m SignalHandlerId
onListBoxSelectedRowsChanged obj cb = liftIO $ connectListBoxSelectedRowsChanged obj cb SignalConnectBefore
afterListBoxSelectedRowsChanged :: (GObject a, MonadIO m) => a -> ListBoxSelectedRowsChangedCallback -> m SignalHandlerId
afterListBoxSelectedRowsChanged obj cb = connectListBoxSelectedRowsChanged obj cb SignalConnectAfter

connectListBoxSelectedRowsChanged :: (GObject a, MonadIO m) =>
                                     a -> ListBoxSelectedRowsChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectListBoxSelectedRowsChanged obj cb after = liftIO $ do
    cb' <- mkListBoxSelectedRowsChangedCallback (listBoxSelectedRowsChangedCallbackWrapper cb)
    connectSignalFunPtr obj "selected-rows-changed" cb' after

-- signal ListBox::toggle-cursor-row
type ListBoxToggleCursorRowCallback =
    IO ()

noListBoxToggleCursorRowCallback :: Maybe ListBoxToggleCursorRowCallback
noListBoxToggleCursorRowCallback = Nothing

type ListBoxToggleCursorRowCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkListBoxToggleCursorRowCallback :: ListBoxToggleCursorRowCallbackC -> IO (FunPtr ListBoxToggleCursorRowCallbackC)

listBoxToggleCursorRowClosure :: ListBoxToggleCursorRowCallback -> IO Closure
listBoxToggleCursorRowClosure cb = newCClosure =<< mkListBoxToggleCursorRowCallback wrapped
    where wrapped = listBoxToggleCursorRowCallbackWrapper cb

listBoxToggleCursorRowCallbackWrapper ::
    ListBoxToggleCursorRowCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
listBoxToggleCursorRowCallbackWrapper _cb _ _ = do
    _cb 

onListBoxToggleCursorRow :: (GObject a, MonadIO m) => a -> ListBoxToggleCursorRowCallback -> m SignalHandlerId
onListBoxToggleCursorRow obj cb = liftIO $ connectListBoxToggleCursorRow obj cb SignalConnectBefore
afterListBoxToggleCursorRow :: (GObject a, MonadIO m) => a -> ListBoxToggleCursorRowCallback -> m SignalHandlerId
afterListBoxToggleCursorRow obj cb = connectListBoxToggleCursorRow obj cb SignalConnectAfter

connectListBoxToggleCursorRow :: (GObject a, MonadIO m) =>
                                 a -> ListBoxToggleCursorRowCallback -> SignalConnectMode -> m SignalHandlerId
connectListBoxToggleCursorRow obj cb after = liftIO $ do
    cb' <- mkListBoxToggleCursorRowCallback (listBoxToggleCursorRowCallbackWrapper cb)
    connectSignalFunPtr obj "toggle-cursor-row" cb' after

-- signal ListBox::unselect-all
type ListBoxUnselectAllCallback =
    IO ()

noListBoxUnselectAllCallback :: Maybe ListBoxUnselectAllCallback
noListBoxUnselectAllCallback = Nothing

type ListBoxUnselectAllCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkListBoxUnselectAllCallback :: ListBoxUnselectAllCallbackC -> IO (FunPtr ListBoxUnselectAllCallbackC)

listBoxUnselectAllClosure :: ListBoxUnselectAllCallback -> IO Closure
listBoxUnselectAllClosure cb = newCClosure =<< mkListBoxUnselectAllCallback wrapped
    where wrapped = listBoxUnselectAllCallbackWrapper cb

listBoxUnselectAllCallbackWrapper ::
    ListBoxUnselectAllCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
listBoxUnselectAllCallbackWrapper _cb _ _ = do
    _cb 

onListBoxUnselectAll :: (GObject a, MonadIO m) => a -> ListBoxUnselectAllCallback -> m SignalHandlerId
onListBoxUnselectAll obj cb = liftIO $ connectListBoxUnselectAll obj cb SignalConnectBefore
afterListBoxUnselectAll :: (GObject a, MonadIO m) => a -> ListBoxUnselectAllCallback -> m SignalHandlerId
afterListBoxUnselectAll obj cb = connectListBoxUnselectAll obj cb SignalConnectAfter

connectListBoxUnselectAll :: (GObject a, MonadIO m) =>
                             a -> ListBoxUnselectAllCallback -> SignalConnectMode -> m SignalHandlerId
connectListBoxUnselectAll obj cb after = liftIO $ do
    cb' <- mkListBoxUnselectAllCallback (listBoxUnselectAllCallbackWrapper cb)
    connectSignalFunPtr obj "unselect-all" cb' after

-- object ListBoxAccessible 
newtype ListBoxAccessible = ListBoxAccessible (ForeignPtr ListBoxAccessible)
noListBoxAccessible :: Maybe ListBoxAccessible
noListBoxAccessible = Nothing

foreign import ccall "gtk_list_box_accessible_get_type"
    c_gtk_list_box_accessible_get_type :: IO GType

type instance ParentTypes ListBoxAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Selection]

instance GObject ListBoxAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_list_box_accessible_get_type
    

class GObject o => ListBoxAccessibleK o
instance (GObject o, IsDescendantOf ListBoxAccessible o) => ListBoxAccessibleK o

toListBoxAccessible :: ListBoxAccessibleK o => o -> IO ListBoxAccessible
toListBoxAccessible = unsafeCastTo ListBoxAccessible

-- callback ListBoxCreateWidgetFunc
listBoxCreateWidgetFuncClosure :: ListBoxCreateWidgetFunc -> IO Closure
listBoxCreateWidgetFuncClosure cb = newCClosure =<< mkListBoxCreateWidgetFunc wrapped
    where wrapped = listBoxCreateWidgetFuncWrapper Nothing cb

type ListBoxCreateWidgetFuncC =
    Ptr GObject.Object ->
    Ptr () ->
    IO (Ptr Widget)

foreign import ccall "wrapper"
    mkListBoxCreateWidgetFunc :: ListBoxCreateWidgetFuncC -> IO (FunPtr ListBoxCreateWidgetFuncC)

type ListBoxCreateWidgetFunc =
    GObject.Object ->
    IO Widget

noListBoxCreateWidgetFunc :: Maybe ListBoxCreateWidgetFunc
noListBoxCreateWidgetFunc = Nothing

listBoxCreateWidgetFuncWrapper ::
    Maybe (Ptr (FunPtr (ListBoxCreateWidgetFuncC))) ->
    ListBoxCreateWidgetFunc ->
    Ptr GObject.Object ->
    Ptr () ->
    IO (Ptr Widget)
listBoxCreateWidgetFuncWrapper funptrptr _cb item _ = do
    item' <- (newObject GObject.Object) item
    result <- _cb  item'
    maybeReleaseFunPtr funptrptr
    result' <- refObject result
    return result'

-- callback ListBoxFilterFunc
listBoxFilterFuncClosure :: ListBoxFilterFunc -> IO Closure
listBoxFilterFuncClosure cb = newCClosure =<< mkListBoxFilterFunc wrapped
    where wrapped = listBoxFilterFuncWrapper Nothing cb

type ListBoxFilterFuncC =
    Ptr ListBoxRow ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkListBoxFilterFunc :: ListBoxFilterFuncC -> IO (FunPtr ListBoxFilterFuncC)

type ListBoxFilterFunc =
    ListBoxRow ->
    IO Bool

noListBoxFilterFunc :: Maybe ListBoxFilterFunc
noListBoxFilterFunc = Nothing

listBoxFilterFuncWrapper ::
    Maybe (Ptr (FunPtr (ListBoxFilterFuncC))) ->
    ListBoxFilterFunc ->
    Ptr ListBoxRow ->
    Ptr () ->
    IO CInt
listBoxFilterFuncWrapper funptrptr _cb row _ = do
    row' <- (newObject ListBoxRow) row
    result <- _cb  row'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- callback ListBoxForeachFunc
listBoxForeachFuncClosure :: ListBoxForeachFunc -> IO Closure
listBoxForeachFuncClosure cb = newCClosure =<< mkListBoxForeachFunc wrapped
    where wrapped = listBoxForeachFuncWrapper Nothing cb

type ListBoxForeachFuncC =
    Ptr ListBox ->
    Ptr ListBoxRow ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkListBoxForeachFunc :: ListBoxForeachFuncC -> IO (FunPtr ListBoxForeachFuncC)

type ListBoxForeachFunc =
    ListBox ->
    ListBoxRow ->
    IO ()

noListBoxForeachFunc :: Maybe ListBoxForeachFunc
noListBoxForeachFunc = Nothing

listBoxForeachFuncWrapper ::
    Maybe (Ptr (FunPtr (ListBoxForeachFuncC))) ->
    ListBoxForeachFunc ->
    Ptr ListBox ->
    Ptr ListBoxRow ->
    Ptr () ->
    IO ()
listBoxForeachFuncWrapper funptrptr _cb box row _ = do
    box' <- (newObject ListBox) box
    row' <- (newObject ListBoxRow) row
    _cb  box' row'
    maybeReleaseFunPtr funptrptr

-- object ListBoxRow 
newtype ListBoxRow = ListBoxRow (ForeignPtr ListBoxRow)
noListBoxRow :: Maybe ListBoxRow
noListBoxRow = Nothing

foreign import ccall "gtk_list_box_row_get_type"
    c_gtk_list_box_row_get_type :: IO GType

type instance ParentTypes ListBoxRow = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject ListBoxRow where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_list_box_row_get_type
    

class GObject o => ListBoxRowK o
instance (GObject o, IsDescendantOf ListBoxRow o) => ListBoxRowK o

toListBoxRow :: ListBoxRowK o => o -> IO ListBoxRow
toListBoxRow = unsafeCastTo ListBoxRow

-- method ListBoxRow::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ListBoxRow"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_row_new" gtk_list_box_row_new :: 
    IO (Ptr ListBoxRow)


listBoxRowNew ::
    (MonadIO m) =>
    m ListBoxRow
listBoxRowNew  = liftIO $ do
    result <- gtk_list_box_row_new
    checkUnexpectedReturnNULL "gtk_list_box_row_new" result
    result' <- (newObject ListBoxRow) result
    return result'

-- method ListBoxRow::changed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_row_changed" gtk_list_box_row_changed :: 
    Ptr ListBoxRow ->                       -- _obj : TInterface "Gtk" "ListBoxRow"
    IO ()


listBoxRowChanged ::
    (MonadIO m, ListBoxRowK a) =>
    a ->                                    -- _obj
    m ()
listBoxRowChanged _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_list_box_row_changed _obj'
    touchManagedPtr _obj
    return ()

-- method ListBoxRow::get_activatable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_row_get_activatable" gtk_list_box_row_get_activatable :: 
    Ptr ListBoxRow ->                       -- _obj : TInterface "Gtk" "ListBoxRow"
    IO CInt


listBoxRowGetActivatable ::
    (MonadIO m, ListBoxRowK a) =>
    a ->                                    -- _obj
    m Bool
listBoxRowGetActivatable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_row_get_activatable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ListBoxRow::get_header
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_row_get_header" gtk_list_box_row_get_header :: 
    Ptr ListBoxRow ->                       -- _obj : TInterface "Gtk" "ListBoxRow"
    IO (Ptr Widget)


listBoxRowGetHeader ::
    (MonadIO m, ListBoxRowK a) =>
    a ->                                    -- _obj
    m Widget
listBoxRowGetHeader _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_row_get_header _obj'
    checkUnexpectedReturnNULL "gtk_list_box_row_get_header" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method ListBoxRow::get_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_row_get_index" gtk_list_box_row_get_index :: 
    Ptr ListBoxRow ->                       -- _obj : TInterface "Gtk" "ListBoxRow"
    IO Int32


listBoxRowGetIndex ::
    (MonadIO m, ListBoxRowK a) =>
    a ->                                    -- _obj
    m Int32
listBoxRowGetIndex _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_row_get_index _obj'
    touchManagedPtr _obj
    return result

-- method ListBoxRow::get_selectable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_row_get_selectable" gtk_list_box_row_get_selectable :: 
    Ptr ListBoxRow ->                       -- _obj : TInterface "Gtk" "ListBoxRow"
    IO CInt


listBoxRowGetSelectable ::
    (MonadIO m, ListBoxRowK a) =>
    a ->                                    -- _obj
    m Bool
listBoxRowGetSelectable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_row_get_selectable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ListBoxRow::is_selected
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_row_is_selected" gtk_list_box_row_is_selected :: 
    Ptr ListBoxRow ->                       -- _obj : TInterface "Gtk" "ListBoxRow"
    IO CInt


listBoxRowIsSelected ::
    (MonadIO m, ListBoxRowK a) =>
    a ->                                    -- _obj
    m Bool
listBoxRowIsSelected _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_list_box_row_is_selected _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ListBoxRow::set_activatable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "activatable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "activatable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_row_set_activatable" gtk_list_box_row_set_activatable :: 
    Ptr ListBoxRow ->                       -- _obj : TInterface "Gtk" "ListBoxRow"
    CInt ->                                 -- activatable : TBasicType TBoolean
    IO ()


listBoxRowSetActivatable ::
    (MonadIO m, ListBoxRowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- activatable
    m ()
listBoxRowSetActivatable _obj activatable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let activatable' = (fromIntegral . fromEnum) activatable
    gtk_list_box_row_set_activatable _obj' activatable'
    touchManagedPtr _obj
    return ()

-- method ListBoxRow::set_header
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "header", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "header", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_row_set_header" gtk_list_box_row_set_header :: 
    Ptr ListBoxRow ->                       -- _obj : TInterface "Gtk" "ListBoxRow"
    Ptr Widget ->                           -- header : TInterface "Gtk" "Widget"
    IO ()


listBoxRowSetHeader ::
    (MonadIO m, ListBoxRowK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- header
    m ()
listBoxRowSetHeader _obj header = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeHeader <- case header of
        Nothing -> return nullPtr
        Just jHeader -> do
            let jHeader' = unsafeManagedPtrCastPtr jHeader
            return jHeader'
    gtk_list_box_row_set_header _obj' maybeHeader
    touchManagedPtr _obj
    whenJust header touchManagedPtr
    return ()

-- method ListBoxRow::set_selectable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selectable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListBoxRow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selectable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_row_set_selectable" gtk_list_box_row_set_selectable :: 
    Ptr ListBoxRow ->                       -- _obj : TInterface "Gtk" "ListBoxRow"
    CInt ->                                 -- selectable : TBasicType TBoolean
    IO ()


listBoxRowSetSelectable ::
    (MonadIO m, ListBoxRowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- selectable
    m ()
listBoxRowSetSelectable _obj selectable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let selectable' = (fromIntegral . fromEnum) selectable
    gtk_list_box_row_set_selectable _obj' selectable'
    touchManagedPtr _obj
    return ()

-- signal ListBoxRow::activate
type ListBoxRowActivateCallback =
    IO ()

noListBoxRowActivateCallback :: Maybe ListBoxRowActivateCallback
noListBoxRowActivateCallback = Nothing

type ListBoxRowActivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkListBoxRowActivateCallback :: ListBoxRowActivateCallbackC -> IO (FunPtr ListBoxRowActivateCallbackC)

listBoxRowActivateClosure :: ListBoxRowActivateCallback -> IO Closure
listBoxRowActivateClosure cb = newCClosure =<< mkListBoxRowActivateCallback wrapped
    where wrapped = listBoxRowActivateCallbackWrapper cb

listBoxRowActivateCallbackWrapper ::
    ListBoxRowActivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
listBoxRowActivateCallbackWrapper _cb _ _ = do
    _cb 

onListBoxRowActivate :: (GObject a, MonadIO m) => a -> ListBoxRowActivateCallback -> m SignalHandlerId
onListBoxRowActivate obj cb = liftIO $ connectListBoxRowActivate obj cb SignalConnectBefore
afterListBoxRowActivate :: (GObject a, MonadIO m) => a -> ListBoxRowActivateCallback -> m SignalHandlerId
afterListBoxRowActivate obj cb = connectListBoxRowActivate obj cb SignalConnectAfter

connectListBoxRowActivate :: (GObject a, MonadIO m) =>
                             a -> ListBoxRowActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectListBoxRowActivate obj cb after = liftIO $ do
    cb' <- mkListBoxRowActivateCallback (listBoxRowActivateCallbackWrapper cb)
    connectSignalFunPtr obj "activate" cb' after

-- object ListBoxRowAccessible 
newtype ListBoxRowAccessible = ListBoxRowAccessible (ForeignPtr ListBoxRowAccessible)
noListBoxRowAccessible :: Maybe ListBoxRowAccessible
noListBoxRowAccessible = Nothing

foreign import ccall "gtk_list_box_row_accessible_get_type"
    c_gtk_list_box_row_accessible_get_type :: IO GType

type instance ParentTypes ListBoxRowAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component]

instance GObject ListBoxRowAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_list_box_row_accessible_get_type
    

class GObject o => ListBoxRowAccessibleK o
instance (GObject o, IsDescendantOf ListBoxRowAccessible o) => ListBoxRowAccessibleK o

toListBoxRowAccessible :: ListBoxRowAccessibleK o => o -> IO ListBoxRowAccessible
toListBoxRowAccessible = unsafeCastTo ListBoxRowAccessible

-- callback ListBoxSortFunc
listBoxSortFuncClosure :: ListBoxSortFunc -> IO Closure
listBoxSortFuncClosure cb = newCClosure =<< mkListBoxSortFunc wrapped
    where wrapped = listBoxSortFuncWrapper Nothing cb

type ListBoxSortFuncC =
    Ptr ListBoxRow ->
    Ptr ListBoxRow ->
    Ptr () ->
    IO Int32

foreign import ccall "wrapper"
    mkListBoxSortFunc :: ListBoxSortFuncC -> IO (FunPtr ListBoxSortFuncC)

type ListBoxSortFunc =
    ListBoxRow ->
    ListBoxRow ->
    IO Int32

noListBoxSortFunc :: Maybe ListBoxSortFunc
noListBoxSortFunc = Nothing

listBoxSortFuncWrapper ::
    Maybe (Ptr (FunPtr (ListBoxSortFuncC))) ->
    ListBoxSortFunc ->
    Ptr ListBoxRow ->
    Ptr ListBoxRow ->
    Ptr () ->
    IO Int32
listBoxSortFuncWrapper funptrptr _cb row1 row2 _ = do
    row1' <- (newObject ListBoxRow) row1
    row2' <- (newObject ListBoxRow) row2
    result <- _cb  row1' row2'
    maybeReleaseFunPtr funptrptr
    return result

-- callback ListBoxUpdateHeaderFunc
listBoxUpdateHeaderFuncClosure :: ListBoxUpdateHeaderFunc -> IO Closure
listBoxUpdateHeaderFuncClosure cb = newCClosure =<< mkListBoxUpdateHeaderFunc wrapped
    where wrapped = listBoxUpdateHeaderFuncWrapper Nothing cb

type ListBoxUpdateHeaderFuncC =
    Ptr ListBoxRow ->
    Ptr ListBoxRow ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkListBoxUpdateHeaderFunc :: ListBoxUpdateHeaderFuncC -> IO (FunPtr ListBoxUpdateHeaderFuncC)

type ListBoxUpdateHeaderFunc =
    ListBoxRow ->
    Maybe ListBoxRow ->
    IO ()

noListBoxUpdateHeaderFunc :: Maybe ListBoxUpdateHeaderFunc
noListBoxUpdateHeaderFunc = Nothing

listBoxUpdateHeaderFuncWrapper ::
    Maybe (Ptr (FunPtr (ListBoxUpdateHeaderFuncC))) ->
    ListBoxUpdateHeaderFunc ->
    Ptr ListBoxRow ->
    Ptr ListBoxRow ->
    Ptr () ->
    IO ()
listBoxUpdateHeaderFuncWrapper funptrptr _cb row before _ = do
    row' <- (newObject ListBoxRow) row
    maybeBefore <-
        if before == nullPtr
        then return Nothing
        else do
            before' <- (newObject ListBoxRow) before
            return $ Just before'
    _cb  row' maybeBefore
    maybeReleaseFunPtr funptrptr

-- object ListStore 
newtype ListStore = ListStore (ForeignPtr ListStore)
noListStore :: Maybe ListStore
noListStore = Nothing

foreign import ccall "gtk_list_store_get_type"
    c_gtk_list_store_get_type :: IO GType

type instance ParentTypes ListStore = '[GObject.Object, Buildable, TreeDragDest, TreeDragSource, TreeModel, TreeSortable]

instance GObject ListStore where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_list_store_get_type
    

class GObject o => ListStoreK o
instance (GObject o, IsDescendantOf ListStore o) => ListStoreK o

toListStore :: ListStoreK o => o -> IO ListStore
toListStore = unsafeCastTo ListStore

-- method ListStore::new
-- method type : Constructor
-- Args : [Arg {argName = "n_columns", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TCArray False (-1) 0 (TBasicType TGType), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_columns", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "types", argType = TCArray False (-1) 0 (TBasicType TGType), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ListStore"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_newv" gtk_list_store_newv :: 
    Int32 ->                                -- n_columns : TBasicType TInt32
    Ptr CGType ->                           -- types : TCArray False (-1) 0 (TBasicType TGType)
    IO (Ptr ListStore)


listStoreNew ::
    (MonadIO m) =>
    [GType] ->                              -- types
    m ListStore
listStoreNew types = liftIO $ do
    let n_columns = fromIntegral $ length types
    types' <- (packMapStorableArray gtypeToCGType) types
    result <- gtk_list_store_newv n_columns types'
    checkUnexpectedReturnNULL "gtk_list_store_newv" result
    result' <- (wrapObject ListStore) result
    freeMem types'
    return result'

-- method ListStore::append
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_append" gtk_list_store_append :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO ()


listStoreAppend ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    m (TreeIter)
listStoreAppend _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    gtk_list_store_append _obj' iter
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    return iter'

-- method ListStore::clear
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_clear" gtk_list_store_clear :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    IO ()


listStoreClear ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    m ()
listStoreClear _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_list_store_clear _obj'
    touchManagedPtr _obj
    return ()

-- method ListStore::insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_insert" gtk_list_store_insert :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


listStoreInsert ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    m (TreeIter)
listStoreInsert _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    gtk_list_store_insert _obj' iter position
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    return iter'

-- method ListStore::insert_after
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_insert_after" gtk_list_store_insert_after :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- sibling : TInterface "Gtk" "TreeIter"
    IO ()


listStoreInsertAfter ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- sibling
    m (TreeIter)
listStoreInsertAfter _obj sibling = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    maybeSibling <- case sibling of
        Nothing -> return nullPtr
        Just jSibling -> do
            let jSibling' = unsafeManagedPtrGetPtr jSibling
            return jSibling'
    gtk_list_store_insert_after _obj' iter maybeSibling
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    whenJust sibling touchManagedPtr
    return iter'

-- method ListStore::insert_before
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_insert_before" gtk_list_store_insert_before :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- sibling : TInterface "Gtk" "TreeIter"
    IO ()


listStoreInsertBefore ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- sibling
    m (TreeIter)
listStoreInsertBefore _obj sibling = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    maybeSibling <- case sibling of
        Nothing -> return nullPtr
        Just jSibling -> do
            let jSibling' = unsafeManagedPtrGetPtr jSibling
            return jSibling'
    gtk_list_store_insert_before _obj' iter maybeSibling
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    whenJust sibling touchManagedPtr
    return iter'

-- method ListStore::insert_with_valuesv
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TCArray False (-1) 5 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "values", argType = TCArray False (-1) 5 (TInterface "GObject" "Value"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TCArray False (-1) 5 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "values", argType = TCArray False (-1) 5 (TInterface "GObject" "Value"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_insert_with_valuesv" gtk_list_store_insert_with_valuesv :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Int32 ->                                -- position : TBasicType TInt32
    Ptr Int32 ->                            -- columns : TCArray False (-1) 5 (TBasicType TInt32)
    Ptr GValue ->                           -- values : TCArray False (-1) 5 (TInterface "GObject" "Value")
    Int32 ->                                -- n_values : TBasicType TInt32
    IO ()


listStoreInsertWithValuesv ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    [Int32] ->                              -- columns
    [GValue] ->                             -- values
    m (TreeIter)
listStoreInsertWithValuesv _obj position columns values = liftIO $ do
    let n_values = fromIntegral $ length values
    let columns_expected_length_ = fromIntegral $ length columns
    when (columns_expected_length_ /= n_values) $
        error "Gtk.listStoreInsertWithValuesv : length of 'columns' does not agree with that of 'values'."
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    columns' <- packStorableArray columns
    let values' = map unsafeManagedPtrGetPtr values
    values'' <- packBlockArray 24 values'
    gtk_list_store_insert_with_valuesv _obj' iter position columns' values'' n_values
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    mapM_ touchManagedPtr values
    freeMem columns'
    freeMem values''
    return iter'

-- method ListStore::iter_is_valid
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_iter_is_valid" gtk_list_store_iter_is_valid :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


listStoreIterIsValid ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m Bool
listStoreIterIsValid _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_list_store_iter_is_valid _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method ListStore::move_after
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_move_after" gtk_list_store_move_after :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- position : TInterface "Gtk" "TreeIter"
    IO ()


listStoreMoveAfter ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    Maybe (TreeIter) ->                     -- position
    m ()
listStoreMoveAfter _obj iter position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    maybePosition <- case position of
        Nothing -> return nullPtr
        Just jPosition -> do
            let jPosition' = unsafeManagedPtrGetPtr jPosition
            return jPosition'
    gtk_list_store_move_after _obj' iter' maybePosition
    touchManagedPtr _obj
    touchManagedPtr iter
    whenJust position touchManagedPtr
    return ()

-- method ListStore::move_before
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_move_before" gtk_list_store_move_before :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- position : TInterface "Gtk" "TreeIter"
    IO ()


listStoreMoveBefore ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    Maybe (TreeIter) ->                     -- position
    m ()
listStoreMoveBefore _obj iter position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    maybePosition <- case position of
        Nothing -> return nullPtr
        Just jPosition -> do
            let jPosition' = unsafeManagedPtrGetPtr jPosition
            return jPosition'
    gtk_list_store_move_before _obj' iter' maybePosition
    touchManagedPtr _obj
    touchManagedPtr iter
    whenJust position touchManagedPtr
    return ()

-- method ListStore::prepend
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_prepend" gtk_list_store_prepend :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO ()


listStorePrepend ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    m (TreeIter)
listStorePrepend _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    gtk_list_store_prepend _obj' iter
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    return iter'

-- method ListStore::remove
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_remove" gtk_list_store_remove :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


listStoreRemove ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m Bool
listStoreRemove _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_list_store_remove _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method ListStore::reorder
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_order", argType = TCArray True (-1) (-1) (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_order", argType = TCArray True (-1) (-1) (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_reorder" gtk_list_store_reorder :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr Int32 ->                            -- new_order : TCArray True (-1) (-1) (TBasicType TInt32)
    IO ()


listStoreReorder ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    [Int32] ->                              -- new_order
    m ()
listStoreReorder _obj new_order = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    new_order' <- packZeroTerminatedStorableArray new_order
    gtk_list_store_reorder _obj' new_order'
    touchManagedPtr _obj
    freeMem new_order'
    return ()

-- method ListStore::set_column_types
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_columns", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TCArray False (-1) 1 (TBasicType TGType), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_columns", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TCArray False (-1) 1 (TBasicType TGType), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_set_column_types" gtk_list_store_set_column_types :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Int32 ->                                -- n_columns : TBasicType TInt32
    Ptr CGType ->                           -- types : TCArray False (-1) 1 (TBasicType TGType)
    IO ()


listStoreSetColumnTypes ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    [GType] ->                              -- types
    m ()
listStoreSetColumnTypes _obj types = liftIO $ do
    let n_columns = fromIntegral $ length types
    let _obj' = unsafeManagedPtrCastPtr _obj
    types' <- (packMapStorableArray gtypeToCGType) types
    gtk_list_store_set_column_types _obj' n_columns types'
    touchManagedPtr _obj
    freeMem types'
    return ()

-- method ListStore::set_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_set_value" gtk_list_store_set_value :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Int32 ->                                -- column : TBasicType TInt32
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


listStoreSetValue ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    Int32 ->                                -- column
    GValue ->                               -- value
    m ()
listStoreSetValue _obj iter column value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    let value' = unsafeManagedPtrGetPtr value
    gtk_list_store_set_value _obj' iter' column value'
    touchManagedPtr _obj
    touchManagedPtr iter
    touchManagedPtr value
    return ()

-- method ListStore::set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TCArray False (-1) 4 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "values", argType = TCArray False (-1) 4 (TInterface "GObject" "Value"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TCArray False (-1) 4 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "values", argType = TCArray False (-1) 4 (TInterface "GObject" "Value"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_set_valuesv" gtk_list_store_set_valuesv :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr Int32 ->                            -- columns : TCArray False (-1) 4 (TBasicType TInt32)
    Ptr GValue ->                           -- values : TCArray False (-1) 4 (TInterface "GObject" "Value")
    Int32 ->                                -- n_values : TBasicType TInt32
    IO ()


listStoreSet ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    [Int32] ->                              -- columns
    [GValue] ->                             -- values
    m ()
listStoreSet _obj iter columns values = liftIO $ do
    let n_values = fromIntegral $ length values
    let columns_expected_length_ = fromIntegral $ length columns
    when (columns_expected_length_ /= n_values) $
        error "Gtk.listStoreSet : length of 'columns' does not agree with that of 'values'."
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    columns' <- packStorableArray columns
    let values' = map unsafeManagedPtrGetPtr values
    values'' <- packBlockArray 24 values'
    gtk_list_store_set_valuesv _obj' iter' columns' values'' n_values
    touchManagedPtr _obj
    touchManagedPtr iter
    mapM_ touchManagedPtr values
    freeMem columns'
    freeMem values''
    return ()

-- method ListStore::swap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "a", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "b", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ListStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "a", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "b", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_store_swap" gtk_list_store_swap :: 
    Ptr ListStore ->                        -- _obj : TInterface "Gtk" "ListStore"
    Ptr TreeIter ->                         -- a : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- b : TInterface "Gtk" "TreeIter"
    IO ()


listStoreSwap ::
    (MonadIO m, ListStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- a
    TreeIter ->                             -- b
    m ()
listStoreSwap _obj a b = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let a' = unsafeManagedPtrGetPtr a
    let b' = unsafeManagedPtrGetPtr b
    gtk_list_store_swap _obj' a' b'
    touchManagedPtr _obj
    touchManagedPtr a
    touchManagedPtr b
    return ()

-- object LockButton 
newtype LockButton = LockButton (ForeignPtr LockButton)
noLockButton :: Maybe LockButton
noLockButton = Nothing

foreign import ccall "gtk_lock_button_get_type"
    c_gtk_lock_button_get_type :: IO GType

type instance ParentTypes LockButton = '[Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject LockButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_lock_button_get_type
    

class GObject o => LockButtonK o
instance (GObject o, IsDescendantOf LockButton o) => LockButtonK o

toLockButton :: LockButtonK o => o -> IO LockButton
toLockButton = unsafeCastTo LockButton

-- method LockButton::new
-- method type : Constructor
-- Args : [Arg {argName = "permission", argType = TInterface "Gio" "Permission", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "permission", argType = TInterface "Gio" "Permission", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "LockButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_lock_button_new" gtk_lock_button_new :: 
    Ptr Gio.Permission ->                   -- permission : TInterface "Gio" "Permission"
    IO (Ptr LockButton)


lockButtonNew ::
    (MonadIO m, Gio.PermissionK a) =>
    Maybe (a) ->                            -- permission
    m LockButton
lockButtonNew permission = liftIO $ do
    maybePermission <- case permission of
        Nothing -> return nullPtr
        Just jPermission -> do
            let jPermission' = unsafeManagedPtrCastPtr jPermission
            return jPermission'
    result <- gtk_lock_button_new maybePermission
    checkUnexpectedReturnNULL "gtk_lock_button_new" result
    result' <- (newObject LockButton) result
    whenJust permission touchManagedPtr
    return result'

-- method LockButton::get_permission
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LockButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LockButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Permission"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_lock_button_get_permission" gtk_lock_button_get_permission :: 
    Ptr LockButton ->                       -- _obj : TInterface "Gtk" "LockButton"
    IO (Ptr Gio.Permission)


lockButtonGetPermission ::
    (MonadIO m, LockButtonK a) =>
    a ->                                    -- _obj
    m Gio.Permission
lockButtonGetPermission _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_lock_button_get_permission _obj'
    checkUnexpectedReturnNULL "gtk_lock_button_get_permission" result
    result' <- (newObject Gio.Permission) result
    touchManagedPtr _obj
    return result'

-- method LockButton::set_permission
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LockButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "permission", argType = TInterface "Gio" "Permission", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LockButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "permission", argType = TInterface "Gio" "Permission", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_lock_button_set_permission" gtk_lock_button_set_permission :: 
    Ptr LockButton ->                       -- _obj : TInterface "Gtk" "LockButton"
    Ptr Gio.Permission ->                   -- permission : TInterface "Gio" "Permission"
    IO ()


lockButtonSetPermission ::
    (MonadIO m, LockButtonK a, Gio.PermissionK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- permission
    m ()
lockButtonSetPermission _obj permission = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePermission <- case permission of
        Nothing -> return nullPtr
        Just jPermission -> do
            let jPermission' = unsafeManagedPtrCastPtr jPermission
            return jPermission'
    gtk_lock_button_set_permission _obj' maybePermission
    touchManagedPtr _obj
    whenJust permission touchManagedPtr
    return ()

-- object LockButtonAccessible 
newtype LockButtonAccessible = LockButtonAccessible (ForeignPtr LockButtonAccessible)
noLockButtonAccessible :: Maybe LockButtonAccessible
noLockButtonAccessible = Nothing

foreign import ccall "gtk_lock_button_accessible_get_type"
    c_gtk_lock_button_accessible_get_type :: IO GType

type instance ParentTypes LockButtonAccessible = '[ButtonAccessible, ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Image]

instance GObject LockButtonAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_lock_button_accessible_get_type
    

class GObject o => LockButtonAccessibleK o
instance (GObject o, IsDescendantOf LockButtonAccessible o) => LockButtonAccessibleK o

toLockButtonAccessible :: LockButtonAccessibleK o => o -> IO LockButtonAccessible
toLockButtonAccessible = unsafeCastTo LockButtonAccessible

-- object Menu 
newtype Menu = Menu (ForeignPtr Menu)
noMenu :: Maybe Menu
noMenu = Nothing

foreign import ccall "gtk_menu_get_type"
    c_gtk_menu_get_type :: IO GType

type instance ParentTypes Menu = '[MenuShell, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Menu where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_menu_get_type
    

class GObject o => MenuK o
instance (GObject o, IsDescendantOf Menu o) => MenuK o

toMenu :: MenuK o => o -> IO Menu
toMenu = unsafeCastTo Menu

-- method Menu::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Menu"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_new" gtk_menu_new :: 
    IO (Ptr Menu)


menuNew ::
    (MonadIO m) =>
    m Menu
menuNew  = liftIO $ do
    result <- gtk_menu_new
    checkUnexpectedReturnNULL "gtk_menu_new" result
    result' <- (newObject Menu) result
    return result'

-- method Menu::new_from_model
-- method type : Constructor
-- Args : [Arg {argName = "model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Menu"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_new_from_model" gtk_menu_new_from_model :: 
    Ptr Gio.MenuModel ->                    -- model : TInterface "Gio" "MenuModel"
    IO (Ptr Menu)


menuNewFromModel ::
    (MonadIO m, Gio.MenuModelK a) =>
    a ->                                    -- model
    m Menu
menuNewFromModel model = liftIO $ do
    let model' = unsafeManagedPtrCastPtr model
    result <- gtk_menu_new_from_model model'
    checkUnexpectedReturnNULL "gtk_menu_new_from_model" result
    result' <- (newObject Menu) result
    touchManagedPtr model
    return result'

-- method Menu::attach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "right_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bottom_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "right_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bottom_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_attach" gtk_menu_attach :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Word32 ->                               -- left_attach : TBasicType TUInt32
    Word32 ->                               -- right_attach : TBasicType TUInt32
    Word32 ->                               -- top_attach : TBasicType TUInt32
    Word32 ->                               -- bottom_attach : TBasicType TUInt32
    IO ()


menuAttach ::
    (MonadIO m, MenuK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Word32 ->                               -- left_attach
    Word32 ->                               -- right_attach
    Word32 ->                               -- top_attach
    Word32 ->                               -- bottom_attach
    m ()
menuAttach _obj child left_attach right_attach top_attach bottom_attach = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_menu_attach _obj' child' left_attach right_attach top_attach bottom_attach
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Menu::attach_to_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attach_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detacher", argType = TInterface "Gtk" "MenuDetachFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attach_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detacher", argType = TInterface "Gtk" "MenuDetachFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_attach_to_widget" gtk_menu_attach_to_widget :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    Ptr Widget ->                           -- attach_widget : TInterface "Gtk" "Widget"
    FunPtr MenuDetachFuncC ->               -- detacher : TInterface "Gtk" "MenuDetachFunc"
    IO ()


menuAttachToWidget ::
    (MonadIO m, MenuK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- attach_widget
    Maybe (MenuDetachFunc) ->               -- detacher
    m ()
menuAttachToWidget _obj attach_widget detacher = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let attach_widget' = unsafeManagedPtrCastPtr attach_widget
    ptrdetacher <- callocMem :: IO (Ptr (FunPtr MenuDetachFuncC))
    maybeDetacher <- case detacher of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jDetacher -> do
            jDetacher' <- mkMenuDetachFunc (menuDetachFuncWrapper (Just ptrdetacher) jDetacher)
            poke ptrdetacher jDetacher'
            return jDetacher'
    gtk_menu_attach_to_widget _obj' attach_widget' maybeDetacher
    touchManagedPtr _obj
    touchManagedPtr attach_widget
    return ()

-- method Menu::detach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_detach" gtk_menu_detach :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    IO ()


menuDetach ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    m ()
menuDetach _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_detach _obj'
    touchManagedPtr _obj
    return ()

-- method Menu::get_accel_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AccelGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_get_accel_group" gtk_menu_get_accel_group :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    IO (Ptr AccelGroup)


menuGetAccelGroup ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    m AccelGroup
menuGetAccelGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_get_accel_group _obj'
    checkUnexpectedReturnNULL "gtk_menu_get_accel_group" result
    result' <- (newObject AccelGroup) result
    touchManagedPtr _obj
    return result'

-- method Menu::get_accel_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_get_accel_path" gtk_menu_get_accel_path :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    IO CString


menuGetAccelPath ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    m T.Text
menuGetAccelPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_get_accel_path _obj'
    checkUnexpectedReturnNULL "gtk_menu_get_accel_path" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Menu::get_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_get_active" gtk_menu_get_active :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    IO (Ptr Widget)


menuGetActive ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    m Widget
menuGetActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_get_active _obj'
    checkUnexpectedReturnNULL "gtk_menu_get_active" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Menu::get_attach_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_get_attach_widget" gtk_menu_get_attach_widget :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    IO (Ptr Widget)


menuGetAttachWidget ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    m Widget
menuGetAttachWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_get_attach_widget _obj'
    checkUnexpectedReturnNULL "gtk_menu_get_attach_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Menu::get_monitor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_get_monitor" gtk_menu_get_monitor :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    IO Int32


menuGetMonitor ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    m Int32
menuGetMonitor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_get_monitor _obj'
    touchManagedPtr _obj
    return result

-- method Menu::get_reserve_toggle_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_get_reserve_toggle_size" gtk_menu_get_reserve_toggle_size :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    IO CInt


menuGetReserveToggleSize ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    m Bool
menuGetReserveToggleSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_get_reserve_toggle_size _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Menu::get_tearoff_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_get_tearoff_state" gtk_menu_get_tearoff_state :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    IO CInt

{-# DEPRECATED menuGetTearoffState ["(Since version 3.10)"]#-}
menuGetTearoffState ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    m Bool
menuGetTearoffState _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_get_tearoff_state _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Menu::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_get_title" gtk_menu_get_title :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    IO CString

{-# DEPRECATED menuGetTitle ["(Since version 3.10)"]#-}
menuGetTitle ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    m T.Text
menuGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_get_title _obj'
    checkUnexpectedReturnNULL "gtk_menu_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Menu::popdown
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_popdown" gtk_menu_popdown :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    IO ()


menuPopdown ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    m ()
menuPopdown _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_popdown _obj'
    touchManagedPtr _obj
    return ()

-- method Menu::popup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent_menu_shell", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent_menu_item", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "MenuPositionFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "activate_time", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent_menu_shell", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent_menu_item", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "MenuPositionFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "activate_time", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_popup" gtk_menu_popup :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    Ptr Widget ->                           -- parent_menu_shell : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- parent_menu_item : TInterface "Gtk" "Widget"
    FunPtr MenuPositionFuncC ->             -- func : TInterface "Gtk" "MenuPositionFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    Word32 ->                               -- button : TBasicType TUInt32
    Word32 ->                               -- activate_time : TBasicType TUInt32
    IO ()


menuPopup ::
    (MonadIO m, MenuK a, WidgetK b, WidgetK c) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- parent_menu_shell
    Maybe (c) ->                            -- parent_menu_item
    Maybe (MenuPositionFunc) ->             -- func
    Word32 ->                               -- button
    Word32 ->                               -- activate_time
    m ()
menuPopup _obj parent_menu_shell parent_menu_item func button activate_time = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeParent_menu_shell <- case parent_menu_shell of
        Nothing -> return nullPtr
        Just jParent_menu_shell -> do
            let jParent_menu_shell' = unsafeManagedPtrCastPtr jParent_menu_shell
            return jParent_menu_shell'
    maybeParent_menu_item <- case parent_menu_item of
        Nothing -> return nullPtr
        Just jParent_menu_item -> do
            let jParent_menu_item' = unsafeManagedPtrCastPtr jParent_menu_item
            return jParent_menu_item'
    ptrfunc <- callocMem :: IO (Ptr (FunPtr MenuPositionFuncC))
    maybeFunc <- case func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jFunc -> do
            jFunc' <- mkMenuPositionFunc (menuPositionFuncWrapper (Just ptrfunc) jFunc)
            poke ptrfunc jFunc'
            return jFunc'
    let data_ = nullPtr
    gtk_menu_popup _obj' maybeParent_menu_shell maybeParent_menu_item maybeFunc data_ button activate_time
    touchManagedPtr _obj
    whenJust parent_menu_shell touchManagedPtr
    whenJust parent_menu_item touchManagedPtr
    return ()

-- method Menu::popup_for_device
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent_menu_shell", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent_menu_item", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "MenuPositionFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 5, argDestroy = 6, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "activate_time", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent_menu_shell", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent_menu_item", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "MenuPositionFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 5, argDestroy = 6, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "activate_time", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_popup_for_device" gtk_menu_popup_for_device :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    Ptr Gdk.Device ->                       -- device : TInterface "Gdk" "Device"
    Ptr Widget ->                           -- parent_menu_shell : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- parent_menu_item : TInterface "Gtk" "Widget"
    FunPtr MenuPositionFuncC ->             -- func : TInterface "Gtk" "MenuPositionFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    Word32 ->                               -- button : TBasicType TUInt32
    Word32 ->                               -- activate_time : TBasicType TUInt32
    IO ()


menuPopupForDevice ::
    (MonadIO m, MenuK a, Gdk.DeviceK b, WidgetK c, WidgetK d) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- device
    Maybe (c) ->                            -- parent_menu_shell
    Maybe (d) ->                            -- parent_menu_item
    Maybe (MenuPositionFunc) ->             -- func
    Word32 ->                               -- button
    Word32 ->                               -- activate_time
    m ()
menuPopupForDevice _obj device parent_menu_shell parent_menu_item func button activate_time = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeDevice <- case device of
        Nothing -> return nullPtr
        Just jDevice -> do
            let jDevice' = unsafeManagedPtrCastPtr jDevice
            return jDevice'
    maybeParent_menu_shell <- case parent_menu_shell of
        Nothing -> return nullPtr
        Just jParent_menu_shell -> do
            let jParent_menu_shell' = unsafeManagedPtrCastPtr jParent_menu_shell
            return jParent_menu_shell'
    maybeParent_menu_item <- case parent_menu_item of
        Nothing -> return nullPtr
        Just jParent_menu_item -> do
            let jParent_menu_item' = unsafeManagedPtrCastPtr jParent_menu_item
            return jParent_menu_item'
    maybeFunc <- case func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jFunc -> do
            jFunc' <- mkMenuPositionFunc (menuPositionFuncWrapper Nothing jFunc)
            return jFunc'
    let data_ = castFunPtrToPtr maybeFunc
    let destroy = safeFreeFunPtrPtr
    gtk_menu_popup_for_device _obj' maybeDevice maybeParent_menu_shell maybeParent_menu_item maybeFunc data_ destroy button activate_time
    touchManagedPtr _obj
    whenJust device touchManagedPtr
    whenJust parent_menu_shell touchManagedPtr
    whenJust parent_menu_item touchManagedPtr
    return ()

-- method Menu::reorder_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_reorder_child" gtk_menu_reorder_child :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


menuReorderChild ::
    (MonadIO m, MenuK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Int32 ->                                -- position
    m ()
menuReorderChild _obj child position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_menu_reorder_child _obj' child' position
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Menu::reposition
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_reposition" gtk_menu_reposition :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    IO ()


menuReposition ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    m ()
menuReposition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_reposition _obj'
    touchManagedPtr _obj
    return ()

-- method Menu::set_accel_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_set_accel_group" gtk_menu_set_accel_group :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    Ptr AccelGroup ->                       -- accel_group : TInterface "Gtk" "AccelGroup"
    IO ()


menuSetAccelGroup ::
    (MonadIO m, MenuK a, AccelGroupK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- accel_group
    m ()
menuSetAccelGroup _obj accel_group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAccel_group <- case accel_group of
        Nothing -> return nullPtr
        Just jAccel_group -> do
            let jAccel_group' = unsafeManagedPtrCastPtr jAccel_group
            return jAccel_group'
    gtk_menu_set_accel_group _obj' maybeAccel_group
    touchManagedPtr _obj
    whenJust accel_group touchManagedPtr
    return ()

-- method Menu::set_accel_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_set_accel_path" gtk_menu_set_accel_path :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    CString ->                              -- accel_path : TBasicType TUTF8
    IO ()


menuSetAccelPath ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- accel_path
    m ()
menuSetAccelPath _obj accel_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAccel_path <- case accel_path of
        Nothing -> return nullPtr
        Just jAccel_path -> do
            jAccel_path' <- textToCString jAccel_path
            return jAccel_path'
    gtk_menu_set_accel_path _obj' maybeAccel_path
    touchManagedPtr _obj
    freeMem maybeAccel_path
    return ()

-- method Menu::set_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_set_active" gtk_menu_set_active :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    Word32 ->                               -- index : TBasicType TUInt32
    IO ()


menuSetActive ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- index
    m ()
menuSetActive _obj index = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_set_active _obj' index
    touchManagedPtr _obj
    return ()

-- method Menu::set_monitor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "monitor_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "monitor_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_set_monitor" gtk_menu_set_monitor :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    Int32 ->                                -- monitor_num : TBasicType TInt32
    IO ()


menuSetMonitor ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- monitor_num
    m ()
menuSetMonitor _obj monitor_num = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_set_monitor _obj' monitor_num
    touchManagedPtr _obj
    return ()

-- method Menu::set_reserve_toggle_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reserve_toggle_size", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reserve_toggle_size", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_set_reserve_toggle_size" gtk_menu_set_reserve_toggle_size :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    CInt ->                                 -- reserve_toggle_size : TBasicType TBoolean
    IO ()


menuSetReserveToggleSize ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- reserve_toggle_size
    m ()
menuSetReserveToggleSize _obj reserve_toggle_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let reserve_toggle_size' = (fromIntegral . fromEnum) reserve_toggle_size
    gtk_menu_set_reserve_toggle_size _obj' reserve_toggle_size'
    touchManagedPtr _obj
    return ()

-- method Menu::set_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_set_screen" gtk_menu_set_screen :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO ()


menuSetScreen ::
    (MonadIO m, MenuK a, Gdk.ScreenK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- screen
    m ()
menuSetScreen _obj screen = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeScreen <- case screen of
        Nothing -> return nullPtr
        Just jScreen -> do
            let jScreen' = unsafeManagedPtrCastPtr jScreen
            return jScreen'
    gtk_menu_set_screen _obj' maybeScreen
    touchManagedPtr _obj
    whenJust screen touchManagedPtr
    return ()

-- method Menu::set_tearoff_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "torn_off", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "torn_off", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_set_tearoff_state" gtk_menu_set_tearoff_state :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    CInt ->                                 -- torn_off : TBasicType TBoolean
    IO ()

{-# DEPRECATED menuSetTearoffState ["(Since version 3.10)"]#-}
menuSetTearoffState ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- torn_off
    m ()
menuSetTearoffState _obj torn_off = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let torn_off' = (fromIntegral . fromEnum) torn_off
    gtk_menu_set_tearoff_state _obj' torn_off'
    touchManagedPtr _obj
    return ()

-- method Menu::set_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_set_title" gtk_menu_set_title :: 
    Ptr Menu ->                             -- _obj : TInterface "Gtk" "Menu"
    CString ->                              -- title : TBasicType TUTF8
    IO ()

{-# DEPRECATED menuSetTitle ["(Since version 3.10)"]#-}
menuSetTitle ::
    (MonadIO m, MenuK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- title
    m ()
menuSetTitle _obj title = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    title' <- textToCString title
    gtk_menu_set_title _obj' title'
    touchManagedPtr _obj
    freeMem title'
    return ()

-- method Menu::get_for_attach_widget
-- method type : MemberFunction
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "Widget")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_get_for_attach_widget" gtk_menu_get_for_attach_widget :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO (Ptr (GList (Ptr Widget)))


menuGetForAttachWidget ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m [Widget]
menuGetForAttachWidget widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_menu_get_for_attach_widget widget'
    checkUnexpectedReturnNULL "gtk_menu_get_for_attach_widget" result
    result' <- unpackGList result
    result'' <- mapM (newObject Widget) result'
    touchManagedPtr widget
    return result''

-- signal Menu::move-scroll
type MenuMoveScrollCallback =
    ScrollType ->
    IO ()

noMenuMoveScrollCallback :: Maybe MenuMoveScrollCallback
noMenuMoveScrollCallback = Nothing

type MenuMoveScrollCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuMoveScrollCallback :: MenuMoveScrollCallbackC -> IO (FunPtr MenuMoveScrollCallbackC)

menuMoveScrollClosure :: MenuMoveScrollCallback -> IO Closure
menuMoveScrollClosure cb = newCClosure =<< mkMenuMoveScrollCallback wrapped
    where wrapped = menuMoveScrollCallbackWrapper cb

menuMoveScrollCallbackWrapper ::
    MenuMoveScrollCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
menuMoveScrollCallbackWrapper _cb _ scroll_type _ = do
    let scroll_type' = (toEnum . fromIntegral) scroll_type
    _cb  scroll_type'

onMenuMoveScroll :: (GObject a, MonadIO m) => a -> MenuMoveScrollCallback -> m SignalHandlerId
onMenuMoveScroll obj cb = liftIO $ connectMenuMoveScroll obj cb SignalConnectBefore
afterMenuMoveScroll :: (GObject a, MonadIO m) => a -> MenuMoveScrollCallback -> m SignalHandlerId
afterMenuMoveScroll obj cb = connectMenuMoveScroll obj cb SignalConnectAfter

connectMenuMoveScroll :: (GObject a, MonadIO m) =>
                         a -> MenuMoveScrollCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuMoveScroll obj cb after = liftIO $ do
    cb' <- mkMenuMoveScrollCallback (menuMoveScrollCallbackWrapper cb)
    connectSignalFunPtr obj "move-scroll" cb' after

-- object MenuAccessible 
newtype MenuAccessible = MenuAccessible (ForeignPtr MenuAccessible)
noMenuAccessible :: Maybe MenuAccessible
noMenuAccessible = Nothing

foreign import ccall "gtk_menu_accessible_get_type"
    c_gtk_menu_accessible_get_type :: IO GType

type instance ParentTypes MenuAccessible = '[MenuShellAccessible, ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Selection]

instance GObject MenuAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_menu_accessible_get_type
    

class GObject o => MenuAccessibleK o
instance (GObject o, IsDescendantOf MenuAccessible o) => MenuAccessibleK o

toMenuAccessible :: MenuAccessibleK o => o -> IO MenuAccessible
toMenuAccessible = unsafeCastTo MenuAccessible

-- object MenuBar 
newtype MenuBar = MenuBar (ForeignPtr MenuBar)
noMenuBar :: Maybe MenuBar
noMenuBar = Nothing

foreign import ccall "gtk_menu_bar_get_type"
    c_gtk_menu_bar_get_type :: IO GType

type instance ParentTypes MenuBar = '[MenuShell, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject MenuBar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_menu_bar_get_type
    

class GObject o => MenuBarK o
instance (GObject o, IsDescendantOf MenuBar o) => MenuBarK o

toMenuBar :: MenuBarK o => o -> IO MenuBar
toMenuBar = unsafeCastTo MenuBar

-- method MenuBar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "MenuBar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_bar_new" gtk_menu_bar_new :: 
    IO (Ptr MenuBar)


menuBarNew ::
    (MonadIO m) =>
    m MenuBar
menuBarNew  = liftIO $ do
    result <- gtk_menu_bar_new
    checkUnexpectedReturnNULL "gtk_menu_bar_new" result
    result' <- (newObject MenuBar) result
    return result'

-- method MenuBar::new_from_model
-- method type : Constructor
-- Args : [Arg {argName = "model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "MenuBar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_bar_new_from_model" gtk_menu_bar_new_from_model :: 
    Ptr Gio.MenuModel ->                    -- model : TInterface "Gio" "MenuModel"
    IO (Ptr MenuBar)


menuBarNewFromModel ::
    (MonadIO m, Gio.MenuModelK a) =>
    a ->                                    -- model
    m MenuBar
menuBarNewFromModel model = liftIO $ do
    let model' = unsafeManagedPtrCastPtr model
    result <- gtk_menu_bar_new_from_model model'
    checkUnexpectedReturnNULL "gtk_menu_bar_new_from_model" result
    result' <- (newObject MenuBar) result
    touchManagedPtr model
    return result'

-- method MenuBar::get_child_pack_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PackDirection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_bar_get_child_pack_direction" gtk_menu_bar_get_child_pack_direction :: 
    Ptr MenuBar ->                          -- _obj : TInterface "Gtk" "MenuBar"
    IO CUInt


menuBarGetChildPackDirection ::
    (MonadIO m, MenuBarK a) =>
    a ->                                    -- _obj
    m PackDirection
menuBarGetChildPackDirection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_bar_get_child_pack_direction _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method MenuBar::get_pack_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PackDirection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_bar_get_pack_direction" gtk_menu_bar_get_pack_direction :: 
    Ptr MenuBar ->                          -- _obj : TInterface "Gtk" "MenuBar"
    IO CUInt


menuBarGetPackDirection ::
    (MonadIO m, MenuBarK a) =>
    a ->                                    -- _obj
    m PackDirection
menuBarGetPackDirection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_bar_get_pack_direction _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method MenuBar::set_child_pack_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_pack_dir", argType = TInterface "Gtk" "PackDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_pack_dir", argType = TInterface "Gtk" "PackDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_bar_set_child_pack_direction" gtk_menu_bar_set_child_pack_direction :: 
    Ptr MenuBar ->                          -- _obj : TInterface "Gtk" "MenuBar"
    CUInt ->                                -- child_pack_dir : TInterface "Gtk" "PackDirection"
    IO ()


menuBarSetChildPackDirection ::
    (MonadIO m, MenuBarK a) =>
    a ->                                    -- _obj
    PackDirection ->                        -- child_pack_dir
    m ()
menuBarSetChildPackDirection _obj child_pack_dir = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child_pack_dir' = (fromIntegral . fromEnum) child_pack_dir
    gtk_menu_bar_set_child_pack_direction _obj' child_pack_dir'
    touchManagedPtr _obj
    return ()

-- method MenuBar::set_pack_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pack_dir", argType = TInterface "Gtk" "PackDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pack_dir", argType = TInterface "Gtk" "PackDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_bar_set_pack_direction" gtk_menu_bar_set_pack_direction :: 
    Ptr MenuBar ->                          -- _obj : TInterface "Gtk" "MenuBar"
    CUInt ->                                -- pack_dir : TInterface "Gtk" "PackDirection"
    IO ()


menuBarSetPackDirection ::
    (MonadIO m, MenuBarK a) =>
    a ->                                    -- _obj
    PackDirection ->                        -- pack_dir
    m ()
menuBarSetPackDirection _obj pack_dir = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let pack_dir' = (fromIntegral . fromEnum) pack_dir
    gtk_menu_bar_set_pack_direction _obj' pack_dir'
    touchManagedPtr _obj
    return ()

-- object MenuButton 
newtype MenuButton = MenuButton (ForeignPtr MenuButton)
noMenuButton :: Maybe MenuButton
noMenuButton = Nothing

foreign import ccall "gtk_menu_button_get_type"
    c_gtk_menu_button_get_type :: IO GType

type instance ParentTypes MenuButton = '[ToggleButton, Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject MenuButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_menu_button_get_type
    

class GObject o => MenuButtonK o
instance (GObject o, IsDescendantOf MenuButton o) => MenuButtonK o

toMenuButton :: MenuButtonK o => o -> IO MenuButton
toMenuButton = unsafeCastTo MenuButton

-- method MenuButton::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "MenuButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_new" gtk_menu_button_new :: 
    IO (Ptr MenuButton)


menuButtonNew ::
    (MonadIO m) =>
    m MenuButton
menuButtonNew  = liftIO $ do
    result <- gtk_menu_button_new
    checkUnexpectedReturnNULL "gtk_menu_button_new" result
    result' <- (newObject MenuButton) result
    return result'

-- method MenuButton::get_align_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_get_align_widget" gtk_menu_button_get_align_widget :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    IO (Ptr Widget)


menuButtonGetAlignWidget ::
    (MonadIO m, MenuButtonK a) =>
    a ->                                    -- _obj
    m Widget
menuButtonGetAlignWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_button_get_align_widget _obj'
    checkUnexpectedReturnNULL "gtk_menu_button_get_align_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method MenuButton::get_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ArrowType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_get_direction" gtk_menu_button_get_direction :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    IO CUInt


menuButtonGetDirection ::
    (MonadIO m, MenuButtonK a) =>
    a ->                                    -- _obj
    m ArrowType
menuButtonGetDirection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_button_get_direction _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method MenuButton::get_menu_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "MenuModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_get_menu_model" gtk_menu_button_get_menu_model :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    IO (Ptr Gio.MenuModel)


menuButtonGetMenuModel ::
    (MonadIO m, MenuButtonK a) =>
    a ->                                    -- _obj
    m Gio.MenuModel
menuButtonGetMenuModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_button_get_menu_model _obj'
    checkUnexpectedReturnNULL "gtk_menu_button_get_menu_model" result
    result' <- (newObject Gio.MenuModel) result
    touchManagedPtr _obj
    return result'

-- method MenuButton::get_popover
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Popover"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_get_popover" gtk_menu_button_get_popover :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    IO (Ptr Popover)


menuButtonGetPopover ::
    (MonadIO m, MenuButtonK a) =>
    a ->                                    -- _obj
    m Popover
menuButtonGetPopover _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_button_get_popover _obj'
    checkUnexpectedReturnNULL "gtk_menu_button_get_popover" result
    result' <- (newObject Popover) result
    touchManagedPtr _obj
    return result'

-- method MenuButton::get_popup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Menu"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_get_popup" gtk_menu_button_get_popup :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    IO (Ptr Menu)


menuButtonGetPopup ::
    (MonadIO m, MenuButtonK a) =>
    a ->                                    -- _obj
    m Menu
menuButtonGetPopup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_button_get_popup _obj'
    checkUnexpectedReturnNULL "gtk_menu_button_get_popup" result
    result' <- (newObject Menu) result
    touchManagedPtr _obj
    return result'

-- method MenuButton::get_use_popover
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_get_use_popover" gtk_menu_button_get_use_popover :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    IO CInt


menuButtonGetUsePopover ::
    (MonadIO m, MenuButtonK a) =>
    a ->                                    -- _obj
    m Bool
menuButtonGetUsePopover _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_button_get_use_popover _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method MenuButton::set_align_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_set_align_widget" gtk_menu_button_set_align_widget :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    Ptr Widget ->                           -- align_widget : TInterface "Gtk" "Widget"
    IO ()


menuButtonSetAlignWidget ::
    (MonadIO m, MenuButtonK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- align_widget
    m ()
menuButtonSetAlignWidget _obj align_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAlign_widget <- case align_widget of
        Nothing -> return nullPtr
        Just jAlign_widget -> do
            let jAlign_widget' = unsafeManagedPtrCastPtr jAlign_widget
            return jAlign_widget'
    gtk_menu_button_set_align_widget _obj' maybeAlign_widget
    touchManagedPtr _obj
    whenJust align_widget touchManagedPtr
    return ()

-- method MenuButton::set_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "ArrowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "ArrowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_set_direction" gtk_menu_button_set_direction :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    CUInt ->                                -- direction : TInterface "Gtk" "ArrowType"
    IO ()


menuButtonSetDirection ::
    (MonadIO m, MenuButtonK a) =>
    a ->                                    -- _obj
    ArrowType ->                            -- direction
    m ()
menuButtonSetDirection _obj direction = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let direction' = (fromIntegral . fromEnum) direction
    gtk_menu_button_set_direction _obj' direction'
    touchManagedPtr _obj
    return ()

-- method MenuButton::set_menu_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_set_menu_model" gtk_menu_button_set_menu_model :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    Ptr Gio.MenuModel ->                    -- menu_model : TInterface "Gio" "MenuModel"
    IO ()


menuButtonSetMenuModel ::
    (MonadIO m, MenuButtonK a, Gio.MenuModelK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- menu_model
    m ()
menuButtonSetMenuModel _obj menu_model = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeMenu_model <- case menu_model of
        Nothing -> return nullPtr
        Just jMenu_model -> do
            let jMenu_model' = unsafeManagedPtrCastPtr jMenu_model
            return jMenu_model'
    gtk_menu_button_set_menu_model _obj' maybeMenu_model
    touchManagedPtr _obj
    whenJust menu_model touchManagedPtr
    return ()

-- method MenuButton::set_popover
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "popover", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "popover", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_set_popover" gtk_menu_button_set_popover :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    Ptr Widget ->                           -- popover : TInterface "Gtk" "Widget"
    IO ()


menuButtonSetPopover ::
    (MonadIO m, MenuButtonK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- popover
    m ()
menuButtonSetPopover _obj popover = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePopover <- case popover of
        Nothing -> return nullPtr
        Just jPopover -> do
            let jPopover' = unsafeManagedPtrCastPtr jPopover
            return jPopover'
    gtk_menu_button_set_popover _obj' maybePopover
    touchManagedPtr _obj
    whenJust popover touchManagedPtr
    return ()

-- method MenuButton::set_popup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_set_popup" gtk_menu_button_set_popup :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    Ptr Widget ->                           -- menu : TInterface "Gtk" "Widget"
    IO ()


menuButtonSetPopup ::
    (MonadIO m, MenuButtonK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- menu
    m ()
menuButtonSetPopup _obj menu = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeMenu <- case menu of
        Nothing -> return nullPtr
        Just jMenu -> do
            let jMenu' = unsafeManagedPtrCastPtr jMenu
            return jMenu'
    gtk_menu_button_set_popup _obj' maybeMenu
    touchManagedPtr _obj
    whenJust menu touchManagedPtr
    return ()

-- method MenuButton::set_use_popover
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_popover", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_popover", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_button_set_use_popover" gtk_menu_button_set_use_popover :: 
    Ptr MenuButton ->                       -- _obj : TInterface "Gtk" "MenuButton"
    CInt ->                                 -- use_popover : TBasicType TBoolean
    IO ()


menuButtonSetUsePopover ::
    (MonadIO m, MenuButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_popover
    m ()
menuButtonSetUsePopover _obj use_popover = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_popover' = (fromIntegral . fromEnum) use_popover
    gtk_menu_button_set_use_popover _obj' use_popover'
    touchManagedPtr _obj
    return ()

-- object MenuButtonAccessible 
newtype MenuButtonAccessible = MenuButtonAccessible (ForeignPtr MenuButtonAccessible)
noMenuButtonAccessible :: Maybe MenuButtonAccessible
noMenuButtonAccessible = Nothing

foreign import ccall "gtk_menu_button_accessible_get_type"
    c_gtk_menu_button_accessible_get_type :: IO GType

type instance ParentTypes MenuButtonAccessible = '[ToggleButtonAccessible, ButtonAccessible, ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Image]

instance GObject MenuButtonAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_menu_button_accessible_get_type
    

class GObject o => MenuButtonAccessibleK o
instance (GObject o, IsDescendantOf MenuButtonAccessible o) => MenuButtonAccessibleK o

toMenuButtonAccessible :: MenuButtonAccessibleK o => o -> IO MenuButtonAccessible
toMenuButtonAccessible = unsafeCastTo MenuButtonAccessible

-- callback MenuDetachFunc
menuDetachFuncClosure :: MenuDetachFunc -> IO Closure
menuDetachFuncClosure cb = newCClosure =<< mkMenuDetachFunc wrapped
    where wrapped = menuDetachFuncWrapper Nothing cb

type MenuDetachFuncC =
    Ptr Widget ->
    Ptr Menu ->
    IO ()

foreign import ccall "wrapper"
    mkMenuDetachFunc :: MenuDetachFuncC -> IO (FunPtr MenuDetachFuncC)

type MenuDetachFunc =
    Widget ->
    Menu ->
    IO ()

noMenuDetachFunc :: Maybe MenuDetachFunc
noMenuDetachFunc = Nothing

menuDetachFuncWrapper ::
    Maybe (Ptr (FunPtr (MenuDetachFuncC))) ->
    MenuDetachFunc ->
    Ptr Widget ->
    Ptr Menu ->
    IO ()
menuDetachFuncWrapper funptrptr _cb attach_widget menu = do
    attach_widget' <- (newObject Widget) attach_widget
    menu' <- (newObject Menu) menu
    _cb  attach_widget' menu'
    maybeReleaseFunPtr funptrptr

-- Enum MenuDirectionType

data MenuDirectionType = 
      MenuDirectionTypeParent
    | MenuDirectionTypeChild
    | MenuDirectionTypeNext
    | MenuDirectionTypePrev
    | AnotherMenuDirectionType Int
    deriving (Show, Eq)

instance Enum MenuDirectionType where
    fromEnum MenuDirectionTypeParent = 0
    fromEnum MenuDirectionTypeChild = 1
    fromEnum MenuDirectionTypeNext = 2
    fromEnum MenuDirectionTypePrev = 3
    fromEnum (AnotherMenuDirectionType k) = k

    toEnum 0 = MenuDirectionTypeParent
    toEnum 1 = MenuDirectionTypeChild
    toEnum 2 = MenuDirectionTypeNext
    toEnum 3 = MenuDirectionTypePrev
    toEnum k = AnotherMenuDirectionType k

foreign import ccall "gtk_menu_direction_type_get_type" c_gtk_menu_direction_type_get_type :: 
    IO GType

instance BoxedEnum MenuDirectionType where
    boxedEnumType _ = c_gtk_menu_direction_type_get_type

-- object MenuItem 
newtype MenuItem = MenuItem (ForeignPtr MenuItem)
noMenuItem :: Maybe MenuItem
noMenuItem = Nothing

foreign import ccall "gtk_menu_item_get_type"
    c_gtk_menu_item_get_type :: IO GType

type instance ParentTypes MenuItem = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject MenuItem where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_menu_item_get_type
    

class GObject o => MenuItemK o
instance (GObject o, IsDescendantOf MenuItem o) => MenuItemK o

toMenuItem :: MenuItemK o => o -> IO MenuItem
toMenuItem = unsafeCastTo MenuItem

-- method MenuItem::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "MenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_new" gtk_menu_item_new :: 
    IO (Ptr MenuItem)


menuItemNew ::
    (MonadIO m) =>
    m MenuItem
menuItemNew  = liftIO $ do
    result <- gtk_menu_item_new
    checkUnexpectedReturnNULL "gtk_menu_item_new" result
    result' <- (newObject MenuItem) result
    return result'

-- method MenuItem::new_with_label
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "MenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_new_with_label" gtk_menu_item_new_with_label :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr MenuItem)


menuItemNewWithLabel ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m MenuItem
menuItemNewWithLabel label = liftIO $ do
    label' <- textToCString label
    result <- gtk_menu_item_new_with_label label'
    checkUnexpectedReturnNULL "gtk_menu_item_new_with_label" result
    result' <- (newObject MenuItem) result
    freeMem label'
    return result'

-- method MenuItem::new_with_mnemonic
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "MenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_new_with_mnemonic" gtk_menu_item_new_with_mnemonic :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr MenuItem)


menuItemNewWithMnemonic ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m MenuItem
menuItemNewWithMnemonic label = liftIO $ do
    label' <- textToCString label
    result <- gtk_menu_item_new_with_mnemonic label'
    checkUnexpectedReturnNULL "gtk_menu_item_new_with_mnemonic" result
    result' <- (newObject MenuItem) result
    freeMem label'
    return result'

-- method MenuItem::activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_activate" gtk_menu_item_activate :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    IO ()


menuItemActivate ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    m ()
menuItemActivate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_item_activate _obj'
    touchManagedPtr _obj
    return ()

-- method MenuItem::deselect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_deselect" gtk_menu_item_deselect :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    IO ()


menuItemDeselect ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    m ()
menuItemDeselect _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_item_deselect _obj'
    touchManagedPtr _obj
    return ()

-- method MenuItem::get_accel_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_get_accel_path" gtk_menu_item_get_accel_path :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    IO CString


menuItemGetAccelPath ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    m T.Text
menuItemGetAccelPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_item_get_accel_path _obj'
    checkUnexpectedReturnNULL "gtk_menu_item_get_accel_path" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method MenuItem::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_get_label" gtk_menu_item_get_label :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    IO CString


menuItemGetLabel ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    m T.Text
menuItemGetLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_item_get_label _obj'
    checkUnexpectedReturnNULL "gtk_menu_item_get_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method MenuItem::get_reserve_indicator
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_get_reserve_indicator" gtk_menu_item_get_reserve_indicator :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    IO CInt


menuItemGetReserveIndicator ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    m Bool
menuItemGetReserveIndicator _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_item_get_reserve_indicator _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method MenuItem::get_right_justified
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_get_right_justified" gtk_menu_item_get_right_justified :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    IO CInt

{-# DEPRECATED menuItemGetRightJustified ["(Since version 3.2)","See gtk_menu_item_set_right_justified()"]#-}
menuItemGetRightJustified ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    m Bool
menuItemGetRightJustified _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_item_get_right_justified _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method MenuItem::get_submenu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_get_submenu" gtk_menu_item_get_submenu :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    IO (Ptr Widget)


menuItemGetSubmenu ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    m Widget
menuItemGetSubmenu _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_item_get_submenu _obj'
    checkUnexpectedReturnNULL "gtk_menu_item_get_submenu" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method MenuItem::get_use_underline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_get_use_underline" gtk_menu_item_get_use_underline :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    IO CInt


menuItemGetUseUnderline ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    m Bool
menuItemGetUseUnderline _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_item_get_use_underline _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method MenuItem::select
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_select" gtk_menu_item_select :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    IO ()


menuItemSelect ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    m ()
menuItemSelect _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_item_select _obj'
    touchManagedPtr _obj
    return ()

-- method MenuItem::set_accel_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_set_accel_path" gtk_menu_item_set_accel_path :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    CString ->                              -- accel_path : TBasicType TUTF8
    IO ()


menuItemSetAccelPath ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- accel_path
    m ()
menuItemSetAccelPath _obj accel_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAccel_path <- case accel_path of
        Nothing -> return nullPtr
        Just jAccel_path -> do
            jAccel_path' <- textToCString jAccel_path
            return jAccel_path'
    gtk_menu_item_set_accel_path _obj' maybeAccel_path
    touchManagedPtr _obj
    freeMem maybeAccel_path
    return ()

-- method MenuItem::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_set_label" gtk_menu_item_set_label :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    CString ->                              -- label : TBasicType TUTF8
    IO ()


menuItemSetLabel ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- label
    m ()
menuItemSetLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    label' <- textToCString label
    gtk_menu_item_set_label _obj' label'
    touchManagedPtr _obj
    freeMem label'
    return ()

-- method MenuItem::set_reserve_indicator
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reserve", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reserve", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_set_reserve_indicator" gtk_menu_item_set_reserve_indicator :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    CInt ->                                 -- reserve : TBasicType TBoolean
    IO ()


menuItemSetReserveIndicator ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- reserve
    m ()
menuItemSetReserveIndicator _obj reserve = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let reserve' = (fromIntegral . fromEnum) reserve
    gtk_menu_item_set_reserve_indicator _obj' reserve'
    touchManagedPtr _obj
    return ()

-- method MenuItem::set_right_justified
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "right_justified", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "right_justified", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_set_right_justified" gtk_menu_item_set_right_justified :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    CInt ->                                 -- right_justified : TBasicType TBoolean
    IO ()

{-# DEPRECATED menuItemSetRightJustified ["(Since version 3.2)","If you insist on using it, use","  gtk_widget_set_hexpand() and gtk_widget_set_halign()."]#-}
menuItemSetRightJustified ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- right_justified
    m ()
menuItemSetRightJustified _obj right_justified = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let right_justified' = (fromIntegral . fromEnum) right_justified
    gtk_menu_item_set_right_justified _obj' right_justified'
    touchManagedPtr _obj
    return ()

-- method MenuItem::set_submenu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "submenu", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "submenu", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_set_submenu" gtk_menu_item_set_submenu :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    Ptr Menu ->                             -- submenu : TInterface "Gtk" "Menu"
    IO ()


menuItemSetSubmenu ::
    (MonadIO m, MenuItemK a, MenuK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- submenu
    m ()
menuItemSetSubmenu _obj submenu = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeSubmenu <- case submenu of
        Nothing -> return nullPtr
        Just jSubmenu -> do
            let jSubmenu' = unsafeManagedPtrCastPtr jSubmenu
            return jSubmenu'
    gtk_menu_item_set_submenu _obj' maybeSubmenu
    touchManagedPtr _obj
    whenJust submenu touchManagedPtr
    return ()

-- method MenuItem::set_use_underline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_set_use_underline" gtk_menu_item_set_use_underline :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


menuItemSetUseUnderline ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
menuItemSetUseUnderline _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_menu_item_set_use_underline _obj' setting'
    touchManagedPtr _obj
    return ()

-- method MenuItem::toggle_size_allocate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allocation", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allocation", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_toggle_size_allocate" gtk_menu_item_toggle_size_allocate :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    Int32 ->                                -- allocation : TBasicType TInt32
    IO ()


menuItemToggleSizeAllocate ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- allocation
    m ()
menuItemToggleSizeAllocate _obj allocation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_item_toggle_size_allocate _obj' allocation
    touchManagedPtr _obj
    return ()

-- method MenuItem::toggle_size_request
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "requisition", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "requisition", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_item_toggle_size_request" gtk_menu_item_toggle_size_request :: 
    Ptr MenuItem ->                         -- _obj : TInterface "Gtk" "MenuItem"
    Ptr Int32 ->                            -- requisition : TBasicType TInt32
    IO ()


menuItemToggleSizeRequest ::
    (MonadIO m, MenuItemK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- requisition
    m (Int32)
menuItemToggleSizeRequest _obj requisition = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    requisition' <- allocMem :: IO (Ptr Int32)
    poke requisition' requisition
    gtk_menu_item_toggle_size_request _obj' requisition'
    requisition'' <- peek requisition'
    touchManagedPtr _obj
    freeMem requisition'
    return requisition''

-- signal MenuItem::activate
type MenuItemActivateCallback =
    IO ()

noMenuItemActivateCallback :: Maybe MenuItemActivateCallback
noMenuItemActivateCallback = Nothing

type MenuItemActivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuItemActivateCallback :: MenuItemActivateCallbackC -> IO (FunPtr MenuItemActivateCallbackC)

menuItemActivateClosure :: MenuItemActivateCallback -> IO Closure
menuItemActivateClosure cb = newCClosure =<< mkMenuItemActivateCallback wrapped
    where wrapped = menuItemActivateCallbackWrapper cb

menuItemActivateCallbackWrapper ::
    MenuItemActivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
menuItemActivateCallbackWrapper _cb _ _ = do
    _cb 

onMenuItemActivate :: (GObject a, MonadIO m) => a -> MenuItemActivateCallback -> m SignalHandlerId
onMenuItemActivate obj cb = liftIO $ connectMenuItemActivate obj cb SignalConnectBefore
afterMenuItemActivate :: (GObject a, MonadIO m) => a -> MenuItemActivateCallback -> m SignalHandlerId
afterMenuItemActivate obj cb = connectMenuItemActivate obj cb SignalConnectAfter

connectMenuItemActivate :: (GObject a, MonadIO m) =>
                           a -> MenuItemActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuItemActivate obj cb after = liftIO $ do
    cb' <- mkMenuItemActivateCallback (menuItemActivateCallbackWrapper cb)
    connectSignalFunPtr obj "activate" cb' after

-- signal MenuItem::activate-item
type MenuItemActivateItemCallback =
    IO ()

noMenuItemActivateItemCallback :: Maybe MenuItemActivateItemCallback
noMenuItemActivateItemCallback = Nothing

type MenuItemActivateItemCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuItemActivateItemCallback :: MenuItemActivateItemCallbackC -> IO (FunPtr MenuItemActivateItemCallbackC)

menuItemActivateItemClosure :: MenuItemActivateItemCallback -> IO Closure
menuItemActivateItemClosure cb = newCClosure =<< mkMenuItemActivateItemCallback wrapped
    where wrapped = menuItemActivateItemCallbackWrapper cb

menuItemActivateItemCallbackWrapper ::
    MenuItemActivateItemCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
menuItemActivateItemCallbackWrapper _cb _ _ = do
    _cb 

onMenuItemActivateItem :: (GObject a, MonadIO m) => a -> MenuItemActivateItemCallback -> m SignalHandlerId
onMenuItemActivateItem obj cb = liftIO $ connectMenuItemActivateItem obj cb SignalConnectBefore
afterMenuItemActivateItem :: (GObject a, MonadIO m) => a -> MenuItemActivateItemCallback -> m SignalHandlerId
afterMenuItemActivateItem obj cb = connectMenuItemActivateItem obj cb SignalConnectAfter

connectMenuItemActivateItem :: (GObject a, MonadIO m) =>
                               a -> MenuItemActivateItemCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuItemActivateItem obj cb after = liftIO $ do
    cb' <- mkMenuItemActivateItemCallback (menuItemActivateItemCallbackWrapper cb)
    connectSignalFunPtr obj "activate-item" cb' after

-- signal MenuItem::deselect
type MenuItemDeselectCallback =
    IO ()

noMenuItemDeselectCallback :: Maybe MenuItemDeselectCallback
noMenuItemDeselectCallback = Nothing

type MenuItemDeselectCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuItemDeselectCallback :: MenuItemDeselectCallbackC -> IO (FunPtr MenuItemDeselectCallbackC)

menuItemDeselectClosure :: MenuItemDeselectCallback -> IO Closure
menuItemDeselectClosure cb = newCClosure =<< mkMenuItemDeselectCallback wrapped
    where wrapped = menuItemDeselectCallbackWrapper cb

menuItemDeselectCallbackWrapper ::
    MenuItemDeselectCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
menuItemDeselectCallbackWrapper _cb _ _ = do
    _cb 

onMenuItemDeselect :: (GObject a, MonadIO m) => a -> MenuItemDeselectCallback -> m SignalHandlerId
onMenuItemDeselect obj cb = liftIO $ connectMenuItemDeselect obj cb SignalConnectBefore
afterMenuItemDeselect :: (GObject a, MonadIO m) => a -> MenuItemDeselectCallback -> m SignalHandlerId
afterMenuItemDeselect obj cb = connectMenuItemDeselect obj cb SignalConnectAfter

connectMenuItemDeselect :: (GObject a, MonadIO m) =>
                           a -> MenuItemDeselectCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuItemDeselect obj cb after = liftIO $ do
    cb' <- mkMenuItemDeselectCallback (menuItemDeselectCallbackWrapper cb)
    connectSignalFunPtr obj "deselect" cb' after

-- signal MenuItem::select
type MenuItemSelectCallback =
    IO ()

noMenuItemSelectCallback :: Maybe MenuItemSelectCallback
noMenuItemSelectCallback = Nothing

type MenuItemSelectCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuItemSelectCallback :: MenuItemSelectCallbackC -> IO (FunPtr MenuItemSelectCallbackC)

menuItemSelectClosure :: MenuItemSelectCallback -> IO Closure
menuItemSelectClosure cb = newCClosure =<< mkMenuItemSelectCallback wrapped
    where wrapped = menuItemSelectCallbackWrapper cb

menuItemSelectCallbackWrapper ::
    MenuItemSelectCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
menuItemSelectCallbackWrapper _cb _ _ = do
    _cb 

onMenuItemSelect :: (GObject a, MonadIO m) => a -> MenuItemSelectCallback -> m SignalHandlerId
onMenuItemSelect obj cb = liftIO $ connectMenuItemSelect obj cb SignalConnectBefore
afterMenuItemSelect :: (GObject a, MonadIO m) => a -> MenuItemSelectCallback -> m SignalHandlerId
afterMenuItemSelect obj cb = connectMenuItemSelect obj cb SignalConnectAfter

connectMenuItemSelect :: (GObject a, MonadIO m) =>
                         a -> MenuItemSelectCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuItemSelect obj cb after = liftIO $ do
    cb' <- mkMenuItemSelectCallback (menuItemSelectCallbackWrapper cb)
    connectSignalFunPtr obj "select" cb' after

-- signal MenuItem::toggle-size-allocate
type MenuItemToggleSizeAllocateCallback =
    Int32 ->
    IO ()

noMenuItemToggleSizeAllocateCallback :: Maybe MenuItemToggleSizeAllocateCallback
noMenuItemToggleSizeAllocateCallback = Nothing

type MenuItemToggleSizeAllocateCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuItemToggleSizeAllocateCallback :: MenuItemToggleSizeAllocateCallbackC -> IO (FunPtr MenuItemToggleSizeAllocateCallbackC)

menuItemToggleSizeAllocateClosure :: MenuItemToggleSizeAllocateCallback -> IO Closure
menuItemToggleSizeAllocateClosure cb = newCClosure =<< mkMenuItemToggleSizeAllocateCallback wrapped
    where wrapped = menuItemToggleSizeAllocateCallbackWrapper cb

menuItemToggleSizeAllocateCallbackWrapper ::
    MenuItemToggleSizeAllocateCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO ()
menuItemToggleSizeAllocateCallbackWrapper _cb _ object _ = do
    _cb  object

onMenuItemToggleSizeAllocate :: (GObject a, MonadIO m) => a -> MenuItemToggleSizeAllocateCallback -> m SignalHandlerId
onMenuItemToggleSizeAllocate obj cb = liftIO $ connectMenuItemToggleSizeAllocate obj cb SignalConnectBefore
afterMenuItemToggleSizeAllocate :: (GObject a, MonadIO m) => a -> MenuItemToggleSizeAllocateCallback -> m SignalHandlerId
afterMenuItemToggleSizeAllocate obj cb = connectMenuItemToggleSizeAllocate obj cb SignalConnectAfter

connectMenuItemToggleSizeAllocate :: (GObject a, MonadIO m) =>
                                     a -> MenuItemToggleSizeAllocateCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuItemToggleSizeAllocate obj cb after = liftIO $ do
    cb' <- mkMenuItemToggleSizeAllocateCallback (menuItemToggleSizeAllocateCallbackWrapper cb)
    connectSignalFunPtr obj "toggle-size-allocate" cb' after

-- signal MenuItem::toggle-size-request
type MenuItemToggleSizeRequestCallback =
    Ptr () ->
    IO ()

noMenuItemToggleSizeRequestCallback :: Maybe MenuItemToggleSizeRequestCallback
noMenuItemToggleSizeRequestCallback = Nothing

type MenuItemToggleSizeRequestCallbackC =
    Ptr () ->                               -- object
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuItemToggleSizeRequestCallback :: MenuItemToggleSizeRequestCallbackC -> IO (FunPtr MenuItemToggleSizeRequestCallbackC)

menuItemToggleSizeRequestClosure :: MenuItemToggleSizeRequestCallback -> IO Closure
menuItemToggleSizeRequestClosure cb = newCClosure =<< mkMenuItemToggleSizeRequestCallback wrapped
    where wrapped = menuItemToggleSizeRequestCallbackWrapper cb

menuItemToggleSizeRequestCallbackWrapper ::
    MenuItemToggleSizeRequestCallback ->
    Ptr () ->
    Ptr () ->
    Ptr () ->
    IO ()
menuItemToggleSizeRequestCallbackWrapper _cb _ object _ = do
    _cb  object

onMenuItemToggleSizeRequest :: (GObject a, MonadIO m) => a -> MenuItemToggleSizeRequestCallback -> m SignalHandlerId
onMenuItemToggleSizeRequest obj cb = liftIO $ connectMenuItemToggleSizeRequest obj cb SignalConnectBefore
afterMenuItemToggleSizeRequest :: (GObject a, MonadIO m) => a -> MenuItemToggleSizeRequestCallback -> m SignalHandlerId
afterMenuItemToggleSizeRequest obj cb = connectMenuItemToggleSizeRequest obj cb SignalConnectAfter

connectMenuItemToggleSizeRequest :: (GObject a, MonadIO m) =>
                                    a -> MenuItemToggleSizeRequestCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuItemToggleSizeRequest obj cb after = liftIO $ do
    cb' <- mkMenuItemToggleSizeRequestCallback (menuItemToggleSizeRequestCallbackWrapper cb)
    connectSignalFunPtr obj "toggle-size-request" cb' after

-- object MenuItemAccessible 
newtype MenuItemAccessible = MenuItemAccessible (ForeignPtr MenuItemAccessible)
noMenuItemAccessible :: Maybe MenuItemAccessible
noMenuItemAccessible = Nothing

foreign import ccall "gtk_menu_item_accessible_get_type"
    c_gtk_menu_item_accessible_get_type :: IO GType

type instance ParentTypes MenuItemAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Selection]

instance GObject MenuItemAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_menu_item_accessible_get_type
    

class GObject o => MenuItemAccessibleK o
instance (GObject o, IsDescendantOf MenuItemAccessible o) => MenuItemAccessibleK o

toMenuItemAccessible :: MenuItemAccessibleK o => o -> IO MenuItemAccessible
toMenuItemAccessible = unsafeCastTo MenuItemAccessible

-- callback MenuPositionFunc
menuPositionFuncClosure :: MenuPositionFunc -> IO Closure
menuPositionFuncClosure cb = newCClosure =<< mkMenuPositionFunc wrapped
    where wrapped = menuPositionFuncWrapper Nothing cb

type MenuPositionFuncC =
    Ptr Menu ->
    Ptr Int32 ->
    Ptr Int32 ->
    Ptr CInt ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkMenuPositionFunc :: MenuPositionFuncC -> IO (FunPtr MenuPositionFuncC)

type MenuPositionFunc =
    Menu ->
    Int32 ->
    Int32 ->
    IO (Int32,Int32,Bool)

noMenuPositionFunc :: Maybe MenuPositionFunc
noMenuPositionFunc = Nothing

menuPositionFuncWrapper ::
    Maybe (Ptr (FunPtr (MenuPositionFuncC))) ->
    MenuPositionFunc ->
    Ptr Menu ->
    Ptr Int32 ->
    Ptr Int32 ->
    Ptr CInt ->
    Ptr () ->
    IO ()
menuPositionFuncWrapper funptrptr _cb menu x y push_in _ = do
    menu' <- (newObject Menu) menu
    x' <- peek x
    y' <- peek y
    (outx, outy, outpush_in) <- _cb  menu' x' y'
    poke x outx
    poke y outy
    let outpush_in' = (fromIntegral . fromEnum) outpush_in
    poke push_in outpush_in'
    maybeReleaseFunPtr funptrptr

-- object MenuShell 
newtype MenuShell = MenuShell (ForeignPtr MenuShell)
noMenuShell :: Maybe MenuShell
noMenuShell = Nothing

foreign import ccall "gtk_menu_shell_get_type"
    c_gtk_menu_shell_get_type :: IO GType

type instance ParentTypes MenuShell = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject MenuShell where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_menu_shell_get_type
    

class GObject o => MenuShellK o
instance (GObject o, IsDescendantOf MenuShell o) => MenuShellK o

toMenuShell :: MenuShellK o => o -> IO MenuShell
toMenuShell = unsafeCastTo MenuShell

-- method MenuShell::activate_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_item", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "force_deactivate", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_item", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "force_deactivate", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_activate_item" gtk_menu_shell_activate_item :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    Ptr Widget ->                           -- menu_item : TInterface "Gtk" "Widget"
    CInt ->                                 -- force_deactivate : TBasicType TBoolean
    IO ()


menuShellActivateItem ::
    (MonadIO m, MenuShellK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- menu_item
    Bool ->                                 -- force_deactivate
    m ()
menuShellActivateItem _obj menu_item force_deactivate = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let menu_item' = unsafeManagedPtrCastPtr menu_item
    let force_deactivate' = (fromIntegral . fromEnum) force_deactivate
    gtk_menu_shell_activate_item _obj' menu_item' force_deactivate'
    touchManagedPtr _obj
    touchManagedPtr menu_item
    return ()

-- method MenuShell::append
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "MenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_append" gtk_menu_shell_append :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    Ptr MenuItem ->                         -- child : TInterface "Gtk" "MenuItem"
    IO ()


menuShellAppend ::
    (MonadIO m, MenuShellK a, MenuItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
menuShellAppend _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_menu_shell_append _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method MenuShell::bind_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_namespace", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "with_separators", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_namespace", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "with_separators", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_bind_model" gtk_menu_shell_bind_model :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    Ptr Gio.MenuModel ->                    -- model : TInterface "Gio" "MenuModel"
    CString ->                              -- action_namespace : TBasicType TUTF8
    CInt ->                                 -- with_separators : TBasicType TBoolean
    IO ()


menuShellBindModel ::
    (MonadIO m, MenuShellK a, Gio.MenuModelK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- model
    Maybe (T.Text) ->                       -- action_namespace
    Bool ->                                 -- with_separators
    m ()
menuShellBindModel _obj model action_namespace with_separators = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeModel <- case model of
        Nothing -> return nullPtr
        Just jModel -> do
            let jModel' = unsafeManagedPtrCastPtr jModel
            return jModel'
    maybeAction_namespace <- case action_namespace of
        Nothing -> return nullPtr
        Just jAction_namespace -> do
            jAction_namespace' <- textToCString jAction_namespace
            return jAction_namespace'
    let with_separators' = (fromIntegral . fromEnum) with_separators
    gtk_menu_shell_bind_model _obj' maybeModel maybeAction_namespace with_separators'
    touchManagedPtr _obj
    whenJust model touchManagedPtr
    freeMem maybeAction_namespace
    return ()

-- method MenuShell::cancel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_cancel" gtk_menu_shell_cancel :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    IO ()


menuShellCancel ::
    (MonadIO m, MenuShellK a) =>
    a ->                                    -- _obj
    m ()
menuShellCancel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_shell_cancel _obj'
    touchManagedPtr _obj
    return ()

-- method MenuShell::deactivate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_deactivate" gtk_menu_shell_deactivate :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    IO ()


menuShellDeactivate ::
    (MonadIO m, MenuShellK a) =>
    a ->                                    -- _obj
    m ()
menuShellDeactivate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_shell_deactivate _obj'
    touchManagedPtr _obj
    return ()

-- method MenuShell::deselect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_deselect" gtk_menu_shell_deselect :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    IO ()


menuShellDeselect ::
    (MonadIO m, MenuShellK a) =>
    a ->                                    -- _obj
    m ()
menuShellDeselect _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_menu_shell_deselect _obj'
    touchManagedPtr _obj
    return ()

-- method MenuShell::get_parent_shell
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_get_parent_shell" gtk_menu_shell_get_parent_shell :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    IO (Ptr Widget)


menuShellGetParentShell ::
    (MonadIO m, MenuShellK a) =>
    a ->                                    -- _obj
    m Widget
menuShellGetParentShell _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_shell_get_parent_shell _obj'
    checkUnexpectedReturnNULL "gtk_menu_shell_get_parent_shell" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method MenuShell::get_selected_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_get_selected_item" gtk_menu_shell_get_selected_item :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    IO (Ptr Widget)


menuShellGetSelectedItem ::
    (MonadIO m, MenuShellK a) =>
    a ->                                    -- _obj
    m Widget
menuShellGetSelectedItem _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_shell_get_selected_item _obj'
    checkUnexpectedReturnNULL "gtk_menu_shell_get_selected_item" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method MenuShell::get_take_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_get_take_focus" gtk_menu_shell_get_take_focus :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    IO CInt


menuShellGetTakeFocus ::
    (MonadIO m, MenuShellK a) =>
    a ->                                    -- _obj
    m Bool
menuShellGetTakeFocus _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_shell_get_take_focus _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method MenuShell::insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_insert" gtk_menu_shell_insert :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


menuShellInsert ::
    (MonadIO m, MenuShellK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Int32 ->                                -- position
    m ()
menuShellInsert _obj child position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_menu_shell_insert _obj' child' position
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method MenuShell::prepend
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_prepend" gtk_menu_shell_prepend :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


menuShellPrepend ::
    (MonadIO m, MenuShellK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
menuShellPrepend _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_menu_shell_prepend _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method MenuShell::select_first
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "search_sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "search_sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_select_first" gtk_menu_shell_select_first :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    CInt ->                                 -- search_sensitive : TBasicType TBoolean
    IO ()


menuShellSelectFirst ::
    (MonadIO m, MenuShellK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- search_sensitive
    m ()
menuShellSelectFirst _obj search_sensitive = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let search_sensitive' = (fromIntegral . fromEnum) search_sensitive
    gtk_menu_shell_select_first _obj' search_sensitive'
    touchManagedPtr _obj
    return ()

-- method MenuShell::select_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_item", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_item", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_select_item" gtk_menu_shell_select_item :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    Ptr Widget ->                           -- menu_item : TInterface "Gtk" "Widget"
    IO ()


menuShellSelectItem ::
    (MonadIO m, MenuShellK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- menu_item
    m ()
menuShellSelectItem _obj menu_item = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let menu_item' = unsafeManagedPtrCastPtr menu_item
    gtk_menu_shell_select_item _obj' menu_item'
    touchManagedPtr _obj
    touchManagedPtr menu_item
    return ()

-- method MenuShell::set_take_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "take_focus", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "take_focus", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_shell_set_take_focus" gtk_menu_shell_set_take_focus :: 
    Ptr MenuShell ->                        -- _obj : TInterface "Gtk" "MenuShell"
    CInt ->                                 -- take_focus : TBasicType TBoolean
    IO ()


menuShellSetTakeFocus ::
    (MonadIO m, MenuShellK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- take_focus
    m ()
menuShellSetTakeFocus _obj take_focus = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let take_focus' = (fromIntegral . fromEnum) take_focus
    gtk_menu_shell_set_take_focus _obj' take_focus'
    touchManagedPtr _obj
    return ()

-- signal MenuShell::activate-current
type MenuShellActivateCurrentCallback =
    Bool ->
    IO ()

noMenuShellActivateCurrentCallback :: Maybe MenuShellActivateCurrentCallback
noMenuShellActivateCurrentCallback = Nothing

type MenuShellActivateCurrentCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuShellActivateCurrentCallback :: MenuShellActivateCurrentCallbackC -> IO (FunPtr MenuShellActivateCurrentCallbackC)

menuShellActivateCurrentClosure :: MenuShellActivateCurrentCallback -> IO Closure
menuShellActivateCurrentClosure cb = newCClosure =<< mkMenuShellActivateCurrentCallback wrapped
    where wrapped = menuShellActivateCurrentCallbackWrapper cb

menuShellActivateCurrentCallbackWrapper ::
    MenuShellActivateCurrentCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO ()
menuShellActivateCurrentCallbackWrapper _cb _ force_hide _ = do
    let force_hide' = (/= 0) force_hide
    _cb  force_hide'

onMenuShellActivateCurrent :: (GObject a, MonadIO m) => a -> MenuShellActivateCurrentCallback -> m SignalHandlerId
onMenuShellActivateCurrent obj cb = liftIO $ connectMenuShellActivateCurrent obj cb SignalConnectBefore
afterMenuShellActivateCurrent :: (GObject a, MonadIO m) => a -> MenuShellActivateCurrentCallback -> m SignalHandlerId
afterMenuShellActivateCurrent obj cb = connectMenuShellActivateCurrent obj cb SignalConnectAfter

connectMenuShellActivateCurrent :: (GObject a, MonadIO m) =>
                                   a -> MenuShellActivateCurrentCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuShellActivateCurrent obj cb after = liftIO $ do
    cb' <- mkMenuShellActivateCurrentCallback (menuShellActivateCurrentCallbackWrapper cb)
    connectSignalFunPtr obj "activate-current" cb' after

-- signal MenuShell::cancel
type MenuShellCancelCallback =
    IO ()

noMenuShellCancelCallback :: Maybe MenuShellCancelCallback
noMenuShellCancelCallback = Nothing

type MenuShellCancelCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuShellCancelCallback :: MenuShellCancelCallbackC -> IO (FunPtr MenuShellCancelCallbackC)

menuShellCancelClosure :: MenuShellCancelCallback -> IO Closure
menuShellCancelClosure cb = newCClosure =<< mkMenuShellCancelCallback wrapped
    where wrapped = menuShellCancelCallbackWrapper cb

menuShellCancelCallbackWrapper ::
    MenuShellCancelCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
menuShellCancelCallbackWrapper _cb _ _ = do
    _cb 

onMenuShellCancel :: (GObject a, MonadIO m) => a -> MenuShellCancelCallback -> m SignalHandlerId
onMenuShellCancel obj cb = liftIO $ connectMenuShellCancel obj cb SignalConnectBefore
afterMenuShellCancel :: (GObject a, MonadIO m) => a -> MenuShellCancelCallback -> m SignalHandlerId
afterMenuShellCancel obj cb = connectMenuShellCancel obj cb SignalConnectAfter

connectMenuShellCancel :: (GObject a, MonadIO m) =>
                          a -> MenuShellCancelCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuShellCancel obj cb after = liftIO $ do
    cb' <- mkMenuShellCancelCallback (menuShellCancelCallbackWrapper cb)
    connectSignalFunPtr obj "cancel" cb' after

-- signal MenuShell::cycle-focus
type MenuShellCycleFocusCallback =
    DirectionType ->
    IO ()

noMenuShellCycleFocusCallback :: Maybe MenuShellCycleFocusCallback
noMenuShellCycleFocusCallback = Nothing

type MenuShellCycleFocusCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuShellCycleFocusCallback :: MenuShellCycleFocusCallbackC -> IO (FunPtr MenuShellCycleFocusCallbackC)

menuShellCycleFocusClosure :: MenuShellCycleFocusCallback -> IO Closure
menuShellCycleFocusClosure cb = newCClosure =<< mkMenuShellCycleFocusCallback wrapped
    where wrapped = menuShellCycleFocusCallbackWrapper cb

menuShellCycleFocusCallbackWrapper ::
    MenuShellCycleFocusCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
menuShellCycleFocusCallbackWrapper _cb _ direction _ = do
    let direction' = (toEnum . fromIntegral) direction
    _cb  direction'

onMenuShellCycleFocus :: (GObject a, MonadIO m) => a -> MenuShellCycleFocusCallback -> m SignalHandlerId
onMenuShellCycleFocus obj cb = liftIO $ connectMenuShellCycleFocus obj cb SignalConnectBefore
afterMenuShellCycleFocus :: (GObject a, MonadIO m) => a -> MenuShellCycleFocusCallback -> m SignalHandlerId
afterMenuShellCycleFocus obj cb = connectMenuShellCycleFocus obj cb SignalConnectAfter

connectMenuShellCycleFocus :: (GObject a, MonadIO m) =>
                              a -> MenuShellCycleFocusCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuShellCycleFocus obj cb after = liftIO $ do
    cb' <- mkMenuShellCycleFocusCallback (menuShellCycleFocusCallbackWrapper cb)
    connectSignalFunPtr obj "cycle-focus" cb' after

-- signal MenuShell::deactivate
type MenuShellDeactivateCallback =
    IO ()

noMenuShellDeactivateCallback :: Maybe MenuShellDeactivateCallback
noMenuShellDeactivateCallback = Nothing

type MenuShellDeactivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuShellDeactivateCallback :: MenuShellDeactivateCallbackC -> IO (FunPtr MenuShellDeactivateCallbackC)

menuShellDeactivateClosure :: MenuShellDeactivateCallback -> IO Closure
menuShellDeactivateClosure cb = newCClosure =<< mkMenuShellDeactivateCallback wrapped
    where wrapped = menuShellDeactivateCallbackWrapper cb

menuShellDeactivateCallbackWrapper ::
    MenuShellDeactivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
menuShellDeactivateCallbackWrapper _cb _ _ = do
    _cb 

onMenuShellDeactivate :: (GObject a, MonadIO m) => a -> MenuShellDeactivateCallback -> m SignalHandlerId
onMenuShellDeactivate obj cb = liftIO $ connectMenuShellDeactivate obj cb SignalConnectBefore
afterMenuShellDeactivate :: (GObject a, MonadIO m) => a -> MenuShellDeactivateCallback -> m SignalHandlerId
afterMenuShellDeactivate obj cb = connectMenuShellDeactivate obj cb SignalConnectAfter

connectMenuShellDeactivate :: (GObject a, MonadIO m) =>
                              a -> MenuShellDeactivateCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuShellDeactivate obj cb after = liftIO $ do
    cb' <- mkMenuShellDeactivateCallback (menuShellDeactivateCallbackWrapper cb)
    connectSignalFunPtr obj "deactivate" cb' after

-- signal MenuShell::insert
type MenuShellInsertCallback =
    Widget ->
    Int32 ->
    IO ()

noMenuShellInsertCallback :: Maybe MenuShellInsertCallback
noMenuShellInsertCallback = Nothing

type MenuShellInsertCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuShellInsertCallback :: MenuShellInsertCallbackC -> IO (FunPtr MenuShellInsertCallbackC)

menuShellInsertClosure :: MenuShellInsertCallback -> IO Closure
menuShellInsertClosure cb = newCClosure =<< mkMenuShellInsertCallback wrapped
    where wrapped = menuShellInsertCallbackWrapper cb

menuShellInsertCallbackWrapper ::
    MenuShellInsertCallback ->
    Ptr () ->
    Ptr Widget ->
    Int32 ->
    Ptr () ->
    IO ()
menuShellInsertCallbackWrapper _cb _ child position _ = do
    child' <- (newObject Widget) child
    _cb  child' position

onMenuShellInsert :: (GObject a, MonadIO m) => a -> MenuShellInsertCallback -> m SignalHandlerId
onMenuShellInsert obj cb = liftIO $ connectMenuShellInsert obj cb SignalConnectBefore
afterMenuShellInsert :: (GObject a, MonadIO m) => a -> MenuShellInsertCallback -> m SignalHandlerId
afterMenuShellInsert obj cb = connectMenuShellInsert obj cb SignalConnectAfter

connectMenuShellInsert :: (GObject a, MonadIO m) =>
                          a -> MenuShellInsertCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuShellInsert obj cb after = liftIO $ do
    cb' <- mkMenuShellInsertCallback (menuShellInsertCallbackWrapper cb)
    connectSignalFunPtr obj "insert" cb' after

-- signal MenuShell::move-current
type MenuShellMoveCurrentCallback =
    MenuDirectionType ->
    IO ()

noMenuShellMoveCurrentCallback :: Maybe MenuShellMoveCurrentCallback
noMenuShellMoveCurrentCallback = Nothing

type MenuShellMoveCurrentCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuShellMoveCurrentCallback :: MenuShellMoveCurrentCallbackC -> IO (FunPtr MenuShellMoveCurrentCallbackC)

menuShellMoveCurrentClosure :: MenuShellMoveCurrentCallback -> IO Closure
menuShellMoveCurrentClosure cb = newCClosure =<< mkMenuShellMoveCurrentCallback wrapped
    where wrapped = menuShellMoveCurrentCallbackWrapper cb

menuShellMoveCurrentCallbackWrapper ::
    MenuShellMoveCurrentCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
menuShellMoveCurrentCallbackWrapper _cb _ direction _ = do
    let direction' = (toEnum . fromIntegral) direction
    _cb  direction'

onMenuShellMoveCurrent :: (GObject a, MonadIO m) => a -> MenuShellMoveCurrentCallback -> m SignalHandlerId
onMenuShellMoveCurrent obj cb = liftIO $ connectMenuShellMoveCurrent obj cb SignalConnectBefore
afterMenuShellMoveCurrent :: (GObject a, MonadIO m) => a -> MenuShellMoveCurrentCallback -> m SignalHandlerId
afterMenuShellMoveCurrent obj cb = connectMenuShellMoveCurrent obj cb SignalConnectAfter

connectMenuShellMoveCurrent :: (GObject a, MonadIO m) =>
                               a -> MenuShellMoveCurrentCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuShellMoveCurrent obj cb after = liftIO $ do
    cb' <- mkMenuShellMoveCurrentCallback (menuShellMoveCurrentCallbackWrapper cb)
    connectSignalFunPtr obj "move-current" cb' after

-- signal MenuShell::move-selected
type MenuShellMoveSelectedCallback =
    Int32 ->
    IO Bool

noMenuShellMoveSelectedCallback :: Maybe MenuShellMoveSelectedCallback
noMenuShellMoveSelectedCallback = Nothing

type MenuShellMoveSelectedCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkMenuShellMoveSelectedCallback :: MenuShellMoveSelectedCallbackC -> IO (FunPtr MenuShellMoveSelectedCallbackC)

menuShellMoveSelectedClosure :: MenuShellMoveSelectedCallback -> IO Closure
menuShellMoveSelectedClosure cb = newCClosure =<< mkMenuShellMoveSelectedCallback wrapped
    where wrapped = menuShellMoveSelectedCallbackWrapper cb

menuShellMoveSelectedCallbackWrapper ::
    MenuShellMoveSelectedCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO CInt
menuShellMoveSelectedCallbackWrapper _cb _ distance _ = do
    result <- _cb  distance
    let result' = (fromIntegral . fromEnum) result
    return result'

onMenuShellMoveSelected :: (GObject a, MonadIO m) => a -> MenuShellMoveSelectedCallback -> m SignalHandlerId
onMenuShellMoveSelected obj cb = liftIO $ connectMenuShellMoveSelected obj cb SignalConnectBefore
afterMenuShellMoveSelected :: (GObject a, MonadIO m) => a -> MenuShellMoveSelectedCallback -> m SignalHandlerId
afterMenuShellMoveSelected obj cb = connectMenuShellMoveSelected obj cb SignalConnectAfter

connectMenuShellMoveSelected :: (GObject a, MonadIO m) =>
                                a -> MenuShellMoveSelectedCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuShellMoveSelected obj cb after = liftIO $ do
    cb' <- mkMenuShellMoveSelectedCallback (menuShellMoveSelectedCallbackWrapper cb)
    connectSignalFunPtr obj "move-selected" cb' after

-- signal MenuShell::selection-done
type MenuShellSelectionDoneCallback =
    IO ()

noMenuShellSelectionDoneCallback :: Maybe MenuShellSelectionDoneCallback
noMenuShellSelectionDoneCallback = Nothing

type MenuShellSelectionDoneCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuShellSelectionDoneCallback :: MenuShellSelectionDoneCallbackC -> IO (FunPtr MenuShellSelectionDoneCallbackC)

menuShellSelectionDoneClosure :: MenuShellSelectionDoneCallback -> IO Closure
menuShellSelectionDoneClosure cb = newCClosure =<< mkMenuShellSelectionDoneCallback wrapped
    where wrapped = menuShellSelectionDoneCallbackWrapper cb

menuShellSelectionDoneCallbackWrapper ::
    MenuShellSelectionDoneCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
menuShellSelectionDoneCallbackWrapper _cb _ _ = do
    _cb 

onMenuShellSelectionDone :: (GObject a, MonadIO m) => a -> MenuShellSelectionDoneCallback -> m SignalHandlerId
onMenuShellSelectionDone obj cb = liftIO $ connectMenuShellSelectionDone obj cb SignalConnectBefore
afterMenuShellSelectionDone :: (GObject a, MonadIO m) => a -> MenuShellSelectionDoneCallback -> m SignalHandlerId
afterMenuShellSelectionDone obj cb = connectMenuShellSelectionDone obj cb SignalConnectAfter

connectMenuShellSelectionDone :: (GObject a, MonadIO m) =>
                                 a -> MenuShellSelectionDoneCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuShellSelectionDone obj cb after = liftIO $ do
    cb' <- mkMenuShellSelectionDoneCallback (menuShellSelectionDoneCallbackWrapper cb)
    connectSignalFunPtr obj "selection-done" cb' after

-- object MenuShellAccessible 
newtype MenuShellAccessible = MenuShellAccessible (ForeignPtr MenuShellAccessible)
noMenuShellAccessible :: Maybe MenuShellAccessible
noMenuShellAccessible = Nothing

foreign import ccall "gtk_menu_shell_accessible_get_type"
    c_gtk_menu_shell_accessible_get_type :: IO GType

type instance ParentTypes MenuShellAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Selection]

instance GObject MenuShellAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_menu_shell_accessible_get_type
    

class GObject o => MenuShellAccessibleK o
instance (GObject o, IsDescendantOf MenuShellAccessible o) => MenuShellAccessibleK o

toMenuShellAccessible :: MenuShellAccessibleK o => o -> IO MenuShellAccessible
toMenuShellAccessible = unsafeCastTo MenuShellAccessible

-- object MenuToolButton 
newtype MenuToolButton = MenuToolButton (ForeignPtr MenuToolButton)
noMenuToolButton :: Maybe MenuToolButton
noMenuToolButton = Nothing

foreign import ccall "gtk_menu_tool_button_get_type"
    c_gtk_menu_tool_button_get_type :: IO GType

type instance ParentTypes MenuToolButton = '[ToolButton, ToolItem, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject MenuToolButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_menu_tool_button_get_type
    

class GObject o => MenuToolButtonK o
instance (GObject o, IsDescendantOf MenuToolButton o) => MenuToolButtonK o

toMenuToolButton :: MenuToolButtonK o => o -> IO MenuToolButton
toMenuToolButton = unsafeCastTo MenuToolButton

-- method MenuToolButton::new
-- method type : Constructor
-- Args : [Arg {argName = "icon_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "MenuToolButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_tool_button_new" gtk_menu_tool_button_new :: 
    Ptr Widget ->                           -- icon_widget : TInterface "Gtk" "Widget"
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr MenuToolButton)


menuToolButtonNew ::
    (MonadIO m, WidgetK a) =>
    Maybe (a) ->                            -- icon_widget
    Maybe (T.Text) ->                       -- label
    m MenuToolButton
menuToolButtonNew icon_widget label = liftIO $ do
    maybeIcon_widget <- case icon_widget of
        Nothing -> return nullPtr
        Just jIcon_widget -> do
            let jIcon_widget' = unsafeManagedPtrCastPtr jIcon_widget
            return jIcon_widget'
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    result <- gtk_menu_tool_button_new maybeIcon_widget maybeLabel
    checkUnexpectedReturnNULL "gtk_menu_tool_button_new" result
    result' <- (newObject MenuToolButton) result
    whenJust icon_widget touchManagedPtr
    freeMem maybeLabel
    return result'

-- method MenuToolButton::new_from_stock
-- method type : Constructor
-- Args : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "MenuToolButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_tool_button_new_from_stock" gtk_menu_tool_button_new_from_stock :: 
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr MenuToolButton)

{-# DEPRECATED menuToolButtonNewFromStock ["(Since version 3.10)","Use gtk_menu_tool_button_new() instead."]#-}
menuToolButtonNewFromStock ::
    (MonadIO m) =>
    T.Text ->                               -- stock_id
    m MenuToolButton
menuToolButtonNewFromStock stock_id = liftIO $ do
    stock_id' <- textToCString stock_id
    result <- gtk_menu_tool_button_new_from_stock stock_id'
    checkUnexpectedReturnNULL "gtk_menu_tool_button_new_from_stock" result
    result' <- (newObject MenuToolButton) result
    freeMem stock_id'
    return result'

-- method MenuToolButton::get_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_tool_button_get_menu" gtk_menu_tool_button_get_menu :: 
    Ptr MenuToolButton ->                   -- _obj : TInterface "Gtk" "MenuToolButton"
    IO (Ptr Widget)


menuToolButtonGetMenu ::
    (MonadIO m, MenuToolButtonK a) =>
    a ->                                    -- _obj
    m Widget
menuToolButtonGetMenu _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_menu_tool_button_get_menu _obj'
    checkUnexpectedReturnNULL "gtk_menu_tool_button_get_menu" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method MenuToolButton::set_arrow_tooltip_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_tool_button_set_arrow_tooltip_markup" gtk_menu_tool_button_set_arrow_tooltip_markup :: 
    Ptr MenuToolButton ->                   -- _obj : TInterface "Gtk" "MenuToolButton"
    CString ->                              -- markup : TBasicType TUTF8
    IO ()


menuToolButtonSetArrowTooltipMarkup ::
    (MonadIO m, MenuToolButtonK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- markup
    m ()
menuToolButtonSetArrowTooltipMarkup _obj markup = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    markup' <- textToCString markup
    gtk_menu_tool_button_set_arrow_tooltip_markup _obj' markup'
    touchManagedPtr _obj
    freeMem markup'
    return ()

-- method MenuToolButton::set_arrow_tooltip_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_tool_button_set_arrow_tooltip_text" gtk_menu_tool_button_set_arrow_tooltip_text :: 
    Ptr MenuToolButton ->                   -- _obj : TInterface "Gtk" "MenuToolButton"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


menuToolButtonSetArrowTooltipText ::
    (MonadIO m, MenuToolButtonK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    m ()
menuToolButtonSetArrowTooltipText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_menu_tool_button_set_arrow_tooltip_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method MenuToolButton::set_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MenuToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_menu_tool_button_set_menu" gtk_menu_tool_button_set_menu :: 
    Ptr MenuToolButton ->                   -- _obj : TInterface "Gtk" "MenuToolButton"
    Ptr Widget ->                           -- menu : TInterface "Gtk" "Widget"
    IO ()


menuToolButtonSetMenu ::
    (MonadIO m, MenuToolButtonK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- menu
    m ()
menuToolButtonSetMenu _obj menu = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let menu' = unsafeManagedPtrCastPtr menu
    gtk_menu_tool_button_set_menu _obj' menu'
    touchManagedPtr _obj
    touchManagedPtr menu
    return ()

-- signal MenuToolButton::show-menu
type MenuToolButtonShowMenuCallback =
    IO ()

noMenuToolButtonShowMenuCallback :: Maybe MenuToolButtonShowMenuCallback
noMenuToolButtonShowMenuCallback = Nothing

type MenuToolButtonShowMenuCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkMenuToolButtonShowMenuCallback :: MenuToolButtonShowMenuCallbackC -> IO (FunPtr MenuToolButtonShowMenuCallbackC)

menuToolButtonShowMenuClosure :: MenuToolButtonShowMenuCallback -> IO Closure
menuToolButtonShowMenuClosure cb = newCClosure =<< mkMenuToolButtonShowMenuCallback wrapped
    where wrapped = menuToolButtonShowMenuCallbackWrapper cb

menuToolButtonShowMenuCallbackWrapper ::
    MenuToolButtonShowMenuCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
menuToolButtonShowMenuCallbackWrapper _cb _ _ = do
    _cb 

onMenuToolButtonShowMenu :: (GObject a, MonadIO m) => a -> MenuToolButtonShowMenuCallback -> m SignalHandlerId
onMenuToolButtonShowMenu obj cb = liftIO $ connectMenuToolButtonShowMenu obj cb SignalConnectBefore
afterMenuToolButtonShowMenu :: (GObject a, MonadIO m) => a -> MenuToolButtonShowMenuCallback -> m SignalHandlerId
afterMenuToolButtonShowMenu obj cb = connectMenuToolButtonShowMenu obj cb SignalConnectAfter

connectMenuToolButtonShowMenu :: (GObject a, MonadIO m) =>
                                 a -> MenuToolButtonShowMenuCallback -> SignalConnectMode -> m SignalHandlerId
connectMenuToolButtonShowMenu obj cb after = liftIO $ do
    cb' <- mkMenuToolButtonShowMenuCallback (menuToolButtonShowMenuCallbackWrapper cb)
    connectSignalFunPtr obj "show-menu" cb' after

-- object MessageDialog 
newtype MessageDialog = MessageDialog (ForeignPtr MessageDialog)
noMessageDialog :: Maybe MessageDialog
noMessageDialog = Nothing

foreign import ccall "gtk_message_dialog_get_type"
    c_gtk_message_dialog_get_type :: IO GType

type instance ParentTypes MessageDialog = '[Dialog, Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject MessageDialog where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_message_dialog_get_type
    

class GObject o => MessageDialogK o
instance (GObject o, IsDescendantOf MessageDialog o) => MessageDialogK o

toMessageDialog :: MessageDialogK o => o -> IO MessageDialog
toMessageDialog = unsafeCastTo MessageDialog

-- method MessageDialog::get_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MessageDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MessageDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_message_dialog_get_image" gtk_message_dialog_get_image :: 
    Ptr MessageDialog ->                    -- _obj : TInterface "Gtk" "MessageDialog"
    IO (Ptr Widget)

{-# DEPRECATED messageDialogGetImage ["(Since version 3.12)","Use #GtkDialog for dialogs with images"]#-}
messageDialogGetImage ::
    (MonadIO m, MessageDialogK a) =>
    a ->                                    -- _obj
    m Widget
messageDialogGetImage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_message_dialog_get_image _obj'
    checkUnexpectedReturnNULL "gtk_message_dialog_get_image" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method MessageDialog::get_message_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MessageDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MessageDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_message_dialog_get_message_area" gtk_message_dialog_get_message_area :: 
    Ptr MessageDialog ->                    -- _obj : TInterface "Gtk" "MessageDialog"
    IO (Ptr Widget)


messageDialogGetMessageArea ::
    (MonadIO m, MessageDialogK a) =>
    a ->                                    -- _obj
    m Widget
messageDialogGetMessageArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_message_dialog_get_message_area _obj'
    checkUnexpectedReturnNULL "gtk_message_dialog_get_message_area" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method MessageDialog::set_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MessageDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "image", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MessageDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "image", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_message_dialog_set_image" gtk_message_dialog_set_image :: 
    Ptr MessageDialog ->                    -- _obj : TInterface "Gtk" "MessageDialog"
    Ptr Widget ->                           -- image : TInterface "Gtk" "Widget"
    IO ()

{-# DEPRECATED messageDialogSetImage ["(Since version 3.12)","Use #GtkDialog to create dialogs with images"]#-}
messageDialogSetImage ::
    (MonadIO m, MessageDialogK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- image
    m ()
messageDialogSetImage _obj image = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let image' = unsafeManagedPtrCastPtr image
    gtk_message_dialog_set_image _obj' image'
    touchManagedPtr _obj
    touchManagedPtr image
    return ()

-- method MessageDialog::set_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MessageDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MessageDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_message_dialog_set_markup" gtk_message_dialog_set_markup :: 
    Ptr MessageDialog ->                    -- _obj : TInterface "Gtk" "MessageDialog"
    CString ->                              -- str : TBasicType TUTF8
    IO ()


messageDialogSetMarkup ::
    (MonadIO m, MessageDialogK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- str
    m ()
messageDialogSetMarkup _obj str = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    str' <- textToCString str
    gtk_message_dialog_set_markup _obj' str'
    touchManagedPtr _obj
    freeMem str'
    return ()

-- Enum MessageType

data MessageType = 
      MessageTypeInfo
    | MessageTypeWarning
    | MessageTypeQuestion
    | MessageTypeError
    | MessageTypeOther
    | AnotherMessageType Int
    deriving (Show, Eq)

instance Enum MessageType where
    fromEnum MessageTypeInfo = 0
    fromEnum MessageTypeWarning = 1
    fromEnum MessageTypeQuestion = 2
    fromEnum MessageTypeError = 3
    fromEnum MessageTypeOther = 4
    fromEnum (AnotherMessageType k) = k

    toEnum 0 = MessageTypeInfo
    toEnum 1 = MessageTypeWarning
    toEnum 2 = MessageTypeQuestion
    toEnum 3 = MessageTypeError
    toEnum 4 = MessageTypeOther
    toEnum k = AnotherMessageType k

foreign import ccall "gtk_message_type_get_type" c_gtk_message_type_get_type :: 
    IO GType

instance BoxedEnum MessageType where
    boxedEnumType _ = c_gtk_message_type_get_type

-- object Misc 
newtype Misc = Misc (ForeignPtr Misc)
noMisc :: Maybe Misc
noMisc = Nothing

foreign import ccall "gtk_misc_get_type"
    c_gtk_misc_get_type :: IO GType

type instance ParentTypes Misc = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Misc where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_misc_get_type
    

class GObject o => MiscK o
instance (GObject o, IsDescendantOf Misc o) => MiscK o

toMisc :: MiscK o => o -> IO Misc
toMisc = unsafeCastTo Misc

-- method Misc::get_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Misc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Misc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_misc_get_alignment" gtk_misc_get_alignment :: 
    Ptr Misc ->                             -- _obj : TInterface "Gtk" "Misc"
    Ptr CFloat ->                           -- xalign : TBasicType TFloat
    Ptr CFloat ->                           -- yalign : TBasicType TFloat
    IO ()

{-# DEPRECATED miscGetAlignment ["(Since version 3.14)","Use #GtkWidget alignment and margin properties."]#-}
miscGetAlignment ::
    (MonadIO m, MiscK a) =>
    a ->                                    -- _obj
    m (Float,Float)
miscGetAlignment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    xalign <- allocMem :: IO (Ptr CFloat)
    yalign <- allocMem :: IO (Ptr CFloat)
    gtk_misc_get_alignment _obj' xalign yalign
    xalign' <- peek xalign
    let xalign'' = realToFrac xalign'
    yalign' <- peek yalign
    let yalign'' = realToFrac yalign'
    touchManagedPtr _obj
    freeMem xalign
    freeMem yalign
    return (xalign'', yalign'')

-- method Misc::get_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Misc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpad", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "ypad", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Misc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_misc_get_padding" gtk_misc_get_padding :: 
    Ptr Misc ->                             -- _obj : TInterface "Gtk" "Misc"
    Ptr Int32 ->                            -- xpad : TBasicType TInt32
    Ptr Int32 ->                            -- ypad : TBasicType TInt32
    IO ()

{-# DEPRECATED miscGetPadding ["(Since version 3.14)","Use #GtkWidget alignment and margin properties."]#-}
miscGetPadding ::
    (MonadIO m, MiscK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
miscGetPadding _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    xpad <- allocMem :: IO (Ptr Int32)
    ypad <- allocMem :: IO (Ptr Int32)
    gtk_misc_get_padding _obj' xpad ypad
    xpad' <- peek xpad
    ypad' <- peek ypad
    touchManagedPtr _obj
    freeMem xpad
    freeMem ypad
    return (xpad', ypad')

-- method Misc::set_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Misc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Misc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_misc_set_alignment" gtk_misc_set_alignment :: 
    Ptr Misc ->                             -- _obj : TInterface "Gtk" "Misc"
    CFloat ->                               -- xalign : TBasicType TFloat
    CFloat ->                               -- yalign : TBasicType TFloat
    IO ()

{-# DEPRECATED miscSetAlignment ["(Since version 3.14)","Use #GtkWidget's alignment (#GtkWidget:halign and #GtkWidget:valign) and margin properties or #GtkLabel's #GtkLabel:xalign and #GtkLabel:yalign properties."]#-}
miscSetAlignment ::
    (MonadIO m, MiscK a) =>
    a ->                                    -- _obj
    Float ->                                -- xalign
    Float ->                                -- yalign
    m ()
miscSetAlignment _obj xalign yalign = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let xalign' = realToFrac xalign
    let yalign' = realToFrac yalign
    gtk_misc_set_alignment _obj' xalign' yalign'
    touchManagedPtr _obj
    return ()

-- method Misc::set_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Misc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpad", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ypad", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Misc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpad", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ypad", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_misc_set_padding" gtk_misc_set_padding :: 
    Ptr Misc ->                             -- _obj : TInterface "Gtk" "Misc"
    Int32 ->                                -- xpad : TBasicType TInt32
    Int32 ->                                -- ypad : TBasicType TInt32
    IO ()

{-# DEPRECATED miscSetPadding ["(Since version 3.14)","Use #GtkWidget alignment and margin properties."]#-}
miscSetPadding ::
    (MonadIO m, MiscK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- xpad
    Int32 ->                                -- ypad
    m ()
miscSetPadding _obj xpad ypad = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_misc_set_padding _obj' xpad ypad
    touchManagedPtr _obj
    return ()

-- object ModelButton 
newtype ModelButton = ModelButton (ForeignPtr ModelButton)
noModelButton :: Maybe ModelButton
noModelButton = Nothing

foreign import ccall "gtk_model_button_get_type"
    c_gtk_model_button_get_type :: IO GType

type instance ParentTypes ModelButton = '[Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject ModelButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_model_button_get_type
    

class GObject o => ModelButtonK o
instance (GObject o, IsDescendantOf ModelButton o) => ModelButtonK o

toModelButton :: ModelButtonK o => o -> IO ModelButton
toModelButton = unsafeCastTo ModelButton

-- method ModelButton::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ModelButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_model_button_new" gtk_model_button_new :: 
    IO (Ptr ModelButton)


modelButtonNew ::
    (MonadIO m) =>
    m ModelButton
modelButtonNew  = liftIO $ do
    result <- gtk_model_button_new
    checkUnexpectedReturnNULL "gtk_model_button_new" result
    result' <- (newObject ModelButton) result
    return result'

-- callback ModuleDisplayInitFunc
moduleDisplayInitFuncClosure :: ModuleDisplayInitFunc -> IO Closure
moduleDisplayInitFuncClosure cb = newCClosure =<< mkModuleDisplayInitFunc wrapped
    where wrapped = moduleDisplayInitFuncWrapper Nothing cb

type ModuleDisplayInitFuncC =
    Ptr Gdk.Display ->
    IO ()

foreign import ccall "wrapper"
    mkModuleDisplayInitFunc :: ModuleDisplayInitFuncC -> IO (FunPtr ModuleDisplayInitFuncC)

type ModuleDisplayInitFunc =
    Gdk.Display ->
    IO ()

noModuleDisplayInitFunc :: Maybe ModuleDisplayInitFunc
noModuleDisplayInitFunc = Nothing

moduleDisplayInitFuncWrapper ::
    Maybe (Ptr (FunPtr (ModuleDisplayInitFuncC))) ->
    ModuleDisplayInitFunc ->
    Ptr Gdk.Display ->
    IO ()
moduleDisplayInitFuncWrapper funptrptr _cb display = do
    display' <- (newObject Gdk.Display) display
    _cb  display'
    maybeReleaseFunPtr funptrptr

-- callback ModuleInitFunc
moduleInitFuncClosure :: ModuleInitFunc -> IO Closure
moduleInitFuncClosure cb = newCClosure =<< mkModuleInitFunc wrapped
    where wrapped = moduleInitFuncWrapper Nothing cb

type ModuleInitFuncC =
    Int32 ->
    Ptr CString ->
    IO ()

foreign import ccall "wrapper"
    mkModuleInitFunc :: ModuleInitFuncC -> IO (FunPtr ModuleInitFuncC)

type ModuleInitFunc =
    Maybe [T.Text] ->
    IO ()

noModuleInitFunc :: Maybe ModuleInitFunc
noModuleInitFunc = Nothing

moduleInitFuncWrapper ::
    Maybe (Ptr (FunPtr (ModuleInitFuncC))) ->
    ModuleInitFunc ->
    Int32 ->
    Ptr CString ->
    IO ()
moduleInitFuncWrapper funptrptr _cb argc argv = do
    maybeArgv <-
        if argv == nullPtr
        then return Nothing
        else do
            argv' <- (unpackUTF8CArrayWithLength argc) argv
            return $ Just argv'
    _cb  maybeArgv
    maybeReleaseFunPtr funptrptr

-- object MountOperation 
newtype MountOperation = MountOperation (ForeignPtr MountOperation)
noMountOperation :: Maybe MountOperation
noMountOperation = Nothing

foreign import ccall "gtk_mount_operation_get_type"
    c_gtk_mount_operation_get_type :: IO GType

type instance ParentTypes MountOperation = '[Gio.MountOperation, GObject.Object]

instance GObject MountOperation where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_mount_operation_get_type
    

class GObject o => MountOperationK o
instance (GObject o, IsDescendantOf MountOperation o) => MountOperationK o

toMountOperation :: MountOperationK o => o -> IO MountOperation
toMountOperation = unsafeCastTo MountOperation

-- method MountOperation::new
-- method type : Constructor
-- Args : [Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "MountOperation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_new" gtk_mount_operation_new :: 
    Ptr Window ->                           -- parent : TInterface "Gtk" "Window"
    IO (Ptr MountOperation)


mountOperationNew ::
    (MonadIO m, WindowK a) =>
    Maybe (a) ->                            -- parent
    m MountOperation
mountOperationNew parent = liftIO $ do
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    result <- gtk_mount_operation_new maybeParent
    checkUnexpectedReturnNULL "gtk_mount_operation_new" result
    result' <- (wrapObject MountOperation) result
    whenJust parent touchManagedPtr
    return result'

-- method MountOperation::get_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MountOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MountOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_get_parent" gtk_mount_operation_get_parent :: 
    Ptr MountOperation ->                   -- _obj : TInterface "Gtk" "MountOperation"
    IO (Ptr Window)


mountOperationGetParent ::
    (MonadIO m, MountOperationK a) =>
    a ->                                    -- _obj
    m Window
mountOperationGetParent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_mount_operation_get_parent _obj'
    checkUnexpectedReturnNULL "gtk_mount_operation_get_parent" result
    result' <- (newObject Window) result
    touchManagedPtr _obj
    return result'

-- method MountOperation::get_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MountOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MountOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Screen"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_get_screen" gtk_mount_operation_get_screen :: 
    Ptr MountOperation ->                   -- _obj : TInterface "Gtk" "MountOperation"
    IO (Ptr Gdk.Screen)


mountOperationGetScreen ::
    (MonadIO m, MountOperationK a) =>
    a ->                                    -- _obj
    m Gdk.Screen
mountOperationGetScreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_mount_operation_get_screen _obj'
    checkUnexpectedReturnNULL "gtk_mount_operation_get_screen" result
    result' <- (newObject Gdk.Screen) result
    touchManagedPtr _obj
    return result'

-- method MountOperation::is_showing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MountOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MountOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_is_showing" gtk_mount_operation_is_showing :: 
    Ptr MountOperation ->                   -- _obj : TInterface "Gtk" "MountOperation"
    IO CInt


mountOperationIsShowing ::
    (MonadIO m, MountOperationK a) =>
    a ->                                    -- _obj
    m Bool
mountOperationIsShowing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_mount_operation_is_showing _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method MountOperation::set_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MountOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MountOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_set_parent" gtk_mount_operation_set_parent :: 
    Ptr MountOperation ->                   -- _obj : TInterface "Gtk" "MountOperation"
    Ptr Window ->                           -- parent : TInterface "Gtk" "Window"
    IO ()


mountOperationSetParent ::
    (MonadIO m, MountOperationK a, WindowK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- parent
    m ()
mountOperationSetParent _obj parent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    gtk_mount_operation_set_parent _obj' maybeParent
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    return ()

-- method MountOperation::set_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "MountOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "MountOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_set_screen" gtk_mount_operation_set_screen :: 
    Ptr MountOperation ->                   -- _obj : TInterface "Gtk" "MountOperation"
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO ()


mountOperationSetScreen ::
    (MonadIO m, MountOperationK a, Gdk.ScreenK b) =>
    a ->                                    -- _obj
    b ->                                    -- screen
    m ()
mountOperationSetScreen _obj screen = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let screen' = unsafeManagedPtrCastPtr screen
    gtk_mount_operation_set_screen _obj' screen'
    touchManagedPtr _obj
    touchManagedPtr screen
    return ()

-- Enum MovementStep

data MovementStep = 
      MovementStepLogicalPositions
    | MovementStepVisualPositions
    | MovementStepWords
    | MovementStepDisplayLines
    | MovementStepDisplayLineEnds
    | MovementStepParagraphs
    | MovementStepParagraphEnds
    | MovementStepPages
    | MovementStepBufferEnds
    | MovementStepHorizontalPages
    | AnotherMovementStep Int
    deriving (Show, Eq)

instance Enum MovementStep where
    fromEnum MovementStepLogicalPositions = 0
    fromEnum MovementStepVisualPositions = 1
    fromEnum MovementStepWords = 2
    fromEnum MovementStepDisplayLines = 3
    fromEnum MovementStepDisplayLineEnds = 4
    fromEnum MovementStepParagraphs = 5
    fromEnum MovementStepParagraphEnds = 6
    fromEnum MovementStepPages = 7
    fromEnum MovementStepBufferEnds = 8
    fromEnum MovementStepHorizontalPages = 9
    fromEnum (AnotherMovementStep k) = k

    toEnum 0 = MovementStepLogicalPositions
    toEnum 1 = MovementStepVisualPositions
    toEnum 2 = MovementStepWords
    toEnum 3 = MovementStepDisplayLines
    toEnum 4 = MovementStepDisplayLineEnds
    toEnum 5 = MovementStepParagraphs
    toEnum 6 = MovementStepParagraphEnds
    toEnum 7 = MovementStepPages
    toEnum 8 = MovementStepBufferEnds
    toEnum 9 = MovementStepHorizontalPages
    toEnum k = AnotherMovementStep k

foreign import ccall "gtk_movement_step_get_type" c_gtk_movement_step_get_type :: 
    IO GType

instance BoxedEnum MovementStep where
    boxedEnumType _ = c_gtk_movement_step_get_type

-- object Notebook 
newtype Notebook = Notebook (ForeignPtr Notebook)
noNotebook :: Maybe Notebook
noNotebook = Nothing

foreign import ccall "gtk_notebook_get_type"
    c_gtk_notebook_get_type :: IO GType

type instance ParentTypes Notebook = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Notebook where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_notebook_get_type
    

class GObject o => NotebookK o
instance (GObject o, IsDescendantOf Notebook o) => NotebookK o

toNotebook :: NotebookK o => o -> IO Notebook
toNotebook = unsafeCastTo Notebook

-- method Notebook::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Notebook"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_new" gtk_notebook_new :: 
    IO (Ptr Notebook)


notebookNew ::
    (MonadIO m) =>
    m Notebook
notebookNew  = liftIO $ do
    result <- gtk_notebook_new
    checkUnexpectedReturnNULL "gtk_notebook_new" result
    result' <- (newObject Notebook) result
    return result'

-- method Notebook::append_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_append_page" gtk_notebook_append_page :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- tab_label : TInterface "Gtk" "Widget"
    IO Int32


notebookAppendPage ::
    (MonadIO m, NotebookK a, WidgetK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Maybe (c) ->                            -- tab_label
    m Int32
notebookAppendPage _obj child tab_label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    maybeTab_label <- case tab_label of
        Nothing -> return nullPtr
        Just jTab_label -> do
            let jTab_label' = unsafeManagedPtrCastPtr jTab_label
            return jTab_label'
    result <- gtk_notebook_append_page _obj' child' maybeTab_label
    touchManagedPtr _obj
    touchManagedPtr child
    whenJust tab_label touchManagedPtr
    return result

-- method Notebook::append_page_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_append_page_menu" gtk_notebook_append_page_menu :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- tab_label : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- menu_label : TInterface "Gtk" "Widget"
    IO Int32


notebookAppendPageMenu ::
    (MonadIO m, NotebookK a, WidgetK b, WidgetK c, WidgetK d) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Maybe (c) ->                            -- tab_label
    Maybe (d) ->                            -- menu_label
    m Int32
notebookAppendPageMenu _obj child tab_label menu_label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    maybeTab_label <- case tab_label of
        Nothing -> return nullPtr
        Just jTab_label -> do
            let jTab_label' = unsafeManagedPtrCastPtr jTab_label
            return jTab_label'
    maybeMenu_label <- case menu_label of
        Nothing -> return nullPtr
        Just jMenu_label -> do
            let jMenu_label' = unsafeManagedPtrCastPtr jMenu_label
            return jMenu_label'
    result <- gtk_notebook_append_page_menu _obj' child' maybeTab_label maybeMenu_label
    touchManagedPtr _obj
    touchManagedPtr child
    whenJust tab_label touchManagedPtr
    whenJust menu_label touchManagedPtr
    return result

-- method Notebook::detach_tab
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_detach_tab" gtk_notebook_detach_tab :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


notebookDetachTab ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
notebookDetachTab _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_notebook_detach_tab _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Notebook::get_action_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pack_type", argType = TInterface "Gtk" "PackType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pack_type", argType = TInterface "Gtk" "PackType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_action_widget" gtk_notebook_get_action_widget :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    CUInt ->                                -- pack_type : TInterface "Gtk" "PackType"
    IO (Ptr Widget)


notebookGetActionWidget ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    PackType ->                             -- pack_type
    m Widget
notebookGetActionWidget _obj pack_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let pack_type' = (fromIntegral . fromEnum) pack_type
    result <- gtk_notebook_get_action_widget _obj' pack_type'
    checkUnexpectedReturnNULL "gtk_notebook_get_action_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Notebook::get_current_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_current_page" gtk_notebook_get_current_page :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO Int32


notebookGetCurrentPage ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m Int32
notebookGetCurrentPage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_notebook_get_current_page _obj'
    touchManagedPtr _obj
    return result

-- method Notebook::get_group_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_group_name" gtk_notebook_get_group_name :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO CString


notebookGetGroupName ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m T.Text
notebookGetGroupName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_notebook_get_group_name _obj'
    checkUnexpectedReturnNULL "gtk_notebook_get_group_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Notebook::get_menu_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_menu_label" gtk_notebook_get_menu_label :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO (Ptr Widget)


notebookGetMenuLabel ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m Widget
notebookGetMenuLabel _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    result <- gtk_notebook_get_menu_label _obj' child'
    checkUnexpectedReturnNULL "gtk_notebook_get_menu_label" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    touchManagedPtr child
    return result'

-- method Notebook::get_menu_label_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_menu_label_text" gtk_notebook_get_menu_label_text :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO CString


notebookGetMenuLabelText ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m T.Text
notebookGetMenuLabelText _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    result <- gtk_notebook_get_menu_label_text _obj' child'
    checkUnexpectedReturnNULL "gtk_notebook_get_menu_label_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    touchManagedPtr child
    return result'

-- method Notebook::get_n_pages
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_n_pages" gtk_notebook_get_n_pages :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO Int32


notebookGetNPages ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m Int32
notebookGetNPages _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_notebook_get_n_pages _obj'
    touchManagedPtr _obj
    return result

-- method Notebook::get_nth_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_nth_page" gtk_notebook_get_nth_page :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Int32 ->                                -- page_num : TBasicType TInt32
    IO (Ptr Widget)


notebookGetNthPage ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- page_num
    m Widget
notebookGetNthPage _obj page_num = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_notebook_get_nth_page _obj' page_num
    checkUnexpectedReturnNULL "gtk_notebook_get_nth_page" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Notebook::get_scrollable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_scrollable" gtk_notebook_get_scrollable :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO CInt


notebookGetScrollable ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m Bool
notebookGetScrollable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_notebook_get_scrollable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Notebook::get_show_border
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_show_border" gtk_notebook_get_show_border :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO CInt


notebookGetShowBorder ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m Bool
notebookGetShowBorder _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_notebook_get_show_border _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Notebook::get_show_tabs
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_show_tabs" gtk_notebook_get_show_tabs :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO CInt


notebookGetShowTabs ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m Bool
notebookGetShowTabs _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_notebook_get_show_tabs _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Notebook::get_tab_detachable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_tab_detachable" gtk_notebook_get_tab_detachable :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO CInt


notebookGetTabDetachable ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m Bool
notebookGetTabDetachable _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    result <- gtk_notebook_get_tab_detachable _obj' child'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr child
    return result'

-- method Notebook::get_tab_hborder
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt16
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_tab_hborder" gtk_notebook_get_tab_hborder :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO Word16

{-# DEPRECATED notebookGetTabHborder ["(Since version 3.4)","this function returns zero"]#-}
notebookGetTabHborder ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m Word16
notebookGetTabHborder _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_notebook_get_tab_hborder _obj'
    touchManagedPtr _obj
    return result

-- method Notebook::get_tab_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_tab_label" gtk_notebook_get_tab_label :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO (Ptr Widget)


notebookGetTabLabel ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m Widget
notebookGetTabLabel _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    result <- gtk_notebook_get_tab_label _obj' child'
    checkUnexpectedReturnNULL "gtk_notebook_get_tab_label" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    touchManagedPtr child
    return result'

-- method Notebook::get_tab_label_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_tab_label_text" gtk_notebook_get_tab_label_text :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO CString


notebookGetTabLabelText ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m T.Text
notebookGetTabLabelText _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    result <- gtk_notebook_get_tab_label_text _obj' child'
    checkUnexpectedReturnNULL "gtk_notebook_get_tab_label_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    touchManagedPtr child
    return result'

-- method Notebook::get_tab_pos
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PositionType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_tab_pos" gtk_notebook_get_tab_pos :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO CUInt


notebookGetTabPos ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m PositionType
notebookGetTabPos _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_notebook_get_tab_pos _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Notebook::get_tab_reorderable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_tab_reorderable" gtk_notebook_get_tab_reorderable :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO CInt


notebookGetTabReorderable ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m Bool
notebookGetTabReorderable _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    result <- gtk_notebook_get_tab_reorderable _obj' child'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr child
    return result'

-- method Notebook::get_tab_vborder
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt16
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_get_tab_vborder" gtk_notebook_get_tab_vborder :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO Word16

{-# DEPRECATED notebookGetTabVborder ["(Since version 3.4)","this function returns zero"]#-}
notebookGetTabVborder ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m Word16
notebookGetTabVborder _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_notebook_get_tab_vborder _obj'
    touchManagedPtr _obj
    return result

-- method Notebook::insert_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_insert_page" gtk_notebook_insert_page :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- tab_label : TInterface "Gtk" "Widget"
    Int32 ->                                -- position : TBasicType TInt32
    IO Int32


notebookInsertPage ::
    (MonadIO m, NotebookK a, WidgetK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Maybe (c) ->                            -- tab_label
    Int32 ->                                -- position
    m Int32
notebookInsertPage _obj child tab_label position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    maybeTab_label <- case tab_label of
        Nothing -> return nullPtr
        Just jTab_label -> do
            let jTab_label' = unsafeManagedPtrCastPtr jTab_label
            return jTab_label'
    result <- gtk_notebook_insert_page _obj' child' maybeTab_label position
    touchManagedPtr _obj
    touchManagedPtr child
    whenJust tab_label touchManagedPtr
    return result

-- method Notebook::insert_page_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_insert_page_menu" gtk_notebook_insert_page_menu :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- tab_label : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- menu_label : TInterface "Gtk" "Widget"
    Int32 ->                                -- position : TBasicType TInt32
    IO Int32


notebookInsertPageMenu ::
    (MonadIO m, NotebookK a, WidgetK b, WidgetK c, WidgetK d) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Maybe (c) ->                            -- tab_label
    Maybe (d) ->                            -- menu_label
    Int32 ->                                -- position
    m Int32
notebookInsertPageMenu _obj child tab_label menu_label position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    maybeTab_label <- case tab_label of
        Nothing -> return nullPtr
        Just jTab_label -> do
            let jTab_label' = unsafeManagedPtrCastPtr jTab_label
            return jTab_label'
    maybeMenu_label <- case menu_label of
        Nothing -> return nullPtr
        Just jMenu_label -> do
            let jMenu_label' = unsafeManagedPtrCastPtr jMenu_label
            return jMenu_label'
    result <- gtk_notebook_insert_page_menu _obj' child' maybeTab_label maybeMenu_label position
    touchManagedPtr _obj
    touchManagedPtr child
    whenJust tab_label touchManagedPtr
    whenJust menu_label touchManagedPtr
    return result

-- method Notebook::next_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_next_page" gtk_notebook_next_page :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO ()


notebookNextPage ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m ()
notebookNextPage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_notebook_next_page _obj'
    touchManagedPtr _obj
    return ()

-- method Notebook::page_num
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_page_num" gtk_notebook_page_num :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO Int32


notebookPageNum ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m Int32
notebookPageNum _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    result <- gtk_notebook_page_num _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return result

-- method Notebook::popup_disable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_popup_disable" gtk_notebook_popup_disable :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO ()


notebookPopupDisable ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m ()
notebookPopupDisable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_notebook_popup_disable _obj'
    touchManagedPtr _obj
    return ()

-- method Notebook::popup_enable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_popup_enable" gtk_notebook_popup_enable :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO ()


notebookPopupEnable ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m ()
notebookPopupEnable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_notebook_popup_enable _obj'
    touchManagedPtr _obj
    return ()

-- method Notebook::prepend_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_prepend_page" gtk_notebook_prepend_page :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- tab_label : TInterface "Gtk" "Widget"
    IO Int32


notebookPrependPage ::
    (MonadIO m, NotebookK a, WidgetK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Maybe (c) ->                            -- tab_label
    m Int32
notebookPrependPage _obj child tab_label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    maybeTab_label <- case tab_label of
        Nothing -> return nullPtr
        Just jTab_label -> do
            let jTab_label' = unsafeManagedPtrCastPtr jTab_label
            return jTab_label'
    result <- gtk_notebook_prepend_page _obj' child' maybeTab_label
    touchManagedPtr _obj
    touchManagedPtr child
    whenJust tab_label touchManagedPtr
    return result

-- method Notebook::prepend_page_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_prepend_page_menu" gtk_notebook_prepend_page_menu :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- tab_label : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- menu_label : TInterface "Gtk" "Widget"
    IO Int32


notebookPrependPageMenu ::
    (MonadIO m, NotebookK a, WidgetK b, WidgetK c, WidgetK d) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Maybe (c) ->                            -- tab_label
    Maybe (d) ->                            -- menu_label
    m Int32
notebookPrependPageMenu _obj child tab_label menu_label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    maybeTab_label <- case tab_label of
        Nothing -> return nullPtr
        Just jTab_label -> do
            let jTab_label' = unsafeManagedPtrCastPtr jTab_label
            return jTab_label'
    maybeMenu_label <- case menu_label of
        Nothing -> return nullPtr
        Just jMenu_label -> do
            let jMenu_label' = unsafeManagedPtrCastPtr jMenu_label
            return jMenu_label'
    result <- gtk_notebook_prepend_page_menu _obj' child' maybeTab_label maybeMenu_label
    touchManagedPtr _obj
    touchManagedPtr child
    whenJust tab_label touchManagedPtr
    whenJust menu_label touchManagedPtr
    return result

-- method Notebook::prev_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_prev_page" gtk_notebook_prev_page :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    IO ()


notebookPrevPage ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    m ()
notebookPrevPage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_notebook_prev_page _obj'
    touchManagedPtr _obj
    return ()

-- method Notebook::remove_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_remove_page" gtk_notebook_remove_page :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Int32 ->                                -- page_num : TBasicType TInt32
    IO ()


notebookRemovePage ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- page_num
    m ()
notebookRemovePage _obj page_num = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_notebook_remove_page _obj' page_num
    touchManagedPtr _obj
    return ()

-- method Notebook::reorder_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_reorder_child" gtk_notebook_reorder_child :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


notebookReorderChild ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Int32 ->                                -- position
    m ()
notebookReorderChild _obj child position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_notebook_reorder_child _obj' child' position
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Notebook::set_action_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pack_type", argType = TInterface "Gtk" "PackType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pack_type", argType = TInterface "Gtk" "PackType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_action_widget" gtk_notebook_set_action_widget :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CUInt ->                                -- pack_type : TInterface "Gtk" "PackType"
    IO ()


notebookSetActionWidget ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    PackType ->                             -- pack_type
    m ()
notebookSetActionWidget _obj widget pack_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    let pack_type' = (fromIntegral . fromEnum) pack_type
    gtk_notebook_set_action_widget _obj' widget' pack_type'
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- method Notebook::set_current_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_current_page" gtk_notebook_set_current_page :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Int32 ->                                -- page_num : TBasicType TInt32
    IO ()


notebookSetCurrentPage ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- page_num
    m ()
notebookSetCurrentPage _obj page_num = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_notebook_set_current_page _obj' page_num
    touchManagedPtr _obj
    return ()

-- method Notebook::set_group_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_group_name" gtk_notebook_set_group_name :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    CString ->                              -- group_name : TBasicType TUTF8
    IO ()


notebookSetGroupName ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- group_name
    m ()
notebookSetGroupName _obj group_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeGroup_name <- case group_name of
        Nothing -> return nullPtr
        Just jGroup_name -> do
            jGroup_name' <- textToCString jGroup_name
            return jGroup_name'
    gtk_notebook_set_group_name _obj' maybeGroup_name
    touchManagedPtr _obj
    freeMem maybeGroup_name
    return ()

-- method Notebook::set_menu_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_menu_label" gtk_notebook_set_menu_label :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- menu_label : TInterface "Gtk" "Widget"
    IO ()


notebookSetMenuLabel ::
    (MonadIO m, NotebookK a, WidgetK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Maybe (c) ->                            -- menu_label
    m ()
notebookSetMenuLabel _obj child menu_label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    maybeMenu_label <- case menu_label of
        Nothing -> return nullPtr
        Just jMenu_label -> do
            let jMenu_label' = unsafeManagedPtrCastPtr jMenu_label
            return jMenu_label'
    gtk_notebook_set_menu_label _obj' child' maybeMenu_label
    touchManagedPtr _obj
    touchManagedPtr child
    whenJust menu_label touchManagedPtr
    return ()

-- method Notebook::set_menu_label_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_menu_label_text" gtk_notebook_set_menu_label_text :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CString ->                              -- menu_text : TBasicType TUTF8
    IO ()


notebookSetMenuLabelText ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    T.Text ->                               -- menu_text
    m ()
notebookSetMenuLabelText _obj child menu_text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    menu_text' <- textToCString menu_text
    gtk_notebook_set_menu_label_text _obj' child' menu_text'
    touchManagedPtr _obj
    touchManagedPtr child
    freeMem menu_text'
    return ()

-- method Notebook::set_scrollable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scrollable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scrollable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_scrollable" gtk_notebook_set_scrollable :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    CInt ->                                 -- scrollable : TBasicType TBoolean
    IO ()


notebookSetScrollable ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- scrollable
    m ()
notebookSetScrollable _obj scrollable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let scrollable' = (fromIntegral . fromEnum) scrollable
    gtk_notebook_set_scrollable _obj' scrollable'
    touchManagedPtr _obj
    return ()

-- method Notebook::set_show_border
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_border", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_border", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_show_border" gtk_notebook_set_show_border :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    CInt ->                                 -- show_border : TBasicType TBoolean
    IO ()


notebookSetShowBorder ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_border
    m ()
notebookSetShowBorder _obj show_border = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_border' = (fromIntegral . fromEnum) show_border
    gtk_notebook_set_show_border _obj' show_border'
    touchManagedPtr _obj
    return ()

-- method Notebook::set_show_tabs
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_tabs", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_tabs", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_show_tabs" gtk_notebook_set_show_tabs :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    CInt ->                                 -- show_tabs : TBasicType TBoolean
    IO ()


notebookSetShowTabs ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_tabs
    m ()
notebookSetShowTabs _obj show_tabs = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_tabs' = (fromIntegral . fromEnum) show_tabs
    gtk_notebook_set_show_tabs _obj' show_tabs'
    touchManagedPtr _obj
    return ()

-- method Notebook::set_tab_detachable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detachable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detachable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_tab_detachable" gtk_notebook_set_tab_detachable :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CInt ->                                 -- detachable : TBasicType TBoolean
    IO ()


notebookSetTabDetachable ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Bool ->                                 -- detachable
    m ()
notebookSetTabDetachable _obj child detachable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let detachable' = (fromIntegral . fromEnum) detachable
    gtk_notebook_set_tab_detachable _obj' child' detachable'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Notebook::set_tab_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_tab_label" gtk_notebook_set_tab_label :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- tab_label : TInterface "Gtk" "Widget"
    IO ()


notebookSetTabLabel ::
    (MonadIO m, NotebookK a, WidgetK b, WidgetK c) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Maybe (c) ->                            -- tab_label
    m ()
notebookSetTabLabel _obj child tab_label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    maybeTab_label <- case tab_label of
        Nothing -> return nullPtr
        Just jTab_label -> do
            let jTab_label' = unsafeManagedPtrCastPtr jTab_label
            return jTab_label'
    gtk_notebook_set_tab_label _obj' child' maybeTab_label
    touchManagedPtr _obj
    touchManagedPtr child
    whenJust tab_label touchManagedPtr
    return ()

-- method Notebook::set_tab_label_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tab_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_tab_label_text" gtk_notebook_set_tab_label_text :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CString ->                              -- tab_text : TBasicType TUTF8
    IO ()


notebookSetTabLabelText ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    T.Text ->                               -- tab_text
    m ()
notebookSetTabLabelText _obj child tab_text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    tab_text' <- textToCString tab_text
    gtk_notebook_set_tab_label_text _obj' child' tab_text'
    touchManagedPtr _obj
    touchManagedPtr child
    freeMem tab_text'
    return ()

-- method Notebook::set_tab_pos
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_tab_pos" gtk_notebook_set_tab_pos :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    CUInt ->                                -- pos : TInterface "Gtk" "PositionType"
    IO ()


notebookSetTabPos ::
    (MonadIO m, NotebookK a) =>
    a ->                                    -- _obj
    PositionType ->                         -- pos
    m ()
notebookSetTabPos _obj pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let pos' = (fromIntegral . fromEnum) pos
    gtk_notebook_set_tab_pos _obj' pos'
    touchManagedPtr _obj
    return ()

-- method Notebook::set_tab_reorderable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reorderable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Notebook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reorderable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_set_tab_reorderable" gtk_notebook_set_tab_reorderable :: 
    Ptr Notebook ->                         -- _obj : TInterface "Gtk" "Notebook"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CInt ->                                 -- reorderable : TBasicType TBoolean
    IO ()


notebookSetTabReorderable ::
    (MonadIO m, NotebookK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Bool ->                                 -- reorderable
    m ()
notebookSetTabReorderable _obj child reorderable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let reorderable' = (fromIntegral . fromEnum) reorderable
    gtk_notebook_set_tab_reorderable _obj' child' reorderable'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- signal Notebook::change-current-page
type NotebookChangeCurrentPageCallback =
    Int32 ->
    IO Bool

noNotebookChangeCurrentPageCallback :: Maybe NotebookChangeCurrentPageCallback
noNotebookChangeCurrentPageCallback = Nothing

type NotebookChangeCurrentPageCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkNotebookChangeCurrentPageCallback :: NotebookChangeCurrentPageCallbackC -> IO (FunPtr NotebookChangeCurrentPageCallbackC)

notebookChangeCurrentPageClosure :: NotebookChangeCurrentPageCallback -> IO Closure
notebookChangeCurrentPageClosure cb = newCClosure =<< mkNotebookChangeCurrentPageCallback wrapped
    where wrapped = notebookChangeCurrentPageCallbackWrapper cb

notebookChangeCurrentPageCallbackWrapper ::
    NotebookChangeCurrentPageCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO CInt
notebookChangeCurrentPageCallbackWrapper _cb _ object _ = do
    result <- _cb  object
    let result' = (fromIntegral . fromEnum) result
    return result'

onNotebookChangeCurrentPage :: (GObject a, MonadIO m) => a -> NotebookChangeCurrentPageCallback -> m SignalHandlerId
onNotebookChangeCurrentPage obj cb = liftIO $ connectNotebookChangeCurrentPage obj cb SignalConnectBefore
afterNotebookChangeCurrentPage :: (GObject a, MonadIO m) => a -> NotebookChangeCurrentPageCallback -> m SignalHandlerId
afterNotebookChangeCurrentPage obj cb = connectNotebookChangeCurrentPage obj cb SignalConnectAfter

connectNotebookChangeCurrentPage :: (GObject a, MonadIO m) =>
                                    a -> NotebookChangeCurrentPageCallback -> SignalConnectMode -> m SignalHandlerId
connectNotebookChangeCurrentPage obj cb after = liftIO $ do
    cb' <- mkNotebookChangeCurrentPageCallback (notebookChangeCurrentPageCallbackWrapper cb)
    connectSignalFunPtr obj "change-current-page" cb' after

-- signal Notebook::create-window
type NotebookCreateWindowCallback =
    Widget ->
    Int32 ->
    Int32 ->
    IO Notebook

noNotebookCreateWindowCallback :: Maybe NotebookCreateWindowCallback
noNotebookCreateWindowCallback = Nothing

type NotebookCreateWindowCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Int32 ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO (Ptr Notebook)

foreign import ccall "wrapper"
    mkNotebookCreateWindowCallback :: NotebookCreateWindowCallbackC -> IO (FunPtr NotebookCreateWindowCallbackC)

notebookCreateWindowClosure :: NotebookCreateWindowCallback -> IO Closure
notebookCreateWindowClosure cb = newCClosure =<< mkNotebookCreateWindowCallback wrapped
    where wrapped = notebookCreateWindowCallbackWrapper cb

notebookCreateWindowCallbackWrapper ::
    NotebookCreateWindowCallback ->
    Ptr () ->
    Ptr Widget ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO (Ptr Notebook)
notebookCreateWindowCallbackWrapper _cb _ page x y _ = do
    page' <- (newObject Widget) page
    result <- _cb  page' x y
    let result' = unsafeManagedPtrCastPtr result
    return result'

onNotebookCreateWindow :: (GObject a, MonadIO m) => a -> NotebookCreateWindowCallback -> m SignalHandlerId
onNotebookCreateWindow obj cb = liftIO $ connectNotebookCreateWindow obj cb SignalConnectBefore
afterNotebookCreateWindow :: (GObject a, MonadIO m) => a -> NotebookCreateWindowCallback -> m SignalHandlerId
afterNotebookCreateWindow obj cb = connectNotebookCreateWindow obj cb SignalConnectAfter

connectNotebookCreateWindow :: (GObject a, MonadIO m) =>
                               a -> NotebookCreateWindowCallback -> SignalConnectMode -> m SignalHandlerId
connectNotebookCreateWindow obj cb after = liftIO $ do
    cb' <- mkNotebookCreateWindowCallback (notebookCreateWindowCallbackWrapper cb)
    connectSignalFunPtr obj "create-window" cb' after

-- signal Notebook::focus-tab
type NotebookFocusTabCallback =
    NotebookTab ->
    IO Bool

noNotebookFocusTabCallback :: Maybe NotebookFocusTabCallback
noNotebookFocusTabCallback = Nothing

type NotebookFocusTabCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkNotebookFocusTabCallback :: NotebookFocusTabCallbackC -> IO (FunPtr NotebookFocusTabCallbackC)

notebookFocusTabClosure :: NotebookFocusTabCallback -> IO Closure
notebookFocusTabClosure cb = newCClosure =<< mkNotebookFocusTabCallback wrapped
    where wrapped = notebookFocusTabCallbackWrapper cb

notebookFocusTabCallbackWrapper ::
    NotebookFocusTabCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO CInt
notebookFocusTabCallbackWrapper _cb _ object _ = do
    let object' = (toEnum . fromIntegral) object
    result <- _cb  object'
    let result' = (fromIntegral . fromEnum) result
    return result'

onNotebookFocusTab :: (GObject a, MonadIO m) => a -> NotebookFocusTabCallback -> m SignalHandlerId
onNotebookFocusTab obj cb = liftIO $ connectNotebookFocusTab obj cb SignalConnectBefore
afterNotebookFocusTab :: (GObject a, MonadIO m) => a -> NotebookFocusTabCallback -> m SignalHandlerId
afterNotebookFocusTab obj cb = connectNotebookFocusTab obj cb SignalConnectAfter

connectNotebookFocusTab :: (GObject a, MonadIO m) =>
                           a -> NotebookFocusTabCallback -> SignalConnectMode -> m SignalHandlerId
connectNotebookFocusTab obj cb after = liftIO $ do
    cb' <- mkNotebookFocusTabCallback (notebookFocusTabCallbackWrapper cb)
    connectSignalFunPtr obj "focus-tab" cb' after

-- signal Notebook::move-focus-out
type NotebookMoveFocusOutCallback =
    DirectionType ->
    IO ()

noNotebookMoveFocusOutCallback :: Maybe NotebookMoveFocusOutCallback
noNotebookMoveFocusOutCallback = Nothing

type NotebookMoveFocusOutCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkNotebookMoveFocusOutCallback :: NotebookMoveFocusOutCallbackC -> IO (FunPtr NotebookMoveFocusOutCallbackC)

notebookMoveFocusOutClosure :: NotebookMoveFocusOutCallback -> IO Closure
notebookMoveFocusOutClosure cb = newCClosure =<< mkNotebookMoveFocusOutCallback wrapped
    where wrapped = notebookMoveFocusOutCallbackWrapper cb

notebookMoveFocusOutCallbackWrapper ::
    NotebookMoveFocusOutCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
notebookMoveFocusOutCallbackWrapper _cb _ object _ = do
    let object' = (toEnum . fromIntegral) object
    _cb  object'

onNotebookMoveFocusOut :: (GObject a, MonadIO m) => a -> NotebookMoveFocusOutCallback -> m SignalHandlerId
onNotebookMoveFocusOut obj cb = liftIO $ connectNotebookMoveFocusOut obj cb SignalConnectBefore
afterNotebookMoveFocusOut :: (GObject a, MonadIO m) => a -> NotebookMoveFocusOutCallback -> m SignalHandlerId
afterNotebookMoveFocusOut obj cb = connectNotebookMoveFocusOut obj cb SignalConnectAfter

connectNotebookMoveFocusOut :: (GObject a, MonadIO m) =>
                               a -> NotebookMoveFocusOutCallback -> SignalConnectMode -> m SignalHandlerId
connectNotebookMoveFocusOut obj cb after = liftIO $ do
    cb' <- mkNotebookMoveFocusOutCallback (notebookMoveFocusOutCallbackWrapper cb)
    connectSignalFunPtr obj "move-focus-out" cb' after

-- signal Notebook::page-added
type NotebookPageAddedCallback =
    Widget ->
    Word32 ->
    IO ()

noNotebookPageAddedCallback :: Maybe NotebookPageAddedCallback
noNotebookPageAddedCallback = Nothing

type NotebookPageAddedCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkNotebookPageAddedCallback :: NotebookPageAddedCallbackC -> IO (FunPtr NotebookPageAddedCallbackC)

notebookPageAddedClosure :: NotebookPageAddedCallback -> IO Closure
notebookPageAddedClosure cb = newCClosure =<< mkNotebookPageAddedCallback wrapped
    where wrapped = notebookPageAddedCallbackWrapper cb

notebookPageAddedCallbackWrapper ::
    NotebookPageAddedCallback ->
    Ptr () ->
    Ptr Widget ->
    Word32 ->
    Ptr () ->
    IO ()
notebookPageAddedCallbackWrapper _cb _ child page_num _ = do
    child' <- (newObject Widget) child
    _cb  child' page_num

onNotebookPageAdded :: (GObject a, MonadIO m) => a -> NotebookPageAddedCallback -> m SignalHandlerId
onNotebookPageAdded obj cb = liftIO $ connectNotebookPageAdded obj cb SignalConnectBefore
afterNotebookPageAdded :: (GObject a, MonadIO m) => a -> NotebookPageAddedCallback -> m SignalHandlerId
afterNotebookPageAdded obj cb = connectNotebookPageAdded obj cb SignalConnectAfter

connectNotebookPageAdded :: (GObject a, MonadIO m) =>
                            a -> NotebookPageAddedCallback -> SignalConnectMode -> m SignalHandlerId
connectNotebookPageAdded obj cb after = liftIO $ do
    cb' <- mkNotebookPageAddedCallback (notebookPageAddedCallbackWrapper cb)
    connectSignalFunPtr obj "page-added" cb' after

-- signal Notebook::page-removed
type NotebookPageRemovedCallback =
    Widget ->
    Word32 ->
    IO ()

noNotebookPageRemovedCallback :: Maybe NotebookPageRemovedCallback
noNotebookPageRemovedCallback = Nothing

type NotebookPageRemovedCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkNotebookPageRemovedCallback :: NotebookPageRemovedCallbackC -> IO (FunPtr NotebookPageRemovedCallbackC)

notebookPageRemovedClosure :: NotebookPageRemovedCallback -> IO Closure
notebookPageRemovedClosure cb = newCClosure =<< mkNotebookPageRemovedCallback wrapped
    where wrapped = notebookPageRemovedCallbackWrapper cb

notebookPageRemovedCallbackWrapper ::
    NotebookPageRemovedCallback ->
    Ptr () ->
    Ptr Widget ->
    Word32 ->
    Ptr () ->
    IO ()
notebookPageRemovedCallbackWrapper _cb _ child page_num _ = do
    child' <- (newObject Widget) child
    _cb  child' page_num

onNotebookPageRemoved :: (GObject a, MonadIO m) => a -> NotebookPageRemovedCallback -> m SignalHandlerId
onNotebookPageRemoved obj cb = liftIO $ connectNotebookPageRemoved obj cb SignalConnectBefore
afterNotebookPageRemoved :: (GObject a, MonadIO m) => a -> NotebookPageRemovedCallback -> m SignalHandlerId
afterNotebookPageRemoved obj cb = connectNotebookPageRemoved obj cb SignalConnectAfter

connectNotebookPageRemoved :: (GObject a, MonadIO m) =>
                              a -> NotebookPageRemovedCallback -> SignalConnectMode -> m SignalHandlerId
connectNotebookPageRemoved obj cb after = liftIO $ do
    cb' <- mkNotebookPageRemovedCallback (notebookPageRemovedCallbackWrapper cb)
    connectSignalFunPtr obj "page-removed" cb' after

-- signal Notebook::page-reordered
type NotebookPageReorderedCallback =
    Widget ->
    Word32 ->
    IO ()

noNotebookPageReorderedCallback :: Maybe NotebookPageReorderedCallback
noNotebookPageReorderedCallback = Nothing

type NotebookPageReorderedCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkNotebookPageReorderedCallback :: NotebookPageReorderedCallbackC -> IO (FunPtr NotebookPageReorderedCallbackC)

notebookPageReorderedClosure :: NotebookPageReorderedCallback -> IO Closure
notebookPageReorderedClosure cb = newCClosure =<< mkNotebookPageReorderedCallback wrapped
    where wrapped = notebookPageReorderedCallbackWrapper cb

notebookPageReorderedCallbackWrapper ::
    NotebookPageReorderedCallback ->
    Ptr () ->
    Ptr Widget ->
    Word32 ->
    Ptr () ->
    IO ()
notebookPageReorderedCallbackWrapper _cb _ child page_num _ = do
    child' <- (newObject Widget) child
    _cb  child' page_num

onNotebookPageReordered :: (GObject a, MonadIO m) => a -> NotebookPageReorderedCallback -> m SignalHandlerId
onNotebookPageReordered obj cb = liftIO $ connectNotebookPageReordered obj cb SignalConnectBefore
afterNotebookPageReordered :: (GObject a, MonadIO m) => a -> NotebookPageReorderedCallback -> m SignalHandlerId
afterNotebookPageReordered obj cb = connectNotebookPageReordered obj cb SignalConnectAfter

connectNotebookPageReordered :: (GObject a, MonadIO m) =>
                                a -> NotebookPageReorderedCallback -> SignalConnectMode -> m SignalHandlerId
connectNotebookPageReordered obj cb after = liftIO $ do
    cb' <- mkNotebookPageReorderedCallback (notebookPageReorderedCallbackWrapper cb)
    connectSignalFunPtr obj "page-reordered" cb' after

-- signal Notebook::reorder-tab
type NotebookReorderTabCallback =
    DirectionType ->
    Bool ->
    IO Bool

noNotebookReorderTabCallback :: Maybe NotebookReorderTabCallback
noNotebookReorderTabCallback = Nothing

type NotebookReorderTabCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    CInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkNotebookReorderTabCallback :: NotebookReorderTabCallbackC -> IO (FunPtr NotebookReorderTabCallbackC)

notebookReorderTabClosure :: NotebookReorderTabCallback -> IO Closure
notebookReorderTabClosure cb = newCClosure =<< mkNotebookReorderTabCallback wrapped
    where wrapped = notebookReorderTabCallbackWrapper cb

notebookReorderTabCallbackWrapper ::
    NotebookReorderTabCallback ->
    Ptr () ->
    CUInt ->
    CInt ->
    Ptr () ->
    IO CInt
notebookReorderTabCallbackWrapper _cb _ object p0 _ = do
    let object' = (toEnum . fromIntegral) object
    let p0' = (/= 0) p0
    result <- _cb  object' p0'
    let result' = (fromIntegral . fromEnum) result
    return result'

onNotebookReorderTab :: (GObject a, MonadIO m) => a -> NotebookReorderTabCallback -> m SignalHandlerId
onNotebookReorderTab obj cb = liftIO $ connectNotebookReorderTab obj cb SignalConnectBefore
afterNotebookReorderTab :: (GObject a, MonadIO m) => a -> NotebookReorderTabCallback -> m SignalHandlerId
afterNotebookReorderTab obj cb = connectNotebookReorderTab obj cb SignalConnectAfter

connectNotebookReorderTab :: (GObject a, MonadIO m) =>
                             a -> NotebookReorderTabCallback -> SignalConnectMode -> m SignalHandlerId
connectNotebookReorderTab obj cb after = liftIO $ do
    cb' <- mkNotebookReorderTabCallback (notebookReorderTabCallbackWrapper cb)
    connectSignalFunPtr obj "reorder-tab" cb' after

-- signal Notebook::select-page
type NotebookSelectPageCallback =
    Bool ->
    IO Bool

noNotebookSelectPageCallback :: Maybe NotebookSelectPageCallback
noNotebookSelectPageCallback = Nothing

type NotebookSelectPageCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkNotebookSelectPageCallback :: NotebookSelectPageCallbackC -> IO (FunPtr NotebookSelectPageCallbackC)

notebookSelectPageClosure :: NotebookSelectPageCallback -> IO Closure
notebookSelectPageClosure cb = newCClosure =<< mkNotebookSelectPageCallback wrapped
    where wrapped = notebookSelectPageCallbackWrapper cb

notebookSelectPageCallbackWrapper ::
    NotebookSelectPageCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO CInt
notebookSelectPageCallbackWrapper _cb _ object _ = do
    let object' = (/= 0) object
    result <- _cb  object'
    let result' = (fromIntegral . fromEnum) result
    return result'

onNotebookSelectPage :: (GObject a, MonadIO m) => a -> NotebookSelectPageCallback -> m SignalHandlerId
onNotebookSelectPage obj cb = liftIO $ connectNotebookSelectPage obj cb SignalConnectBefore
afterNotebookSelectPage :: (GObject a, MonadIO m) => a -> NotebookSelectPageCallback -> m SignalHandlerId
afterNotebookSelectPage obj cb = connectNotebookSelectPage obj cb SignalConnectAfter

connectNotebookSelectPage :: (GObject a, MonadIO m) =>
                             a -> NotebookSelectPageCallback -> SignalConnectMode -> m SignalHandlerId
connectNotebookSelectPage obj cb after = liftIO $ do
    cb' <- mkNotebookSelectPageCallback (notebookSelectPageCallbackWrapper cb)
    connectSignalFunPtr obj "select-page" cb' after

-- signal Notebook::switch-page
type NotebookSwitchPageCallback =
    Widget ->
    Word32 ->
    IO ()

noNotebookSwitchPageCallback :: Maybe NotebookSwitchPageCallback
noNotebookSwitchPageCallback = Nothing

type NotebookSwitchPageCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkNotebookSwitchPageCallback :: NotebookSwitchPageCallbackC -> IO (FunPtr NotebookSwitchPageCallbackC)

notebookSwitchPageClosure :: NotebookSwitchPageCallback -> IO Closure
notebookSwitchPageClosure cb = newCClosure =<< mkNotebookSwitchPageCallback wrapped
    where wrapped = notebookSwitchPageCallbackWrapper cb

notebookSwitchPageCallbackWrapper ::
    NotebookSwitchPageCallback ->
    Ptr () ->
    Ptr Widget ->
    Word32 ->
    Ptr () ->
    IO ()
notebookSwitchPageCallbackWrapper _cb _ page page_num _ = do
    page' <- (newObject Widget) page
    _cb  page' page_num

onNotebookSwitchPage :: (GObject a, MonadIO m) => a -> NotebookSwitchPageCallback -> m SignalHandlerId
onNotebookSwitchPage obj cb = liftIO $ connectNotebookSwitchPage obj cb SignalConnectBefore
afterNotebookSwitchPage :: (GObject a, MonadIO m) => a -> NotebookSwitchPageCallback -> m SignalHandlerId
afterNotebookSwitchPage obj cb = connectNotebookSwitchPage obj cb SignalConnectAfter

connectNotebookSwitchPage :: (GObject a, MonadIO m) =>
                             a -> NotebookSwitchPageCallback -> SignalConnectMode -> m SignalHandlerId
connectNotebookSwitchPage obj cb after = liftIO $ do
    cb' <- mkNotebookSwitchPageCallback (notebookSwitchPageCallbackWrapper cb)
    connectSignalFunPtr obj "switch-page" cb' after

-- object NotebookAccessible 
newtype NotebookAccessible = NotebookAccessible (ForeignPtr NotebookAccessible)
noNotebookAccessible :: Maybe NotebookAccessible
noNotebookAccessible = Nothing

foreign import ccall "gtk_notebook_accessible_get_type"
    c_gtk_notebook_accessible_get_type :: IO GType

type instance ParentTypes NotebookAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Selection]

instance GObject NotebookAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_notebook_accessible_get_type
    

class GObject o => NotebookAccessibleK o
instance (GObject o, IsDescendantOf NotebookAccessible o) => NotebookAccessibleK o

toNotebookAccessible :: NotebookAccessibleK o => o -> IO NotebookAccessible
toNotebookAccessible = unsafeCastTo NotebookAccessible

-- object NotebookPageAccessible 
newtype NotebookPageAccessible = NotebookPageAccessible (ForeignPtr NotebookPageAccessible)
noNotebookPageAccessible :: Maybe NotebookPageAccessible
noNotebookPageAccessible = Nothing

foreign import ccall "gtk_notebook_page_accessible_get_type"
    c_gtk_notebook_page_accessible_get_type :: IO GType

type instance ParentTypes NotebookPageAccessible = '[Atk.Object, GObject.Object, Atk.Component]

instance GObject NotebookPageAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_notebook_page_accessible_get_type
    

class GObject o => NotebookPageAccessibleK o
instance (GObject o, IsDescendantOf NotebookPageAccessible o) => NotebookPageAccessibleK o

toNotebookPageAccessible :: NotebookPageAccessibleK o => o -> IO NotebookPageAccessible
toNotebookPageAccessible = unsafeCastTo NotebookPageAccessible

-- method NotebookPageAccessible::new
-- method type : Constructor
-- Args : [Arg {argName = "notebook", argType = TInterface "Gtk" "NotebookAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "notebook", argType = TInterface "Gtk" "NotebookAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "NotebookPageAccessible"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_page_accessible_new" gtk_notebook_page_accessible_new :: 
    Ptr NotebookAccessible ->               -- notebook : TInterface "Gtk" "NotebookAccessible"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO (Ptr NotebookPageAccessible)


notebookPageAccessibleNew ::
    (MonadIO m, NotebookAccessibleK a, WidgetK b) =>
    a ->                                    -- notebook
    b ->                                    -- child
    m NotebookPageAccessible
notebookPageAccessibleNew notebook child = liftIO $ do
    let notebook' = unsafeManagedPtrCastPtr notebook
    let child' = unsafeManagedPtrCastPtr child
    result <- gtk_notebook_page_accessible_new notebook' child'
    checkUnexpectedReturnNULL "gtk_notebook_page_accessible_new" result
    result' <- (wrapObject NotebookPageAccessible) result
    touchManagedPtr notebook
    touchManagedPtr child
    return result'

-- method NotebookPageAccessible::invalidate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "NotebookPageAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "NotebookPageAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_notebook_page_accessible_invalidate" gtk_notebook_page_accessible_invalidate :: 
    Ptr NotebookPageAccessible ->           -- _obj : TInterface "Gtk" "NotebookPageAccessible"
    IO ()


notebookPageAccessibleInvalidate ::
    (MonadIO m, NotebookPageAccessibleK a) =>
    a ->                                    -- _obj
    m ()
notebookPageAccessibleInvalidate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_notebook_page_accessible_invalidate _obj'
    touchManagedPtr _obj
    return ()

-- Enum NotebookTab

data NotebookTab = 
      NotebookTabFirst
    | NotebookTabLast
    | AnotherNotebookTab Int
    deriving (Show, Eq)

instance Enum NotebookTab where
    fromEnum NotebookTabFirst = 0
    fromEnum NotebookTabLast = 1
    fromEnum (AnotherNotebookTab k) = k

    toEnum 0 = NotebookTabFirst
    toEnum 1 = NotebookTabLast
    toEnum k = AnotherNotebookTab k

foreign import ccall "gtk_notebook_tab_get_type" c_gtk_notebook_tab_get_type :: 
    IO GType

instance BoxedEnum NotebookTab where
    boxedEnumType _ = c_gtk_notebook_tab_get_type

-- Enum NumberUpLayout

data NumberUpLayout = 
      NumberUpLayoutLrtb
    | NumberUpLayoutLrbt
    | NumberUpLayoutRltb
    | NumberUpLayoutRlbt
    | NumberUpLayoutTblr
    | NumberUpLayoutTbrl
    | NumberUpLayoutBtlr
    | NumberUpLayoutBtrl
    | AnotherNumberUpLayout Int
    deriving (Show, Eq)

instance Enum NumberUpLayout where
    fromEnum NumberUpLayoutLrtb = 0
    fromEnum NumberUpLayoutLrbt = 1
    fromEnum NumberUpLayoutRltb = 2
    fromEnum NumberUpLayoutRlbt = 3
    fromEnum NumberUpLayoutTblr = 4
    fromEnum NumberUpLayoutTbrl = 5
    fromEnum NumberUpLayoutBtlr = 6
    fromEnum NumberUpLayoutBtrl = 7
    fromEnum (AnotherNumberUpLayout k) = k

    toEnum 0 = NumberUpLayoutLrtb
    toEnum 1 = NumberUpLayoutLrbt
    toEnum 2 = NumberUpLayoutRltb
    toEnum 3 = NumberUpLayoutRlbt
    toEnum 4 = NumberUpLayoutTblr
    toEnum 5 = NumberUpLayoutTbrl
    toEnum 6 = NumberUpLayoutBtlr
    toEnum 7 = NumberUpLayoutBtrl
    toEnum k = AnotherNumberUpLayout k

foreign import ccall "gtk_number_up_layout_get_type" c_gtk_number_up_layout_get_type :: 
    IO GType

instance BoxedEnum NumberUpLayout where
    boxedEnumType _ = c_gtk_number_up_layout_get_type

-- object NumerableIcon 
newtype NumerableIcon = NumerableIcon (ForeignPtr NumerableIcon)
noNumerableIcon :: Maybe NumerableIcon
noNumerableIcon = Nothing

foreign import ccall "gtk_numerable_icon_get_type"
    c_gtk_numerable_icon_get_type :: IO GType

type instance ParentTypes NumerableIcon = '[Gio.EmblemedIcon, GObject.Object, Gio.Icon]

instance GObject NumerableIcon where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_numerable_icon_get_type
    

class GObject o => NumerableIconK o
instance (GObject o, IsDescendantOf NumerableIcon o) => NumerableIconK o

toNumerableIcon :: NumerableIconK o => o -> IO NumerableIcon
toNumerableIcon = unsafeCastTo NumerableIcon

-- method NumerableIcon::get_background_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_get_background_gicon" gtk_numerable_icon_get_background_gicon :: 
    Ptr NumerableIcon ->                    -- _obj : TInterface "Gtk" "NumerableIcon"
    IO (Ptr Gio.Icon)

{-# DEPRECATED numerableIconGetBackgroundGicon ["(Since version 3.14)"]#-}
numerableIconGetBackgroundGicon ::
    (MonadIO m, NumerableIconK a) =>
    a ->                                    -- _obj
    m Gio.Icon
numerableIconGetBackgroundGicon _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_numerable_icon_get_background_gicon _obj'
    checkUnexpectedReturnNULL "gtk_numerable_icon_get_background_gicon" result
    result' <- (newObject Gio.Icon) result
    touchManagedPtr _obj
    return result'

-- method NumerableIcon::get_background_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_get_background_icon_name" gtk_numerable_icon_get_background_icon_name :: 
    Ptr NumerableIcon ->                    -- _obj : TInterface "Gtk" "NumerableIcon"
    IO CString

{-# DEPRECATED numerableIconGetBackgroundIconName ["(Since version 3.14)"]#-}
numerableIconGetBackgroundIconName ::
    (MonadIO m, NumerableIconK a) =>
    a ->                                    -- _obj
    m T.Text
numerableIconGetBackgroundIconName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_numerable_icon_get_background_icon_name _obj'
    checkUnexpectedReturnNULL "gtk_numerable_icon_get_background_icon_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method NumerableIcon::get_count
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_get_count" gtk_numerable_icon_get_count :: 
    Ptr NumerableIcon ->                    -- _obj : TInterface "Gtk" "NumerableIcon"
    IO Int32

{-# DEPRECATED numerableIconGetCount ["(Since version 3.14)"]#-}
numerableIconGetCount ::
    (MonadIO m, NumerableIconK a) =>
    a ->                                    -- _obj
    m Int32
numerableIconGetCount _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_numerable_icon_get_count _obj'
    touchManagedPtr _obj
    return result

-- method NumerableIcon::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_get_label" gtk_numerable_icon_get_label :: 
    Ptr NumerableIcon ->                    -- _obj : TInterface "Gtk" "NumerableIcon"
    IO CString

{-# DEPRECATED numerableIconGetLabel ["(Since version 3.14)"]#-}
numerableIconGetLabel ::
    (MonadIO m, NumerableIconK a) =>
    a ->                                    -- _obj
    m T.Text
numerableIconGetLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_numerable_icon_get_label _obj'
    checkUnexpectedReturnNULL "gtk_numerable_icon_get_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method NumerableIcon::get_style_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StyleContext"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_get_style_context" gtk_numerable_icon_get_style_context :: 
    Ptr NumerableIcon ->                    -- _obj : TInterface "Gtk" "NumerableIcon"
    IO (Ptr StyleContext)

{-# DEPRECATED numerableIconGetStyleContext ["(Since version 3.14)"]#-}
numerableIconGetStyleContext ::
    (MonadIO m, NumerableIconK a) =>
    a ->                                    -- _obj
    m StyleContext
numerableIconGetStyleContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_numerable_icon_get_style_context _obj'
    checkUnexpectedReturnNULL "gtk_numerable_icon_get_style_context" result
    result' <- (newObject StyleContext) result
    touchManagedPtr _obj
    return result'

-- method NumerableIcon::set_background_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_set_background_gicon" gtk_numerable_icon_set_background_gicon :: 
    Ptr NumerableIcon ->                    -- _obj : TInterface "Gtk" "NumerableIcon"
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    IO ()

{-# DEPRECATED numerableIconSetBackgroundGicon ["(Since version 3.14)"]#-}
numerableIconSetBackgroundGicon ::
    (MonadIO m, NumerableIconK a, Gio.IconK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- icon
    m ()
numerableIconSetBackgroundGicon _obj icon = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeIcon <- case icon of
        Nothing -> return nullPtr
        Just jIcon -> do
            let jIcon' = unsafeManagedPtrCastPtr jIcon
            return jIcon'
    gtk_numerable_icon_set_background_gicon _obj' maybeIcon
    touchManagedPtr _obj
    whenJust icon touchManagedPtr
    return ()

-- method NumerableIcon::set_background_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_set_background_icon_name" gtk_numerable_icon_set_background_icon_name :: 
    Ptr NumerableIcon ->                    -- _obj : TInterface "Gtk" "NumerableIcon"
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()

{-# DEPRECATED numerableIconSetBackgroundIconName ["(Since version 3.14)"]#-}
numerableIconSetBackgroundIconName ::
    (MonadIO m, NumerableIconK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- icon_name
    m ()
numerableIconSetBackgroundIconName _obj icon_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeIcon_name <- case icon_name of
        Nothing -> return nullPtr
        Just jIcon_name -> do
            jIcon_name' <- textToCString jIcon_name
            return jIcon_name'
    gtk_numerable_icon_set_background_icon_name _obj' maybeIcon_name
    touchManagedPtr _obj
    freeMem maybeIcon_name
    return ()

-- method NumerableIcon::set_count
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_set_count" gtk_numerable_icon_set_count :: 
    Ptr NumerableIcon ->                    -- _obj : TInterface "Gtk" "NumerableIcon"
    Int32 ->                                -- count : TBasicType TInt32
    IO ()

{-# DEPRECATED numerableIconSetCount ["(Since version 3.14)"]#-}
numerableIconSetCount ::
    (MonadIO m, NumerableIconK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- count
    m ()
numerableIconSetCount _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_numerable_icon_set_count _obj' count
    touchManagedPtr _obj
    return ()

-- method NumerableIcon::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_set_label" gtk_numerable_icon_set_label :: 
    Ptr NumerableIcon ->                    -- _obj : TInterface "Gtk" "NumerableIcon"
    CString ->                              -- label : TBasicType TUTF8
    IO ()

{-# DEPRECATED numerableIconSetLabel ["(Since version 3.14)"]#-}
numerableIconSetLabel ::
    (MonadIO m, NumerableIconK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- label
    m ()
numerableIconSetLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    gtk_numerable_icon_set_label _obj' maybeLabel
    touchManagedPtr _obj
    freeMem maybeLabel
    return ()

-- method NumerableIcon::set_style_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "NumerableIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_set_style_context" gtk_numerable_icon_set_style_context :: 
    Ptr NumerableIcon ->                    -- _obj : TInterface "Gtk" "NumerableIcon"
    Ptr StyleContext ->                     -- style : TInterface "Gtk" "StyleContext"
    IO ()

{-# DEPRECATED numerableIconSetStyleContext ["(Since version 3.14)"]#-}
numerableIconSetStyleContext ::
    (MonadIO m, NumerableIconK a, StyleContextK b) =>
    a ->                                    -- _obj
    b ->                                    -- style
    m ()
numerableIconSetStyleContext _obj style = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let style' = unsafeManagedPtrCastPtr style
    gtk_numerable_icon_set_style_context _obj' style'
    touchManagedPtr _obj
    touchManagedPtr style
    return ()

-- method NumerableIcon::new
-- method type : MemberFunction
-- Args : [Arg {argName = "base_icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "base_icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_new" gtk_numerable_icon_new :: 
    Ptr Gio.Icon ->                         -- base_icon : TInterface "Gio" "Icon"
    IO (Ptr Gio.Icon)

{-# DEPRECATED numerableIconNew ["(Since version 3.14)"]#-}
numerableIconNew ::
    (MonadIO m, Gio.IconK a) =>
    a ->                                    -- base_icon
    m Gio.Icon
numerableIconNew base_icon = liftIO $ do
    let base_icon' = unsafeManagedPtrCastPtr base_icon
    result <- gtk_numerable_icon_new base_icon'
    checkUnexpectedReturnNULL "gtk_numerable_icon_new" result
    result' <- (wrapObject Gio.Icon) result
    touchManagedPtr base_icon
    return result'

-- method NumerableIcon::new_with_style_context
-- method type : MemberFunction
-- Args : [Arg {argName = "base_icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "base_icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_new_with_style_context" gtk_numerable_icon_new_with_style_context :: 
    Ptr Gio.Icon ->                         -- base_icon : TInterface "Gio" "Icon"
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    IO (Ptr Gio.Icon)

{-# DEPRECATED numerableIconNewWithStyleContext ["(Since version 3.14)"]#-}
numerableIconNewWithStyleContext ::
    (MonadIO m, Gio.IconK a, StyleContextK b) =>
    a ->                                    -- base_icon
    b ->                                    -- context
    m Gio.Icon
numerableIconNewWithStyleContext base_icon context = liftIO $ do
    let base_icon' = unsafeManagedPtrCastPtr base_icon
    let context' = unsafeManagedPtrCastPtr context
    result <- gtk_numerable_icon_new_with_style_context base_icon' context'
    checkUnexpectedReturnNULL "gtk_numerable_icon_new_with_style_context" result
    result' <- (wrapObject Gio.Icon) result
    touchManagedPtr base_icon
    touchManagedPtr context
    return result'

-- object OffscreenWindow 
newtype OffscreenWindow = OffscreenWindow (ForeignPtr OffscreenWindow)
noOffscreenWindow :: Maybe OffscreenWindow
noOffscreenWindow = Nothing

foreign import ccall "gtk_offscreen_window_get_type"
    c_gtk_offscreen_window_get_type :: IO GType

type instance ParentTypes OffscreenWindow = '[Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject OffscreenWindow where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_offscreen_window_get_type
    

class GObject o => OffscreenWindowK o
instance (GObject o, IsDescendantOf OffscreenWindow o) => OffscreenWindowK o

toOffscreenWindow :: OffscreenWindowK o => o -> IO OffscreenWindow
toOffscreenWindow = unsafeCastTo OffscreenWindow

-- method OffscreenWindow::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "OffscreenWindow"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_offscreen_window_new" gtk_offscreen_window_new :: 
    IO (Ptr OffscreenWindow)


offscreenWindowNew ::
    (MonadIO m) =>
    m OffscreenWindow
offscreenWindowNew  = liftIO $ do
    result <- gtk_offscreen_window_new
    checkUnexpectedReturnNULL "gtk_offscreen_window_new" result
    result' <- (newObject OffscreenWindow) result
    return result'

-- method OffscreenWindow::get_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "OffscreenWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "OffscreenWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_offscreen_window_get_pixbuf" gtk_offscreen_window_get_pixbuf :: 
    Ptr OffscreenWindow ->                  -- _obj : TInterface "Gtk" "OffscreenWindow"
    IO (Ptr GdkPixbuf.Pixbuf)


offscreenWindowGetPixbuf ::
    (MonadIO m, OffscreenWindowK a) =>
    a ->                                    -- _obj
    m GdkPixbuf.Pixbuf
offscreenWindowGetPixbuf _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_offscreen_window_get_pixbuf _obj'
    checkUnexpectedReturnNULL "gtk_offscreen_window_get_pixbuf" result
    result' <- (wrapObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method OffscreenWindow::get_surface
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "OffscreenWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "OffscreenWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Surface"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_offscreen_window_get_surface" gtk_offscreen_window_get_surface :: 
    Ptr OffscreenWindow ->                  -- _obj : TInterface "Gtk" "OffscreenWindow"
    IO (Ptr Cairo.Surface)


offscreenWindowGetSurface ::
    (MonadIO m, OffscreenWindowK a) =>
    a ->                                    -- _obj
    m Cairo.Surface
offscreenWindowGetSurface _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_offscreen_window_get_surface _obj'
    checkUnexpectedReturnNULL "gtk_offscreen_window_get_surface" result
    result' <- (newBoxed Cairo.Surface) result
    touchManagedPtr _obj
    return result'

-- interface Orientable 

newtype Orientable = Orientable (ForeignPtr Orientable)
noOrientable :: Maybe Orientable
noOrientable = Nothing

foreign import ccall "gtk_orientable_get_type"
    c_gtk_orientable_get_type :: IO GType

type instance ParentTypes Orientable = '[GObject.Object]

instance GObject Orientable where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_orientable_get_type
    

class GObject o => OrientableK o
instance (GObject o, IsDescendantOf Orientable o) => OrientableK o

toOrientable :: OrientableK o => o -> IO Orientable
toOrientable = unsafeCastTo Orientable

-- method Orientable::get_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Orientable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Orientable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Orientation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_orientable_get_orientation" gtk_orientable_get_orientation :: 
    Ptr Orientable ->                       -- _obj : TInterface "Gtk" "Orientable"
    IO CUInt


orientableGetOrientation ::
    (MonadIO m, OrientableK a) =>
    a ->                                    -- _obj
    m Orientation
orientableGetOrientation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_orientable_get_orientation _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Orientable::set_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Orientable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Orientable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_orientable_set_orientation" gtk_orientable_set_orientation :: 
    Ptr Orientable ->                       -- _obj : TInterface "Gtk" "Orientable"
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    IO ()


orientableSetOrientation ::
    (MonadIO m, OrientableK a) =>
    a ->                                    -- _obj
    Orientation ->                          -- orientation
    m ()
orientableSetOrientation _obj orientation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let orientation' = (fromIntegral . fromEnum) orientation
    gtk_orientable_set_orientation _obj' orientation'
    touchManagedPtr _obj
    return ()

-- Enum Orientation

data Orientation = 
      OrientationHorizontal
    | OrientationVertical
    | AnotherOrientation Int
    deriving (Show, Eq)

instance Enum Orientation where
    fromEnum OrientationHorizontal = 0
    fromEnum OrientationVertical = 1
    fromEnum (AnotherOrientation k) = k

    toEnum 0 = OrientationHorizontal
    toEnum 1 = OrientationVertical
    toEnum k = AnotherOrientation k

foreign import ccall "gtk_orientation_get_type" c_gtk_orientation_get_type :: 
    IO GType

instance BoxedEnum Orientation where
    boxedEnumType _ = c_gtk_orientation_get_type

-- object Overlay 
newtype Overlay = Overlay (ForeignPtr Overlay)
noOverlay :: Maybe Overlay
noOverlay = Nothing

foreign import ccall "gtk_overlay_get_type"
    c_gtk_overlay_get_type :: IO GType

type instance ParentTypes Overlay = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Overlay where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_overlay_get_type
    

class GObject o => OverlayK o
instance (GObject o, IsDescendantOf Overlay o) => OverlayK o

toOverlay :: OverlayK o => o -> IO Overlay
toOverlay = unsafeCastTo Overlay

-- method Overlay::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Overlay"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_overlay_new" gtk_overlay_new :: 
    IO (Ptr Overlay)


overlayNew ::
    (MonadIO m) =>
    m Overlay
overlayNew  = liftIO $ do
    result <- gtk_overlay_new
    checkUnexpectedReturnNULL "gtk_overlay_new" result
    result' <- (newObject Overlay) result
    return result'

-- method Overlay::add_overlay
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Overlay", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Overlay", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_overlay_add_overlay" gtk_overlay_add_overlay :: 
    Ptr Overlay ->                          -- _obj : TInterface "Gtk" "Overlay"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


overlayAddOverlay ::
    (MonadIO m, OverlayK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    m ()
overlayAddOverlay _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_overlay_add_overlay _obj' widget'
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- method Overlay::get_overlay_pass_through
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Overlay", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Overlay", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_overlay_get_overlay_pass_through" gtk_overlay_get_overlay_pass_through :: 
    Ptr Overlay ->                          -- _obj : TInterface "Gtk" "Overlay"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO CInt


overlayGetOverlayPassThrough ::
    (MonadIO m, OverlayK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    m Bool
overlayGetOverlayPassThrough _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_overlay_get_overlay_pass_through _obj' widget'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr widget
    return result'

-- method Overlay::reorder_overlay
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Overlay", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Overlay", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_overlay_reorder_overlay" gtk_overlay_reorder_overlay :: 
    Ptr Overlay ->                          -- _obj : TInterface "Gtk" "Overlay"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


overlayReorderOverlay ::
    (MonadIO m, OverlayK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Int32 ->                                -- position
    m ()
overlayReorderOverlay _obj child position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_overlay_reorder_overlay _obj' child' position
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Overlay::set_overlay_pass_through
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Overlay", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pass_through", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Overlay", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pass_through", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_overlay_set_overlay_pass_through" gtk_overlay_set_overlay_pass_through :: 
    Ptr Overlay ->                          -- _obj : TInterface "Gtk" "Overlay"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CInt ->                                 -- pass_through : TBasicType TBoolean
    IO ()


overlaySetOverlayPassThrough ::
    (MonadIO m, OverlayK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    Bool ->                                 -- pass_through
    m ()
overlaySetOverlayPassThrough _obj widget pass_through = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    let pass_through' = (fromIntegral . fromEnum) pass_through
    gtk_overlay_set_overlay_pass_through _obj' widget' pass_through'
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- Enum PackDirection

data PackDirection = 
      PackDirectionLtr
    | PackDirectionRtl
    | PackDirectionTtb
    | PackDirectionBtt
    | AnotherPackDirection Int
    deriving (Show, Eq)

instance Enum PackDirection where
    fromEnum PackDirectionLtr = 0
    fromEnum PackDirectionRtl = 1
    fromEnum PackDirectionTtb = 2
    fromEnum PackDirectionBtt = 3
    fromEnum (AnotherPackDirection k) = k

    toEnum 0 = PackDirectionLtr
    toEnum 1 = PackDirectionRtl
    toEnum 2 = PackDirectionTtb
    toEnum 3 = PackDirectionBtt
    toEnum k = AnotherPackDirection k

foreign import ccall "gtk_pack_direction_get_type" c_gtk_pack_direction_get_type :: 
    IO GType

instance BoxedEnum PackDirection where
    boxedEnumType _ = c_gtk_pack_direction_get_type

-- Enum PackType

data PackType = 
      PackTypeStart
    | PackTypeEnd
    | AnotherPackType Int
    deriving (Show, Eq)

instance Enum PackType where
    fromEnum PackTypeStart = 0
    fromEnum PackTypeEnd = 1
    fromEnum (AnotherPackType k) = k

    toEnum 0 = PackTypeStart
    toEnum 1 = PackTypeEnd
    toEnum k = AnotherPackType k

foreign import ccall "gtk_pack_type_get_type" c_gtk_pack_type_get_type :: 
    IO GType

instance BoxedEnum PackType where
    boxedEnumType _ = c_gtk_pack_type_get_type

-- Enum PageOrientation

data PageOrientation = 
      PageOrientationPortrait
    | PageOrientationLandscape
    | PageOrientationReversePortrait
    | PageOrientationReverseLandscape
    | AnotherPageOrientation Int
    deriving (Show, Eq)

instance Enum PageOrientation where
    fromEnum PageOrientationPortrait = 0
    fromEnum PageOrientationLandscape = 1
    fromEnum PageOrientationReversePortrait = 2
    fromEnum PageOrientationReverseLandscape = 3
    fromEnum (AnotherPageOrientation k) = k

    toEnum 0 = PageOrientationPortrait
    toEnum 1 = PageOrientationLandscape
    toEnum 2 = PageOrientationReversePortrait
    toEnum 3 = PageOrientationReverseLandscape
    toEnum k = AnotherPageOrientation k

foreign import ccall "gtk_page_orientation_get_type" c_gtk_page_orientation_get_type :: 
    IO GType

instance BoxedEnum PageOrientation where
    boxedEnumType _ = c_gtk_page_orientation_get_type

-- struct PageRange
newtype PageRange = PageRange (ForeignPtr PageRange)
noPageRange :: Maybe PageRange
noPageRange = Nothing

pageRangeReadStart :: PageRange -> IO Int32
pageRangeReadStart s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Int32
    return val

pageRangeReadEnd :: PageRange -> IO Int32
pageRangeReadEnd s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO Int32
    return val

-- Enum PageSet

data PageSet = 
      PageSetAll
    | PageSetEven
    | PageSetOdd
    | AnotherPageSet Int
    deriving (Show, Eq)

instance Enum PageSet where
    fromEnum PageSetAll = 0
    fromEnum PageSetEven = 1
    fromEnum PageSetOdd = 2
    fromEnum (AnotherPageSet k) = k

    toEnum 0 = PageSetAll
    toEnum 1 = PageSetEven
    toEnum 2 = PageSetOdd
    toEnum k = AnotherPageSet k

foreign import ccall "gtk_page_set_get_type" c_gtk_page_set_get_type :: 
    IO GType

instance BoxedEnum PageSet where
    boxedEnumType _ = c_gtk_page_set_get_type

-- object PageSetup 
newtype PageSetup = PageSetup (ForeignPtr PageSetup)
noPageSetup :: Maybe PageSetup
noPageSetup = Nothing

foreign import ccall "gtk_page_setup_get_type"
    c_gtk_page_setup_get_type :: IO GType

type instance ParentTypes PageSetup = '[GObject.Object]

instance GObject PageSetup where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_page_setup_get_type
    

class GObject o => PageSetupK o
instance (GObject o, IsDescendantOf PageSetup o) => PageSetupK o

toPageSetup :: PageSetupK o => o -> IO PageSetup
toPageSetup = unsafeCastTo PageSetup

-- method PageSetup::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "PageSetup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_new" gtk_page_setup_new :: 
    IO (Ptr PageSetup)


pageSetupNew ::
    (MonadIO m) =>
    m PageSetup
pageSetupNew  = liftIO $ do
    result <- gtk_page_setup_new
    checkUnexpectedReturnNULL "gtk_page_setup_new" result
    result' <- (wrapObject PageSetup) result
    return result'

-- method PageSetup::new_from_file
-- method type : Constructor
-- Args : [Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PageSetup"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_page_setup_new_from_file" gtk_page_setup_new_from_file :: 
    CString ->                              -- file_name : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr PageSetup)


pageSetupNewFromFile ::
    (MonadIO m) =>
    [Char] ->                               -- file_name
    m PageSetup
pageSetupNewFromFile file_name = liftIO $ do
    file_name' <- stringToCString file_name
    onException (do
        result <- propagateGError $ gtk_page_setup_new_from_file file_name'
        checkUnexpectedReturnNULL "gtk_page_setup_new_from_file" result
        result' <- (wrapObject PageSetup) result
        freeMem file_name'
        return result'
     ) (do
        freeMem file_name'
     )

-- method PageSetup::new_from_key_file
-- method type : Constructor
-- Args : [Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PageSetup"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_page_setup_new_from_key_file" gtk_page_setup_new_from_key_file :: 
    Ptr GLib.KeyFile ->                     -- key_file : TInterface "GLib" "KeyFile"
    CString ->                              -- group_name : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr PageSetup)


pageSetupNewFromKeyFile ::
    (MonadIO m) =>
    GLib.KeyFile ->                         -- key_file
    Maybe (T.Text) ->                       -- group_name
    m PageSetup
pageSetupNewFromKeyFile key_file group_name = liftIO $ do
    let key_file' = unsafeManagedPtrGetPtr key_file
    maybeGroup_name <- case group_name of
        Nothing -> return nullPtr
        Just jGroup_name -> do
            jGroup_name' <- textToCString jGroup_name
            return jGroup_name'
    onException (do
        result <- propagateGError $ gtk_page_setup_new_from_key_file key_file' maybeGroup_name
        checkUnexpectedReturnNULL "gtk_page_setup_new_from_key_file" result
        result' <- (wrapObject PageSetup) result
        touchManagedPtr key_file
        freeMem maybeGroup_name
        return result'
     ) (do
        freeMem maybeGroup_name
     )

-- method PageSetup::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PageSetup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_copy" gtk_page_setup_copy :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    IO (Ptr PageSetup)


pageSetupCopy ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    m PageSetup
pageSetupCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_page_setup_copy _obj'
    checkUnexpectedReturnNULL "gtk_page_setup_copy" result
    result' <- (wrapObject PageSetup) result
    touchManagedPtr _obj
    return result'

-- method PageSetup::get_bottom_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_get_bottom_margin" gtk_page_setup_get_bottom_margin :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


pageSetupGetBottomMargin ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Unit ->                                 -- unit
    m Double
pageSetupGetBottomMargin _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_page_setup_get_bottom_margin _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PageSetup::get_left_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_get_left_margin" gtk_page_setup_get_left_margin :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


pageSetupGetLeftMargin ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Unit ->                                 -- unit
    m Double
pageSetupGetLeftMargin _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_page_setup_get_left_margin _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PageSetup::get_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PageOrientation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_get_orientation" gtk_page_setup_get_orientation :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    IO CUInt


pageSetupGetOrientation ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    m PageOrientation
pageSetupGetOrientation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_page_setup_get_orientation _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method PageSetup::get_page_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_get_page_height" gtk_page_setup_get_page_height :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


pageSetupGetPageHeight ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Unit ->                                 -- unit
    m Double
pageSetupGetPageHeight _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_page_setup_get_page_height _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PageSetup::get_page_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_get_page_width" gtk_page_setup_get_page_width :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


pageSetupGetPageWidth ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Unit ->                                 -- unit
    m Double
pageSetupGetPageWidth _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_page_setup_get_page_width _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PageSetup::get_paper_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_get_paper_height" gtk_page_setup_get_paper_height :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


pageSetupGetPaperHeight ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Unit ->                                 -- unit
    m Double
pageSetupGetPaperHeight _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_page_setup_get_paper_height _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PageSetup::get_paper_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PaperSize"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_get_paper_size" gtk_page_setup_get_paper_size :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    IO (Ptr PaperSize)


pageSetupGetPaperSize ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    m PaperSize
pageSetupGetPaperSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_page_setup_get_paper_size _obj'
    checkUnexpectedReturnNULL "gtk_page_setup_get_paper_size" result
    result' <- (newBoxed PaperSize) result
    touchManagedPtr _obj
    return result'

-- method PageSetup::get_paper_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_get_paper_width" gtk_page_setup_get_paper_width :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


pageSetupGetPaperWidth ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Unit ->                                 -- unit
    m Double
pageSetupGetPaperWidth _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_page_setup_get_paper_width _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PageSetup::get_right_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_get_right_margin" gtk_page_setup_get_right_margin :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


pageSetupGetRightMargin ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Unit ->                                 -- unit
    m Double
pageSetupGetRightMargin _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_page_setup_get_right_margin _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PageSetup::get_top_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_get_top_margin" gtk_page_setup_get_top_margin :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


pageSetupGetTopMargin ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Unit ->                                 -- unit
    m Double
pageSetupGetTopMargin _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_page_setup_get_top_margin _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PageSetup::load_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_page_setup_load_file" gtk_page_setup_load_file :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CString ->                              -- file_name : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO CInt


pageSetupLoadFile ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- file_name
    m ()
pageSetupLoadFile _obj file_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    file_name' <- stringToCString file_name
    onException (do
        _ <- propagateGError $ gtk_page_setup_load_file _obj' file_name'
        touchManagedPtr _obj
        freeMem file_name'
        return ()
     ) (do
        freeMem file_name'
     )

-- method PageSetup::load_key_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_page_setup_load_key_file" gtk_page_setup_load_key_file :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    Ptr GLib.KeyFile ->                     -- key_file : TInterface "GLib" "KeyFile"
    CString ->                              -- group_name : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt


pageSetupLoadKeyFile ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    GLib.KeyFile ->                         -- key_file
    Maybe (T.Text) ->                       -- group_name
    m ()
pageSetupLoadKeyFile _obj key_file group_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let key_file' = unsafeManagedPtrGetPtr key_file
    maybeGroup_name <- case group_name of
        Nothing -> return nullPtr
        Just jGroup_name -> do
            jGroup_name' <- textToCString jGroup_name
            return jGroup_name'
    onException (do
        _ <- propagateGError $ gtk_page_setup_load_key_file _obj' key_file' maybeGroup_name
        touchManagedPtr _obj
        touchManagedPtr key_file
        freeMem maybeGroup_name
        return ()
     ) (do
        freeMem maybeGroup_name
     )

-- method PageSetup::set_bottom_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_set_bottom_margin" gtk_page_setup_set_bottom_margin :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CDouble ->                              -- margin : TBasicType TDouble
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO ()


pageSetupSetBottomMargin ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Double ->                               -- margin
    Unit ->                                 -- unit
    m ()
pageSetupSetBottomMargin _obj margin unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let margin' = realToFrac margin
    let unit' = (fromIntegral . fromEnum) unit
    gtk_page_setup_set_bottom_margin _obj' margin' unit'
    touchManagedPtr _obj
    return ()

-- method PageSetup::set_left_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_set_left_margin" gtk_page_setup_set_left_margin :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CDouble ->                              -- margin : TBasicType TDouble
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO ()


pageSetupSetLeftMargin ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Double ->                               -- margin
    Unit ->                                 -- unit
    m ()
pageSetupSetLeftMargin _obj margin unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let margin' = realToFrac margin
    let unit' = (fromIntegral . fromEnum) unit
    gtk_page_setup_set_left_margin _obj' margin' unit'
    touchManagedPtr _obj
    return ()

-- method PageSetup::set_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "PageOrientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "PageOrientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_set_orientation" gtk_page_setup_set_orientation :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CUInt ->                                -- orientation : TInterface "Gtk" "PageOrientation"
    IO ()


pageSetupSetOrientation ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    PageOrientation ->                      -- orientation
    m ()
pageSetupSetOrientation _obj orientation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let orientation' = (fromIntegral . fromEnum) orientation
    gtk_page_setup_set_orientation _obj' orientation'
    touchManagedPtr _obj
    return ()

-- method PageSetup::set_paper_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_set_paper_size" gtk_page_setup_set_paper_size :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    Ptr PaperSize ->                        -- size : TInterface "Gtk" "PaperSize"
    IO ()


pageSetupSetPaperSize ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    PaperSize ->                            -- size
    m ()
pageSetupSetPaperSize _obj size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let size' = unsafeManagedPtrGetPtr size
    gtk_page_setup_set_paper_size _obj' size'
    touchManagedPtr _obj
    touchManagedPtr size
    return ()

-- method PageSetup::set_paper_size_and_default_margins
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_set_paper_size_and_default_margins" gtk_page_setup_set_paper_size_and_default_margins :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    Ptr PaperSize ->                        -- size : TInterface "Gtk" "PaperSize"
    IO ()


pageSetupSetPaperSizeAndDefaultMargins ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    PaperSize ->                            -- size
    m ()
pageSetupSetPaperSizeAndDefaultMargins _obj size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let size' = unsafeManagedPtrGetPtr size
    gtk_page_setup_set_paper_size_and_default_margins _obj' size'
    touchManagedPtr _obj
    touchManagedPtr size
    return ()

-- method PageSetup::set_right_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_set_right_margin" gtk_page_setup_set_right_margin :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CDouble ->                              -- margin : TBasicType TDouble
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO ()


pageSetupSetRightMargin ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Double ->                               -- margin
    Unit ->                                 -- unit
    m ()
pageSetupSetRightMargin _obj margin unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let margin' = realToFrac margin
    let unit' = (fromIntegral . fromEnum) unit
    gtk_page_setup_set_right_margin _obj' margin' unit'
    touchManagedPtr _obj
    return ()

-- method PageSetup::set_top_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_set_top_margin" gtk_page_setup_set_top_margin :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CDouble ->                              -- margin : TBasicType TDouble
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO ()


pageSetupSetTopMargin ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    Double ->                               -- margin
    Unit ->                                 -- unit
    m ()
pageSetupSetTopMargin _obj margin unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let margin' = realToFrac margin
    let unit' = (fromIntegral . fromEnum) unit
    gtk_page_setup_set_top_margin _obj' margin' unit'
    touchManagedPtr _obj
    return ()

-- method PageSetup::to_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_page_setup_to_file" gtk_page_setup_to_file :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    CString ->                              -- file_name : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO CInt


pageSetupToFile ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- file_name
    m ()
pageSetupToFile _obj file_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    file_name' <- stringToCString file_name
    onException (do
        _ <- propagateGError $ gtk_page_setup_to_file _obj' file_name'
        touchManagedPtr _obj
        freeMem file_name'
        return ()
     ) (do
        freeMem file_name'
     )

-- method PageSetup::to_key_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_page_setup_to_key_file" gtk_page_setup_to_key_file :: 
    Ptr PageSetup ->                        -- _obj : TInterface "Gtk" "PageSetup"
    Ptr GLib.KeyFile ->                     -- key_file : TInterface "GLib" "KeyFile"
    CString ->                              -- group_name : TBasicType TUTF8
    IO ()


pageSetupToKeyFile ::
    (MonadIO m, PageSetupK a) =>
    a ->                                    -- _obj
    GLib.KeyFile ->                         -- key_file
    T.Text ->                               -- group_name
    m ()
pageSetupToKeyFile _obj key_file group_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let key_file' = unsafeManagedPtrGetPtr key_file
    group_name' <- textToCString group_name
    gtk_page_setup_to_key_file _obj' key_file' group_name'
    touchManagedPtr _obj
    touchManagedPtr key_file
    freeMem group_name'
    return ()

-- callback PageSetupDoneFunc
pageSetupDoneFuncClosure :: PageSetupDoneFunc -> IO Closure
pageSetupDoneFuncClosure cb = newCClosure =<< mkPageSetupDoneFunc wrapped
    where wrapped = pageSetupDoneFuncWrapper Nothing cb

type PageSetupDoneFuncC =
    Ptr PageSetup ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkPageSetupDoneFunc :: PageSetupDoneFuncC -> IO (FunPtr PageSetupDoneFuncC)

type PageSetupDoneFunc =
    PageSetup ->
    IO ()

noPageSetupDoneFunc :: Maybe PageSetupDoneFunc
noPageSetupDoneFunc = Nothing

pageSetupDoneFuncWrapper ::
    Maybe (Ptr (FunPtr (PageSetupDoneFuncC))) ->
    PageSetupDoneFunc ->
    Ptr PageSetup ->
    Ptr () ->
    IO ()
pageSetupDoneFuncWrapper funptrptr _cb page_setup _ = do
    page_setup' <- (newObject PageSetup) page_setup
    _cb  page_setup'
    maybeReleaseFunPtr funptrptr

-- Enum PanDirection

data PanDirection = 
      PanDirectionLeft
    | PanDirectionRight
    | PanDirectionUp
    | PanDirectionDown
    | AnotherPanDirection Int
    deriving (Show, Eq)

instance Enum PanDirection where
    fromEnum PanDirectionLeft = 0
    fromEnum PanDirectionRight = 1
    fromEnum PanDirectionUp = 2
    fromEnum PanDirectionDown = 3
    fromEnum (AnotherPanDirection k) = k

    toEnum 0 = PanDirectionLeft
    toEnum 1 = PanDirectionRight
    toEnum 2 = PanDirectionUp
    toEnum 3 = PanDirectionDown
    toEnum k = AnotherPanDirection k

foreign import ccall "gtk_pan_direction_get_type" c_gtk_pan_direction_get_type :: 
    IO GType

instance BoxedEnum PanDirection where
    boxedEnumType _ = c_gtk_pan_direction_get_type

-- object Paned 
newtype Paned = Paned (ForeignPtr Paned)
noPaned :: Maybe Paned
noPaned = Nothing

foreign import ccall "gtk_paned_get_type"
    c_gtk_paned_get_type :: IO GType

type instance ParentTypes Paned = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject Paned where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_paned_get_type
    

class GObject o => PanedK o
instance (GObject o, IsDescendantOf Paned o) => PanedK o

toPaned :: PanedK o => o -> IO Paned
toPaned = unsafeCastTo Paned

-- method Paned::new
-- method type : Constructor
-- Args : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Paned"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_new" gtk_paned_new :: 
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    IO (Ptr Paned)


panedNew ::
    (MonadIO m) =>
    Orientation ->                          -- orientation
    m Paned
panedNew orientation = liftIO $ do
    let orientation' = (fromIntegral . fromEnum) orientation
    result <- gtk_paned_new orientation'
    checkUnexpectedReturnNULL "gtk_paned_new" result
    result' <- (newObject Paned) result
    return result'

-- method Paned::add1
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_add1" gtk_paned_add1 :: 
    Ptr Paned ->                            -- _obj : TInterface "Gtk" "Paned"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


panedAdd1 ::
    (MonadIO m, PanedK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
panedAdd1 _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_paned_add1 _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Paned::add2
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_add2" gtk_paned_add2 :: 
    Ptr Paned ->                            -- _obj : TInterface "Gtk" "Paned"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


panedAdd2 ::
    (MonadIO m, PanedK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
panedAdd2 _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_paned_add2 _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Paned::get_child1
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_get_child1" gtk_paned_get_child1 :: 
    Ptr Paned ->                            -- _obj : TInterface "Gtk" "Paned"
    IO (Ptr Widget)


panedGetChild1 ::
    (MonadIO m, PanedK a) =>
    a ->                                    -- _obj
    m Widget
panedGetChild1 _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_paned_get_child1 _obj'
    checkUnexpectedReturnNULL "gtk_paned_get_child1" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Paned::get_child2
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_get_child2" gtk_paned_get_child2 :: 
    Ptr Paned ->                            -- _obj : TInterface "Gtk" "Paned"
    IO (Ptr Widget)


panedGetChild2 ::
    (MonadIO m, PanedK a) =>
    a ->                                    -- _obj
    m Widget
panedGetChild2 _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_paned_get_child2 _obj'
    checkUnexpectedReturnNULL "gtk_paned_get_child2" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Paned::get_handle_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_get_handle_window" gtk_paned_get_handle_window :: 
    Ptr Paned ->                            -- _obj : TInterface "Gtk" "Paned"
    IO (Ptr Gdk.Window)


panedGetHandleWindow ::
    (MonadIO m, PanedK a) =>
    a ->                                    -- _obj
    m Gdk.Window
panedGetHandleWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_paned_get_handle_window _obj'
    checkUnexpectedReturnNULL "gtk_paned_get_handle_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- method Paned::get_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_get_position" gtk_paned_get_position :: 
    Ptr Paned ->                            -- _obj : TInterface "Gtk" "Paned"
    IO Int32


panedGetPosition ::
    (MonadIO m, PanedK a) =>
    a ->                                    -- _obj
    m Int32
panedGetPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_paned_get_position _obj'
    touchManagedPtr _obj
    return result

-- method Paned::get_wide_handle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_get_wide_handle" gtk_paned_get_wide_handle :: 
    Ptr Paned ->                            -- _obj : TInterface "Gtk" "Paned"
    IO CInt


panedGetWideHandle ::
    (MonadIO m, PanedK a) =>
    a ->                                    -- _obj
    m Bool
panedGetWideHandle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_paned_get_wide_handle _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Paned::pack1
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resize", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shrink", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resize", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shrink", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_pack1" gtk_paned_pack1 :: 
    Ptr Paned ->                            -- _obj : TInterface "Gtk" "Paned"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CInt ->                                 -- resize : TBasicType TBoolean
    CInt ->                                 -- shrink : TBasicType TBoolean
    IO ()


panedPack1 ::
    (MonadIO m, PanedK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Bool ->                                 -- resize
    Bool ->                                 -- shrink
    m ()
panedPack1 _obj child resize shrink = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let resize' = (fromIntegral . fromEnum) resize
    let shrink' = (fromIntegral . fromEnum) shrink
    gtk_paned_pack1 _obj' child' resize' shrink'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Paned::pack2
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resize", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shrink", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resize", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shrink", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_pack2" gtk_paned_pack2 :: 
    Ptr Paned ->                            -- _obj : TInterface "Gtk" "Paned"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CInt ->                                 -- resize : TBasicType TBoolean
    CInt ->                                 -- shrink : TBasicType TBoolean
    IO ()


panedPack2 ::
    (MonadIO m, PanedK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Bool ->                                 -- resize
    Bool ->                                 -- shrink
    m ()
panedPack2 _obj child resize shrink = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let resize' = (fromIntegral . fromEnum) resize
    let shrink' = (fromIntegral . fromEnum) shrink
    gtk_paned_pack2 _obj' child' resize' shrink'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Paned::set_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_set_position" gtk_paned_set_position :: 
    Ptr Paned ->                            -- _obj : TInterface "Gtk" "Paned"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


panedSetPosition ::
    (MonadIO m, PanedK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    m ()
panedSetPosition _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_paned_set_position _obj' position
    touchManagedPtr _obj
    return ()

-- method Paned::set_wide_handle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wide", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Paned", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wide", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paned_set_wide_handle" gtk_paned_set_wide_handle :: 
    Ptr Paned ->                            -- _obj : TInterface "Gtk" "Paned"
    CInt ->                                 -- wide : TBasicType TBoolean
    IO ()


panedSetWideHandle ::
    (MonadIO m, PanedK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- wide
    m ()
panedSetWideHandle _obj wide = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let wide' = (fromIntegral . fromEnum) wide
    gtk_paned_set_wide_handle _obj' wide'
    touchManagedPtr _obj
    return ()

-- signal Paned::accept-position
type PanedAcceptPositionCallback =
    IO Bool

noPanedAcceptPositionCallback :: Maybe PanedAcceptPositionCallback
noPanedAcceptPositionCallback = Nothing

type PanedAcceptPositionCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkPanedAcceptPositionCallback :: PanedAcceptPositionCallbackC -> IO (FunPtr PanedAcceptPositionCallbackC)

panedAcceptPositionClosure :: PanedAcceptPositionCallback -> IO Closure
panedAcceptPositionClosure cb = newCClosure =<< mkPanedAcceptPositionCallback wrapped
    where wrapped = panedAcceptPositionCallbackWrapper cb

panedAcceptPositionCallbackWrapper ::
    PanedAcceptPositionCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
panedAcceptPositionCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onPanedAcceptPosition :: (GObject a, MonadIO m) => a -> PanedAcceptPositionCallback -> m SignalHandlerId
onPanedAcceptPosition obj cb = liftIO $ connectPanedAcceptPosition obj cb SignalConnectBefore
afterPanedAcceptPosition :: (GObject a, MonadIO m) => a -> PanedAcceptPositionCallback -> m SignalHandlerId
afterPanedAcceptPosition obj cb = connectPanedAcceptPosition obj cb SignalConnectAfter

connectPanedAcceptPosition :: (GObject a, MonadIO m) =>
                              a -> PanedAcceptPositionCallback -> SignalConnectMode -> m SignalHandlerId
connectPanedAcceptPosition obj cb after = liftIO $ do
    cb' <- mkPanedAcceptPositionCallback (panedAcceptPositionCallbackWrapper cb)
    connectSignalFunPtr obj "accept-position" cb' after

-- signal Paned::cancel-position
type PanedCancelPositionCallback =
    IO Bool

noPanedCancelPositionCallback :: Maybe PanedCancelPositionCallback
noPanedCancelPositionCallback = Nothing

type PanedCancelPositionCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkPanedCancelPositionCallback :: PanedCancelPositionCallbackC -> IO (FunPtr PanedCancelPositionCallbackC)

panedCancelPositionClosure :: PanedCancelPositionCallback -> IO Closure
panedCancelPositionClosure cb = newCClosure =<< mkPanedCancelPositionCallback wrapped
    where wrapped = panedCancelPositionCallbackWrapper cb

panedCancelPositionCallbackWrapper ::
    PanedCancelPositionCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
panedCancelPositionCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onPanedCancelPosition :: (GObject a, MonadIO m) => a -> PanedCancelPositionCallback -> m SignalHandlerId
onPanedCancelPosition obj cb = liftIO $ connectPanedCancelPosition obj cb SignalConnectBefore
afterPanedCancelPosition :: (GObject a, MonadIO m) => a -> PanedCancelPositionCallback -> m SignalHandlerId
afterPanedCancelPosition obj cb = connectPanedCancelPosition obj cb SignalConnectAfter

connectPanedCancelPosition :: (GObject a, MonadIO m) =>
                              a -> PanedCancelPositionCallback -> SignalConnectMode -> m SignalHandlerId
connectPanedCancelPosition obj cb after = liftIO $ do
    cb' <- mkPanedCancelPositionCallback (panedCancelPositionCallbackWrapper cb)
    connectSignalFunPtr obj "cancel-position" cb' after

-- signal Paned::cycle-child-focus
type PanedCycleChildFocusCallback =
    Bool ->
    IO Bool

noPanedCycleChildFocusCallback :: Maybe PanedCycleChildFocusCallback
noPanedCycleChildFocusCallback = Nothing

type PanedCycleChildFocusCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkPanedCycleChildFocusCallback :: PanedCycleChildFocusCallbackC -> IO (FunPtr PanedCycleChildFocusCallbackC)

panedCycleChildFocusClosure :: PanedCycleChildFocusCallback -> IO Closure
panedCycleChildFocusClosure cb = newCClosure =<< mkPanedCycleChildFocusCallback wrapped
    where wrapped = panedCycleChildFocusCallbackWrapper cb

panedCycleChildFocusCallbackWrapper ::
    PanedCycleChildFocusCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO CInt
panedCycleChildFocusCallbackWrapper _cb _ reversed _ = do
    let reversed' = (/= 0) reversed
    result <- _cb  reversed'
    let result' = (fromIntegral . fromEnum) result
    return result'

onPanedCycleChildFocus :: (GObject a, MonadIO m) => a -> PanedCycleChildFocusCallback -> m SignalHandlerId
onPanedCycleChildFocus obj cb = liftIO $ connectPanedCycleChildFocus obj cb SignalConnectBefore
afterPanedCycleChildFocus :: (GObject a, MonadIO m) => a -> PanedCycleChildFocusCallback -> m SignalHandlerId
afterPanedCycleChildFocus obj cb = connectPanedCycleChildFocus obj cb SignalConnectAfter

connectPanedCycleChildFocus :: (GObject a, MonadIO m) =>
                               a -> PanedCycleChildFocusCallback -> SignalConnectMode -> m SignalHandlerId
connectPanedCycleChildFocus obj cb after = liftIO $ do
    cb' <- mkPanedCycleChildFocusCallback (panedCycleChildFocusCallbackWrapper cb)
    connectSignalFunPtr obj "cycle-child-focus" cb' after

-- signal Paned::cycle-handle-focus
type PanedCycleHandleFocusCallback =
    Bool ->
    IO Bool

noPanedCycleHandleFocusCallback :: Maybe PanedCycleHandleFocusCallback
noPanedCycleHandleFocusCallback = Nothing

type PanedCycleHandleFocusCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkPanedCycleHandleFocusCallback :: PanedCycleHandleFocusCallbackC -> IO (FunPtr PanedCycleHandleFocusCallbackC)

panedCycleHandleFocusClosure :: PanedCycleHandleFocusCallback -> IO Closure
panedCycleHandleFocusClosure cb = newCClosure =<< mkPanedCycleHandleFocusCallback wrapped
    where wrapped = panedCycleHandleFocusCallbackWrapper cb

panedCycleHandleFocusCallbackWrapper ::
    PanedCycleHandleFocusCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO CInt
panedCycleHandleFocusCallbackWrapper _cb _ reversed _ = do
    let reversed' = (/= 0) reversed
    result <- _cb  reversed'
    let result' = (fromIntegral . fromEnum) result
    return result'

onPanedCycleHandleFocus :: (GObject a, MonadIO m) => a -> PanedCycleHandleFocusCallback -> m SignalHandlerId
onPanedCycleHandleFocus obj cb = liftIO $ connectPanedCycleHandleFocus obj cb SignalConnectBefore
afterPanedCycleHandleFocus :: (GObject a, MonadIO m) => a -> PanedCycleHandleFocusCallback -> m SignalHandlerId
afterPanedCycleHandleFocus obj cb = connectPanedCycleHandleFocus obj cb SignalConnectAfter

connectPanedCycleHandleFocus :: (GObject a, MonadIO m) =>
                                a -> PanedCycleHandleFocusCallback -> SignalConnectMode -> m SignalHandlerId
connectPanedCycleHandleFocus obj cb after = liftIO $ do
    cb' <- mkPanedCycleHandleFocusCallback (panedCycleHandleFocusCallbackWrapper cb)
    connectSignalFunPtr obj "cycle-handle-focus" cb' after

-- signal Paned::move-handle
type PanedMoveHandleCallback =
    ScrollType ->
    IO Bool

noPanedMoveHandleCallback :: Maybe PanedMoveHandleCallback
noPanedMoveHandleCallback = Nothing

type PanedMoveHandleCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkPanedMoveHandleCallback :: PanedMoveHandleCallbackC -> IO (FunPtr PanedMoveHandleCallbackC)

panedMoveHandleClosure :: PanedMoveHandleCallback -> IO Closure
panedMoveHandleClosure cb = newCClosure =<< mkPanedMoveHandleCallback wrapped
    where wrapped = panedMoveHandleCallbackWrapper cb

panedMoveHandleCallbackWrapper ::
    PanedMoveHandleCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO CInt
panedMoveHandleCallbackWrapper _cb _ scroll_type _ = do
    let scroll_type' = (toEnum . fromIntegral) scroll_type
    result <- _cb  scroll_type'
    let result' = (fromIntegral . fromEnum) result
    return result'

onPanedMoveHandle :: (GObject a, MonadIO m) => a -> PanedMoveHandleCallback -> m SignalHandlerId
onPanedMoveHandle obj cb = liftIO $ connectPanedMoveHandle obj cb SignalConnectBefore
afterPanedMoveHandle :: (GObject a, MonadIO m) => a -> PanedMoveHandleCallback -> m SignalHandlerId
afterPanedMoveHandle obj cb = connectPanedMoveHandle obj cb SignalConnectAfter

connectPanedMoveHandle :: (GObject a, MonadIO m) =>
                          a -> PanedMoveHandleCallback -> SignalConnectMode -> m SignalHandlerId
connectPanedMoveHandle obj cb after = liftIO $ do
    cb' <- mkPanedMoveHandleCallback (panedMoveHandleCallbackWrapper cb)
    connectSignalFunPtr obj "move-handle" cb' after

-- signal Paned::toggle-handle-focus
type PanedToggleHandleFocusCallback =
    IO Bool

noPanedToggleHandleFocusCallback :: Maybe PanedToggleHandleFocusCallback
noPanedToggleHandleFocusCallback = Nothing

type PanedToggleHandleFocusCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkPanedToggleHandleFocusCallback :: PanedToggleHandleFocusCallbackC -> IO (FunPtr PanedToggleHandleFocusCallbackC)

panedToggleHandleFocusClosure :: PanedToggleHandleFocusCallback -> IO Closure
panedToggleHandleFocusClosure cb = newCClosure =<< mkPanedToggleHandleFocusCallback wrapped
    where wrapped = panedToggleHandleFocusCallbackWrapper cb

panedToggleHandleFocusCallbackWrapper ::
    PanedToggleHandleFocusCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
panedToggleHandleFocusCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onPanedToggleHandleFocus :: (GObject a, MonadIO m) => a -> PanedToggleHandleFocusCallback -> m SignalHandlerId
onPanedToggleHandleFocus obj cb = liftIO $ connectPanedToggleHandleFocus obj cb SignalConnectBefore
afterPanedToggleHandleFocus :: (GObject a, MonadIO m) => a -> PanedToggleHandleFocusCallback -> m SignalHandlerId
afterPanedToggleHandleFocus obj cb = connectPanedToggleHandleFocus obj cb SignalConnectAfter

connectPanedToggleHandleFocus :: (GObject a, MonadIO m) =>
                                 a -> PanedToggleHandleFocusCallback -> SignalConnectMode -> m SignalHandlerId
connectPanedToggleHandleFocus obj cb after = liftIO $ do
    cb' <- mkPanedToggleHandleFocusCallback (panedToggleHandleFocusCallbackWrapper cb)
    connectSignalFunPtr obj "toggle-handle-focus" cb' after

-- object PanedAccessible 
newtype PanedAccessible = PanedAccessible (ForeignPtr PanedAccessible)
noPanedAccessible :: Maybe PanedAccessible
noPanedAccessible = Nothing

foreign import ccall "gtk_paned_accessible_get_type"
    c_gtk_paned_accessible_get_type :: IO GType

type instance ParentTypes PanedAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Value]

instance GObject PanedAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_paned_accessible_get_type
    

class GObject o => PanedAccessibleK o
instance (GObject o, IsDescendantOf PanedAccessible o) => PanedAccessibleK o

toPanedAccessible :: PanedAccessibleK o => o -> IO PanedAccessible
toPanedAccessible = unsafeCastTo PanedAccessible

-- struct PaperSize
newtype PaperSize = PaperSize (ForeignPtr PaperSize)
noPaperSize :: Maybe PaperSize
noPaperSize = Nothing

foreign import ccall "gtk_paper_size_get_type" c_gtk_paper_size_get_type :: 
    IO GType

instance BoxedObject PaperSize where
    boxedType _ = c_gtk_paper_size_get_type

-- method PaperSize::new
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PaperSize"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_new" gtk_paper_size_new :: 
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr PaperSize)


paperSizeNew ::
    (MonadIO m) =>
    Maybe (T.Text) ->                       -- name
    m PaperSize
paperSizeNew name = liftIO $ do
    maybeName <- case name of
        Nothing -> return nullPtr
        Just jName -> do
            jName' <- textToCString jName
            return jName'
    result <- gtk_paper_size_new maybeName
    checkUnexpectedReturnNULL "gtk_paper_size_new" result
    result' <- (wrapBoxed PaperSize) result
    freeMem maybeName
    return result'

-- method PaperSize::new_custom
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "display_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "display_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PaperSize"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_new_custom" gtk_paper_size_new_custom :: 
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- display_name : TBasicType TUTF8
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO (Ptr PaperSize)


paperSizeNewCustom ::
    (MonadIO m) =>
    T.Text ->                               -- name
    T.Text ->                               -- display_name
    Double ->                               -- width
    Double ->                               -- height
    Unit ->                                 -- unit
    m PaperSize
paperSizeNewCustom name display_name width height unit = liftIO $ do
    name' <- textToCString name
    display_name' <- textToCString display_name
    let width' = realToFrac width
    let height' = realToFrac height
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_paper_size_new_custom name' display_name' width' height' unit'
    checkUnexpectedReturnNULL "gtk_paper_size_new_custom" result
    result' <- (wrapBoxed PaperSize) result
    freeMem name'
    freeMem display_name'
    return result'

-- method PaperSize::new_from_ipp
-- method type : Constructor
-- Args : [Arg {argName = "ipp_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "ipp_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PaperSize"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_new_from_ipp" gtk_paper_size_new_from_ipp :: 
    CString ->                              -- ipp_name : TBasicType TUTF8
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    IO (Ptr PaperSize)


paperSizeNewFromIpp ::
    (MonadIO m) =>
    T.Text ->                               -- ipp_name
    Double ->                               -- width
    Double ->                               -- height
    m PaperSize
paperSizeNewFromIpp ipp_name width height = liftIO $ do
    ipp_name' <- textToCString ipp_name
    let width' = realToFrac width
    let height' = realToFrac height
    result <- gtk_paper_size_new_from_ipp ipp_name' width' height'
    checkUnexpectedReturnNULL "gtk_paper_size_new_from_ipp" result
    result' <- (wrapBoxed PaperSize) result
    freeMem ipp_name'
    return result'

-- method PaperSize::new_from_key_file
-- method type : Constructor
-- Args : [Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PaperSize"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_paper_size_new_from_key_file" gtk_paper_size_new_from_key_file :: 
    Ptr GLib.KeyFile ->                     -- key_file : TInterface "GLib" "KeyFile"
    CString ->                              -- group_name : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr PaperSize)


paperSizeNewFromKeyFile ::
    (MonadIO m) =>
    GLib.KeyFile ->                         -- key_file
    T.Text ->                               -- group_name
    m PaperSize
paperSizeNewFromKeyFile key_file group_name = liftIO $ do
    let key_file' = unsafeManagedPtrGetPtr key_file
    group_name' <- textToCString group_name
    onException (do
        result <- propagateGError $ gtk_paper_size_new_from_key_file key_file' group_name'
        checkUnexpectedReturnNULL "gtk_paper_size_new_from_key_file" result
        result' <- (wrapBoxed PaperSize) result
        touchManagedPtr key_file
        freeMem group_name'
        return result'
     ) (do
        freeMem group_name'
     )

-- method PaperSize::new_from_ppd
-- method type : Constructor
-- Args : [Arg {argName = "ppd_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ppd_display_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "ppd_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ppd_display_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PaperSize"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_new_from_ppd" gtk_paper_size_new_from_ppd :: 
    CString ->                              -- ppd_name : TBasicType TUTF8
    CString ->                              -- ppd_display_name : TBasicType TUTF8
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    IO (Ptr PaperSize)


paperSizeNewFromPpd ::
    (MonadIO m) =>
    T.Text ->                               -- ppd_name
    T.Text ->                               -- ppd_display_name
    Double ->                               -- width
    Double ->                               -- height
    m PaperSize
paperSizeNewFromPpd ppd_name ppd_display_name width height = liftIO $ do
    ppd_name' <- textToCString ppd_name
    ppd_display_name' <- textToCString ppd_display_name
    let width' = realToFrac width
    let height' = realToFrac height
    result <- gtk_paper_size_new_from_ppd ppd_name' ppd_display_name' width' height'
    checkUnexpectedReturnNULL "gtk_paper_size_new_from_ppd" result
    result' <- (wrapBoxed PaperSize) result
    freeMem ppd_name'
    freeMem ppd_display_name'
    return result'

-- method PaperSize::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PaperSize"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_copy" gtk_paper_size_copy :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    IO (Ptr PaperSize)


paperSizeCopy ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    m PaperSize
paperSizeCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_paper_size_copy _obj'
    checkUnexpectedReturnNULL "gtk_paper_size_copy" result
    result' <- (wrapBoxed PaperSize) result
    touchManagedPtr _obj
    return result'

-- method PaperSize::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_free" gtk_paper_size_free :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    IO ()


paperSizeFree ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    m ()
paperSizeFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_paper_size_free _obj'
    touchManagedPtr _obj
    return ()

-- method PaperSize::get_default_bottom_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_get_default_bottom_margin" gtk_paper_size_get_default_bottom_margin :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


paperSizeGetDefaultBottomMargin ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    Unit ->                                 -- unit
    m Double
paperSizeGetDefaultBottomMargin _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_paper_size_get_default_bottom_margin _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PaperSize::get_default_left_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_get_default_left_margin" gtk_paper_size_get_default_left_margin :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


paperSizeGetDefaultLeftMargin ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    Unit ->                                 -- unit
    m Double
paperSizeGetDefaultLeftMargin _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_paper_size_get_default_left_margin _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PaperSize::get_default_right_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_get_default_right_margin" gtk_paper_size_get_default_right_margin :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


paperSizeGetDefaultRightMargin ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    Unit ->                                 -- unit
    m Double
paperSizeGetDefaultRightMargin _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_paper_size_get_default_right_margin _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PaperSize::get_default_top_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_get_default_top_margin" gtk_paper_size_get_default_top_margin :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


paperSizeGetDefaultTopMargin ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    Unit ->                                 -- unit
    m Double
paperSizeGetDefaultTopMargin _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_paper_size_get_default_top_margin _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PaperSize::get_display_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_get_display_name" gtk_paper_size_get_display_name :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    IO CString


paperSizeGetDisplayName ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    m T.Text
paperSizeGetDisplayName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_paper_size_get_display_name _obj'
    checkUnexpectedReturnNULL "gtk_paper_size_get_display_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method PaperSize::get_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_get_height" gtk_paper_size_get_height :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


paperSizeGetHeight ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    Unit ->                                 -- unit
    m Double
paperSizeGetHeight _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_paper_size_get_height _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PaperSize::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_get_name" gtk_paper_size_get_name :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    IO CString


paperSizeGetName ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    m T.Text
paperSizeGetName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_paper_size_get_name _obj'
    checkUnexpectedReturnNULL "gtk_paper_size_get_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method PaperSize::get_ppd_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_get_ppd_name" gtk_paper_size_get_ppd_name :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    IO CString


paperSizeGetPpdName ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    m T.Text
paperSizeGetPpdName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_paper_size_get_ppd_name _obj'
    checkUnexpectedReturnNULL "gtk_paper_size_get_ppd_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method PaperSize::get_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_get_width" gtk_paper_size_get_width :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


paperSizeGetWidth ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    Unit ->                                 -- unit
    m Double
paperSizeGetWidth _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_paper_size_get_width _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PaperSize::is_custom
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_is_custom" gtk_paper_size_is_custom :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    IO CInt


paperSizeIsCustom ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    m Bool
paperSizeIsCustom _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_paper_size_is_custom _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PaperSize::is_equal
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size2", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size2", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_is_equal" gtk_paper_size_is_equal :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    Ptr PaperSize ->                        -- size2 : TInterface "Gtk" "PaperSize"
    IO CInt


paperSizeIsEqual ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    PaperSize ->                            -- size2
    m Bool
paperSizeIsEqual _obj size2 = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let size2' = unsafeManagedPtrGetPtr size2
    result <- gtk_paper_size_is_equal _obj' size2'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr size2
    return result'

-- method PaperSize::is_ipp
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_is_ipp" gtk_paper_size_is_ipp :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    IO CInt


paperSizeIsIpp ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    m Bool
paperSizeIsIpp _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_paper_size_is_ipp _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PaperSize::set_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_set_size" gtk_paper_size_set_size :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO ()


paperSizeSetSize ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    Double ->                               -- width
    Double ->                               -- height
    Unit ->                                 -- unit
    m ()
paperSizeSetSize _obj width height unit = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let width' = realToFrac width
    let height' = realToFrac height
    let unit' = (fromIntegral . fromEnum) unit
    gtk_paper_size_set_size _obj' width' height' unit'
    touchManagedPtr _obj
    return ()

-- method PaperSize::to_key_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_to_key_file" gtk_paper_size_to_key_file :: 
    Ptr PaperSize ->                        -- _obj : TInterface "Gtk" "PaperSize"
    Ptr GLib.KeyFile ->                     -- key_file : TInterface "GLib" "KeyFile"
    CString ->                              -- group_name : TBasicType TUTF8
    IO ()


paperSizeToKeyFile ::
    (MonadIO m) =>
    PaperSize ->                            -- _obj
    GLib.KeyFile ->                         -- key_file
    T.Text ->                               -- group_name
    m ()
paperSizeToKeyFile _obj key_file group_name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let key_file' = unsafeManagedPtrGetPtr key_file
    group_name' <- textToCString group_name
    gtk_paper_size_to_key_file _obj' key_file' group_name'
    touchManagedPtr _obj
    touchManagedPtr key_file
    freeMem group_name'
    return ()

-- Enum PathPriorityType
{-# DEPRECATED PathPriorityType ["(Since version 3.0)"]#-}
data PathPriorityType = 
      PathPriorityTypeLowest
    | PathPriorityTypeGtk
    | PathPriorityTypeApplication
    | PathPriorityTypeTheme
    | PathPriorityTypeRc
    | PathPriorityTypeHighest
    | AnotherPathPriorityType Int
    deriving (Show, Eq)

instance Enum PathPriorityType where
    fromEnum PathPriorityTypeLowest = 0
    fromEnum PathPriorityTypeGtk = 4
    fromEnum PathPriorityTypeApplication = 8
    fromEnum PathPriorityTypeTheme = 10
    fromEnum PathPriorityTypeRc = 12
    fromEnum PathPriorityTypeHighest = 15
    fromEnum (AnotherPathPriorityType k) = k

    toEnum 0 = PathPriorityTypeLowest
    toEnum 4 = PathPriorityTypeGtk
    toEnum 8 = PathPriorityTypeApplication
    toEnum 10 = PathPriorityTypeTheme
    toEnum 12 = PathPriorityTypeRc
    toEnum 15 = PathPriorityTypeHighest
    toEnum k = AnotherPathPriorityType k

foreign import ccall "gtk_path_priority_type_get_type" c_gtk_path_priority_type_get_type :: 
    IO GType

instance BoxedEnum PathPriorityType where
    boxedEnumType _ = c_gtk_path_priority_type_get_type

-- Enum PathType
{-# DEPRECATED PathType ["(Since version 3.0)"]#-}
data PathType = 
      PathTypeWidget
    | PathTypeWidgetClass
    | PathTypeClass
    | AnotherPathType Int
    deriving (Show, Eq)

instance Enum PathType where
    fromEnum PathTypeWidget = 0
    fromEnum PathTypeWidgetClass = 1
    fromEnum PathTypeClass = 2
    fromEnum (AnotherPathType k) = k

    toEnum 0 = PathTypeWidget
    toEnum 1 = PathTypeWidgetClass
    toEnum 2 = PathTypeClass
    toEnum k = AnotherPathType k

foreign import ccall "gtk_path_type_get_type" c_gtk_path_type_get_type :: 
    IO GType

instance BoxedEnum PathType where
    boxedEnumType _ = c_gtk_path_type_get_type

-- Flags PlacesOpenFlags

data PlacesOpenFlags = 
      PlacesOpenFlagsNormal
    | PlacesOpenFlagsNewTab
    | PlacesOpenFlagsNewWindow
    | AnotherPlacesOpenFlags Int
    deriving (Show, Eq)

instance Enum PlacesOpenFlags where
    fromEnum PlacesOpenFlagsNormal = 1
    fromEnum PlacesOpenFlagsNewTab = 2
    fromEnum PlacesOpenFlagsNewWindow = 4
    fromEnum (AnotherPlacesOpenFlags k) = k

    toEnum 1 = PlacesOpenFlagsNormal
    toEnum 2 = PlacesOpenFlagsNewTab
    toEnum 4 = PlacesOpenFlagsNewWindow
    toEnum k = AnotherPlacesOpenFlags k

foreign import ccall "gtk_places_open_flags_get_type" c_gtk_places_open_flags_get_type :: 
    IO GType

instance BoxedEnum PlacesOpenFlags where
    boxedEnumType _ = c_gtk_places_open_flags_get_type

instance IsGFlag PlacesOpenFlags

-- object PlacesSidebar 
newtype PlacesSidebar = PlacesSidebar (ForeignPtr PlacesSidebar)
noPlacesSidebar :: Maybe PlacesSidebar
noPlacesSidebar = Nothing

foreign import ccall "gtk_places_sidebar_get_type"
    c_gtk_places_sidebar_get_type :: IO GType

type instance ParentTypes PlacesSidebar = '[ScrolledWindow, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject PlacesSidebar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_places_sidebar_get_type
    

class GObject o => PlacesSidebarK o
instance (GObject o, IsDescendantOf PlacesSidebar o) => PlacesSidebarK o

toPlacesSidebar :: PlacesSidebarK o => o -> IO PlacesSidebar
toPlacesSidebar = unsafeCastTo PlacesSidebar

-- method PlacesSidebar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "PlacesSidebar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_new" gtk_places_sidebar_new :: 
    IO (Ptr PlacesSidebar)


placesSidebarNew ::
    (MonadIO m) =>
    m PlacesSidebar
placesSidebarNew  = liftIO $ do
    result <- gtk_places_sidebar_new
    checkUnexpectedReturnNULL "gtk_places_sidebar_new" result
    result' <- (newObject PlacesSidebar) result
    return result'

-- method PlacesSidebar::add_shortcut
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "location", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "location", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_add_shortcut" gtk_places_sidebar_add_shortcut :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    Ptr Gio.File ->                         -- location : TInterface "Gio" "File"
    IO ()


placesSidebarAddShortcut ::
    (MonadIO m, PlacesSidebarK a, Gio.FileK b) =>
    a ->                                    -- _obj
    b ->                                    -- location
    m ()
placesSidebarAddShortcut _obj location = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let location' = unsafeManagedPtrCastPtr location
    gtk_places_sidebar_add_shortcut _obj' location'
    touchManagedPtr _obj
    touchManagedPtr location
    return ()

-- method PlacesSidebar::get_local_only
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_get_local_only" gtk_places_sidebar_get_local_only :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    IO CInt


placesSidebarGetLocalOnly ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    m Bool
placesSidebarGetLocalOnly _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_places_sidebar_get_local_only _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PlacesSidebar::get_location
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_get_location" gtk_places_sidebar_get_location :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    IO (Ptr Gio.File)


placesSidebarGetLocation ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    m Gio.File
placesSidebarGetLocation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_places_sidebar_get_location _obj'
    checkUnexpectedReturnNULL "gtk_places_sidebar_get_location" result
    result' <- (wrapObject Gio.File) result
    touchManagedPtr _obj
    return result'

-- method PlacesSidebar::get_nth_bookmark
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_get_nth_bookmark" gtk_places_sidebar_get_nth_bookmark :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    Int32 ->                                -- n : TBasicType TInt32
    IO (Ptr Gio.File)


placesSidebarGetNthBookmark ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- n
    m Gio.File
placesSidebarGetNthBookmark _obj n = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_places_sidebar_get_nth_bookmark _obj' n
    checkUnexpectedReturnNULL "gtk_places_sidebar_get_nth_bookmark" result
    result' <- (wrapObject Gio.File) result
    touchManagedPtr _obj
    return result'

-- method PlacesSidebar::get_open_flags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PlacesOpenFlags"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_get_open_flags" gtk_places_sidebar_get_open_flags :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    IO CUInt


placesSidebarGetOpenFlags ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    m [PlacesOpenFlags]
placesSidebarGetOpenFlags _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_places_sidebar_get_open_flags _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method PlacesSidebar::get_show_connect_to_server
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_get_show_connect_to_server" gtk_places_sidebar_get_show_connect_to_server :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    IO CInt

{-# DEPRECATED placesSidebarGetShowConnectToServer ["(Since version 3.18)","It is recommended to group this functionality with the drives","    and network location under the new 'Other Location' item"]#-}
placesSidebarGetShowConnectToServer ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    m Bool
placesSidebarGetShowConnectToServer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_places_sidebar_get_show_connect_to_server _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PlacesSidebar::get_show_desktop
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_get_show_desktop" gtk_places_sidebar_get_show_desktop :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    IO CInt


placesSidebarGetShowDesktop ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    m Bool
placesSidebarGetShowDesktop _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_places_sidebar_get_show_desktop _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PlacesSidebar::get_show_enter_location
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_get_show_enter_location" gtk_places_sidebar_get_show_enter_location :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    IO CInt


placesSidebarGetShowEnterLocation ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    m Bool
placesSidebarGetShowEnterLocation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_places_sidebar_get_show_enter_location _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PlacesSidebar::get_show_other_locations
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_get_show_other_locations" gtk_places_sidebar_get_show_other_locations :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    IO CInt


placesSidebarGetShowOtherLocations ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    m Bool
placesSidebarGetShowOtherLocations _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_places_sidebar_get_show_other_locations _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PlacesSidebar::get_show_recent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_get_show_recent" gtk_places_sidebar_get_show_recent :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    IO CInt


placesSidebarGetShowRecent ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    m Bool
placesSidebarGetShowRecent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_places_sidebar_get_show_recent _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PlacesSidebar::get_show_trash
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_get_show_trash" gtk_places_sidebar_get_show_trash :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    IO CInt


placesSidebarGetShowTrash ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    m Bool
placesSidebarGetShowTrash _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_places_sidebar_get_show_trash _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PlacesSidebar::list_shortcuts
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gio" "File")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_list_shortcuts" gtk_places_sidebar_list_shortcuts :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    IO (Ptr (GSList (Ptr Gio.File)))


placesSidebarListShortcuts ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    m [Gio.File]
placesSidebarListShortcuts _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_places_sidebar_list_shortcuts _obj'
    checkUnexpectedReturnNULL "gtk_places_sidebar_list_shortcuts" result
    result' <- unpackGSList result
    result'' <- mapM (wrapObject Gio.File) result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method PlacesSidebar::remove_shortcut
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "location", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "location", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_remove_shortcut" gtk_places_sidebar_remove_shortcut :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    Ptr Gio.File ->                         -- location : TInterface "Gio" "File"
    IO ()


placesSidebarRemoveShortcut ::
    (MonadIO m, PlacesSidebarK a, Gio.FileK b) =>
    a ->                                    -- _obj
    b ->                                    -- location
    m ()
placesSidebarRemoveShortcut _obj location = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let location' = unsafeManagedPtrCastPtr location
    gtk_places_sidebar_remove_shortcut _obj' location'
    touchManagedPtr _obj
    touchManagedPtr location
    return ()

-- method PlacesSidebar::set_drop_targets_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_set_drop_targets_visible" gtk_places_sidebar_set_drop_targets_visible :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    CInt ->                                 -- visible : TBasicType TBoolean
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    IO ()


placesSidebarSetDropTargetsVisible ::
    (MonadIO m, PlacesSidebarK a, Gdk.DragContextK b) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible
    b ->                                    -- context
    m ()
placesSidebarSetDropTargetsVisible _obj visible context = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible' = (fromIntegral . fromEnum) visible
    let context' = unsafeManagedPtrCastPtr context
    gtk_places_sidebar_set_drop_targets_visible _obj' visible' context'
    touchManagedPtr _obj
    touchManagedPtr context
    return ()

-- method PlacesSidebar::set_local_only
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "local_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "local_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_set_local_only" gtk_places_sidebar_set_local_only :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    CInt ->                                 -- local_only : TBasicType TBoolean
    IO ()


placesSidebarSetLocalOnly ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- local_only
    m ()
placesSidebarSetLocalOnly _obj local_only = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let local_only' = (fromIntegral . fromEnum) local_only
    gtk_places_sidebar_set_local_only _obj' local_only'
    touchManagedPtr _obj
    return ()

-- method PlacesSidebar::set_location
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "location", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "location", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_set_location" gtk_places_sidebar_set_location :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    Ptr Gio.File ->                         -- location : TInterface "Gio" "File"
    IO ()


placesSidebarSetLocation ::
    (MonadIO m, PlacesSidebarK a, Gio.FileK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- location
    m ()
placesSidebarSetLocation _obj location = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLocation <- case location of
        Nothing -> return nullPtr
        Just jLocation -> do
            let jLocation' = unsafeManagedPtrCastPtr jLocation
            return jLocation'
    gtk_places_sidebar_set_location _obj' maybeLocation
    touchManagedPtr _obj
    whenJust location touchManagedPtr
    return ()

-- method PlacesSidebar::set_open_flags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "PlacesOpenFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "PlacesOpenFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_set_open_flags" gtk_places_sidebar_set_open_flags :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    CUInt ->                                -- flags : TInterface "Gtk" "PlacesOpenFlags"
    IO ()


placesSidebarSetOpenFlags ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    [PlacesOpenFlags] ->                    -- flags
    m ()
placesSidebarSetOpenFlags _obj flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let flags' = gflagsToWord flags
    gtk_places_sidebar_set_open_flags _obj' flags'
    touchManagedPtr _obj
    return ()

-- method PlacesSidebar::set_show_connect_to_server
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_connect_to_server", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_connect_to_server", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_set_show_connect_to_server" gtk_places_sidebar_set_show_connect_to_server :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    CInt ->                                 -- show_connect_to_server : TBasicType TBoolean
    IO ()

{-# DEPRECATED placesSidebarSetShowConnectToServer ["(Since version 3.18)","It is recommended to group this functionality with the drives","    and network location under the new 'Other Location' item"]#-}
placesSidebarSetShowConnectToServer ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_connect_to_server
    m ()
placesSidebarSetShowConnectToServer _obj show_connect_to_server = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_connect_to_server' = (fromIntegral . fromEnum) show_connect_to_server
    gtk_places_sidebar_set_show_connect_to_server _obj' show_connect_to_server'
    touchManagedPtr _obj
    return ()

-- method PlacesSidebar::set_show_desktop
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_desktop", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_desktop", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_set_show_desktop" gtk_places_sidebar_set_show_desktop :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    CInt ->                                 -- show_desktop : TBasicType TBoolean
    IO ()


placesSidebarSetShowDesktop ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_desktop
    m ()
placesSidebarSetShowDesktop _obj show_desktop = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_desktop' = (fromIntegral . fromEnum) show_desktop
    gtk_places_sidebar_set_show_desktop _obj' show_desktop'
    touchManagedPtr _obj
    return ()

-- method PlacesSidebar::set_show_enter_location
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_enter_location", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_enter_location", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_set_show_enter_location" gtk_places_sidebar_set_show_enter_location :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    CInt ->                                 -- show_enter_location : TBasicType TBoolean
    IO ()


placesSidebarSetShowEnterLocation ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_enter_location
    m ()
placesSidebarSetShowEnterLocation _obj show_enter_location = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_enter_location' = (fromIntegral . fromEnum) show_enter_location
    gtk_places_sidebar_set_show_enter_location _obj' show_enter_location'
    touchManagedPtr _obj
    return ()

-- method PlacesSidebar::set_show_other_locations
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_other_locations", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_other_locations", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_set_show_other_locations" gtk_places_sidebar_set_show_other_locations :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    CInt ->                                 -- show_other_locations : TBasicType TBoolean
    IO ()


placesSidebarSetShowOtherLocations ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_other_locations
    m ()
placesSidebarSetShowOtherLocations _obj show_other_locations = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_other_locations' = (fromIntegral . fromEnum) show_other_locations
    gtk_places_sidebar_set_show_other_locations _obj' show_other_locations'
    touchManagedPtr _obj
    return ()

-- method PlacesSidebar::set_show_recent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_recent", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_recent", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_set_show_recent" gtk_places_sidebar_set_show_recent :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    CInt ->                                 -- show_recent : TBasicType TBoolean
    IO ()


placesSidebarSetShowRecent ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_recent
    m ()
placesSidebarSetShowRecent _obj show_recent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_recent' = (fromIntegral . fromEnum) show_recent
    gtk_places_sidebar_set_show_recent _obj' show_recent'
    touchManagedPtr _obj
    return ()

-- method PlacesSidebar::set_show_trash
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_trash", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PlacesSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_trash", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_places_sidebar_set_show_trash" gtk_places_sidebar_set_show_trash :: 
    Ptr PlacesSidebar ->                    -- _obj : TInterface "Gtk" "PlacesSidebar"
    CInt ->                                 -- show_trash : TBasicType TBoolean
    IO ()


placesSidebarSetShowTrash ::
    (MonadIO m, PlacesSidebarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_trash
    m ()
placesSidebarSetShowTrash _obj show_trash = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_trash' = (fromIntegral . fromEnum) show_trash
    gtk_places_sidebar_set_show_trash _obj' show_trash'
    touchManagedPtr _obj
    return ()

-- signal PlacesSidebar::drag-action-ask
type PlacesSidebarDragActionAskCallback =
    Int32 ->
    IO Int32

noPlacesSidebarDragActionAskCallback :: Maybe PlacesSidebarDragActionAskCallback
noPlacesSidebarDragActionAskCallback = Nothing

type PlacesSidebarDragActionAskCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Ptr () ->                               -- user_data
    IO Int32

foreign import ccall "wrapper"
    mkPlacesSidebarDragActionAskCallback :: PlacesSidebarDragActionAskCallbackC -> IO (FunPtr PlacesSidebarDragActionAskCallbackC)

placesSidebarDragActionAskClosure :: PlacesSidebarDragActionAskCallback -> IO Closure
placesSidebarDragActionAskClosure cb = newCClosure =<< mkPlacesSidebarDragActionAskCallback wrapped
    where wrapped = placesSidebarDragActionAskCallbackWrapper cb

placesSidebarDragActionAskCallbackWrapper ::
    PlacesSidebarDragActionAskCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO Int32
placesSidebarDragActionAskCallbackWrapper _cb _ actions _ = do
    result <- _cb  actions
    return result

onPlacesSidebarDragActionAsk :: (GObject a, MonadIO m) => a -> PlacesSidebarDragActionAskCallback -> m SignalHandlerId
onPlacesSidebarDragActionAsk obj cb = liftIO $ connectPlacesSidebarDragActionAsk obj cb SignalConnectBefore
afterPlacesSidebarDragActionAsk :: (GObject a, MonadIO m) => a -> PlacesSidebarDragActionAskCallback -> m SignalHandlerId
afterPlacesSidebarDragActionAsk obj cb = connectPlacesSidebarDragActionAsk obj cb SignalConnectAfter

connectPlacesSidebarDragActionAsk :: (GObject a, MonadIO m) =>
                                     a -> PlacesSidebarDragActionAskCallback -> SignalConnectMode -> m SignalHandlerId
connectPlacesSidebarDragActionAsk obj cb after = liftIO $ do
    cb' <- mkPlacesSidebarDragActionAskCallback (placesSidebarDragActionAskCallbackWrapper cb)
    connectSignalFunPtr obj "drag-action-ask" cb' after

-- signal PlacesSidebar::drag-action-requested
type PlacesSidebarDragActionRequestedCallback =
    Gdk.DragContext ->
    Gio.File ->
    [Gio.File] ->
    IO Int32

noPlacesSidebarDragActionRequestedCallback :: Maybe PlacesSidebarDragActionRequestedCallback
noPlacesSidebarDragActionRequestedCallback = Nothing

type PlacesSidebarDragActionRequestedCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext ->
    Ptr Gio.File ->
    Ptr (GList (Ptr Gio.File)) ->
    Ptr () ->                               -- user_data
    IO Int32

foreign import ccall "wrapper"
    mkPlacesSidebarDragActionRequestedCallback :: PlacesSidebarDragActionRequestedCallbackC -> IO (FunPtr PlacesSidebarDragActionRequestedCallbackC)

placesSidebarDragActionRequestedClosure :: PlacesSidebarDragActionRequestedCallback -> IO Closure
placesSidebarDragActionRequestedClosure cb = newCClosure =<< mkPlacesSidebarDragActionRequestedCallback wrapped
    where wrapped = placesSidebarDragActionRequestedCallbackWrapper cb

placesSidebarDragActionRequestedCallbackWrapper ::
    PlacesSidebarDragActionRequestedCallback ->
    Ptr () ->
    Ptr Gdk.DragContext ->
    Ptr Gio.File ->
    Ptr (GList (Ptr Gio.File)) ->
    Ptr () ->
    IO Int32
placesSidebarDragActionRequestedCallbackWrapper _cb _ context dest_file source_file_list _ = do
    context' <- (newObject Gdk.DragContext) context
    dest_file' <- (newObject Gio.File) dest_file
    source_file_list' <- unpackGList source_file_list
    source_file_list'' <- mapM (newObject Gio.File) source_file_list'
    result <- _cb  context' dest_file' source_file_list''
    return result

onPlacesSidebarDragActionRequested :: (GObject a, MonadIO m) => a -> PlacesSidebarDragActionRequestedCallback -> m SignalHandlerId
onPlacesSidebarDragActionRequested obj cb = liftIO $ connectPlacesSidebarDragActionRequested obj cb SignalConnectBefore
afterPlacesSidebarDragActionRequested :: (GObject a, MonadIO m) => a -> PlacesSidebarDragActionRequestedCallback -> m SignalHandlerId
afterPlacesSidebarDragActionRequested obj cb = connectPlacesSidebarDragActionRequested obj cb SignalConnectAfter

connectPlacesSidebarDragActionRequested :: (GObject a, MonadIO m) =>
                                           a -> PlacesSidebarDragActionRequestedCallback -> SignalConnectMode -> m SignalHandlerId
connectPlacesSidebarDragActionRequested obj cb after = liftIO $ do
    cb' <- mkPlacesSidebarDragActionRequestedCallback (placesSidebarDragActionRequestedCallbackWrapper cb)
    connectSignalFunPtr obj "drag-action-requested" cb' after

-- signal PlacesSidebar::drag-perform-drop
type PlacesSidebarDragPerformDropCallback =
    Gio.File ->
    [Gio.File] ->
    Int32 ->
    IO ()

noPlacesSidebarDragPerformDropCallback :: Maybe PlacesSidebarDragPerformDropCallback
noPlacesSidebarDragPerformDropCallback = Nothing

type PlacesSidebarDragPerformDropCallbackC =
    Ptr () ->                               -- object
    Ptr Gio.File ->
    Ptr (GList (Ptr Gio.File)) ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPlacesSidebarDragPerformDropCallback :: PlacesSidebarDragPerformDropCallbackC -> IO (FunPtr PlacesSidebarDragPerformDropCallbackC)

placesSidebarDragPerformDropClosure :: PlacesSidebarDragPerformDropCallback -> IO Closure
placesSidebarDragPerformDropClosure cb = newCClosure =<< mkPlacesSidebarDragPerformDropCallback wrapped
    where wrapped = placesSidebarDragPerformDropCallbackWrapper cb

placesSidebarDragPerformDropCallbackWrapper ::
    PlacesSidebarDragPerformDropCallback ->
    Ptr () ->
    Ptr Gio.File ->
    Ptr (GList (Ptr Gio.File)) ->
    Int32 ->
    Ptr () ->
    IO ()
placesSidebarDragPerformDropCallbackWrapper _cb _ dest_file source_file_list action _ = do
    dest_file' <- (newObject Gio.File) dest_file
    source_file_list' <- unpackGList source_file_list
    source_file_list'' <- mapM (newObject Gio.File) source_file_list'
    _cb  dest_file' source_file_list'' action

onPlacesSidebarDragPerformDrop :: (GObject a, MonadIO m) => a -> PlacesSidebarDragPerformDropCallback -> m SignalHandlerId
onPlacesSidebarDragPerformDrop obj cb = liftIO $ connectPlacesSidebarDragPerformDrop obj cb SignalConnectBefore
afterPlacesSidebarDragPerformDrop :: (GObject a, MonadIO m) => a -> PlacesSidebarDragPerformDropCallback -> m SignalHandlerId
afterPlacesSidebarDragPerformDrop obj cb = connectPlacesSidebarDragPerformDrop obj cb SignalConnectAfter

connectPlacesSidebarDragPerformDrop :: (GObject a, MonadIO m) =>
                                       a -> PlacesSidebarDragPerformDropCallback -> SignalConnectMode -> m SignalHandlerId
connectPlacesSidebarDragPerformDrop obj cb after = liftIO $ do
    cb' <- mkPlacesSidebarDragPerformDropCallback (placesSidebarDragPerformDropCallbackWrapper cb)
    connectSignalFunPtr obj "drag-perform-drop" cb' after

-- signal PlacesSidebar::open-location
type PlacesSidebarOpenLocationCallback =
    Gio.File ->
    [PlacesOpenFlags] ->
    IO ()

noPlacesSidebarOpenLocationCallback :: Maybe PlacesSidebarOpenLocationCallback
noPlacesSidebarOpenLocationCallback = Nothing

type PlacesSidebarOpenLocationCallbackC =
    Ptr () ->                               -- object
    Ptr Gio.File ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPlacesSidebarOpenLocationCallback :: PlacesSidebarOpenLocationCallbackC -> IO (FunPtr PlacesSidebarOpenLocationCallbackC)

placesSidebarOpenLocationClosure :: PlacesSidebarOpenLocationCallback -> IO Closure
placesSidebarOpenLocationClosure cb = newCClosure =<< mkPlacesSidebarOpenLocationCallback wrapped
    where wrapped = placesSidebarOpenLocationCallbackWrapper cb

placesSidebarOpenLocationCallbackWrapper ::
    PlacesSidebarOpenLocationCallback ->
    Ptr () ->
    Ptr Gio.File ->
    CUInt ->
    Ptr () ->
    IO ()
placesSidebarOpenLocationCallbackWrapper _cb _ location open_flags _ = do
    location' <- (newObject Gio.File) location
    let open_flags' = wordToGFlags open_flags
    _cb  location' open_flags'

onPlacesSidebarOpenLocation :: (GObject a, MonadIO m) => a -> PlacesSidebarOpenLocationCallback -> m SignalHandlerId
onPlacesSidebarOpenLocation obj cb = liftIO $ connectPlacesSidebarOpenLocation obj cb SignalConnectBefore
afterPlacesSidebarOpenLocation :: (GObject a, MonadIO m) => a -> PlacesSidebarOpenLocationCallback -> m SignalHandlerId
afterPlacesSidebarOpenLocation obj cb = connectPlacesSidebarOpenLocation obj cb SignalConnectAfter

connectPlacesSidebarOpenLocation :: (GObject a, MonadIO m) =>
                                    a -> PlacesSidebarOpenLocationCallback -> SignalConnectMode -> m SignalHandlerId
connectPlacesSidebarOpenLocation obj cb after = liftIO $ do
    cb' <- mkPlacesSidebarOpenLocationCallback (placesSidebarOpenLocationCallbackWrapper cb)
    connectSignalFunPtr obj "open-location" cb' after

-- signal PlacesSidebar::populate-popup
type PlacesSidebarPopulatePopupCallback =
    Widget ->
    Maybe Gio.File ->
    Maybe Gio.Volume ->
    IO ()

noPlacesSidebarPopulatePopupCallback :: Maybe PlacesSidebarPopulatePopupCallback
noPlacesSidebarPopulatePopupCallback = Nothing

type PlacesSidebarPopulatePopupCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr Gio.File ->
    Ptr Gio.Volume ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPlacesSidebarPopulatePopupCallback :: PlacesSidebarPopulatePopupCallbackC -> IO (FunPtr PlacesSidebarPopulatePopupCallbackC)

placesSidebarPopulatePopupClosure :: PlacesSidebarPopulatePopupCallback -> IO Closure
placesSidebarPopulatePopupClosure cb = newCClosure =<< mkPlacesSidebarPopulatePopupCallback wrapped
    where wrapped = placesSidebarPopulatePopupCallbackWrapper cb

placesSidebarPopulatePopupCallbackWrapper ::
    PlacesSidebarPopulatePopupCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr Gio.File ->
    Ptr Gio.Volume ->
    Ptr () ->
    IO ()
placesSidebarPopulatePopupCallbackWrapper _cb _ container selected_item selected_volume _ = do
    container' <- (newObject Widget) container
    maybeSelected_item <-
        if selected_item == nullPtr
        then return Nothing
        else do
            selected_item' <- (newObject Gio.File) selected_item
            return $ Just selected_item'
    maybeSelected_volume <-
        if selected_volume == nullPtr
        then return Nothing
        else do
            selected_volume' <- (newObject Gio.Volume) selected_volume
            return $ Just selected_volume'
    _cb  container' maybeSelected_item maybeSelected_volume

onPlacesSidebarPopulatePopup :: (GObject a, MonadIO m) => a -> PlacesSidebarPopulatePopupCallback -> m SignalHandlerId
onPlacesSidebarPopulatePopup obj cb = liftIO $ connectPlacesSidebarPopulatePopup obj cb SignalConnectBefore
afterPlacesSidebarPopulatePopup :: (GObject a, MonadIO m) => a -> PlacesSidebarPopulatePopupCallback -> m SignalHandlerId
afterPlacesSidebarPopulatePopup obj cb = connectPlacesSidebarPopulatePopup obj cb SignalConnectAfter

connectPlacesSidebarPopulatePopup :: (GObject a, MonadIO m) =>
                                     a -> PlacesSidebarPopulatePopupCallback -> SignalConnectMode -> m SignalHandlerId
connectPlacesSidebarPopulatePopup obj cb after = liftIO $ do
    cb' <- mkPlacesSidebarPopulatePopupCallback (placesSidebarPopulatePopupCallbackWrapper cb)
    connectSignalFunPtr obj "populate-popup" cb' after

-- signal PlacesSidebar::show-connect-to-server
type PlacesSidebarShowConnectToServerCallback =
    IO ()

noPlacesSidebarShowConnectToServerCallback :: Maybe PlacesSidebarShowConnectToServerCallback
noPlacesSidebarShowConnectToServerCallback = Nothing

type PlacesSidebarShowConnectToServerCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPlacesSidebarShowConnectToServerCallback :: PlacesSidebarShowConnectToServerCallbackC -> IO (FunPtr PlacesSidebarShowConnectToServerCallbackC)

placesSidebarShowConnectToServerClosure :: PlacesSidebarShowConnectToServerCallback -> IO Closure
placesSidebarShowConnectToServerClosure cb = newCClosure =<< mkPlacesSidebarShowConnectToServerCallback wrapped
    where wrapped = placesSidebarShowConnectToServerCallbackWrapper cb

placesSidebarShowConnectToServerCallbackWrapper ::
    PlacesSidebarShowConnectToServerCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
placesSidebarShowConnectToServerCallbackWrapper _cb _ _ = do
    _cb 

onPlacesSidebarShowConnectToServer :: (GObject a, MonadIO m) => a -> PlacesSidebarShowConnectToServerCallback -> m SignalHandlerId
onPlacesSidebarShowConnectToServer obj cb = liftIO $ connectPlacesSidebarShowConnectToServer obj cb SignalConnectBefore
afterPlacesSidebarShowConnectToServer :: (GObject a, MonadIO m) => a -> PlacesSidebarShowConnectToServerCallback -> m SignalHandlerId
afterPlacesSidebarShowConnectToServer obj cb = connectPlacesSidebarShowConnectToServer obj cb SignalConnectAfter

connectPlacesSidebarShowConnectToServer :: (GObject a, MonadIO m) =>
                                           a -> PlacesSidebarShowConnectToServerCallback -> SignalConnectMode -> m SignalHandlerId
connectPlacesSidebarShowConnectToServer obj cb after = liftIO $ do
    cb' <- mkPlacesSidebarShowConnectToServerCallback (placesSidebarShowConnectToServerCallbackWrapper cb)
    connectSignalFunPtr obj "show-connect-to-server" cb' after

-- signal PlacesSidebar::show-enter-location
type PlacesSidebarShowEnterLocationCallback =
    IO ()

noPlacesSidebarShowEnterLocationCallback :: Maybe PlacesSidebarShowEnterLocationCallback
noPlacesSidebarShowEnterLocationCallback = Nothing

type PlacesSidebarShowEnterLocationCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPlacesSidebarShowEnterLocationCallback :: PlacesSidebarShowEnterLocationCallbackC -> IO (FunPtr PlacesSidebarShowEnterLocationCallbackC)

placesSidebarShowEnterLocationClosure :: PlacesSidebarShowEnterLocationCallback -> IO Closure
placesSidebarShowEnterLocationClosure cb = newCClosure =<< mkPlacesSidebarShowEnterLocationCallback wrapped
    where wrapped = placesSidebarShowEnterLocationCallbackWrapper cb

placesSidebarShowEnterLocationCallbackWrapper ::
    PlacesSidebarShowEnterLocationCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
placesSidebarShowEnterLocationCallbackWrapper _cb _ _ = do
    _cb 

onPlacesSidebarShowEnterLocation :: (GObject a, MonadIO m) => a -> PlacesSidebarShowEnterLocationCallback -> m SignalHandlerId
onPlacesSidebarShowEnterLocation obj cb = liftIO $ connectPlacesSidebarShowEnterLocation obj cb SignalConnectBefore
afterPlacesSidebarShowEnterLocation :: (GObject a, MonadIO m) => a -> PlacesSidebarShowEnterLocationCallback -> m SignalHandlerId
afterPlacesSidebarShowEnterLocation obj cb = connectPlacesSidebarShowEnterLocation obj cb SignalConnectAfter

connectPlacesSidebarShowEnterLocation :: (GObject a, MonadIO m) =>
                                         a -> PlacesSidebarShowEnterLocationCallback -> SignalConnectMode -> m SignalHandlerId
connectPlacesSidebarShowEnterLocation obj cb after = liftIO $ do
    cb' <- mkPlacesSidebarShowEnterLocationCallback (placesSidebarShowEnterLocationCallbackWrapper cb)
    connectSignalFunPtr obj "show-enter-location" cb' after

-- signal PlacesSidebar::show-error-message
type PlacesSidebarShowErrorMessageCallback =
    T.Text ->
    T.Text ->
    IO ()

noPlacesSidebarShowErrorMessageCallback :: Maybe PlacesSidebarShowErrorMessageCallback
noPlacesSidebarShowErrorMessageCallback = Nothing

type PlacesSidebarShowErrorMessageCallbackC =
    Ptr () ->                               -- object
    CString ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPlacesSidebarShowErrorMessageCallback :: PlacesSidebarShowErrorMessageCallbackC -> IO (FunPtr PlacesSidebarShowErrorMessageCallbackC)

placesSidebarShowErrorMessageClosure :: PlacesSidebarShowErrorMessageCallback -> IO Closure
placesSidebarShowErrorMessageClosure cb = newCClosure =<< mkPlacesSidebarShowErrorMessageCallback wrapped
    where wrapped = placesSidebarShowErrorMessageCallbackWrapper cb

placesSidebarShowErrorMessageCallbackWrapper ::
    PlacesSidebarShowErrorMessageCallback ->
    Ptr () ->
    CString ->
    CString ->
    Ptr () ->
    IO ()
placesSidebarShowErrorMessageCallbackWrapper _cb _ primary secondary _ = do
    primary' <- cstringToText primary
    secondary' <- cstringToText secondary
    _cb  primary' secondary'

onPlacesSidebarShowErrorMessage :: (GObject a, MonadIO m) => a -> PlacesSidebarShowErrorMessageCallback -> m SignalHandlerId
onPlacesSidebarShowErrorMessage obj cb = liftIO $ connectPlacesSidebarShowErrorMessage obj cb SignalConnectBefore
afterPlacesSidebarShowErrorMessage :: (GObject a, MonadIO m) => a -> PlacesSidebarShowErrorMessageCallback -> m SignalHandlerId
afterPlacesSidebarShowErrorMessage obj cb = connectPlacesSidebarShowErrorMessage obj cb SignalConnectAfter

connectPlacesSidebarShowErrorMessage :: (GObject a, MonadIO m) =>
                                        a -> PlacesSidebarShowErrorMessageCallback -> SignalConnectMode -> m SignalHandlerId
connectPlacesSidebarShowErrorMessage obj cb after = liftIO $ do
    cb' <- mkPlacesSidebarShowErrorMessageCallback (placesSidebarShowErrorMessageCallbackWrapper cb)
    connectSignalFunPtr obj "show-error-message" cb' after

-- signal PlacesSidebar::show-other-locations
type PlacesSidebarShowOtherLocationsCallback =
    IO ()

noPlacesSidebarShowOtherLocationsCallback :: Maybe PlacesSidebarShowOtherLocationsCallback
noPlacesSidebarShowOtherLocationsCallback = Nothing

type PlacesSidebarShowOtherLocationsCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPlacesSidebarShowOtherLocationsCallback :: PlacesSidebarShowOtherLocationsCallbackC -> IO (FunPtr PlacesSidebarShowOtherLocationsCallbackC)

placesSidebarShowOtherLocationsClosure :: PlacesSidebarShowOtherLocationsCallback -> IO Closure
placesSidebarShowOtherLocationsClosure cb = newCClosure =<< mkPlacesSidebarShowOtherLocationsCallback wrapped
    where wrapped = placesSidebarShowOtherLocationsCallbackWrapper cb

placesSidebarShowOtherLocationsCallbackWrapper ::
    PlacesSidebarShowOtherLocationsCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
placesSidebarShowOtherLocationsCallbackWrapper _cb _ _ = do
    _cb 

onPlacesSidebarShowOtherLocations :: (GObject a, MonadIO m) => a -> PlacesSidebarShowOtherLocationsCallback -> m SignalHandlerId
onPlacesSidebarShowOtherLocations obj cb = liftIO $ connectPlacesSidebarShowOtherLocations obj cb SignalConnectBefore
afterPlacesSidebarShowOtherLocations :: (GObject a, MonadIO m) => a -> PlacesSidebarShowOtherLocationsCallback -> m SignalHandlerId
afterPlacesSidebarShowOtherLocations obj cb = connectPlacesSidebarShowOtherLocations obj cb SignalConnectAfter

connectPlacesSidebarShowOtherLocations :: (GObject a, MonadIO m) =>
                                          a -> PlacesSidebarShowOtherLocationsCallback -> SignalConnectMode -> m SignalHandlerId
connectPlacesSidebarShowOtherLocations obj cb after = liftIO $ do
    cb' <- mkPlacesSidebarShowOtherLocationsCallback (placesSidebarShowOtherLocationsCallbackWrapper cb)
    connectSignalFunPtr obj "show-other-locations" cb' after

-- object Plug 
newtype Plug = Plug (ForeignPtr Plug)
noPlug :: Maybe Plug
noPlug = Nothing

foreign import ccall "gtk_plug_get_type"
    c_gtk_plug_get_type :: IO GType

type instance ParentTypes Plug = '[Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Plug where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_plug_get_type
    

class GObject o => PlugK o
instance (GObject o, IsDescendantOf Plug o) => PlugK o

toPlug :: PlugK o => o -> IO Plug
toPlug = unsafeCastTo Plug

-- method Plug::new
-- method type : Constructor
-- Args : [Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Plug"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_new" gtk_plug_new :: 
    Word64 ->                               -- socket_id : TBasicType TUInt64
    IO (Ptr Plug)


plugNew ::
    (MonadIO m) =>
    Word64 ->                               -- socket_id
    m Plug
plugNew socket_id = liftIO $ do
    result <- gtk_plug_new socket_id
    checkUnexpectedReturnNULL "gtk_plug_new" result
    result' <- (newObject Plug) result
    return result'

-- method Plug::new_for_display
-- method type : Constructor
-- Args : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Plug"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_new_for_display" gtk_plug_new_for_display :: 
    Ptr Gdk.Display ->                      -- display : TInterface "Gdk" "Display"
    Word64 ->                               -- socket_id : TBasicType TUInt64
    IO (Ptr Plug)


plugNewForDisplay ::
    (MonadIO m, Gdk.DisplayK a) =>
    a ->                                    -- display
    Word64 ->                               -- socket_id
    m Plug
plugNewForDisplay display socket_id = liftIO $ do
    let display' = unsafeManagedPtrCastPtr display
    result <- gtk_plug_new_for_display display' socket_id
    checkUnexpectedReturnNULL "gtk_plug_new_for_display" result
    result' <- (newObject Plug) result
    touchManagedPtr display
    return result'

-- method Plug::construct
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_construct" gtk_plug_construct :: 
    Ptr Plug ->                             -- _obj : TInterface "Gtk" "Plug"
    Word64 ->                               -- socket_id : TBasicType TUInt64
    IO ()


plugConstruct ::
    (MonadIO m, PlugK a) =>
    a ->                                    -- _obj
    Word64 ->                               -- socket_id
    m ()
plugConstruct _obj socket_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_plug_construct _obj' socket_id
    touchManagedPtr _obj
    return ()

-- method Plug::construct_for_display
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_construct_for_display" gtk_plug_construct_for_display :: 
    Ptr Plug ->                             -- _obj : TInterface "Gtk" "Plug"
    Ptr Gdk.Display ->                      -- display : TInterface "Gdk" "Display"
    Word64 ->                               -- socket_id : TBasicType TUInt64
    IO ()


plugConstructForDisplay ::
    (MonadIO m, PlugK a, Gdk.DisplayK b) =>
    a ->                                    -- _obj
    b ->                                    -- display
    Word64 ->                               -- socket_id
    m ()
plugConstructForDisplay _obj display socket_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let display' = unsafeManagedPtrCastPtr display
    gtk_plug_construct_for_display _obj' display' socket_id
    touchManagedPtr _obj
    touchManagedPtr display
    return ()

-- method Plug::get_embedded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_get_embedded" gtk_plug_get_embedded :: 
    Ptr Plug ->                             -- _obj : TInterface "Gtk" "Plug"
    IO CInt


plugGetEmbedded ::
    (MonadIO m, PlugK a) =>
    a ->                                    -- _obj
    m Bool
plugGetEmbedded _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_plug_get_embedded _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Plug::get_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_get_id" gtk_plug_get_id :: 
    Ptr Plug ->                             -- _obj : TInterface "Gtk" "Plug"
    IO Word64


plugGetId ::
    (MonadIO m, PlugK a) =>
    a ->                                    -- _obj
    m Word64
plugGetId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_plug_get_id _obj'
    touchManagedPtr _obj
    return result

-- method Plug::get_socket_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_get_socket_window" gtk_plug_get_socket_window :: 
    Ptr Plug ->                             -- _obj : TInterface "Gtk" "Plug"
    IO (Ptr Gdk.Window)


plugGetSocketWindow ::
    (MonadIO m, PlugK a) =>
    a ->                                    -- _obj
    m Gdk.Window
plugGetSocketWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_plug_get_socket_window _obj'
    checkUnexpectedReturnNULL "gtk_plug_get_socket_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- signal Plug::embedded
type PlugEmbeddedCallback =
    IO ()

noPlugEmbeddedCallback :: Maybe PlugEmbeddedCallback
noPlugEmbeddedCallback = Nothing

type PlugEmbeddedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPlugEmbeddedCallback :: PlugEmbeddedCallbackC -> IO (FunPtr PlugEmbeddedCallbackC)

plugEmbeddedClosure :: PlugEmbeddedCallback -> IO Closure
plugEmbeddedClosure cb = newCClosure =<< mkPlugEmbeddedCallback wrapped
    where wrapped = plugEmbeddedCallbackWrapper cb

plugEmbeddedCallbackWrapper ::
    PlugEmbeddedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
plugEmbeddedCallbackWrapper _cb _ _ = do
    _cb 

onPlugEmbedded :: (GObject a, MonadIO m) => a -> PlugEmbeddedCallback -> m SignalHandlerId
onPlugEmbedded obj cb = liftIO $ connectPlugEmbedded obj cb SignalConnectBefore
afterPlugEmbedded :: (GObject a, MonadIO m) => a -> PlugEmbeddedCallback -> m SignalHandlerId
afterPlugEmbedded obj cb = connectPlugEmbedded obj cb SignalConnectAfter

connectPlugEmbedded :: (GObject a, MonadIO m) =>
                       a -> PlugEmbeddedCallback -> SignalConnectMode -> m SignalHandlerId
connectPlugEmbedded obj cb after = liftIO $ do
    cb' <- mkPlugEmbeddedCallback (plugEmbeddedCallbackWrapper cb)
    connectSignalFunPtr obj "embedded" cb' after

-- Enum PolicyType

data PolicyType = 
      PolicyTypeAlways
    | PolicyTypeAutomatic
    | PolicyTypeNever
    | PolicyTypeExternal
    | AnotherPolicyType Int
    deriving (Show, Eq)

instance Enum PolicyType where
    fromEnum PolicyTypeAlways = 0
    fromEnum PolicyTypeAutomatic = 1
    fromEnum PolicyTypeNever = 2
    fromEnum PolicyTypeExternal = 3
    fromEnum (AnotherPolicyType k) = k

    toEnum 0 = PolicyTypeAlways
    toEnum 1 = PolicyTypeAutomatic
    toEnum 2 = PolicyTypeNever
    toEnum 3 = PolicyTypeExternal
    toEnum k = AnotherPolicyType k

foreign import ccall "gtk_policy_type_get_type" c_gtk_policy_type_get_type :: 
    IO GType

instance BoxedEnum PolicyType where
    boxedEnumType _ = c_gtk_policy_type_get_type

-- object Popover 
newtype Popover = Popover (ForeignPtr Popover)
noPopover :: Maybe Popover
noPopover = Nothing

foreign import ccall "gtk_popover_get_type"
    c_gtk_popover_get_type :: IO GType

type instance ParentTypes Popover = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Popover where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_popover_get_type
    

class GObject o => PopoverK o
instance (GObject o, IsDescendantOf Popover o) => PopoverK o

toPopover :: PopoverK o => o -> IO Popover
toPopover = unsafeCastTo Popover

-- method Popover::new
-- method type : Constructor
-- Args : [Arg {argName = "relative_to", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "relative_to", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Popover"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_new" gtk_popover_new :: 
    Ptr Widget ->                           -- relative_to : TInterface "Gtk" "Widget"
    IO (Ptr Popover)


popoverNew ::
    (MonadIO m, WidgetK a) =>
    Maybe (a) ->                            -- relative_to
    m Popover
popoverNew relative_to = liftIO $ do
    maybeRelative_to <- case relative_to of
        Nothing -> return nullPtr
        Just jRelative_to -> do
            let jRelative_to' = unsafeManagedPtrCastPtr jRelative_to
            return jRelative_to'
    result <- gtk_popover_new maybeRelative_to
    checkUnexpectedReturnNULL "gtk_popover_new" result
    result' <- (newObject Popover) result
    whenJust relative_to touchManagedPtr
    return result'

-- method Popover::new_from_model
-- method type : Constructor
-- Args : [Arg {argName = "relative_to", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "relative_to", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Popover"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_new_from_model" gtk_popover_new_from_model :: 
    Ptr Widget ->                           -- relative_to : TInterface "Gtk" "Widget"
    Ptr Gio.MenuModel ->                    -- model : TInterface "Gio" "MenuModel"
    IO (Ptr Popover)


popoverNewFromModel ::
    (MonadIO m, WidgetK a, Gio.MenuModelK b) =>
    Maybe (a) ->                            -- relative_to
    b ->                                    -- model
    m Popover
popoverNewFromModel relative_to model = liftIO $ do
    maybeRelative_to <- case relative_to of
        Nothing -> return nullPtr
        Just jRelative_to -> do
            let jRelative_to' = unsafeManagedPtrCastPtr jRelative_to
            return jRelative_to'
    let model' = unsafeManagedPtrCastPtr model
    result <- gtk_popover_new_from_model maybeRelative_to model'
    checkUnexpectedReturnNULL "gtk_popover_new_from_model" result
    result' <- (newObject Popover) result
    whenJust relative_to touchManagedPtr
    touchManagedPtr model
    return result'

-- method Popover::bind_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_namespace", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gio" "MenuModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_namespace", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_bind_model" gtk_popover_bind_model :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    Ptr Gio.MenuModel ->                    -- model : TInterface "Gio" "MenuModel"
    CString ->                              -- action_namespace : TBasicType TUTF8
    IO ()


popoverBindModel ::
    (MonadIO m, PopoverK a, Gio.MenuModelK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- model
    Maybe (T.Text) ->                       -- action_namespace
    m ()
popoverBindModel _obj model action_namespace = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeModel <- case model of
        Nothing -> return nullPtr
        Just jModel -> do
            let jModel' = unsafeManagedPtrCastPtr jModel
            return jModel'
    maybeAction_namespace <- case action_namespace of
        Nothing -> return nullPtr
        Just jAction_namespace -> do
            jAction_namespace' <- textToCString jAction_namespace
            return jAction_namespace'
    gtk_popover_bind_model _obj' maybeModel maybeAction_namespace
    touchManagedPtr _obj
    whenJust model touchManagedPtr
    freeMem maybeAction_namespace
    return ()

-- method Popover::get_default_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_get_default_widget" gtk_popover_get_default_widget :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    IO (Ptr Widget)


popoverGetDefaultWidget ::
    (MonadIO m, PopoverK a) =>
    a ->                                    -- _obj
    m Widget
popoverGetDefaultWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_popover_get_default_widget _obj'
    checkUnexpectedReturnNULL "gtk_popover_get_default_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Popover::get_modal
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_get_modal" gtk_popover_get_modal :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    IO CInt


popoverGetModal ::
    (MonadIO m, PopoverK a) =>
    a ->                                    -- _obj
    m Bool
popoverGetModal _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_popover_get_modal _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Popover::get_pointing_to
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_get_pointing_to" gtk_popover_get_pointing_to :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    Ptr Gdk.Rectangle ->                    -- rect : TInterface "Gdk" "Rectangle"
    IO CInt


popoverGetPointingTo ::
    (MonadIO m, PopoverK a) =>
    a ->                                    -- _obj
    m (Bool,Gdk.Rectangle)
popoverGetPointingTo _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    rect <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    result <- gtk_popover_get_pointing_to _obj' rect
    let result' = (/= 0) result
    rect' <- (wrapBoxed Gdk.Rectangle) rect
    touchManagedPtr _obj
    return (result', rect')

-- method Popover::get_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PositionType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_get_position" gtk_popover_get_position :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    IO CUInt


popoverGetPosition ::
    (MonadIO m, PopoverK a) =>
    a ->                                    -- _obj
    m PositionType
popoverGetPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_popover_get_position _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Popover::get_relative_to
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_get_relative_to" gtk_popover_get_relative_to :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    IO (Ptr Widget)


popoverGetRelativeTo ::
    (MonadIO m, PopoverK a) =>
    a ->                                    -- _obj
    m Widget
popoverGetRelativeTo _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_popover_get_relative_to _obj'
    checkUnexpectedReturnNULL "gtk_popover_get_relative_to" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Popover::get_transitions_enabled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_get_transitions_enabled" gtk_popover_get_transitions_enabled :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    IO CInt


popoverGetTransitionsEnabled ::
    (MonadIO m, PopoverK a) =>
    a ->                                    -- _obj
    m Bool
popoverGetTransitionsEnabled _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_popover_get_transitions_enabled _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Popover::set_default_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_set_default_widget" gtk_popover_set_default_widget :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


popoverSetDefaultWidget ::
    (MonadIO m, PopoverK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- widget
    m ()
popoverSetDefaultWidget _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    gtk_popover_set_default_widget _obj' maybeWidget
    touchManagedPtr _obj
    whenJust widget touchManagedPtr
    return ()

-- method Popover::set_modal
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modal", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modal", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_set_modal" gtk_popover_set_modal :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    CInt ->                                 -- modal : TBasicType TBoolean
    IO ()


popoverSetModal ::
    (MonadIO m, PopoverK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- modal
    m ()
popoverSetModal _obj modal = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let modal' = (fromIntegral . fromEnum) modal
    gtk_popover_set_modal _obj' modal'
    touchManagedPtr _obj
    return ()

-- method Popover::set_pointing_to
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_set_pointing_to" gtk_popover_set_pointing_to :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    Ptr Gdk.Rectangle ->                    -- rect : TInterface "Gdk" "Rectangle"
    IO ()


popoverSetPointingTo ::
    (MonadIO m, PopoverK a) =>
    a ->                                    -- _obj
    Gdk.Rectangle ->                        -- rect
    m ()
popoverSetPointingTo _obj rect = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let rect' = unsafeManagedPtrGetPtr rect
    gtk_popover_set_pointing_to _obj' rect'
    touchManagedPtr _obj
    touchManagedPtr rect
    return ()

-- method Popover::set_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_set_position" gtk_popover_set_position :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    CUInt ->                                -- position : TInterface "Gtk" "PositionType"
    IO ()


popoverSetPosition ::
    (MonadIO m, PopoverK a) =>
    a ->                                    -- _obj
    PositionType ->                         -- position
    m ()
popoverSetPosition _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let position' = (fromIntegral . fromEnum) position
    gtk_popover_set_position _obj' position'
    touchManagedPtr _obj
    return ()

-- method Popover::set_relative_to
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relative_to", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relative_to", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_set_relative_to" gtk_popover_set_relative_to :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    Ptr Widget ->                           -- relative_to : TInterface "Gtk" "Widget"
    IO ()


popoverSetRelativeTo ::
    (MonadIO m, PopoverK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- relative_to
    m ()
popoverSetRelativeTo _obj relative_to = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeRelative_to <- case relative_to of
        Nothing -> return nullPtr
        Just jRelative_to -> do
            let jRelative_to' = unsafeManagedPtrCastPtr jRelative_to
            return jRelative_to'
    gtk_popover_set_relative_to _obj' maybeRelative_to
    touchManagedPtr _obj
    whenJust relative_to touchManagedPtr
    return ()

-- method Popover::set_transitions_enabled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "transitions_enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Popover", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "transitions_enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_set_transitions_enabled" gtk_popover_set_transitions_enabled :: 
    Ptr Popover ->                          -- _obj : TInterface "Gtk" "Popover"
    CInt ->                                 -- transitions_enabled : TBasicType TBoolean
    IO ()


popoverSetTransitionsEnabled ::
    (MonadIO m, PopoverK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- transitions_enabled
    m ()
popoverSetTransitionsEnabled _obj transitions_enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let transitions_enabled' = (fromIntegral . fromEnum) transitions_enabled
    gtk_popover_set_transitions_enabled _obj' transitions_enabled'
    touchManagedPtr _obj
    return ()

-- signal Popover::closed
type PopoverClosedCallback =
    IO ()

noPopoverClosedCallback :: Maybe PopoverClosedCallback
noPopoverClosedCallback = Nothing

type PopoverClosedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPopoverClosedCallback :: PopoverClosedCallbackC -> IO (FunPtr PopoverClosedCallbackC)

popoverClosedClosure :: PopoverClosedCallback -> IO Closure
popoverClosedClosure cb = newCClosure =<< mkPopoverClosedCallback wrapped
    where wrapped = popoverClosedCallbackWrapper cb

popoverClosedCallbackWrapper ::
    PopoverClosedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
popoverClosedCallbackWrapper _cb _ _ = do
    _cb 

onPopoverClosed :: (GObject a, MonadIO m) => a -> PopoverClosedCallback -> m SignalHandlerId
onPopoverClosed obj cb = liftIO $ connectPopoverClosed obj cb SignalConnectBefore
afterPopoverClosed :: (GObject a, MonadIO m) => a -> PopoverClosedCallback -> m SignalHandlerId
afterPopoverClosed obj cb = connectPopoverClosed obj cb SignalConnectAfter

connectPopoverClosed :: (GObject a, MonadIO m) =>
                        a -> PopoverClosedCallback -> SignalConnectMode -> m SignalHandlerId
connectPopoverClosed obj cb after = liftIO $ do
    cb' <- mkPopoverClosedCallback (popoverClosedCallbackWrapper cb)
    connectSignalFunPtr obj "closed" cb' after

-- object PopoverAccessible 
newtype PopoverAccessible = PopoverAccessible (ForeignPtr PopoverAccessible)
noPopoverAccessible :: Maybe PopoverAccessible
noPopoverAccessible = Nothing

foreign import ccall "gtk_popover_accessible_get_type"
    c_gtk_popover_accessible_get_type :: IO GType

type instance ParentTypes PopoverAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component]

instance GObject PopoverAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_popover_accessible_get_type
    

class GObject o => PopoverAccessibleK o
instance (GObject o, IsDescendantOf PopoverAccessible o) => PopoverAccessibleK o

toPopoverAccessible :: PopoverAccessibleK o => o -> IO PopoverAccessible
toPopoverAccessible = unsafeCastTo PopoverAccessible

-- object PopoverMenu 
newtype PopoverMenu = PopoverMenu (ForeignPtr PopoverMenu)
noPopoverMenu :: Maybe PopoverMenu
noPopoverMenu = Nothing

foreign import ccall "gtk_popover_menu_get_type"
    c_gtk_popover_menu_get_type :: IO GType

type instance ParentTypes PopoverMenu = '[Popover, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject PopoverMenu where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_popover_menu_get_type
    

class GObject o => PopoverMenuK o
instance (GObject o, IsDescendantOf PopoverMenu o) => PopoverMenuK o

toPopoverMenu :: PopoverMenuK o => o -> IO PopoverMenu
toPopoverMenu = unsafeCastTo PopoverMenu

-- method PopoverMenu::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "PopoverMenu"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_menu_new" gtk_popover_menu_new :: 
    IO (Ptr PopoverMenu)


popoverMenuNew ::
    (MonadIO m) =>
    m PopoverMenu
popoverMenuNew  = liftIO $ do
    result <- gtk_popover_menu_new
    checkUnexpectedReturnNULL "gtk_popover_menu_new" result
    result' <- (newObject PopoverMenu) result
    return result'

-- method PopoverMenu::open_submenu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PopoverMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PopoverMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_popover_menu_open_submenu" gtk_popover_menu_open_submenu :: 
    Ptr PopoverMenu ->                      -- _obj : TInterface "Gtk" "PopoverMenu"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


popoverMenuOpenSubmenu ::
    (MonadIO m, PopoverMenuK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
popoverMenuOpenSubmenu _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    gtk_popover_menu_open_submenu _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- Enum PositionType

data PositionType = 
      PositionTypeLeft
    | PositionTypeRight
    | PositionTypeTop
    | PositionTypeBottom
    | AnotherPositionType Int
    deriving (Show, Eq)

instance Enum PositionType where
    fromEnum PositionTypeLeft = 0
    fromEnum PositionTypeRight = 1
    fromEnum PositionTypeTop = 2
    fromEnum PositionTypeBottom = 3
    fromEnum (AnotherPositionType k) = k

    toEnum 0 = PositionTypeLeft
    toEnum 1 = PositionTypeRight
    toEnum 2 = PositionTypeTop
    toEnum 3 = PositionTypeBottom
    toEnum k = AnotherPositionType k

foreign import ccall "gtk_position_type_get_type" c_gtk_position_type_get_type :: 
    IO GType

instance BoxedEnum PositionType where
    boxedEnumType _ = c_gtk_position_type_get_type

-- object PrintContext 
newtype PrintContext = PrintContext (ForeignPtr PrintContext)
noPrintContext :: Maybe PrintContext
noPrintContext = Nothing

foreign import ccall "gtk_print_context_get_type"
    c_gtk_print_context_get_type :: IO GType

type instance ParentTypes PrintContext = '[GObject.Object]

instance GObject PrintContext where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_print_context_get_type
    

class GObject o => PrintContextK o
instance (GObject o, IsDescendantOf PrintContext o) => PrintContextK o

toPrintContext :: PrintContextK o => o -> IO PrintContext
toPrintContext = unsafeCastTo PrintContext

-- method PrintContext::create_pango_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Context"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_context_create_pango_context" gtk_print_context_create_pango_context :: 
    Ptr PrintContext ->                     -- _obj : TInterface "Gtk" "PrintContext"
    IO (Ptr Pango.Context)


printContextCreatePangoContext ::
    (MonadIO m, PrintContextK a) =>
    a ->                                    -- _obj
    m Pango.Context
printContextCreatePangoContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_context_create_pango_context _obj'
    checkUnexpectedReturnNULL "gtk_print_context_create_pango_context" result
    result' <- (wrapObject Pango.Context) result
    touchManagedPtr _obj
    return result'

-- method PrintContext::create_pango_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Layout"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_context_create_pango_layout" gtk_print_context_create_pango_layout :: 
    Ptr PrintContext ->                     -- _obj : TInterface "Gtk" "PrintContext"
    IO (Ptr Pango.Layout)


printContextCreatePangoLayout ::
    (MonadIO m, PrintContextK a) =>
    a ->                                    -- _obj
    m Pango.Layout
printContextCreatePangoLayout _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_context_create_pango_layout _obj'
    checkUnexpectedReturnNULL "gtk_print_context_create_pango_layout" result
    result' <- (wrapObject Pango.Layout) result
    touchManagedPtr _obj
    return result'

-- method PrintContext::get_cairo_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Context"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_context_get_cairo_context" gtk_print_context_get_cairo_context :: 
    Ptr PrintContext ->                     -- _obj : TInterface "Gtk" "PrintContext"
    IO (Ptr Cairo.Context)


printContextGetCairoContext ::
    (MonadIO m, PrintContextK a) =>
    a ->                                    -- _obj
    m Cairo.Context
printContextGetCairoContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_context_get_cairo_context _obj'
    checkUnexpectedReturnNULL "gtk_print_context_get_cairo_context" result
    result' <- (newBoxed Cairo.Context) result
    touchManagedPtr _obj
    return result'

-- method PrintContext::get_dpi_x
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_context_get_dpi_x" gtk_print_context_get_dpi_x :: 
    Ptr PrintContext ->                     -- _obj : TInterface "Gtk" "PrintContext"
    IO CDouble


printContextGetDpiX ::
    (MonadIO m, PrintContextK a) =>
    a ->                                    -- _obj
    m Double
printContextGetDpiX _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_context_get_dpi_x _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PrintContext::get_dpi_y
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_context_get_dpi_y" gtk_print_context_get_dpi_y :: 
    Ptr PrintContext ->                     -- _obj : TInterface "Gtk" "PrintContext"
    IO CDouble


printContextGetDpiY ::
    (MonadIO m, PrintContextK a) =>
    a ->                                    -- _obj
    m Double
printContextGetDpiY _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_context_get_dpi_y _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PrintContext::get_hard_margins
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "bottom", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "left", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "right", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_context_get_hard_margins" gtk_print_context_get_hard_margins :: 
    Ptr PrintContext ->                     -- _obj : TInterface "Gtk" "PrintContext"
    Ptr CDouble ->                          -- top : TBasicType TDouble
    Ptr CDouble ->                          -- bottom : TBasicType TDouble
    Ptr CDouble ->                          -- left : TBasicType TDouble
    Ptr CDouble ->                          -- right : TBasicType TDouble
    IO CInt


printContextGetHardMargins ::
    (MonadIO m, PrintContextK a) =>
    a ->                                    -- _obj
    m (Bool,Double,Double,Double,Double)
printContextGetHardMargins _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    top <- allocMem :: IO (Ptr CDouble)
    bottom <- allocMem :: IO (Ptr CDouble)
    left <- allocMem :: IO (Ptr CDouble)
    right <- allocMem :: IO (Ptr CDouble)
    result <- gtk_print_context_get_hard_margins _obj' top bottom left right
    let result' = (/= 0) result
    top' <- peek top
    let top'' = realToFrac top'
    bottom' <- peek bottom
    let bottom'' = realToFrac bottom'
    left' <- peek left
    let left'' = realToFrac left'
    right' <- peek right
    let right'' = realToFrac right'
    touchManagedPtr _obj
    freeMem top
    freeMem bottom
    freeMem left
    freeMem right
    return (result', top'', bottom'', left'', right'')

-- method PrintContext::get_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_context_get_height" gtk_print_context_get_height :: 
    Ptr PrintContext ->                     -- _obj : TInterface "Gtk" "PrintContext"
    IO CDouble


printContextGetHeight ::
    (MonadIO m, PrintContextK a) =>
    a ->                                    -- _obj
    m Double
printContextGetHeight _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_context_get_height _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PrintContext::get_page_setup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PageSetup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_context_get_page_setup" gtk_print_context_get_page_setup :: 
    Ptr PrintContext ->                     -- _obj : TInterface "Gtk" "PrintContext"
    IO (Ptr PageSetup)


printContextGetPageSetup ::
    (MonadIO m, PrintContextK a) =>
    a ->                                    -- _obj
    m PageSetup
printContextGetPageSetup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_context_get_page_setup _obj'
    checkUnexpectedReturnNULL "gtk_print_context_get_page_setup" result
    result' <- (newObject PageSetup) result
    touchManagedPtr _obj
    return result'

-- method PrintContext::get_pango_fontmap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontMap"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_context_get_pango_fontmap" gtk_print_context_get_pango_fontmap :: 
    Ptr PrintContext ->                     -- _obj : TInterface "Gtk" "PrintContext"
    IO (Ptr Pango.FontMap)


printContextGetPangoFontmap ::
    (MonadIO m, PrintContextK a) =>
    a ->                                    -- _obj
    m Pango.FontMap
printContextGetPangoFontmap _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_context_get_pango_fontmap _obj'
    checkUnexpectedReturnNULL "gtk_print_context_get_pango_fontmap" result
    result' <- (newObject Pango.FontMap) result
    touchManagedPtr _obj
    return result'

-- method PrintContext::get_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_context_get_width" gtk_print_context_get_width :: 
    Ptr PrintContext ->                     -- _obj : TInterface "Gtk" "PrintContext"
    IO CDouble


printContextGetWidth ::
    (MonadIO m, PrintContextK a) =>
    a ->                                    -- _obj
    m Double
printContextGetWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_context_get_width _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PrintContext::set_cairo_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dpi_x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dpi_y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dpi_x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dpi_y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_context_set_cairo_context" gtk_print_context_set_cairo_context :: 
    Ptr PrintContext ->                     -- _obj : TInterface "Gtk" "PrintContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- dpi_x : TBasicType TDouble
    CDouble ->                              -- dpi_y : TBasicType TDouble
    IO ()


printContextSetCairoContext ::
    (MonadIO m, PrintContextK a) =>
    a ->                                    -- _obj
    Cairo.Context ->                        -- cr
    Double ->                               -- dpi_x
    Double ->                               -- dpi_y
    m ()
printContextSetCairoContext _obj cr dpi_x dpi_y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cr' = unsafeManagedPtrGetPtr cr
    let dpi_x' = realToFrac dpi_x
    let dpi_y' = realToFrac dpi_y
    gtk_print_context_set_cairo_context _obj' cr' dpi_x' dpi_y'
    touchManagedPtr _obj
    touchManagedPtr cr
    return ()

-- Enum PrintDuplex

data PrintDuplex = 
      PrintDuplexSimplex
    | PrintDuplexHorizontal
    | PrintDuplexVertical
    | AnotherPrintDuplex Int
    deriving (Show, Eq)

instance Enum PrintDuplex where
    fromEnum PrintDuplexSimplex = 0
    fromEnum PrintDuplexHorizontal = 1
    fromEnum PrintDuplexVertical = 2
    fromEnum (AnotherPrintDuplex k) = k

    toEnum 0 = PrintDuplexSimplex
    toEnum 1 = PrintDuplexHorizontal
    toEnum 2 = PrintDuplexVertical
    toEnum k = AnotherPrintDuplex k

foreign import ccall "gtk_print_duplex_get_type" c_gtk_print_duplex_get_type :: 
    IO GType

instance BoxedEnum PrintDuplex where
    boxedEnumType _ = c_gtk_print_duplex_get_type

-- Enum PrintError

data PrintError = 
      PrintErrorGeneral
    | PrintErrorInternalError
    | PrintErrorNomem
    | PrintErrorInvalidFile
    | AnotherPrintError Int
    deriving (Show, Eq)

instance Enum PrintError where
    fromEnum PrintErrorGeneral = 0
    fromEnum PrintErrorInternalError = 1
    fromEnum PrintErrorNomem = 2
    fromEnum PrintErrorInvalidFile = 3
    fromEnum (AnotherPrintError k) = k

    toEnum 0 = PrintErrorGeneral
    toEnum 1 = PrintErrorInternalError
    toEnum 2 = PrintErrorNomem
    toEnum 3 = PrintErrorInvalidFile
    toEnum k = AnotherPrintError k

instance GErrorClass PrintError where
    gerrorClassDomain _ = "gtk-print-error-quark"

catchPrintError ::
    IO a ->
    (PrintError -> GErrorMessage -> IO a) ->
    IO a
catchPrintError = catchGErrorJustDomain

handlePrintError ::
    (PrintError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handlePrintError = handleGErrorJustDomain

foreign import ccall "gtk_print_error_get_type" c_gtk_print_error_get_type :: 
    IO GType

instance BoxedEnum PrintError where
    boxedEnumType _ = c_gtk_print_error_get_type

-- object PrintOperation 
newtype PrintOperation = PrintOperation (ForeignPtr PrintOperation)
noPrintOperation :: Maybe PrintOperation
noPrintOperation = Nothing

foreign import ccall "gtk_print_operation_get_type"
    c_gtk_print_operation_get_type :: IO GType

type instance ParentTypes PrintOperation = '[GObject.Object, PrintOperationPreview]

instance GObject PrintOperation where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_print_operation_get_type
    

class GObject o => PrintOperationK o
instance (GObject o, IsDescendantOf PrintOperation o) => PrintOperationK o

toPrintOperation :: PrintOperationK o => o -> IO PrintOperation
toPrintOperation = unsafeCastTo PrintOperation

-- method PrintOperation::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "PrintOperation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_new" gtk_print_operation_new :: 
    IO (Ptr PrintOperation)


printOperationNew ::
    (MonadIO m) =>
    m PrintOperation
printOperationNew  = liftIO $ do
    result <- gtk_print_operation_new
    checkUnexpectedReturnNULL "gtk_print_operation_new" result
    result' <- (wrapObject PrintOperation) result
    return result'

-- method PrintOperation::cancel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_cancel" gtk_print_operation_cancel :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO ()


printOperationCancel ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m ()
printOperationCancel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_print_operation_cancel _obj'
    touchManagedPtr _obj
    return ()

-- method PrintOperation::draw_page_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_draw_page_finish" gtk_print_operation_draw_page_finish :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO ()


printOperationDrawPageFinish ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m ()
printOperationDrawPageFinish _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_print_operation_draw_page_finish _obj'
    touchManagedPtr _obj
    return ()

-- method PrintOperation::get_default_page_setup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PageSetup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_get_default_page_setup" gtk_print_operation_get_default_page_setup :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO (Ptr PageSetup)


printOperationGetDefaultPageSetup ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m PageSetup
printOperationGetDefaultPageSetup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_operation_get_default_page_setup _obj'
    checkUnexpectedReturnNULL "gtk_print_operation_get_default_page_setup" result
    result' <- (newObject PageSetup) result
    touchManagedPtr _obj
    return result'

-- method PrintOperation::get_embed_page_setup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_get_embed_page_setup" gtk_print_operation_get_embed_page_setup :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO CInt


printOperationGetEmbedPageSetup ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m Bool
printOperationGetEmbedPageSetup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_operation_get_embed_page_setup _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PrintOperation::get_error
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : True
-- Skip return : False

foreign import ccall "gtk_print_operation_get_error" gtk_print_operation_get_error :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    Ptr (Ptr GError) ->                     -- error
    IO ()


printOperationGetError ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m ()
printOperationGetError _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    onException (do
        propagateGError $ gtk_print_operation_get_error _obj'
        touchManagedPtr _obj
        return ()
     ) (do
        return ()
     )

-- method PrintOperation::get_has_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_get_has_selection" gtk_print_operation_get_has_selection :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO CInt


printOperationGetHasSelection ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m Bool
printOperationGetHasSelection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_operation_get_has_selection _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PrintOperation::get_n_pages_to_print
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_get_n_pages_to_print" gtk_print_operation_get_n_pages_to_print :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO Int32


printOperationGetNPagesToPrint ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m Int32
printOperationGetNPagesToPrint _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_operation_get_n_pages_to_print _obj'
    touchManagedPtr _obj
    return result

-- method PrintOperation::get_print_settings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PrintSettings"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_get_print_settings" gtk_print_operation_get_print_settings :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO (Ptr PrintSettings)


printOperationGetPrintSettings ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m PrintSettings
printOperationGetPrintSettings _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_operation_get_print_settings _obj'
    checkUnexpectedReturnNULL "gtk_print_operation_get_print_settings" result
    result' <- (newObject PrintSettings) result
    touchManagedPtr _obj
    return result'

-- method PrintOperation::get_status
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PrintStatus"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_get_status" gtk_print_operation_get_status :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO CUInt


printOperationGetStatus ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m PrintStatus
printOperationGetStatus _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_operation_get_status _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method PrintOperation::get_status_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_get_status_string" gtk_print_operation_get_status_string :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO CString


printOperationGetStatusString ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m T.Text
printOperationGetStatusString _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_operation_get_status_string _obj'
    checkUnexpectedReturnNULL "gtk_print_operation_get_status_string" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method PrintOperation::get_support_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_get_support_selection" gtk_print_operation_get_support_selection :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO CInt


printOperationGetSupportSelection ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m Bool
printOperationGetSupportSelection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_operation_get_support_selection _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PrintOperation::is_finished
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_is_finished" gtk_print_operation_is_finished :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO CInt


printOperationIsFinished ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m Bool
printOperationIsFinished _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_operation_is_finished _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PrintOperation::run
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "PrintOperationAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TInterface "Gtk" "PrintOperationAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PrintOperationResult"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_print_operation_run" gtk_print_operation_run :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CUInt ->                                -- action : TInterface "Gtk" "PrintOperationAction"
    Ptr Window ->                           -- parent : TInterface "Gtk" "Window"
    Ptr (Ptr GError) ->                     -- error
    IO CUInt


printOperationRun ::
    (MonadIO m, PrintOperationK a, WindowK b) =>
    a ->                                    -- _obj
    PrintOperationAction ->                 -- action
    Maybe (b) ->                            -- parent
    m PrintOperationResult
printOperationRun _obj action parent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action' = (fromIntegral . fromEnum) action
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    onException (do
        result <- propagateGError $ gtk_print_operation_run _obj' action' maybeParent
        let result' = (toEnum . fromIntegral) result
        touchManagedPtr _obj
        whenJust parent touchManagedPtr
        return result'
     ) (do
        return ()
     )

-- method PrintOperation::set_allow_async
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allow_async", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allow_async", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_allow_async" gtk_print_operation_set_allow_async :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CInt ->                                 -- allow_async : TBasicType TBoolean
    IO ()


printOperationSetAllowAsync ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- allow_async
    m ()
printOperationSetAllowAsync _obj allow_async = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let allow_async' = (fromIntegral . fromEnum) allow_async
    gtk_print_operation_set_allow_async _obj' allow_async'
    touchManagedPtr _obj
    return ()

-- method PrintOperation::set_current_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "current_page", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "current_page", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_current_page" gtk_print_operation_set_current_page :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    Int32 ->                                -- current_page : TBasicType TInt32
    IO ()


printOperationSetCurrentPage ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- current_page
    m ()
printOperationSetCurrentPage _obj current_page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_print_operation_set_current_page _obj' current_page
    touchManagedPtr _obj
    return ()

-- method PrintOperation::set_custom_tab_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_custom_tab_label" gtk_print_operation_set_custom_tab_label :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CString ->                              -- label : TBasicType TUTF8
    IO ()


printOperationSetCustomTabLabel ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- label
    m ()
printOperationSetCustomTabLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    gtk_print_operation_set_custom_tab_label _obj' maybeLabel
    touchManagedPtr _obj
    freeMem maybeLabel
    return ()

-- method PrintOperation::set_default_page_setup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_page_setup", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_page_setup", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_default_page_setup" gtk_print_operation_set_default_page_setup :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    Ptr PageSetup ->                        -- default_page_setup : TInterface "Gtk" "PageSetup"
    IO ()


printOperationSetDefaultPageSetup ::
    (MonadIO m, PrintOperationK a, PageSetupK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- default_page_setup
    m ()
printOperationSetDefaultPageSetup _obj default_page_setup = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeDefault_page_setup <- case default_page_setup of
        Nothing -> return nullPtr
        Just jDefault_page_setup -> do
            let jDefault_page_setup' = unsafeManagedPtrCastPtr jDefault_page_setup
            return jDefault_page_setup'
    gtk_print_operation_set_default_page_setup _obj' maybeDefault_page_setup
    touchManagedPtr _obj
    whenJust default_page_setup touchManagedPtr
    return ()

-- method PrintOperation::set_defer_drawing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_defer_drawing" gtk_print_operation_set_defer_drawing :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    IO ()


printOperationSetDeferDrawing ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m ()
printOperationSetDeferDrawing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_print_operation_set_defer_drawing _obj'
    touchManagedPtr _obj
    return ()

-- method PrintOperation::set_embed_page_setup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "embed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "embed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_embed_page_setup" gtk_print_operation_set_embed_page_setup :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CInt ->                                 -- embed : TBasicType TBoolean
    IO ()


printOperationSetEmbedPageSetup ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- embed
    m ()
printOperationSetEmbedPageSetup _obj embed = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let embed' = (fromIntegral . fromEnum) embed
    gtk_print_operation_set_embed_page_setup _obj' embed'
    touchManagedPtr _obj
    return ()

-- method PrintOperation::set_export_filename
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_export_filename" gtk_print_operation_set_export_filename :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CString ->                              -- filename : TBasicType TFileName
    IO ()


printOperationSetExportFilename ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- filename
    m ()
printOperationSetExportFilename _obj filename = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filename' <- stringToCString filename
    gtk_print_operation_set_export_filename _obj' filename'
    touchManagedPtr _obj
    freeMem filename'
    return ()

-- method PrintOperation::set_has_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_selection", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_selection", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_has_selection" gtk_print_operation_set_has_selection :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CInt ->                                 -- has_selection : TBasicType TBoolean
    IO ()


printOperationSetHasSelection ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_selection
    m ()
printOperationSetHasSelection _obj has_selection = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_selection' = (fromIntegral . fromEnum) has_selection
    gtk_print_operation_set_has_selection _obj' has_selection'
    touchManagedPtr _obj
    return ()

-- method PrintOperation::set_job_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "job_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "job_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_job_name" gtk_print_operation_set_job_name :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CString ->                              -- job_name : TBasicType TUTF8
    IO ()


printOperationSetJobName ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- job_name
    m ()
printOperationSetJobName _obj job_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    job_name' <- textToCString job_name
    gtk_print_operation_set_job_name _obj' job_name'
    touchManagedPtr _obj
    freeMem job_name'
    return ()

-- method PrintOperation::set_n_pages
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_pages", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_pages", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_n_pages" gtk_print_operation_set_n_pages :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    Int32 ->                                -- n_pages : TBasicType TInt32
    IO ()


printOperationSetNPages ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- n_pages
    m ()
printOperationSetNPages _obj n_pages = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_print_operation_set_n_pages _obj' n_pages
    touchManagedPtr _obj
    return ()

-- method PrintOperation::set_print_settings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "print_settings", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "print_settings", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_print_settings" gtk_print_operation_set_print_settings :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    Ptr PrintSettings ->                    -- print_settings : TInterface "Gtk" "PrintSettings"
    IO ()


printOperationSetPrintSettings ::
    (MonadIO m, PrintOperationK a, PrintSettingsK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- print_settings
    m ()
printOperationSetPrintSettings _obj print_settings = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePrint_settings <- case print_settings of
        Nothing -> return nullPtr
        Just jPrint_settings -> do
            let jPrint_settings' = unsafeManagedPtrCastPtr jPrint_settings
            return jPrint_settings'
    gtk_print_operation_set_print_settings _obj' maybePrint_settings
    touchManagedPtr _obj
    whenJust print_settings touchManagedPtr
    return ()

-- method PrintOperation::set_show_progress
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_progress", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_progress", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_show_progress" gtk_print_operation_set_show_progress :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CInt ->                                 -- show_progress : TBasicType TBoolean
    IO ()


printOperationSetShowProgress ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_progress
    m ()
printOperationSetShowProgress _obj show_progress = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_progress' = (fromIntegral . fromEnum) show_progress
    gtk_print_operation_set_show_progress _obj' show_progress'
    touchManagedPtr _obj
    return ()

-- method PrintOperation::set_support_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "support_selection", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "support_selection", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_support_selection" gtk_print_operation_set_support_selection :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CInt ->                                 -- support_selection : TBasicType TBoolean
    IO ()


printOperationSetSupportSelection ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- support_selection
    m ()
printOperationSetSupportSelection _obj support_selection = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let support_selection' = (fromIntegral . fromEnum) support_selection
    gtk_print_operation_set_support_selection _obj' support_selection'
    touchManagedPtr _obj
    return ()

-- method PrintOperation::set_track_print_status
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "track_status", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "track_status", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_track_print_status" gtk_print_operation_set_track_print_status :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CInt ->                                 -- track_status : TBasicType TBoolean
    IO ()


printOperationSetTrackPrintStatus ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- track_status
    m ()
printOperationSetTrackPrintStatus _obj track_status = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let track_status' = (fromIntegral . fromEnum) track_status
    gtk_print_operation_set_track_print_status _obj' track_status'
    touchManagedPtr _obj
    return ()

-- method PrintOperation::set_unit
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_unit" gtk_print_operation_set_unit :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO ()


printOperationSetUnit ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    Unit ->                                 -- unit
    m ()
printOperationSetUnit _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    gtk_print_operation_set_unit _obj' unit'
    touchManagedPtr _obj
    return ()

-- method PrintOperation::set_use_full_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "full_page", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "full_page", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_set_use_full_page" gtk_print_operation_set_use_full_page :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "Gtk" "PrintOperation"
    CInt ->                                 -- full_page : TBasicType TBoolean
    IO ()


printOperationSetUseFullPage ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- full_page
    m ()
printOperationSetUseFullPage _obj full_page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let full_page' = (fromIntegral . fromEnum) full_page
    gtk_print_operation_set_use_full_page _obj' full_page'
    touchManagedPtr _obj
    return ()

-- signal PrintOperation::begin-print
type PrintOperationBeginPrintCallback =
    PrintContext ->
    IO ()

noPrintOperationBeginPrintCallback :: Maybe PrintOperationBeginPrintCallback
noPrintOperationBeginPrintCallback = Nothing

type PrintOperationBeginPrintCallbackC =
    Ptr () ->                               -- object
    Ptr PrintContext ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationBeginPrintCallback :: PrintOperationBeginPrintCallbackC -> IO (FunPtr PrintOperationBeginPrintCallbackC)

printOperationBeginPrintClosure :: PrintOperationBeginPrintCallback -> IO Closure
printOperationBeginPrintClosure cb = newCClosure =<< mkPrintOperationBeginPrintCallback wrapped
    where wrapped = printOperationBeginPrintCallbackWrapper cb

printOperationBeginPrintCallbackWrapper ::
    PrintOperationBeginPrintCallback ->
    Ptr () ->
    Ptr PrintContext ->
    Ptr () ->
    IO ()
printOperationBeginPrintCallbackWrapper _cb _ context _ = do
    context' <- (newObject PrintContext) context
    _cb  context'

onPrintOperationBeginPrint :: (GObject a, MonadIO m) => a -> PrintOperationBeginPrintCallback -> m SignalHandlerId
onPrintOperationBeginPrint obj cb = liftIO $ connectPrintOperationBeginPrint obj cb SignalConnectBefore
afterPrintOperationBeginPrint :: (GObject a, MonadIO m) => a -> PrintOperationBeginPrintCallback -> m SignalHandlerId
afterPrintOperationBeginPrint obj cb = connectPrintOperationBeginPrint obj cb SignalConnectAfter

connectPrintOperationBeginPrint :: (GObject a, MonadIO m) =>
                                   a -> PrintOperationBeginPrintCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationBeginPrint obj cb after = liftIO $ do
    cb' <- mkPrintOperationBeginPrintCallback (printOperationBeginPrintCallbackWrapper cb)
    connectSignalFunPtr obj "begin-print" cb' after

-- signal PrintOperation::create-custom-widget
type PrintOperationCreateCustomWidgetCallback =
    IO GObject.Object

noPrintOperationCreateCustomWidgetCallback :: Maybe PrintOperationCreateCustomWidgetCallback
noPrintOperationCreateCustomWidgetCallback = Nothing

type PrintOperationCreateCustomWidgetCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO (Ptr GObject.Object)

foreign import ccall "wrapper"
    mkPrintOperationCreateCustomWidgetCallback :: PrintOperationCreateCustomWidgetCallbackC -> IO (FunPtr PrintOperationCreateCustomWidgetCallbackC)

printOperationCreateCustomWidgetClosure :: PrintOperationCreateCustomWidgetCallback -> IO Closure
printOperationCreateCustomWidgetClosure cb = newCClosure =<< mkPrintOperationCreateCustomWidgetCallback wrapped
    where wrapped = printOperationCreateCustomWidgetCallbackWrapper cb

printOperationCreateCustomWidgetCallbackWrapper ::
    PrintOperationCreateCustomWidgetCallback ->
    Ptr () ->
    Ptr () ->
    IO (Ptr GObject.Object)
printOperationCreateCustomWidgetCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = unsafeManagedPtrCastPtr result
    return result'

onPrintOperationCreateCustomWidget :: (GObject a, MonadIO m) => a -> PrintOperationCreateCustomWidgetCallback -> m SignalHandlerId
onPrintOperationCreateCustomWidget obj cb = liftIO $ connectPrintOperationCreateCustomWidget obj cb SignalConnectBefore
afterPrintOperationCreateCustomWidget :: (GObject a, MonadIO m) => a -> PrintOperationCreateCustomWidgetCallback -> m SignalHandlerId
afterPrintOperationCreateCustomWidget obj cb = connectPrintOperationCreateCustomWidget obj cb SignalConnectAfter

connectPrintOperationCreateCustomWidget :: (GObject a, MonadIO m) =>
                                           a -> PrintOperationCreateCustomWidgetCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationCreateCustomWidget obj cb after = liftIO $ do
    cb' <- mkPrintOperationCreateCustomWidgetCallback (printOperationCreateCustomWidgetCallbackWrapper cb)
    connectSignalFunPtr obj "create-custom-widget" cb' after

-- signal PrintOperation::custom-widget-apply
type PrintOperationCustomWidgetApplyCallback =
    Widget ->
    IO ()

noPrintOperationCustomWidgetApplyCallback :: Maybe PrintOperationCustomWidgetApplyCallback
noPrintOperationCustomWidgetApplyCallback = Nothing

type PrintOperationCustomWidgetApplyCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationCustomWidgetApplyCallback :: PrintOperationCustomWidgetApplyCallbackC -> IO (FunPtr PrintOperationCustomWidgetApplyCallbackC)

printOperationCustomWidgetApplyClosure :: PrintOperationCustomWidgetApplyCallback -> IO Closure
printOperationCustomWidgetApplyClosure cb = newCClosure =<< mkPrintOperationCustomWidgetApplyCallback wrapped
    where wrapped = printOperationCustomWidgetApplyCallbackWrapper cb

printOperationCustomWidgetApplyCallbackWrapper ::
    PrintOperationCustomWidgetApplyCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
printOperationCustomWidgetApplyCallbackWrapper _cb _ widget _ = do
    widget' <- (newObject Widget) widget
    _cb  widget'

onPrintOperationCustomWidgetApply :: (GObject a, MonadIO m) => a -> PrintOperationCustomWidgetApplyCallback -> m SignalHandlerId
onPrintOperationCustomWidgetApply obj cb = liftIO $ connectPrintOperationCustomWidgetApply obj cb SignalConnectBefore
afterPrintOperationCustomWidgetApply :: (GObject a, MonadIO m) => a -> PrintOperationCustomWidgetApplyCallback -> m SignalHandlerId
afterPrintOperationCustomWidgetApply obj cb = connectPrintOperationCustomWidgetApply obj cb SignalConnectAfter

connectPrintOperationCustomWidgetApply :: (GObject a, MonadIO m) =>
                                          a -> PrintOperationCustomWidgetApplyCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationCustomWidgetApply obj cb after = liftIO $ do
    cb' <- mkPrintOperationCustomWidgetApplyCallback (printOperationCustomWidgetApplyCallbackWrapper cb)
    connectSignalFunPtr obj "custom-widget-apply" cb' after

-- signal PrintOperation::done
type PrintOperationDoneCallback =
    PrintOperationResult ->
    IO ()

noPrintOperationDoneCallback :: Maybe PrintOperationDoneCallback
noPrintOperationDoneCallback = Nothing

type PrintOperationDoneCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationDoneCallback :: PrintOperationDoneCallbackC -> IO (FunPtr PrintOperationDoneCallbackC)

printOperationDoneClosure :: PrintOperationDoneCallback -> IO Closure
printOperationDoneClosure cb = newCClosure =<< mkPrintOperationDoneCallback wrapped
    where wrapped = printOperationDoneCallbackWrapper cb

printOperationDoneCallbackWrapper ::
    PrintOperationDoneCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
printOperationDoneCallbackWrapper _cb _ result_ _ = do
    let result_' = (toEnum . fromIntegral) result_
    _cb  result_'

onPrintOperationDone :: (GObject a, MonadIO m) => a -> PrintOperationDoneCallback -> m SignalHandlerId
onPrintOperationDone obj cb = liftIO $ connectPrintOperationDone obj cb SignalConnectBefore
afterPrintOperationDone :: (GObject a, MonadIO m) => a -> PrintOperationDoneCallback -> m SignalHandlerId
afterPrintOperationDone obj cb = connectPrintOperationDone obj cb SignalConnectAfter

connectPrintOperationDone :: (GObject a, MonadIO m) =>
                             a -> PrintOperationDoneCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationDone obj cb after = liftIO $ do
    cb' <- mkPrintOperationDoneCallback (printOperationDoneCallbackWrapper cb)
    connectSignalFunPtr obj "done" cb' after

-- signal PrintOperation::draw-page
type PrintOperationDrawPageCallback =
    PrintContext ->
    Int32 ->
    IO ()

noPrintOperationDrawPageCallback :: Maybe PrintOperationDrawPageCallback
noPrintOperationDrawPageCallback = Nothing

type PrintOperationDrawPageCallbackC =
    Ptr () ->                               -- object
    Ptr PrintContext ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationDrawPageCallback :: PrintOperationDrawPageCallbackC -> IO (FunPtr PrintOperationDrawPageCallbackC)

printOperationDrawPageClosure :: PrintOperationDrawPageCallback -> IO Closure
printOperationDrawPageClosure cb = newCClosure =<< mkPrintOperationDrawPageCallback wrapped
    where wrapped = printOperationDrawPageCallbackWrapper cb

printOperationDrawPageCallbackWrapper ::
    PrintOperationDrawPageCallback ->
    Ptr () ->
    Ptr PrintContext ->
    Int32 ->
    Ptr () ->
    IO ()
printOperationDrawPageCallbackWrapper _cb _ context page_nr _ = do
    context' <- (newObject PrintContext) context
    _cb  context' page_nr

onPrintOperationDrawPage :: (GObject a, MonadIO m) => a -> PrintOperationDrawPageCallback -> m SignalHandlerId
onPrintOperationDrawPage obj cb = liftIO $ connectPrintOperationDrawPage obj cb SignalConnectBefore
afterPrintOperationDrawPage :: (GObject a, MonadIO m) => a -> PrintOperationDrawPageCallback -> m SignalHandlerId
afterPrintOperationDrawPage obj cb = connectPrintOperationDrawPage obj cb SignalConnectAfter

connectPrintOperationDrawPage :: (GObject a, MonadIO m) =>
                                 a -> PrintOperationDrawPageCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationDrawPage obj cb after = liftIO $ do
    cb' <- mkPrintOperationDrawPageCallback (printOperationDrawPageCallbackWrapper cb)
    connectSignalFunPtr obj "draw-page" cb' after

-- signal PrintOperation::end-print
type PrintOperationEndPrintCallback =
    PrintContext ->
    IO ()

noPrintOperationEndPrintCallback :: Maybe PrintOperationEndPrintCallback
noPrintOperationEndPrintCallback = Nothing

type PrintOperationEndPrintCallbackC =
    Ptr () ->                               -- object
    Ptr PrintContext ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationEndPrintCallback :: PrintOperationEndPrintCallbackC -> IO (FunPtr PrintOperationEndPrintCallbackC)

printOperationEndPrintClosure :: PrintOperationEndPrintCallback -> IO Closure
printOperationEndPrintClosure cb = newCClosure =<< mkPrintOperationEndPrintCallback wrapped
    where wrapped = printOperationEndPrintCallbackWrapper cb

printOperationEndPrintCallbackWrapper ::
    PrintOperationEndPrintCallback ->
    Ptr () ->
    Ptr PrintContext ->
    Ptr () ->
    IO ()
printOperationEndPrintCallbackWrapper _cb _ context _ = do
    context' <- (newObject PrintContext) context
    _cb  context'

onPrintOperationEndPrint :: (GObject a, MonadIO m) => a -> PrintOperationEndPrintCallback -> m SignalHandlerId
onPrintOperationEndPrint obj cb = liftIO $ connectPrintOperationEndPrint obj cb SignalConnectBefore
afterPrintOperationEndPrint :: (GObject a, MonadIO m) => a -> PrintOperationEndPrintCallback -> m SignalHandlerId
afterPrintOperationEndPrint obj cb = connectPrintOperationEndPrint obj cb SignalConnectAfter

connectPrintOperationEndPrint :: (GObject a, MonadIO m) =>
                                 a -> PrintOperationEndPrintCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationEndPrint obj cb after = liftIO $ do
    cb' <- mkPrintOperationEndPrintCallback (printOperationEndPrintCallbackWrapper cb)
    connectSignalFunPtr obj "end-print" cb' after

-- signal PrintOperation::paginate
type PrintOperationPaginateCallback =
    PrintContext ->
    IO Bool

noPrintOperationPaginateCallback :: Maybe PrintOperationPaginateCallback
noPrintOperationPaginateCallback = Nothing

type PrintOperationPaginateCallbackC =
    Ptr () ->                               -- object
    Ptr PrintContext ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkPrintOperationPaginateCallback :: PrintOperationPaginateCallbackC -> IO (FunPtr PrintOperationPaginateCallbackC)

printOperationPaginateClosure :: PrintOperationPaginateCallback -> IO Closure
printOperationPaginateClosure cb = newCClosure =<< mkPrintOperationPaginateCallback wrapped
    where wrapped = printOperationPaginateCallbackWrapper cb

printOperationPaginateCallbackWrapper ::
    PrintOperationPaginateCallback ->
    Ptr () ->
    Ptr PrintContext ->
    Ptr () ->
    IO CInt
printOperationPaginateCallbackWrapper _cb _ context _ = do
    context' <- (newObject PrintContext) context
    result <- _cb  context'
    let result' = (fromIntegral . fromEnum) result
    return result'

onPrintOperationPaginate :: (GObject a, MonadIO m) => a -> PrintOperationPaginateCallback -> m SignalHandlerId
onPrintOperationPaginate obj cb = liftIO $ connectPrintOperationPaginate obj cb SignalConnectBefore
afterPrintOperationPaginate :: (GObject a, MonadIO m) => a -> PrintOperationPaginateCallback -> m SignalHandlerId
afterPrintOperationPaginate obj cb = connectPrintOperationPaginate obj cb SignalConnectAfter

connectPrintOperationPaginate :: (GObject a, MonadIO m) =>
                                 a -> PrintOperationPaginateCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationPaginate obj cb after = liftIO $ do
    cb' <- mkPrintOperationPaginateCallback (printOperationPaginateCallbackWrapper cb)
    connectSignalFunPtr obj "paginate" cb' after

-- signal PrintOperation::preview
type PrintOperationPreviewCallback =
    PrintOperationPreview ->
    PrintContext ->
    Maybe Window ->
    IO Bool

noPrintOperationPreviewCallback :: Maybe PrintOperationPreviewCallback
noPrintOperationPreviewCallback = Nothing

type PrintOperationPreviewCallbackC =
    Ptr () ->                               -- object
    Ptr PrintOperationPreview ->
    Ptr PrintContext ->
    Ptr Window ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkPrintOperationPreviewCallback :: PrintOperationPreviewCallbackC -> IO (FunPtr PrintOperationPreviewCallbackC)

printOperationPreviewClosure :: PrintOperationPreviewCallback -> IO Closure
printOperationPreviewClosure cb = newCClosure =<< mkPrintOperationPreviewCallback wrapped
    where wrapped = printOperationPreviewCallbackWrapper cb

printOperationPreviewCallbackWrapper ::
    PrintOperationPreviewCallback ->
    Ptr () ->
    Ptr PrintOperationPreview ->
    Ptr PrintContext ->
    Ptr Window ->
    Ptr () ->
    IO CInt
printOperationPreviewCallbackWrapper _cb _ preview context parent _ = do
    preview' <- (newObject PrintOperationPreview) preview
    context' <- (newObject PrintContext) context
    maybeParent <-
        if parent == nullPtr
        then return Nothing
        else do
            parent' <- (newObject Window) parent
            return $ Just parent'
    result <- _cb  preview' context' maybeParent
    let result' = (fromIntegral . fromEnum) result
    return result'

onPrintOperationPreview :: (GObject a, MonadIO m) => a -> PrintOperationPreviewCallback -> m SignalHandlerId
onPrintOperationPreview obj cb = liftIO $ connectPrintOperationPreview obj cb SignalConnectBefore
afterPrintOperationPreview :: (GObject a, MonadIO m) => a -> PrintOperationPreviewCallback -> m SignalHandlerId
afterPrintOperationPreview obj cb = connectPrintOperationPreview obj cb SignalConnectAfter

connectPrintOperationPreview :: (GObject a, MonadIO m) =>
                                a -> PrintOperationPreviewCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationPreview obj cb after = liftIO $ do
    cb' <- mkPrintOperationPreviewCallback (printOperationPreviewCallbackWrapper cb)
    connectSignalFunPtr obj "preview" cb' after

-- signal PrintOperation::request-page-setup
type PrintOperationRequestPageSetupCallback =
    PrintContext ->
    Int32 ->
    PageSetup ->
    IO ()

noPrintOperationRequestPageSetupCallback :: Maybe PrintOperationRequestPageSetupCallback
noPrintOperationRequestPageSetupCallback = Nothing

type PrintOperationRequestPageSetupCallbackC =
    Ptr () ->                               -- object
    Ptr PrintContext ->
    Int32 ->
    Ptr PageSetup ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationRequestPageSetupCallback :: PrintOperationRequestPageSetupCallbackC -> IO (FunPtr PrintOperationRequestPageSetupCallbackC)

printOperationRequestPageSetupClosure :: PrintOperationRequestPageSetupCallback -> IO Closure
printOperationRequestPageSetupClosure cb = newCClosure =<< mkPrintOperationRequestPageSetupCallback wrapped
    where wrapped = printOperationRequestPageSetupCallbackWrapper cb

printOperationRequestPageSetupCallbackWrapper ::
    PrintOperationRequestPageSetupCallback ->
    Ptr () ->
    Ptr PrintContext ->
    Int32 ->
    Ptr PageSetup ->
    Ptr () ->
    IO ()
printOperationRequestPageSetupCallbackWrapper _cb _ context page_nr setup _ = do
    context' <- (newObject PrintContext) context
    setup' <- (newObject PageSetup) setup
    _cb  context' page_nr setup'

onPrintOperationRequestPageSetup :: (GObject a, MonadIO m) => a -> PrintOperationRequestPageSetupCallback -> m SignalHandlerId
onPrintOperationRequestPageSetup obj cb = liftIO $ connectPrintOperationRequestPageSetup obj cb SignalConnectBefore
afterPrintOperationRequestPageSetup :: (GObject a, MonadIO m) => a -> PrintOperationRequestPageSetupCallback -> m SignalHandlerId
afterPrintOperationRequestPageSetup obj cb = connectPrintOperationRequestPageSetup obj cb SignalConnectAfter

connectPrintOperationRequestPageSetup :: (GObject a, MonadIO m) =>
                                         a -> PrintOperationRequestPageSetupCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationRequestPageSetup obj cb after = liftIO $ do
    cb' <- mkPrintOperationRequestPageSetupCallback (printOperationRequestPageSetupCallbackWrapper cb)
    connectSignalFunPtr obj "request-page-setup" cb' after

-- signal PrintOperation::status-changed
type PrintOperationStatusChangedCallback =
    IO ()

noPrintOperationStatusChangedCallback :: Maybe PrintOperationStatusChangedCallback
noPrintOperationStatusChangedCallback = Nothing

type PrintOperationStatusChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationStatusChangedCallback :: PrintOperationStatusChangedCallbackC -> IO (FunPtr PrintOperationStatusChangedCallbackC)

printOperationStatusChangedClosure :: PrintOperationStatusChangedCallback -> IO Closure
printOperationStatusChangedClosure cb = newCClosure =<< mkPrintOperationStatusChangedCallback wrapped
    where wrapped = printOperationStatusChangedCallbackWrapper cb

printOperationStatusChangedCallbackWrapper ::
    PrintOperationStatusChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
printOperationStatusChangedCallbackWrapper _cb _ _ = do
    _cb 

onPrintOperationStatusChanged :: (GObject a, MonadIO m) => a -> PrintOperationStatusChangedCallback -> m SignalHandlerId
onPrintOperationStatusChanged obj cb = liftIO $ connectPrintOperationStatusChanged obj cb SignalConnectBefore
afterPrintOperationStatusChanged :: (GObject a, MonadIO m) => a -> PrintOperationStatusChangedCallback -> m SignalHandlerId
afterPrintOperationStatusChanged obj cb = connectPrintOperationStatusChanged obj cb SignalConnectAfter

connectPrintOperationStatusChanged :: (GObject a, MonadIO m) =>
                                      a -> PrintOperationStatusChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationStatusChanged obj cb after = liftIO $ do
    cb' <- mkPrintOperationStatusChangedCallback (printOperationStatusChangedCallbackWrapper cb)
    connectSignalFunPtr obj "status-changed" cb' after

-- signal PrintOperation::update-custom-widget
type PrintOperationUpdateCustomWidgetCallback =
    Widget ->
    PageSetup ->
    PrintSettings ->
    IO ()

noPrintOperationUpdateCustomWidgetCallback :: Maybe PrintOperationUpdateCustomWidgetCallback
noPrintOperationUpdateCustomWidgetCallback = Nothing

type PrintOperationUpdateCustomWidgetCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr PageSetup ->
    Ptr PrintSettings ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationUpdateCustomWidgetCallback :: PrintOperationUpdateCustomWidgetCallbackC -> IO (FunPtr PrintOperationUpdateCustomWidgetCallbackC)

printOperationUpdateCustomWidgetClosure :: PrintOperationUpdateCustomWidgetCallback -> IO Closure
printOperationUpdateCustomWidgetClosure cb = newCClosure =<< mkPrintOperationUpdateCustomWidgetCallback wrapped
    where wrapped = printOperationUpdateCustomWidgetCallbackWrapper cb

printOperationUpdateCustomWidgetCallbackWrapper ::
    PrintOperationUpdateCustomWidgetCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr PageSetup ->
    Ptr PrintSettings ->
    Ptr () ->
    IO ()
printOperationUpdateCustomWidgetCallbackWrapper _cb _ widget setup settings _ = do
    widget' <- (newObject Widget) widget
    setup' <- (newObject PageSetup) setup
    settings' <- (newObject PrintSettings) settings
    _cb  widget' setup' settings'

onPrintOperationUpdateCustomWidget :: (GObject a, MonadIO m) => a -> PrintOperationUpdateCustomWidgetCallback -> m SignalHandlerId
onPrintOperationUpdateCustomWidget obj cb = liftIO $ connectPrintOperationUpdateCustomWidget obj cb SignalConnectBefore
afterPrintOperationUpdateCustomWidget :: (GObject a, MonadIO m) => a -> PrintOperationUpdateCustomWidgetCallback -> m SignalHandlerId
afterPrintOperationUpdateCustomWidget obj cb = connectPrintOperationUpdateCustomWidget obj cb SignalConnectAfter

connectPrintOperationUpdateCustomWidget :: (GObject a, MonadIO m) =>
                                           a -> PrintOperationUpdateCustomWidgetCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationUpdateCustomWidget obj cb after = liftIO $ do
    cb' <- mkPrintOperationUpdateCustomWidgetCallback (printOperationUpdateCustomWidgetCallbackWrapper cb)
    connectSignalFunPtr obj "update-custom-widget" cb' after

-- Enum PrintOperationAction

data PrintOperationAction = 
      PrintOperationActionPrintDialog
    | PrintOperationActionPrint
    | PrintOperationActionPreview
    | PrintOperationActionExport
    | AnotherPrintOperationAction Int
    deriving (Show, Eq)

instance Enum PrintOperationAction where
    fromEnum PrintOperationActionPrintDialog = 0
    fromEnum PrintOperationActionPrint = 1
    fromEnum PrintOperationActionPreview = 2
    fromEnum PrintOperationActionExport = 3
    fromEnum (AnotherPrintOperationAction k) = k

    toEnum 0 = PrintOperationActionPrintDialog
    toEnum 1 = PrintOperationActionPrint
    toEnum 2 = PrintOperationActionPreview
    toEnum 3 = PrintOperationActionExport
    toEnum k = AnotherPrintOperationAction k

foreign import ccall "gtk_print_operation_action_get_type" c_gtk_print_operation_action_get_type :: 
    IO GType

instance BoxedEnum PrintOperationAction where
    boxedEnumType _ = c_gtk_print_operation_action_get_type

-- interface PrintOperationPreview 

newtype PrintOperationPreview = PrintOperationPreview (ForeignPtr PrintOperationPreview)
noPrintOperationPreview :: Maybe PrintOperationPreview
noPrintOperationPreview = Nothing

foreign import ccall "gtk_print_operation_preview_get_type"
    c_gtk_print_operation_preview_get_type :: IO GType

type instance ParentTypes PrintOperationPreview = '[GObject.Object]

instance GObject PrintOperationPreview where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_print_operation_preview_get_type
    

class GObject o => PrintOperationPreviewK o
instance (GObject o, IsDescendantOf PrintOperationPreview o) => PrintOperationPreviewK o

toPrintOperationPreview :: PrintOperationPreviewK o => o -> IO PrintOperationPreview
toPrintOperationPreview = unsafeCastTo PrintOperationPreview

-- method PrintOperationPreview::end_preview
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperationPreview", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperationPreview", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_preview_end_preview" gtk_print_operation_preview_end_preview :: 
    Ptr PrintOperationPreview ->            -- _obj : TInterface "Gtk" "PrintOperationPreview"
    IO ()


printOperationPreviewEndPreview ::
    (MonadIO m, PrintOperationPreviewK a) =>
    a ->                                    -- _obj
    m ()
printOperationPreviewEndPreview _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_print_operation_preview_end_preview _obj'
    touchManagedPtr _obj
    return ()

-- method PrintOperationPreview::is_selected
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperationPreview", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_nr", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperationPreview", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_nr", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_preview_is_selected" gtk_print_operation_preview_is_selected :: 
    Ptr PrintOperationPreview ->            -- _obj : TInterface "Gtk" "PrintOperationPreview"
    Int32 ->                                -- page_nr : TBasicType TInt32
    IO CInt


printOperationPreviewIsSelected ::
    (MonadIO m, PrintOperationPreviewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- page_nr
    m Bool
printOperationPreviewIsSelected _obj page_nr = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_operation_preview_is_selected _obj' page_nr
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PrintOperationPreview::render_page
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperationPreview", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_nr", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintOperationPreview", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_nr", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_operation_preview_render_page" gtk_print_operation_preview_render_page :: 
    Ptr PrintOperationPreview ->            -- _obj : TInterface "Gtk" "PrintOperationPreview"
    Int32 ->                                -- page_nr : TBasicType TInt32
    IO ()


printOperationPreviewRenderPage ::
    (MonadIO m, PrintOperationPreviewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- page_nr
    m ()
printOperationPreviewRenderPage _obj page_nr = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_print_operation_preview_render_page _obj' page_nr
    touchManagedPtr _obj
    return ()

-- signal PrintOperationPreview::got-page-size
type PrintOperationPreviewGotPageSizeCallback =
    PrintContext ->
    PageSetup ->
    IO ()

noPrintOperationPreviewGotPageSizeCallback :: Maybe PrintOperationPreviewGotPageSizeCallback
noPrintOperationPreviewGotPageSizeCallback = Nothing

type PrintOperationPreviewGotPageSizeCallbackC =
    Ptr () ->                               -- object
    Ptr PrintContext ->
    Ptr PageSetup ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationPreviewGotPageSizeCallback :: PrintOperationPreviewGotPageSizeCallbackC -> IO (FunPtr PrintOperationPreviewGotPageSizeCallbackC)

printOperationPreviewGotPageSizeClosure :: PrintOperationPreviewGotPageSizeCallback -> IO Closure
printOperationPreviewGotPageSizeClosure cb = newCClosure =<< mkPrintOperationPreviewGotPageSizeCallback wrapped
    where wrapped = printOperationPreviewGotPageSizeCallbackWrapper cb

printOperationPreviewGotPageSizeCallbackWrapper ::
    PrintOperationPreviewGotPageSizeCallback ->
    Ptr () ->
    Ptr PrintContext ->
    Ptr PageSetup ->
    Ptr () ->
    IO ()
printOperationPreviewGotPageSizeCallbackWrapper _cb _ context page_setup _ = do
    context' <- (newObject PrintContext) context
    page_setup' <- (newObject PageSetup) page_setup
    _cb  context' page_setup'

onPrintOperationPreviewGotPageSize :: (GObject a, MonadIO m) => a -> PrintOperationPreviewGotPageSizeCallback -> m SignalHandlerId
onPrintOperationPreviewGotPageSize obj cb = liftIO $ connectPrintOperationPreviewGotPageSize obj cb SignalConnectBefore
afterPrintOperationPreviewGotPageSize :: (GObject a, MonadIO m) => a -> PrintOperationPreviewGotPageSizeCallback -> m SignalHandlerId
afterPrintOperationPreviewGotPageSize obj cb = connectPrintOperationPreviewGotPageSize obj cb SignalConnectAfter

connectPrintOperationPreviewGotPageSize :: (GObject a, MonadIO m) =>
                                           a -> PrintOperationPreviewGotPageSizeCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationPreviewGotPageSize obj cb after = liftIO $ do
    cb' <- mkPrintOperationPreviewGotPageSizeCallback (printOperationPreviewGotPageSizeCallbackWrapper cb)
    connectSignalFunPtr obj "got-page-size" cb' after

-- signal PrintOperationPreview::ready
type PrintOperationPreviewReadyCallback =
    PrintContext ->
    IO ()

noPrintOperationPreviewReadyCallback :: Maybe PrintOperationPreviewReadyCallback
noPrintOperationPreviewReadyCallback = Nothing

type PrintOperationPreviewReadyCallbackC =
    Ptr () ->                               -- object
    Ptr PrintContext ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationPreviewReadyCallback :: PrintOperationPreviewReadyCallbackC -> IO (FunPtr PrintOperationPreviewReadyCallbackC)

printOperationPreviewReadyClosure :: PrintOperationPreviewReadyCallback -> IO Closure
printOperationPreviewReadyClosure cb = newCClosure =<< mkPrintOperationPreviewReadyCallback wrapped
    where wrapped = printOperationPreviewReadyCallbackWrapper cb

printOperationPreviewReadyCallbackWrapper ::
    PrintOperationPreviewReadyCallback ->
    Ptr () ->
    Ptr PrintContext ->
    Ptr () ->
    IO ()
printOperationPreviewReadyCallbackWrapper _cb _ context _ = do
    context' <- (newObject PrintContext) context
    _cb  context'

onPrintOperationPreviewReady :: (GObject a, MonadIO m) => a -> PrintOperationPreviewReadyCallback -> m SignalHandlerId
onPrintOperationPreviewReady obj cb = liftIO $ connectPrintOperationPreviewReady obj cb SignalConnectBefore
afterPrintOperationPreviewReady :: (GObject a, MonadIO m) => a -> PrintOperationPreviewReadyCallback -> m SignalHandlerId
afterPrintOperationPreviewReady obj cb = connectPrintOperationPreviewReady obj cb SignalConnectAfter

connectPrintOperationPreviewReady :: (GObject a, MonadIO m) =>
                                     a -> PrintOperationPreviewReadyCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationPreviewReady obj cb after = liftIO $ do
    cb' <- mkPrintOperationPreviewReadyCallback (printOperationPreviewReadyCallbackWrapper cb)
    connectSignalFunPtr obj "ready" cb' after

-- Enum PrintOperationResult

data PrintOperationResult = 
      PrintOperationResultError
    | PrintOperationResultApply
    | PrintOperationResultCancel
    | PrintOperationResultInProgress
    | AnotherPrintOperationResult Int
    deriving (Show, Eq)

instance Enum PrintOperationResult where
    fromEnum PrintOperationResultError = 0
    fromEnum PrintOperationResultApply = 1
    fromEnum PrintOperationResultCancel = 2
    fromEnum PrintOperationResultInProgress = 3
    fromEnum (AnotherPrintOperationResult k) = k

    toEnum 0 = PrintOperationResultError
    toEnum 1 = PrintOperationResultApply
    toEnum 2 = PrintOperationResultCancel
    toEnum 3 = PrintOperationResultInProgress
    toEnum k = AnotherPrintOperationResult k

foreign import ccall "gtk_print_operation_result_get_type" c_gtk_print_operation_result_get_type :: 
    IO GType

instance BoxedEnum PrintOperationResult where
    boxedEnumType _ = c_gtk_print_operation_result_get_type

-- Enum PrintPages

data PrintPages = 
      PrintPagesAll
    | PrintPagesCurrent
    | PrintPagesRanges
    | PrintPagesSelection
    | AnotherPrintPages Int
    deriving (Show, Eq)

instance Enum PrintPages where
    fromEnum PrintPagesAll = 0
    fromEnum PrintPagesCurrent = 1
    fromEnum PrintPagesRanges = 2
    fromEnum PrintPagesSelection = 3
    fromEnum (AnotherPrintPages k) = k

    toEnum 0 = PrintPagesAll
    toEnum 1 = PrintPagesCurrent
    toEnum 2 = PrintPagesRanges
    toEnum 3 = PrintPagesSelection
    toEnum k = AnotherPrintPages k

foreign import ccall "gtk_print_pages_get_type" c_gtk_print_pages_get_type :: 
    IO GType

instance BoxedEnum PrintPages where
    boxedEnumType _ = c_gtk_print_pages_get_type

-- Enum PrintQuality

data PrintQuality = 
      PrintQualityLow
    | PrintQualityNormal
    | PrintQualityHigh
    | PrintQualityDraft
    | AnotherPrintQuality Int
    deriving (Show, Eq)

instance Enum PrintQuality where
    fromEnum PrintQualityLow = 0
    fromEnum PrintQualityNormal = 1
    fromEnum PrintQualityHigh = 2
    fromEnum PrintQualityDraft = 3
    fromEnum (AnotherPrintQuality k) = k

    toEnum 0 = PrintQualityLow
    toEnum 1 = PrintQualityNormal
    toEnum 2 = PrintQualityHigh
    toEnum 3 = PrintQualityDraft
    toEnum k = AnotherPrintQuality k

foreign import ccall "gtk_print_quality_get_type" c_gtk_print_quality_get_type :: 
    IO GType

instance BoxedEnum PrintQuality where
    boxedEnumType _ = c_gtk_print_quality_get_type

-- object PrintSettings 
newtype PrintSettings = PrintSettings (ForeignPtr PrintSettings)
noPrintSettings :: Maybe PrintSettings
noPrintSettings = Nothing

foreign import ccall "gtk_print_settings_get_type"
    c_gtk_print_settings_get_type :: IO GType

type instance ParentTypes PrintSettings = '[GObject.Object]

instance GObject PrintSettings where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_print_settings_get_type
    

class GObject o => PrintSettingsK o
instance (GObject o, IsDescendantOf PrintSettings o) => PrintSettingsK o

toPrintSettings :: PrintSettingsK o => o -> IO PrintSettings
toPrintSettings = unsafeCastTo PrintSettings

-- method PrintSettings::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "PrintSettings"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_new" gtk_print_settings_new :: 
    IO (Ptr PrintSettings)


printSettingsNew ::
    (MonadIO m) =>
    m PrintSettings
printSettingsNew  = liftIO $ do
    result <- gtk_print_settings_new
    checkUnexpectedReturnNULL "gtk_print_settings_new" result
    result' <- (wrapObject PrintSettings) result
    return result'

-- method PrintSettings::new_from_file
-- method type : Constructor
-- Args : [Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PrintSettings"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_print_settings_new_from_file" gtk_print_settings_new_from_file :: 
    CString ->                              -- file_name : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr PrintSettings)


printSettingsNewFromFile ::
    (MonadIO m) =>
    [Char] ->                               -- file_name
    m PrintSettings
printSettingsNewFromFile file_name = liftIO $ do
    file_name' <- stringToCString file_name
    onException (do
        result <- propagateGError $ gtk_print_settings_new_from_file file_name'
        checkUnexpectedReturnNULL "gtk_print_settings_new_from_file" result
        result' <- (wrapObject PrintSettings) result
        freeMem file_name'
        return result'
     ) (do
        freeMem file_name'
     )

-- method PrintSettings::new_from_key_file
-- method type : Constructor
-- Args : [Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PrintSettings"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_print_settings_new_from_key_file" gtk_print_settings_new_from_key_file :: 
    Ptr GLib.KeyFile ->                     -- key_file : TInterface "GLib" "KeyFile"
    CString ->                              -- group_name : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr PrintSettings)


printSettingsNewFromKeyFile ::
    (MonadIO m) =>
    GLib.KeyFile ->                         -- key_file
    Maybe (T.Text) ->                       -- group_name
    m PrintSettings
printSettingsNewFromKeyFile key_file group_name = liftIO $ do
    let key_file' = unsafeManagedPtrGetPtr key_file
    maybeGroup_name <- case group_name of
        Nothing -> return nullPtr
        Just jGroup_name -> do
            jGroup_name' <- textToCString jGroup_name
            return jGroup_name'
    onException (do
        result <- propagateGError $ gtk_print_settings_new_from_key_file key_file' maybeGroup_name
        checkUnexpectedReturnNULL "gtk_print_settings_new_from_key_file" result
        result' <- (wrapObject PrintSettings) result
        touchManagedPtr key_file
        freeMem maybeGroup_name
        return result'
     ) (do
        freeMem maybeGroup_name
     )

-- method PrintSettings::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PrintSettings"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_copy" gtk_print_settings_copy :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO (Ptr PrintSettings)


printSettingsCopy ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m PrintSettings
printSettingsCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_copy _obj'
    checkUnexpectedReturnNULL "gtk_print_settings_copy" result
    result' <- (wrapObject PrintSettings) result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::foreach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "PrintSettingsFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "PrintSettingsFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_foreach" gtk_print_settings_foreach :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    FunPtr PrintSettingsFuncC ->            -- func : TInterface "Gtk" "PrintSettingsFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


printSettingsForeach ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    PrintSettingsFunc ->                    -- func
    m ()
printSettingsForeach _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkPrintSettingsFunc (printSettingsFuncWrapper Nothing func)
    let user_data = nullPtr
    gtk_print_settings_foreach _obj' func' user_data
    safeFreeFunPtr $ castFunPtrToPtr func'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::get
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get" gtk_print_settings_get :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    IO CString


printSettingsGet ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    m T.Text
printSettingsGet _obj key = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    result <- gtk_print_settings_get _obj' key'
    checkUnexpectedReturnNULL "gtk_print_settings_get" result
    result' <- cstringToText result
    touchManagedPtr _obj
    freeMem key'
    return result'

-- method PrintSettings::get_bool
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_bool" gtk_print_settings_get_bool :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    IO CInt


printSettingsGetBool ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    m Bool
printSettingsGetBool _obj key = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    result <- gtk_print_settings_get_bool _obj' key'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem key'
    return result'

-- method PrintSettings::get_collate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_collate" gtk_print_settings_get_collate :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CInt


printSettingsGetCollate ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m Bool
printSettingsGetCollate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_collate _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_default_source
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_default_source" gtk_print_settings_get_default_source :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CString


printSettingsGetDefaultSource ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m T.Text
printSettingsGetDefaultSource _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_default_source _obj'
    checkUnexpectedReturnNULL "gtk_print_settings_get_default_source" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_dither
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_dither" gtk_print_settings_get_dither :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CString


printSettingsGetDither ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m T.Text
printSettingsGetDither _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_dither _obj'
    checkUnexpectedReturnNULL "gtk_print_settings_get_dither" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_double
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_double" gtk_print_settings_get_double :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    IO CDouble


printSettingsGetDouble ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    m Double
printSettingsGetDouble _obj key = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    result <- gtk_print_settings_get_double _obj' key'
    let result' = realToFrac result
    touchManagedPtr _obj
    freeMem key'
    return result'

-- method PrintSettings::get_double_with_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "def", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "def", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_double_with_default" gtk_print_settings_get_double_with_default :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    CDouble ->                              -- def : TBasicType TDouble
    IO CDouble


printSettingsGetDoubleWithDefault ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    Double ->                               -- def
    m Double
printSettingsGetDoubleWithDefault _obj key def = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    let def' = realToFrac def
    result <- gtk_print_settings_get_double_with_default _obj' key' def'
    let result' = realToFrac result
    touchManagedPtr _obj
    freeMem key'
    return result'

-- method PrintSettings::get_duplex
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PrintDuplex"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_duplex" gtk_print_settings_get_duplex :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CUInt


printSettingsGetDuplex ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m PrintDuplex
printSettingsGetDuplex _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_duplex _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_finishings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_finishings" gtk_print_settings_get_finishings :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CString


printSettingsGetFinishings ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m T.Text
printSettingsGetFinishings _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_finishings _obj'
    checkUnexpectedReturnNULL "gtk_print_settings_get_finishings" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_int
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_int" gtk_print_settings_get_int :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    IO Int32


printSettingsGetInt ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    m Int32
printSettingsGetInt _obj key = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    result <- gtk_print_settings_get_int _obj' key'
    touchManagedPtr _obj
    freeMem key'
    return result

-- method PrintSettings::get_int_with_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "def", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "def", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_int_with_default" gtk_print_settings_get_int_with_default :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    Int32 ->                                -- def : TBasicType TInt32
    IO Int32


printSettingsGetIntWithDefault ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    Int32 ->                                -- def
    m Int32
printSettingsGetIntWithDefault _obj key def = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    result <- gtk_print_settings_get_int_with_default _obj' key' def
    touchManagedPtr _obj
    freeMem key'
    return result

-- method PrintSettings::get_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_length" gtk_print_settings_get_length :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


printSettingsGetLength ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    Unit ->                                 -- unit
    m Double
printSettingsGetLength _obj key unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_print_settings_get_length _obj' key' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    freeMem key'
    return result'

-- method PrintSettings::get_media_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_media_type" gtk_print_settings_get_media_type :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CString


printSettingsGetMediaType ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m T.Text
printSettingsGetMediaType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_media_type _obj'
    checkUnexpectedReturnNULL "gtk_print_settings_get_media_type" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_n_copies
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_n_copies" gtk_print_settings_get_n_copies :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO Int32


printSettingsGetNCopies ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m Int32
printSettingsGetNCopies _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_n_copies _obj'
    touchManagedPtr _obj
    return result

-- method PrintSettings::get_number_up
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_number_up" gtk_print_settings_get_number_up :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO Int32


printSettingsGetNumberUp ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m Int32
printSettingsGetNumberUp _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_number_up _obj'
    touchManagedPtr _obj
    return result

-- method PrintSettings::get_number_up_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "NumberUpLayout"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_number_up_layout" gtk_print_settings_get_number_up_layout :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CUInt


printSettingsGetNumberUpLayout ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m NumberUpLayout
printSettingsGetNumberUpLayout _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_number_up_layout _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PageOrientation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_orientation" gtk_print_settings_get_orientation :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CUInt


printSettingsGetOrientation ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m PageOrientation
printSettingsGetOrientation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_orientation _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_output_bin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_output_bin" gtk_print_settings_get_output_bin :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CString


printSettingsGetOutputBin ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m T.Text
printSettingsGetOutputBin _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_output_bin _obj'
    checkUnexpectedReturnNULL "gtk_print_settings_get_output_bin" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_page_ranges
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "num_ranges", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "num_ranges", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 1 (TInterface "Gtk" "PageRange")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_page_ranges" gtk_print_settings_get_page_ranges :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    Ptr Int32 ->                            -- num_ranges : TBasicType TInt32
    IO (Ptr PageRange)


printSettingsGetPageRanges ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m [PageRange]
printSettingsGetPageRanges _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    num_ranges <- allocMem :: IO (Ptr Int32)
    result <- gtk_print_settings_get_page_ranges _obj' num_ranges
    num_ranges' <- peek num_ranges
    checkUnexpectedReturnNULL "gtk_print_settings_get_page_ranges" result
    result' <- (unpackBlockArrayWithLength 8 num_ranges') result
    result'' <- mapM (wrapPtr PageRange) result'
    freeMem result
    touchManagedPtr _obj
    freeMem num_ranges
    return result''

-- method PrintSettings::get_page_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PageSet"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_page_set" gtk_print_settings_get_page_set :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CUInt


printSettingsGetPageSet ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m PageSet
printSettingsGetPageSet _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_page_set _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_paper_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_paper_height" gtk_print_settings_get_paper_height :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


printSettingsGetPaperHeight ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Unit ->                                 -- unit
    m Double
printSettingsGetPaperHeight _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_print_settings_get_paper_height _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_paper_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PaperSize"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_paper_size" gtk_print_settings_get_paper_size :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO (Ptr PaperSize)


printSettingsGetPaperSize ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m PaperSize
printSettingsGetPaperSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_paper_size _obj'
    checkUnexpectedReturnNULL "gtk_print_settings_get_paper_size" result
    result' <- (wrapBoxed PaperSize) result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_paper_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_paper_width" gtk_print_settings_get_paper_width :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO CDouble


printSettingsGetPaperWidth ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Unit ->                                 -- unit
    m Double
printSettingsGetPaperWidth _obj unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let unit' = (fromIntegral . fromEnum) unit
    result <- gtk_print_settings_get_paper_width _obj' unit'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_print_pages
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PrintPages"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_print_pages" gtk_print_settings_get_print_pages :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CUInt


printSettingsGetPrintPages ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m PrintPages
printSettingsGetPrintPages _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_print_pages _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_printer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_printer" gtk_print_settings_get_printer :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CString


printSettingsGetPrinter ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m T.Text
printSettingsGetPrinter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_printer _obj'
    checkUnexpectedReturnNULL "gtk_print_settings_get_printer" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_printer_lpi
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_printer_lpi" gtk_print_settings_get_printer_lpi :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CDouble


printSettingsGetPrinterLpi ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m Double
printSettingsGetPrinterLpi _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_printer_lpi _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_quality
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PrintQuality"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_quality" gtk_print_settings_get_quality :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CUInt


printSettingsGetQuality ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m PrintQuality
printSettingsGetQuality _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_quality _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_resolution
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_resolution" gtk_print_settings_get_resolution :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO Int32


printSettingsGetResolution ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m Int32
printSettingsGetResolution _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_resolution _obj'
    touchManagedPtr _obj
    return result

-- method PrintSettings::get_resolution_x
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_resolution_x" gtk_print_settings_get_resolution_x :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO Int32


printSettingsGetResolutionX ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m Int32
printSettingsGetResolutionX _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_resolution_x _obj'
    touchManagedPtr _obj
    return result

-- method PrintSettings::get_resolution_y
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_resolution_y" gtk_print_settings_get_resolution_y :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO Int32


printSettingsGetResolutionY ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m Int32
printSettingsGetResolutionY _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_resolution_y _obj'
    touchManagedPtr _obj
    return result

-- method PrintSettings::get_reverse
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_reverse" gtk_print_settings_get_reverse :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CInt


printSettingsGetReverse ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m Bool
printSettingsGetReverse _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_reverse _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_scale
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_scale" gtk_print_settings_get_scale :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CDouble


printSettingsGetScale ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m Double
printSettingsGetScale _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_scale _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::get_use_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_get_use_color" gtk_print_settings_get_use_color :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    IO CInt


printSettingsGetUseColor ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    m Bool
printSettingsGetUseColor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_print_settings_get_use_color _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method PrintSettings::has_key
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_has_key" gtk_print_settings_has_key :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    IO CInt


printSettingsHasKey ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    m Bool
printSettingsHasKey _obj key = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    result <- gtk_print_settings_has_key _obj' key'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem key'
    return result'

-- method PrintSettings::load_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_print_settings_load_file" gtk_print_settings_load_file :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- file_name : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO CInt


printSettingsLoadFile ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- file_name
    m ()
printSettingsLoadFile _obj file_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    file_name' <- stringToCString file_name
    onException (do
        _ <- propagateGError $ gtk_print_settings_load_file _obj' file_name'
        touchManagedPtr _obj
        freeMem file_name'
        return ()
     ) (do
        freeMem file_name'
     )

-- method PrintSettings::load_key_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_print_settings_load_key_file" gtk_print_settings_load_key_file :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    Ptr GLib.KeyFile ->                     -- key_file : TInterface "GLib" "KeyFile"
    CString ->                              -- group_name : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt


printSettingsLoadKeyFile ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    GLib.KeyFile ->                         -- key_file
    Maybe (T.Text) ->                       -- group_name
    m ()
printSettingsLoadKeyFile _obj key_file group_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let key_file' = unsafeManagedPtrGetPtr key_file
    maybeGroup_name <- case group_name of
        Nothing -> return nullPtr
        Just jGroup_name -> do
            jGroup_name' <- textToCString jGroup_name
            return jGroup_name'
    onException (do
        _ <- propagateGError $ gtk_print_settings_load_key_file _obj' key_file' maybeGroup_name
        touchManagedPtr _obj
        touchManagedPtr key_file
        freeMem maybeGroup_name
        return ()
     ) (do
        freeMem maybeGroup_name
     )

-- method PrintSettings::set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set" gtk_print_settings_set :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    CString ->                              -- value : TBasicType TUTF8
    IO ()


printSettingsSet ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    Maybe (T.Text) ->                       -- value
    m ()
printSettingsSet _obj key value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    maybeValue <- case value of
        Nothing -> return nullPtr
        Just jValue -> do
            jValue' <- textToCString jValue
            return jValue'
    gtk_print_settings_set _obj' key' maybeValue
    touchManagedPtr _obj
    freeMem key'
    freeMem maybeValue
    return ()

-- method PrintSettings::set_bool
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_bool" gtk_print_settings_set_bool :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    CInt ->                                 -- value : TBasicType TBoolean
    IO ()


printSettingsSetBool ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    Bool ->                                 -- value
    m ()
printSettingsSetBool _obj key value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    let value' = (fromIntegral . fromEnum) value
    gtk_print_settings_set_bool _obj' key' value'
    touchManagedPtr _obj
    freeMem key'
    return ()

-- method PrintSettings::set_collate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "collate", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "collate", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_collate" gtk_print_settings_set_collate :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CInt ->                                 -- collate : TBasicType TBoolean
    IO ()


printSettingsSetCollate ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- collate
    m ()
printSettingsSetCollate _obj collate = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let collate' = (fromIntegral . fromEnum) collate
    gtk_print_settings_set_collate _obj' collate'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_default_source
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_source", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_source", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_default_source" gtk_print_settings_set_default_source :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- default_source : TBasicType TUTF8
    IO ()


printSettingsSetDefaultSource ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- default_source
    m ()
printSettingsSetDefaultSource _obj default_source = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    default_source' <- textToCString default_source
    gtk_print_settings_set_default_source _obj' default_source'
    touchManagedPtr _obj
    freeMem default_source'
    return ()

-- method PrintSettings::set_dither
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dither", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dither", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_dither" gtk_print_settings_set_dither :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- dither : TBasicType TUTF8
    IO ()


printSettingsSetDither ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- dither
    m ()
printSettingsSetDither _obj dither = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    dither' <- textToCString dither
    gtk_print_settings_set_dither _obj' dither'
    touchManagedPtr _obj
    freeMem dither'
    return ()

-- method PrintSettings::set_double
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_double" gtk_print_settings_set_double :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    CDouble ->                              -- value : TBasicType TDouble
    IO ()


printSettingsSetDouble ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    Double ->                               -- value
    m ()
printSettingsSetDouble _obj key value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    let value' = realToFrac value
    gtk_print_settings_set_double _obj' key' value'
    touchManagedPtr _obj
    freeMem key'
    return ()

-- method PrintSettings::set_duplex
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "duplex", argType = TInterface "Gtk" "PrintDuplex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "duplex", argType = TInterface "Gtk" "PrintDuplex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_duplex" gtk_print_settings_set_duplex :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CUInt ->                                -- duplex : TInterface "Gtk" "PrintDuplex"
    IO ()


printSettingsSetDuplex ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    PrintDuplex ->                          -- duplex
    m ()
printSettingsSetDuplex _obj duplex = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let duplex' = (fromIntegral . fromEnum) duplex
    gtk_print_settings_set_duplex _obj' duplex'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_finishings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "finishings", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "finishings", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_finishings" gtk_print_settings_set_finishings :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- finishings : TBasicType TUTF8
    IO ()


printSettingsSetFinishings ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- finishings
    m ()
printSettingsSetFinishings _obj finishings = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    finishings' <- textToCString finishings
    gtk_print_settings_set_finishings _obj' finishings'
    touchManagedPtr _obj
    freeMem finishings'
    return ()

-- method PrintSettings::set_int
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_int" gtk_print_settings_set_int :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    Int32 ->                                -- value : TBasicType TInt32
    IO ()


printSettingsSetInt ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    Int32 ->                                -- value
    m ()
printSettingsSetInt _obj key value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    gtk_print_settings_set_int _obj' key' value
    touchManagedPtr _obj
    freeMem key'
    return ()

-- method PrintSettings::set_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_length" gtk_print_settings_set_length :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    CDouble ->                              -- value : TBasicType TDouble
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO ()


printSettingsSetLength ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    Double ->                               -- value
    Unit ->                                 -- unit
    m ()
printSettingsSetLength _obj key value unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    let value' = realToFrac value
    let unit' = (fromIntegral . fromEnum) unit
    gtk_print_settings_set_length _obj' key' value' unit'
    touchManagedPtr _obj
    freeMem key'
    return ()

-- method PrintSettings::set_media_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "media_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "media_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_media_type" gtk_print_settings_set_media_type :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- media_type : TBasicType TUTF8
    IO ()


printSettingsSetMediaType ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- media_type
    m ()
printSettingsSetMediaType _obj media_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    media_type' <- textToCString media_type
    gtk_print_settings_set_media_type _obj' media_type'
    touchManagedPtr _obj
    freeMem media_type'
    return ()

-- method PrintSettings::set_n_copies
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "num_copies", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "num_copies", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_n_copies" gtk_print_settings_set_n_copies :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    Int32 ->                                -- num_copies : TBasicType TInt32
    IO ()


printSettingsSetNCopies ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- num_copies
    m ()
printSettingsSetNCopies _obj num_copies = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_print_settings_set_n_copies _obj' num_copies
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_number_up
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "number_up", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "number_up", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_number_up" gtk_print_settings_set_number_up :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    Int32 ->                                -- number_up : TBasicType TInt32
    IO ()


printSettingsSetNumberUp ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- number_up
    m ()
printSettingsSetNumberUp _obj number_up = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_print_settings_set_number_up _obj' number_up
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_number_up_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "number_up_layout", argType = TInterface "Gtk" "NumberUpLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "number_up_layout", argType = TInterface "Gtk" "NumberUpLayout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_number_up_layout" gtk_print_settings_set_number_up_layout :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CUInt ->                                -- number_up_layout : TInterface "Gtk" "NumberUpLayout"
    IO ()


printSettingsSetNumberUpLayout ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    NumberUpLayout ->                       -- number_up_layout
    m ()
printSettingsSetNumberUpLayout _obj number_up_layout = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let number_up_layout' = (fromIntegral . fromEnum) number_up_layout
    gtk_print_settings_set_number_up_layout _obj' number_up_layout'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "PageOrientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "PageOrientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_orientation" gtk_print_settings_set_orientation :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CUInt ->                                -- orientation : TInterface "Gtk" "PageOrientation"
    IO ()


printSettingsSetOrientation ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    PageOrientation ->                      -- orientation
    m ()
printSettingsSetOrientation _obj orientation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let orientation' = (fromIntegral . fromEnum) orientation
    gtk_print_settings_set_orientation _obj' orientation'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_output_bin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "output_bin", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "output_bin", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_output_bin" gtk_print_settings_set_output_bin :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- output_bin : TBasicType TUTF8
    IO ()


printSettingsSetOutputBin ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- output_bin
    m ()
printSettingsSetOutputBin _obj output_bin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    output_bin' <- textToCString output_bin
    gtk_print_settings_set_output_bin _obj' output_bin'
    touchManagedPtr _obj
    freeMem output_bin'
    return ()

-- method PrintSettings::set_page_ranges
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_ranges", argType = TCArray False (-1) 2 (TInterface "Gtk" "PageRange"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "num_ranges", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "num_ranges", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_ranges", argType = TCArray False (-1) 2 (TInterface "Gtk" "PageRange"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_page_ranges" gtk_print_settings_set_page_ranges :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    Ptr PageRange ->                        -- page_ranges : TCArray False (-1) 2 (TInterface "Gtk" "PageRange")
    Int32 ->                                -- num_ranges : TBasicType TInt32
    IO ()


printSettingsSetPageRanges ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    [PageRange] ->                          -- page_ranges
    m ()
printSettingsSetPageRanges _obj page_ranges = liftIO $ do
    let num_ranges = fromIntegral $ length page_ranges
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page_ranges' = map unsafeManagedPtrGetPtr page_ranges
    page_ranges'' <- packBlockArray 8 page_ranges'
    gtk_print_settings_set_page_ranges _obj' page_ranges'' num_ranges
    touchManagedPtr _obj
    mapM_ touchManagedPtr page_ranges
    freeMem page_ranges''
    return ()

-- method PrintSettings::set_page_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_set", argType = TInterface "Gtk" "PageSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_set", argType = TInterface "Gtk" "PageSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_page_set" gtk_print_settings_set_page_set :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CUInt ->                                -- page_set : TInterface "Gtk" "PageSet"
    IO ()


printSettingsSetPageSet ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    PageSet ->                              -- page_set
    m ()
printSettingsSetPageSet _obj page_set = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page_set' = (fromIntegral . fromEnum) page_set
    gtk_print_settings_set_page_set _obj' page_set'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_paper_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_paper_height" gtk_print_settings_set_paper_height :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CDouble ->                              -- height : TBasicType TDouble
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO ()


printSettingsSetPaperHeight ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Double ->                               -- height
    Unit ->                                 -- unit
    m ()
printSettingsSetPaperHeight _obj height unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let height' = realToFrac height
    let unit' = (fromIntegral . fromEnum) unit
    gtk_print_settings_set_paper_height _obj' height' unit'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_paper_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "paper_size", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "paper_size", argType = TInterface "Gtk" "PaperSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_paper_size" gtk_print_settings_set_paper_size :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    Ptr PaperSize ->                        -- paper_size : TInterface "Gtk" "PaperSize"
    IO ()


printSettingsSetPaperSize ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    PaperSize ->                            -- paper_size
    m ()
printSettingsSetPaperSize _obj paper_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let paper_size' = unsafeManagedPtrGetPtr paper_size
    gtk_print_settings_set_paper_size _obj' paper_size'
    touchManagedPtr _obj
    touchManagedPtr paper_size
    return ()

-- method PrintSettings::set_paper_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "unit", argType = TInterface "Gtk" "Unit", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_paper_width" gtk_print_settings_set_paper_width :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CDouble ->                              -- width : TBasicType TDouble
    CUInt ->                                -- unit : TInterface "Gtk" "Unit"
    IO ()


printSettingsSetPaperWidth ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Double ->                               -- width
    Unit ->                                 -- unit
    m ()
printSettingsSetPaperWidth _obj width unit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let width' = realToFrac width
    let unit' = (fromIntegral . fromEnum) unit
    gtk_print_settings_set_paper_width _obj' width' unit'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_print_pages
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pages", argType = TInterface "Gtk" "PrintPages", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pages", argType = TInterface "Gtk" "PrintPages", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_print_pages" gtk_print_settings_set_print_pages :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CUInt ->                                -- pages : TInterface "Gtk" "PrintPages"
    IO ()


printSettingsSetPrintPages ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    PrintPages ->                           -- pages
    m ()
printSettingsSetPrintPages _obj pages = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let pages' = (fromIntegral . fromEnum) pages
    gtk_print_settings_set_print_pages _obj' pages'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_printer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "printer", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "printer", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_printer" gtk_print_settings_set_printer :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- printer : TBasicType TUTF8
    IO ()


printSettingsSetPrinter ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- printer
    m ()
printSettingsSetPrinter _obj printer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    printer' <- textToCString printer
    gtk_print_settings_set_printer _obj' printer'
    touchManagedPtr _obj
    freeMem printer'
    return ()

-- method PrintSettings::set_printer_lpi
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lpi", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lpi", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_printer_lpi" gtk_print_settings_set_printer_lpi :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CDouble ->                              -- lpi : TBasicType TDouble
    IO ()


printSettingsSetPrinterLpi ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Double ->                               -- lpi
    m ()
printSettingsSetPrinterLpi _obj lpi = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let lpi' = realToFrac lpi
    gtk_print_settings_set_printer_lpi _obj' lpi'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_quality
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "quality", argType = TInterface "Gtk" "PrintQuality", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "quality", argType = TInterface "Gtk" "PrintQuality", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_quality" gtk_print_settings_set_quality :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CUInt ->                                -- quality : TInterface "Gtk" "PrintQuality"
    IO ()


printSettingsSetQuality ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    PrintQuality ->                         -- quality
    m ()
printSettingsSetQuality _obj quality = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let quality' = (fromIntegral . fromEnum) quality
    gtk_print_settings_set_quality _obj' quality'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_resolution
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resolution", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resolution", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_resolution" gtk_print_settings_set_resolution :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    Int32 ->                                -- resolution : TBasicType TInt32
    IO ()


printSettingsSetResolution ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- resolution
    m ()
printSettingsSetResolution _obj resolution = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_print_settings_set_resolution _obj' resolution
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_resolution_xy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resolution_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resolution_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resolution_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resolution_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_resolution_xy" gtk_print_settings_set_resolution_xy :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    Int32 ->                                -- resolution_x : TBasicType TInt32
    Int32 ->                                -- resolution_y : TBasicType TInt32
    IO ()


printSettingsSetResolutionXy ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- resolution_x
    Int32 ->                                -- resolution_y
    m ()
printSettingsSetResolutionXy _obj resolution_x resolution_y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_print_settings_set_resolution_xy _obj' resolution_x resolution_y
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_reverse
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reverse", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reverse", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_reverse" gtk_print_settings_set_reverse :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CInt ->                                 -- reverse : TBasicType TBoolean
    IO ()


printSettingsSetReverse ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- reverse
    m ()
printSettingsSetReverse _obj reverse = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let reverse' = (fromIntegral . fromEnum) reverse
    gtk_print_settings_set_reverse _obj' reverse'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_scale
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_scale" gtk_print_settings_set_scale :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CDouble ->                              -- scale : TBasicType TDouble
    IO ()


printSettingsSetScale ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Double ->                               -- scale
    m ()
printSettingsSetScale _obj scale = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let scale' = realToFrac scale
    gtk_print_settings_set_scale _obj' scale'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::set_use_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_color", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_color", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_set_use_color" gtk_print_settings_set_use_color :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CInt ->                                 -- use_color : TBasicType TBoolean
    IO ()


printSettingsSetUseColor ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_color
    m ()
printSettingsSetUseColor _obj use_color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_color' = (fromIntegral . fromEnum) use_color
    gtk_print_settings_set_use_color _obj' use_color'
    touchManagedPtr _obj
    return ()

-- method PrintSettings::to_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file_name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_print_settings_to_file" gtk_print_settings_to_file :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- file_name : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO CInt


printSettingsToFile ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- file_name
    m ()
printSettingsToFile _obj file_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    file_name' <- stringToCString file_name
    onException (do
        _ <- propagateGError $ gtk_print_settings_to_file _obj' file_name'
        touchManagedPtr _obj
        freeMem file_name'
        return ()
     ) (do
        freeMem file_name'
     )

-- method PrintSettings::to_key_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key_file", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_to_key_file" gtk_print_settings_to_key_file :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    Ptr GLib.KeyFile ->                     -- key_file : TInterface "GLib" "KeyFile"
    CString ->                              -- group_name : TBasicType TUTF8
    IO ()


printSettingsToKeyFile ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    GLib.KeyFile ->                         -- key_file
    T.Text ->                               -- group_name
    m ()
printSettingsToKeyFile _obj key_file group_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let key_file' = unsafeManagedPtrGetPtr key_file
    group_name' <- textToCString group_name
    gtk_print_settings_to_key_file _obj' key_file' group_name'
    touchManagedPtr _obj
    touchManagedPtr key_file
    freeMem group_name'
    return ()

-- method PrintSettings::unset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_settings_unset" gtk_print_settings_unset :: 
    Ptr PrintSettings ->                    -- _obj : TInterface "Gtk" "PrintSettings"
    CString ->                              -- key : TBasicType TUTF8
    IO ()


printSettingsUnset ::
    (MonadIO m, PrintSettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- key
    m ()
printSettingsUnset _obj key = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    key' <- textToCString key
    gtk_print_settings_unset _obj' key'
    touchManagedPtr _obj
    freeMem key'
    return ()

-- callback PrintSettingsFunc
printSettingsFuncClosure :: PrintSettingsFunc -> IO Closure
printSettingsFuncClosure cb = newCClosure =<< mkPrintSettingsFunc wrapped
    where wrapped = printSettingsFuncWrapper Nothing cb

type PrintSettingsFuncC =
    CString ->
    CString ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkPrintSettingsFunc :: PrintSettingsFuncC -> IO (FunPtr PrintSettingsFuncC)

type PrintSettingsFunc =
    T.Text ->
    T.Text ->
    IO ()

noPrintSettingsFunc :: Maybe PrintSettingsFunc
noPrintSettingsFunc = Nothing

printSettingsFuncWrapper ::
    Maybe (Ptr (FunPtr (PrintSettingsFuncC))) ->
    PrintSettingsFunc ->
    CString ->
    CString ->
    Ptr () ->
    IO ()
printSettingsFuncWrapper funptrptr _cb key value _ = do
    key' <- cstringToText key
    value' <- cstringToText value
    _cb  key' value'
    maybeReleaseFunPtr funptrptr

-- Enum PrintStatus

data PrintStatus = 
      PrintStatusInitial
    | PrintStatusPreparing
    | PrintStatusGeneratingData
    | PrintStatusSendingData
    | PrintStatusPending
    | PrintStatusPendingIssue
    | PrintStatusPrinting
    | PrintStatusFinished
    | PrintStatusFinishedAborted
    | AnotherPrintStatus Int
    deriving (Show, Eq)

instance Enum PrintStatus where
    fromEnum PrintStatusInitial = 0
    fromEnum PrintStatusPreparing = 1
    fromEnum PrintStatusGeneratingData = 2
    fromEnum PrintStatusSendingData = 3
    fromEnum PrintStatusPending = 4
    fromEnum PrintStatusPendingIssue = 5
    fromEnum PrintStatusPrinting = 6
    fromEnum PrintStatusFinished = 7
    fromEnum PrintStatusFinishedAborted = 8
    fromEnum (AnotherPrintStatus k) = k

    toEnum 0 = PrintStatusInitial
    toEnum 1 = PrintStatusPreparing
    toEnum 2 = PrintStatusGeneratingData
    toEnum 3 = PrintStatusSendingData
    toEnum 4 = PrintStatusPending
    toEnum 5 = PrintStatusPendingIssue
    toEnum 6 = PrintStatusPrinting
    toEnum 7 = PrintStatusFinished
    toEnum 8 = PrintStatusFinishedAborted
    toEnum k = AnotherPrintStatus k

foreign import ccall "gtk_print_status_get_type" c_gtk_print_status_get_type :: 
    IO GType

instance BoxedEnum PrintStatus where
    boxedEnumType _ = c_gtk_print_status_get_type

-- object ProgressBar 
newtype ProgressBar = ProgressBar (ForeignPtr ProgressBar)
noProgressBar :: Maybe ProgressBar
noProgressBar = Nothing

foreign import ccall "gtk_progress_bar_get_type"
    c_gtk_progress_bar_get_type :: IO GType

type instance ParentTypes ProgressBar = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject ProgressBar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_progress_bar_get_type
    

class GObject o => ProgressBarK o
instance (GObject o, IsDescendantOf ProgressBar o) => ProgressBarK o

toProgressBar :: ProgressBarK o => o -> IO ProgressBar
toProgressBar = unsafeCastTo ProgressBar

-- method ProgressBar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ProgressBar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_new" gtk_progress_bar_new :: 
    IO (Ptr ProgressBar)


progressBarNew ::
    (MonadIO m) =>
    m ProgressBar
progressBarNew  = liftIO $ do
    result <- gtk_progress_bar_new
    checkUnexpectedReturnNULL "gtk_progress_bar_new" result
    result' <- (newObject ProgressBar) result
    return result'

-- method ProgressBar::get_ellipsize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "EllipsizeMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_get_ellipsize" gtk_progress_bar_get_ellipsize :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    IO CUInt


progressBarGetEllipsize ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    m Pango.EllipsizeMode
progressBarGetEllipsize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_progress_bar_get_ellipsize _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ProgressBar::get_fraction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_get_fraction" gtk_progress_bar_get_fraction :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    IO CDouble


progressBarGetFraction ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    m Double
progressBarGetFraction _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_progress_bar_get_fraction _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method ProgressBar::get_inverted
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_get_inverted" gtk_progress_bar_get_inverted :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    IO CInt


progressBarGetInverted ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    m Bool
progressBarGetInverted _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_progress_bar_get_inverted _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ProgressBar::get_pulse_step
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_get_pulse_step" gtk_progress_bar_get_pulse_step :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    IO CDouble


progressBarGetPulseStep ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    m Double
progressBarGetPulseStep _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_progress_bar_get_pulse_step _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method ProgressBar::get_show_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_get_show_text" gtk_progress_bar_get_show_text :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    IO CInt


progressBarGetShowText ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    m Bool
progressBarGetShowText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_progress_bar_get_show_text _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ProgressBar::get_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_get_text" gtk_progress_bar_get_text :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    IO CString


progressBarGetText ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    m T.Text
progressBarGetText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_progress_bar_get_text _obj'
    checkUnexpectedReturnNULL "gtk_progress_bar_get_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method ProgressBar::pulse
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_pulse" gtk_progress_bar_pulse :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    IO ()


progressBarPulse ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    m ()
progressBarPulse _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_progress_bar_pulse _obj'
    touchManagedPtr _obj
    return ()

-- method ProgressBar::set_ellipsize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Pango" "EllipsizeMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Pango" "EllipsizeMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_set_ellipsize" gtk_progress_bar_set_ellipsize :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    CUInt ->                                -- mode : TInterface "Pango" "EllipsizeMode"
    IO ()


progressBarSetEllipsize ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    Pango.EllipsizeMode ->                  -- mode
    m ()
progressBarSetEllipsize _obj mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mode' = (fromIntegral . fromEnum) mode
    gtk_progress_bar_set_ellipsize _obj' mode'
    touchManagedPtr _obj
    return ()

-- method ProgressBar::set_fraction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fraction", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fraction", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_set_fraction" gtk_progress_bar_set_fraction :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    CDouble ->                              -- fraction : TBasicType TDouble
    IO ()


progressBarSetFraction ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    Double ->                               -- fraction
    m ()
progressBarSetFraction _obj fraction = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let fraction' = realToFrac fraction
    gtk_progress_bar_set_fraction _obj' fraction'
    touchManagedPtr _obj
    return ()

-- method ProgressBar::set_inverted
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "inverted", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "inverted", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_set_inverted" gtk_progress_bar_set_inverted :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    CInt ->                                 -- inverted : TBasicType TBoolean
    IO ()


progressBarSetInverted ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- inverted
    m ()
progressBarSetInverted _obj inverted = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let inverted' = (fromIntegral . fromEnum) inverted
    gtk_progress_bar_set_inverted _obj' inverted'
    touchManagedPtr _obj
    return ()

-- method ProgressBar::set_pulse_step
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fraction", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fraction", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_set_pulse_step" gtk_progress_bar_set_pulse_step :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    CDouble ->                              -- fraction : TBasicType TDouble
    IO ()


progressBarSetPulseStep ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    Double ->                               -- fraction
    m ()
progressBarSetPulseStep _obj fraction = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let fraction' = realToFrac fraction
    gtk_progress_bar_set_pulse_step _obj' fraction'
    touchManagedPtr _obj
    return ()

-- method ProgressBar::set_show_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_text", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_text", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_set_show_text" gtk_progress_bar_set_show_text :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    CInt ->                                 -- show_text : TBasicType TBoolean
    IO ()


progressBarSetShowText ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_text
    m ()
progressBarSetShowText _obj show_text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_text' = (fromIntegral . fromEnum) show_text
    gtk_progress_bar_set_show_text _obj' show_text'
    touchManagedPtr _obj
    return ()

-- method ProgressBar::set_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ProgressBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_progress_bar_set_text" gtk_progress_bar_set_text :: 
    Ptr ProgressBar ->                      -- _obj : TInterface "Gtk" "ProgressBar"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


progressBarSetText ::
    (MonadIO m, ProgressBarK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- text
    m ()
progressBarSetText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeText <- case text of
        Nothing -> return nullPtr
        Just jText -> do
            jText' <- textToCString jText
            return jText'
    gtk_progress_bar_set_text _obj' maybeText
    touchManagedPtr _obj
    freeMem maybeText
    return ()

-- object ProgressBarAccessible 
newtype ProgressBarAccessible = ProgressBarAccessible (ForeignPtr ProgressBarAccessible)
noProgressBarAccessible :: Maybe ProgressBarAccessible
noProgressBarAccessible = Nothing

foreign import ccall "gtk_progress_bar_accessible_get_type"
    c_gtk_progress_bar_accessible_get_type :: IO GType

type instance ParentTypes ProgressBarAccessible = '[WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Value]

instance GObject ProgressBarAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_progress_bar_accessible_get_type
    

class GObject o => ProgressBarAccessibleK o
instance (GObject o, IsDescendantOf ProgressBarAccessible o) => ProgressBarAccessibleK o

toProgressBarAccessible :: ProgressBarAccessibleK o => o -> IO ProgressBarAccessible
toProgressBarAccessible = unsafeCastTo ProgressBarAccessible

-- Enum PropagationPhase

data PropagationPhase = 
      PropagationPhaseNone
    | PropagationPhaseCapture
    | PropagationPhaseBubble
    | PropagationPhaseTarget
    | AnotherPropagationPhase Int
    deriving (Show, Eq)

instance Enum PropagationPhase where
    fromEnum PropagationPhaseNone = 0
    fromEnum PropagationPhaseCapture = 1
    fromEnum PropagationPhaseBubble = 2
    fromEnum PropagationPhaseTarget = 3
    fromEnum (AnotherPropagationPhase k) = k

    toEnum 0 = PropagationPhaseNone
    toEnum 1 = PropagationPhaseCapture
    toEnum 2 = PropagationPhaseBubble
    toEnum 3 = PropagationPhaseTarget
    toEnum k = AnotherPropagationPhase k

foreign import ccall "gtk_propagation_phase_get_type" c_gtk_propagation_phase_get_type :: 
    IO GType

instance BoxedEnum PropagationPhase where
    boxedEnumType _ = c_gtk_propagation_phase_get_type

-- object RadioAction 
newtype RadioAction = RadioAction (ForeignPtr RadioAction)
noRadioAction :: Maybe RadioAction
noRadioAction = Nothing

foreign import ccall "gtk_radio_action_get_type"
    c_gtk_radio_action_get_type :: IO GType

type instance ParentTypes RadioAction = '[ToggleAction, Action, GObject.Object, Buildable]

instance GObject RadioAction where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_radio_action_get_type
    

class GObject o => RadioActionK o
instance (GObject o, IsDescendantOf RadioAction o) => RadioActionK o

toRadioAction :: RadioActionK o => o -> IO RadioAction
toRadioAction = unsafeCastTo RadioAction

-- method RadioAction::new
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioAction"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_action_new" gtk_radio_action_new :: 
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- label : TBasicType TUTF8
    CString ->                              -- tooltip : TBasicType TUTF8
    CString ->                              -- stock_id : TBasicType TUTF8
    Int32 ->                                -- value : TBasicType TInt32
    IO (Ptr RadioAction)

{-# DEPRECATED radioActionNew ["(Since version 3.10)"]#-}
radioActionNew ::
    (MonadIO m) =>
    T.Text ->                               -- name
    Maybe (T.Text) ->                       -- label
    Maybe (T.Text) ->                       -- tooltip
    Maybe (T.Text) ->                       -- stock_id
    Int32 ->                                -- value
    m RadioAction
radioActionNew name label tooltip stock_id value = liftIO $ do
    name' <- textToCString name
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    maybeTooltip <- case tooltip of
        Nothing -> return nullPtr
        Just jTooltip -> do
            jTooltip' <- textToCString jTooltip
            return jTooltip'
    maybeStock_id <- case stock_id of
        Nothing -> return nullPtr
        Just jStock_id -> do
            jStock_id' <- textToCString jStock_id
            return jStock_id'
    result <- gtk_radio_action_new name' maybeLabel maybeTooltip maybeStock_id value
    checkUnexpectedReturnNULL "gtk_radio_action_new" result
    result' <- (wrapObject RadioAction) result
    freeMem name'
    freeMem maybeLabel
    freeMem maybeTooltip
    freeMem maybeStock_id
    return result'

-- method RadioAction::get_current_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_action_get_current_value" gtk_radio_action_get_current_value :: 
    Ptr RadioAction ->                      -- _obj : TInterface "Gtk" "RadioAction"
    IO Int32

{-# DEPRECATED radioActionGetCurrentValue ["(Since version 3.10)"]#-}
radioActionGetCurrentValue ::
    (MonadIO m, RadioActionK a) =>
    a ->                                    -- _obj
    m Int32
radioActionGetCurrentValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_radio_action_get_current_value _obj'
    touchManagedPtr _obj
    return result

-- method RadioAction::get_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "RadioAction")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_action_get_group" gtk_radio_action_get_group :: 
    Ptr RadioAction ->                      -- _obj : TInterface "Gtk" "RadioAction"
    IO (Ptr (GSList (Ptr RadioAction)))

{-# DEPRECATED radioActionGetGroup ["(Since version 3.10)"]#-}
radioActionGetGroup ::
    (MonadIO m, RadioActionK a) =>
    a ->                                    -- _obj
    m [RadioAction]
radioActionGetGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_radio_action_get_group _obj'
    checkUnexpectedReturnNULL "gtk_radio_action_get_group" result
    result' <- unpackGSList result
    result'' <- mapM (newObject RadioAction) result'
    touchManagedPtr _obj
    return result''

-- method RadioAction::join_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_source", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_source", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_action_join_group" gtk_radio_action_join_group :: 
    Ptr RadioAction ->                      -- _obj : TInterface "Gtk" "RadioAction"
    Ptr RadioAction ->                      -- group_source : TInterface "Gtk" "RadioAction"
    IO ()

{-# DEPRECATED radioActionJoinGroup ["(Since version 3.10)"]#-}
radioActionJoinGroup ::
    (MonadIO m, RadioActionK a, RadioActionK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- group_source
    m ()
radioActionJoinGroup _obj group_source = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeGroup_source <- case group_source of
        Nothing -> return nullPtr
        Just jGroup_source -> do
            let jGroup_source' = unsafeManagedPtrCastPtr jGroup_source
            return jGroup_source'
    gtk_radio_action_join_group _obj' maybeGroup_source
    touchManagedPtr _obj
    whenJust group_source touchManagedPtr
    return ()

-- method RadioAction::set_current_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "current_value", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "current_value", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_action_set_current_value" gtk_radio_action_set_current_value :: 
    Ptr RadioAction ->                      -- _obj : TInterface "Gtk" "RadioAction"
    Int32 ->                                -- current_value : TBasicType TInt32
    IO ()

{-# DEPRECATED radioActionSetCurrentValue ["(Since version 3.10)"]#-}
radioActionSetCurrentValue ::
    (MonadIO m, RadioActionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- current_value
    m ()
radioActionSetCurrentValue _obj current_value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_radio_action_set_current_value _obj' current_value
    touchManagedPtr _obj
    return ()

-- method RadioAction::set_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioAction"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioAction"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_action_set_group" gtk_radio_action_set_group :: 
    Ptr RadioAction ->                      -- _obj : TInterface "Gtk" "RadioAction"
    Ptr (GSList (Ptr RadioAction)) ->       -- group : TGSList (TInterface "Gtk" "RadioAction")
    IO ()

{-# DEPRECATED radioActionSetGroup ["(Since version 3.10)"]#-}
radioActionSetGroup ::
    (MonadIO m, RadioActionK a, RadioActionK b) =>
    a ->                                    -- _obj
    [b] ->                                  -- group
    m ()
radioActionSetGroup _obj group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    gtk_radio_action_set_group _obj' group''
    touchManagedPtr _obj
    mapM_ touchManagedPtr group
    g_slist_free group''
    return ()

-- signal RadioAction::changed
type RadioActionChangedCallback =
    RadioAction ->
    IO ()

noRadioActionChangedCallback :: Maybe RadioActionChangedCallback
noRadioActionChangedCallback = Nothing

type RadioActionChangedCallbackC =
    Ptr () ->                               -- object
    Ptr RadioAction ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkRadioActionChangedCallback :: RadioActionChangedCallbackC -> IO (FunPtr RadioActionChangedCallbackC)

radioActionChangedClosure :: RadioActionChangedCallback -> IO Closure
radioActionChangedClosure cb = newCClosure =<< mkRadioActionChangedCallback wrapped
    where wrapped = radioActionChangedCallbackWrapper cb

radioActionChangedCallbackWrapper ::
    RadioActionChangedCallback ->
    Ptr () ->
    Ptr RadioAction ->
    Ptr () ->
    IO ()
radioActionChangedCallbackWrapper _cb _ current _ = do
    current' <- (newObject RadioAction) current
    _cb  current'

onRadioActionChanged :: (GObject a, MonadIO m) => a -> RadioActionChangedCallback -> m SignalHandlerId
onRadioActionChanged obj cb = liftIO $ connectRadioActionChanged obj cb SignalConnectBefore
afterRadioActionChanged :: (GObject a, MonadIO m) => a -> RadioActionChangedCallback -> m SignalHandlerId
afterRadioActionChanged obj cb = connectRadioActionChanged obj cb SignalConnectAfter

connectRadioActionChanged :: (GObject a, MonadIO m) =>
                             a -> RadioActionChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectRadioActionChanged obj cb after = liftIO $ do
    cb' <- mkRadioActionChangedCallback (radioActionChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- struct RadioActionEntry
newtype RadioActionEntry = RadioActionEntry (ForeignPtr RadioActionEntry)
noRadioActionEntry :: Maybe RadioActionEntry
noRadioActionEntry = Nothing

radioActionEntryReadName :: RadioActionEntry -> IO T.Text
radioActionEntryReadName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

radioActionEntryReadStockId :: RadioActionEntry -> IO T.Text
radioActionEntryReadStockId s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

radioActionEntryReadLabel :: RadioActionEntry -> IO T.Text
radioActionEntryReadLabel s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO CString
    val' <- cstringToText val
    return val'

radioActionEntryReadAccelerator :: RadioActionEntry -> IO T.Text
radioActionEntryReadAccelerator s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO CString
    val' <- cstringToText val
    return val'

radioActionEntryReadTooltip :: RadioActionEntry -> IO T.Text
radioActionEntryReadTooltip s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO CString
    val' <- cstringToText val
    return val'

radioActionEntryReadValue :: RadioActionEntry -> IO Int32
radioActionEntryReadValue s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 40) :: IO Int32
    return val

-- object RadioButton 
newtype RadioButton = RadioButton (ForeignPtr RadioButton)
noRadioButton :: Maybe RadioButton
noRadioButton = Nothing

foreign import ccall "gtk_radio_button_get_type"
    c_gtk_radio_button_get_type :: IO GType

type instance ParentTypes RadioButton = '[CheckButton, ToggleButton, Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject RadioButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_radio_button_get_type
    

class GObject o => RadioButtonK o
instance (GObject o, IsDescendantOf RadioButton o) => RadioButtonK o

toRadioButton :: RadioButtonK o => o -> IO RadioButton
toRadioButton = unsafeCastTo RadioButton

-- method RadioButton::new
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_button_new" gtk_radio_button_new :: 
    Ptr (GSList (Ptr RadioButton)) ->       -- group : TGSList (TInterface "Gtk" "RadioButton")
    IO (Ptr RadioButton)


radioButtonNew ::
    (MonadIO m, RadioButtonK a) =>
    [a] ->                                  -- group
    m RadioButton
radioButtonNew group = liftIO $ do
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    result <- gtk_radio_button_new group''
    checkUnexpectedReturnNULL "gtk_radio_button_new" result
    result' <- (newObject RadioButton) result
    mapM_ touchManagedPtr group
    g_slist_free group''
    return result'

-- method RadioButton::new_from_widget
-- method type : Constructor
-- Args : [Arg {argName = "radio_group_member", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "radio_group_member", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_button_new_from_widget" gtk_radio_button_new_from_widget :: 
    Ptr RadioButton ->                      -- radio_group_member : TInterface "Gtk" "RadioButton"
    IO (Ptr RadioButton)


radioButtonNewFromWidget ::
    (MonadIO m, RadioButtonK a) =>
    Maybe (a) ->                            -- radio_group_member
    m RadioButton
radioButtonNewFromWidget radio_group_member = liftIO $ do
    maybeRadio_group_member <- case radio_group_member of
        Nothing -> return nullPtr
        Just jRadio_group_member -> do
            let jRadio_group_member' = unsafeManagedPtrCastPtr jRadio_group_member
            return jRadio_group_member'
    result <- gtk_radio_button_new_from_widget maybeRadio_group_member
    checkUnexpectedReturnNULL "gtk_radio_button_new_from_widget" result
    result' <- (newObject RadioButton) result
    whenJust radio_group_member touchManagedPtr
    return result'

-- method RadioButton::new_with_label
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_button_new_with_label" gtk_radio_button_new_with_label :: 
    Ptr (GSList (Ptr RadioButton)) ->       -- group : TGSList (TInterface "Gtk" "RadioButton")
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr RadioButton)


radioButtonNewWithLabel ::
    (MonadIO m, RadioButtonK a) =>
    [a] ->                                  -- group
    T.Text ->                               -- label
    m RadioButton
radioButtonNewWithLabel group label = liftIO $ do
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    label' <- textToCString label
    result <- gtk_radio_button_new_with_label group'' label'
    checkUnexpectedReturnNULL "gtk_radio_button_new_with_label" result
    result' <- (newObject RadioButton) result
    mapM_ touchManagedPtr group
    g_slist_free group''
    freeMem label'
    return result'

-- method RadioButton::new_with_label_from_widget
-- method type : Constructor
-- Args : [Arg {argName = "radio_group_member", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "radio_group_member", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_button_new_with_label_from_widget" gtk_radio_button_new_with_label_from_widget :: 
    Ptr RadioButton ->                      -- radio_group_member : TInterface "Gtk" "RadioButton"
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr RadioButton)


radioButtonNewWithLabelFromWidget ::
    (MonadIO m, RadioButtonK a) =>
    Maybe (a) ->                            -- radio_group_member
    T.Text ->                               -- label
    m RadioButton
radioButtonNewWithLabelFromWidget radio_group_member label = liftIO $ do
    maybeRadio_group_member <- case radio_group_member of
        Nothing -> return nullPtr
        Just jRadio_group_member -> do
            let jRadio_group_member' = unsafeManagedPtrCastPtr jRadio_group_member
            return jRadio_group_member'
    label' <- textToCString label
    result <- gtk_radio_button_new_with_label_from_widget maybeRadio_group_member label'
    checkUnexpectedReturnNULL "gtk_radio_button_new_with_label_from_widget" result
    result' <- (newObject RadioButton) result
    whenJust radio_group_member touchManagedPtr
    freeMem label'
    return result'

-- method RadioButton::new_with_mnemonic
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_button_new_with_mnemonic" gtk_radio_button_new_with_mnemonic :: 
    Ptr (GSList (Ptr RadioButton)) ->       -- group : TGSList (TInterface "Gtk" "RadioButton")
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr RadioButton)


radioButtonNewWithMnemonic ::
    (MonadIO m, RadioButtonK a) =>
    [a] ->                                  -- group
    T.Text ->                               -- label
    m RadioButton
radioButtonNewWithMnemonic group label = liftIO $ do
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    label' <- textToCString label
    result <- gtk_radio_button_new_with_mnemonic group'' label'
    checkUnexpectedReturnNULL "gtk_radio_button_new_with_mnemonic" result
    result' <- (newObject RadioButton) result
    mapM_ touchManagedPtr group
    g_slist_free group''
    freeMem label'
    return result'

-- method RadioButton::new_with_mnemonic_from_widget
-- method type : Constructor
-- Args : [Arg {argName = "radio_group_member", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "radio_group_member", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_button_new_with_mnemonic_from_widget" gtk_radio_button_new_with_mnemonic_from_widget :: 
    Ptr RadioButton ->                      -- radio_group_member : TInterface "Gtk" "RadioButton"
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr RadioButton)


radioButtonNewWithMnemonicFromWidget ::
    (MonadIO m, RadioButtonK a) =>
    Maybe (a) ->                            -- radio_group_member
    T.Text ->                               -- label
    m RadioButton
radioButtonNewWithMnemonicFromWidget radio_group_member label = liftIO $ do
    maybeRadio_group_member <- case radio_group_member of
        Nothing -> return nullPtr
        Just jRadio_group_member -> do
            let jRadio_group_member' = unsafeManagedPtrCastPtr jRadio_group_member
            return jRadio_group_member'
    label' <- textToCString label
    result <- gtk_radio_button_new_with_mnemonic_from_widget maybeRadio_group_member label'
    checkUnexpectedReturnNULL "gtk_radio_button_new_with_mnemonic_from_widget" result
    result' <- (newObject RadioButton) result
    whenJust radio_group_member touchManagedPtr
    freeMem label'
    return result'

-- method RadioButton::get_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "RadioButton")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_button_get_group" gtk_radio_button_get_group :: 
    Ptr RadioButton ->                      -- _obj : TInterface "Gtk" "RadioButton"
    IO (Ptr (GSList (Ptr RadioButton)))


radioButtonGetGroup ::
    (MonadIO m, RadioButtonK a) =>
    a ->                                    -- _obj
    m [RadioButton]
radioButtonGetGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_radio_button_get_group _obj'
    checkUnexpectedReturnNULL "gtk_radio_button_get_group" result
    result' <- unpackGSList result
    result'' <- mapM (newObject RadioButton) result'
    touchManagedPtr _obj
    return result''

-- method RadioButton::join_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_source", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_source", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_button_join_group" gtk_radio_button_join_group :: 
    Ptr RadioButton ->                      -- _obj : TInterface "Gtk" "RadioButton"
    Ptr RadioButton ->                      -- group_source : TInterface "Gtk" "RadioButton"
    IO ()


radioButtonJoinGroup ::
    (MonadIO m, RadioButtonK a, RadioButtonK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- group_source
    m ()
radioButtonJoinGroup _obj group_source = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeGroup_source <- case group_source of
        Nothing -> return nullPtr
        Just jGroup_source -> do
            let jGroup_source' = unsafeManagedPtrCastPtr jGroup_source
            return jGroup_source'
    gtk_radio_button_join_group _obj' maybeGroup_source
    touchManagedPtr _obj
    whenJust group_source touchManagedPtr
    return ()

-- method RadioButton::set_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_button_set_group" gtk_radio_button_set_group :: 
    Ptr RadioButton ->                      -- _obj : TInterface "Gtk" "RadioButton"
    Ptr (GSList (Ptr RadioButton)) ->       -- group : TGSList (TInterface "Gtk" "RadioButton")
    IO ()


radioButtonSetGroup ::
    (MonadIO m, RadioButtonK a, RadioButtonK b) =>
    a ->                                    -- _obj
    [b] ->                                  -- group
    m ()
radioButtonSetGroup _obj group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    gtk_radio_button_set_group _obj' group''
    touchManagedPtr _obj
    mapM_ touchManagedPtr group
    g_slist_free group''
    return ()

-- signal RadioButton::group-changed
type RadioButtonGroupChangedCallback =
    IO ()

noRadioButtonGroupChangedCallback :: Maybe RadioButtonGroupChangedCallback
noRadioButtonGroupChangedCallback = Nothing

type RadioButtonGroupChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkRadioButtonGroupChangedCallback :: RadioButtonGroupChangedCallbackC -> IO (FunPtr RadioButtonGroupChangedCallbackC)

radioButtonGroupChangedClosure :: RadioButtonGroupChangedCallback -> IO Closure
radioButtonGroupChangedClosure cb = newCClosure =<< mkRadioButtonGroupChangedCallback wrapped
    where wrapped = radioButtonGroupChangedCallbackWrapper cb

radioButtonGroupChangedCallbackWrapper ::
    RadioButtonGroupChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
radioButtonGroupChangedCallbackWrapper _cb _ _ = do
    _cb 

onRadioButtonGroupChanged :: (GObject a, MonadIO m) => a -> RadioButtonGroupChangedCallback -> m SignalHandlerId
onRadioButtonGroupChanged obj cb = liftIO $ connectRadioButtonGroupChanged obj cb SignalConnectBefore
afterRadioButtonGroupChanged :: (GObject a, MonadIO m) => a -> RadioButtonGroupChangedCallback -> m SignalHandlerId
afterRadioButtonGroupChanged obj cb = connectRadioButtonGroupChanged obj cb SignalConnectAfter

connectRadioButtonGroupChanged :: (GObject a, MonadIO m) =>
                                  a -> RadioButtonGroupChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectRadioButtonGroupChanged obj cb after = liftIO $ do
    cb' <- mkRadioButtonGroupChangedCallback (radioButtonGroupChangedCallbackWrapper cb)
    connectSignalFunPtr obj "group-changed" cb' after

-- object RadioButtonAccessible 
newtype RadioButtonAccessible = RadioButtonAccessible (ForeignPtr RadioButtonAccessible)
noRadioButtonAccessible :: Maybe RadioButtonAccessible
noRadioButtonAccessible = Nothing

foreign import ccall "gtk_radio_button_accessible_get_type"
    c_gtk_radio_button_accessible_get_type :: IO GType

type instance ParentTypes RadioButtonAccessible = '[ToggleButtonAccessible, ButtonAccessible, ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Image]

instance GObject RadioButtonAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_radio_button_accessible_get_type
    

class GObject o => RadioButtonAccessibleK o
instance (GObject o, IsDescendantOf RadioButtonAccessible o) => RadioButtonAccessibleK o

toRadioButtonAccessible :: RadioButtonAccessibleK o => o -> IO RadioButtonAccessible
toRadioButtonAccessible = unsafeCastTo RadioButtonAccessible

-- object RadioMenuItem 
newtype RadioMenuItem = RadioMenuItem (ForeignPtr RadioMenuItem)
noRadioMenuItem :: Maybe RadioMenuItem
noRadioMenuItem = Nothing

foreign import ccall "gtk_radio_menu_item_get_type"
    c_gtk_radio_menu_item_get_type :: IO GType

type instance ParentTypes RadioMenuItem = '[CheckMenuItem, MenuItem, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject RadioMenuItem where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_radio_menu_item_get_type
    

class GObject o => RadioMenuItemK o
instance (GObject o, IsDescendantOf RadioMenuItem o) => RadioMenuItemK o

toRadioMenuItem :: RadioMenuItemK o => o -> IO RadioMenuItem
toRadioMenuItem = unsafeCastTo RadioMenuItem

-- method RadioMenuItem::new
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioMenuItem"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioMenuItem"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_menu_item_new" gtk_radio_menu_item_new :: 
    Ptr (GSList (Ptr RadioMenuItem)) ->     -- group : TGSList (TInterface "Gtk" "RadioMenuItem")
    IO (Ptr RadioMenuItem)


radioMenuItemNew ::
    (MonadIO m, RadioMenuItemK a) =>
    [a] ->                                  -- group
    m RadioMenuItem
radioMenuItemNew group = liftIO $ do
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    result <- gtk_radio_menu_item_new group''
    checkUnexpectedReturnNULL "gtk_radio_menu_item_new" result
    result' <- (newObject RadioMenuItem) result
    mapM_ touchManagedPtr group
    g_slist_free group''
    return result'

-- method RadioMenuItem::new_from_widget
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_menu_item_new_from_widget" gtk_radio_menu_item_new_from_widget :: 
    Ptr RadioMenuItem ->                    -- group : TInterface "Gtk" "RadioMenuItem"
    IO (Ptr RadioMenuItem)


radioMenuItemNewFromWidget ::
    (MonadIO m, RadioMenuItemK a) =>
    Maybe (a) ->                            -- group
    m RadioMenuItem
radioMenuItemNewFromWidget group = liftIO $ do
    maybeGroup <- case group of
        Nothing -> return nullPtr
        Just jGroup -> do
            let jGroup' = unsafeManagedPtrCastPtr jGroup
            return jGroup'
    result <- gtk_radio_menu_item_new_from_widget maybeGroup
    checkUnexpectedReturnNULL "gtk_radio_menu_item_new_from_widget" result
    result' <- (newObject RadioMenuItem) result
    whenJust group touchManagedPtr
    return result'

-- method RadioMenuItem::new_with_label
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioMenuItem"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioMenuItem"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_menu_item_new_with_label" gtk_radio_menu_item_new_with_label :: 
    Ptr (GSList (Ptr RadioMenuItem)) ->     -- group : TGSList (TInterface "Gtk" "RadioMenuItem")
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr RadioMenuItem)


radioMenuItemNewWithLabel ::
    (MonadIO m, RadioMenuItemK a) =>
    [a] ->                                  -- group
    T.Text ->                               -- label
    m RadioMenuItem
radioMenuItemNewWithLabel group label = liftIO $ do
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    label' <- textToCString label
    result <- gtk_radio_menu_item_new_with_label group'' label'
    checkUnexpectedReturnNULL "gtk_radio_menu_item_new_with_label" result
    result' <- (newObject RadioMenuItem) result
    mapM_ touchManagedPtr group
    g_slist_free group''
    freeMem label'
    return result'

-- method RadioMenuItem::new_with_label_from_widget
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_menu_item_new_with_label_from_widget" gtk_radio_menu_item_new_with_label_from_widget :: 
    Ptr RadioMenuItem ->                    -- group : TInterface "Gtk" "RadioMenuItem"
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr RadioMenuItem)


radioMenuItemNewWithLabelFromWidget ::
    (MonadIO m, RadioMenuItemK a) =>
    Maybe (a) ->                            -- group
    Maybe (T.Text) ->                       -- label
    m RadioMenuItem
radioMenuItemNewWithLabelFromWidget group label = liftIO $ do
    maybeGroup <- case group of
        Nothing -> return nullPtr
        Just jGroup -> do
            let jGroup' = unsafeManagedPtrCastPtr jGroup
            return jGroup'
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    result <- gtk_radio_menu_item_new_with_label_from_widget maybeGroup maybeLabel
    checkUnexpectedReturnNULL "gtk_radio_menu_item_new_with_label_from_widget" result
    result' <- (newObject RadioMenuItem) result
    whenJust group touchManagedPtr
    freeMem maybeLabel
    return result'

-- method RadioMenuItem::new_with_mnemonic
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioMenuItem"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioMenuItem"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_menu_item_new_with_mnemonic" gtk_radio_menu_item_new_with_mnemonic :: 
    Ptr (GSList (Ptr RadioMenuItem)) ->     -- group : TGSList (TInterface "Gtk" "RadioMenuItem")
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr RadioMenuItem)


radioMenuItemNewWithMnemonic ::
    (MonadIO m, RadioMenuItemK a) =>
    [a] ->                                  -- group
    T.Text ->                               -- label
    m RadioMenuItem
radioMenuItemNewWithMnemonic group label = liftIO $ do
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    label' <- textToCString label
    result <- gtk_radio_menu_item_new_with_mnemonic group'' label'
    checkUnexpectedReturnNULL "gtk_radio_menu_item_new_with_mnemonic" result
    result' <- (newObject RadioMenuItem) result
    mapM_ touchManagedPtr group
    g_slist_free group''
    freeMem label'
    return result'

-- method RadioMenuItem::new_with_mnemonic_from_widget
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_menu_item_new_with_mnemonic_from_widget" gtk_radio_menu_item_new_with_mnemonic_from_widget :: 
    Ptr RadioMenuItem ->                    -- group : TInterface "Gtk" "RadioMenuItem"
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr RadioMenuItem)


radioMenuItemNewWithMnemonicFromWidget ::
    (MonadIO m, RadioMenuItemK a) =>
    Maybe (a) ->                            -- group
    Maybe (T.Text) ->                       -- label
    m RadioMenuItem
radioMenuItemNewWithMnemonicFromWidget group label = liftIO $ do
    maybeGroup <- case group of
        Nothing -> return nullPtr
        Just jGroup -> do
            let jGroup' = unsafeManagedPtrCastPtr jGroup
            return jGroup'
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    result <- gtk_radio_menu_item_new_with_mnemonic_from_widget maybeGroup maybeLabel
    checkUnexpectedReturnNULL "gtk_radio_menu_item_new_with_mnemonic_from_widget" result
    result' <- (newObject RadioMenuItem) result
    whenJust group touchManagedPtr
    freeMem maybeLabel
    return result'

-- method RadioMenuItem::get_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "RadioMenuItem")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_menu_item_get_group" gtk_radio_menu_item_get_group :: 
    Ptr RadioMenuItem ->                    -- _obj : TInterface "Gtk" "RadioMenuItem"
    IO (Ptr (GSList (Ptr RadioMenuItem)))


radioMenuItemGetGroup ::
    (MonadIO m, RadioMenuItemK a) =>
    a ->                                    -- _obj
    m [RadioMenuItem]
radioMenuItemGetGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_radio_menu_item_get_group _obj'
    checkUnexpectedReturnNULL "gtk_radio_menu_item_get_group" result
    result' <- unpackGSList result
    result'' <- mapM (newObject RadioMenuItem) result'
    touchManagedPtr _obj
    return result''

-- method RadioMenuItem::join_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_source", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_source", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_menu_item_join_group" gtk_radio_menu_item_join_group :: 
    Ptr RadioMenuItem ->                    -- _obj : TInterface "Gtk" "RadioMenuItem"
    Ptr RadioMenuItem ->                    -- group_source : TInterface "Gtk" "RadioMenuItem"
    IO ()


radioMenuItemJoinGroup ::
    (MonadIO m, RadioMenuItemK a, RadioMenuItemK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- group_source
    m ()
radioMenuItemJoinGroup _obj group_source = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeGroup_source <- case group_source of
        Nothing -> return nullPtr
        Just jGroup_source -> do
            let jGroup_source' = unsafeManagedPtrCastPtr jGroup_source
            return jGroup_source'
    gtk_radio_menu_item_join_group _obj' maybeGroup_source
    touchManagedPtr _obj
    whenJust group_source touchManagedPtr
    return ()

-- method RadioMenuItem::set_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioMenuItem"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioMenuItem"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_menu_item_set_group" gtk_radio_menu_item_set_group :: 
    Ptr RadioMenuItem ->                    -- _obj : TInterface "Gtk" "RadioMenuItem"
    Ptr (GSList (Ptr RadioMenuItem)) ->     -- group : TGSList (TInterface "Gtk" "RadioMenuItem")
    IO ()


radioMenuItemSetGroup ::
    (MonadIO m, RadioMenuItemK a, RadioMenuItemK b) =>
    a ->                                    -- _obj
    [b] ->                                  -- group
    m ()
radioMenuItemSetGroup _obj group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    gtk_radio_menu_item_set_group _obj' group''
    touchManagedPtr _obj
    mapM_ touchManagedPtr group
    g_slist_free group''
    return ()

-- signal RadioMenuItem::group-changed
type RadioMenuItemGroupChangedCallback =
    IO ()

noRadioMenuItemGroupChangedCallback :: Maybe RadioMenuItemGroupChangedCallback
noRadioMenuItemGroupChangedCallback = Nothing

type RadioMenuItemGroupChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkRadioMenuItemGroupChangedCallback :: RadioMenuItemGroupChangedCallbackC -> IO (FunPtr RadioMenuItemGroupChangedCallbackC)

radioMenuItemGroupChangedClosure :: RadioMenuItemGroupChangedCallback -> IO Closure
radioMenuItemGroupChangedClosure cb = newCClosure =<< mkRadioMenuItemGroupChangedCallback wrapped
    where wrapped = radioMenuItemGroupChangedCallbackWrapper cb

radioMenuItemGroupChangedCallbackWrapper ::
    RadioMenuItemGroupChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
radioMenuItemGroupChangedCallbackWrapper _cb _ _ = do
    _cb 

onRadioMenuItemGroupChanged :: (GObject a, MonadIO m) => a -> RadioMenuItemGroupChangedCallback -> m SignalHandlerId
onRadioMenuItemGroupChanged obj cb = liftIO $ connectRadioMenuItemGroupChanged obj cb SignalConnectBefore
afterRadioMenuItemGroupChanged :: (GObject a, MonadIO m) => a -> RadioMenuItemGroupChangedCallback -> m SignalHandlerId
afterRadioMenuItemGroupChanged obj cb = connectRadioMenuItemGroupChanged obj cb SignalConnectAfter

connectRadioMenuItemGroupChanged :: (GObject a, MonadIO m) =>
                                    a -> RadioMenuItemGroupChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectRadioMenuItemGroupChanged obj cb after = liftIO $ do
    cb' <- mkRadioMenuItemGroupChangedCallback (radioMenuItemGroupChangedCallbackWrapper cb)
    connectSignalFunPtr obj "group-changed" cb' after

-- object RadioMenuItemAccessible 
newtype RadioMenuItemAccessible = RadioMenuItemAccessible (ForeignPtr RadioMenuItemAccessible)
noRadioMenuItemAccessible :: Maybe RadioMenuItemAccessible
noRadioMenuItemAccessible = Nothing

foreign import ccall "gtk_radio_menu_item_accessible_get_type"
    c_gtk_radio_menu_item_accessible_get_type :: IO GType

type instance ParentTypes RadioMenuItemAccessible = '[CheckMenuItemAccessible, MenuItemAccessible, ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Selection]

instance GObject RadioMenuItemAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_radio_menu_item_accessible_get_type
    

class GObject o => RadioMenuItemAccessibleK o
instance (GObject o, IsDescendantOf RadioMenuItemAccessible o) => RadioMenuItemAccessibleK o

toRadioMenuItemAccessible :: RadioMenuItemAccessibleK o => o -> IO RadioMenuItemAccessible
toRadioMenuItemAccessible = unsafeCastTo RadioMenuItemAccessible

-- object RadioToolButton 
newtype RadioToolButton = RadioToolButton (ForeignPtr RadioToolButton)
noRadioToolButton :: Maybe RadioToolButton
noRadioToolButton = Nothing

foreign import ccall "gtk_radio_tool_button_get_type"
    c_gtk_radio_tool_button_get_type :: IO GType

type instance ParentTypes RadioToolButton = '[ToggleToolButton, ToolButton, ToolItem, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject RadioToolButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_radio_tool_button_get_type
    

class GObject o => RadioToolButtonK o
instance (GObject o, IsDescendantOf RadioToolButton o) => RadioToolButtonK o

toRadioToolButton :: RadioToolButtonK o => o -> IO RadioToolButton
toRadioToolButton = unsafeCastTo RadioToolButton

-- method RadioToolButton::new
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioToolButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_tool_button_new" gtk_radio_tool_button_new :: 
    Ptr (GSList (Ptr RadioButton)) ->       -- group : TGSList (TInterface "Gtk" "RadioButton")
    IO (Ptr RadioToolButton)


radioToolButtonNew ::
    (MonadIO m, RadioButtonK a) =>
    [a] ->                                  -- group
    m RadioToolButton
radioToolButtonNew group = liftIO $ do
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    result <- gtk_radio_tool_button_new group''
    checkUnexpectedReturnNULL "gtk_radio_tool_button_new" result
    result' <- (newObject RadioToolButton) result
    mapM_ touchManagedPtr group
    g_slist_free group''
    return result'

-- method RadioToolButton::new_from_stock
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioToolButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_tool_button_new_from_stock" gtk_radio_tool_button_new_from_stock :: 
    Ptr (GSList (Ptr RadioButton)) ->       -- group : TGSList (TInterface "Gtk" "RadioButton")
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr RadioToolButton)

{-# DEPRECATED radioToolButtonNewFromStock ["(Since version 3.10)","Use gtk_radio_tool_button_new() instead."]#-}
radioToolButtonNewFromStock ::
    (MonadIO m, RadioButtonK a) =>
    [a] ->                                  -- group
    T.Text ->                               -- stock_id
    m RadioToolButton
radioToolButtonNewFromStock group stock_id = liftIO $ do
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    stock_id' <- textToCString stock_id
    result <- gtk_radio_tool_button_new_from_stock group'' stock_id'
    checkUnexpectedReturnNULL "gtk_radio_tool_button_new_from_stock" result
    result' <- (newObject RadioToolButton) result
    mapM_ touchManagedPtr group
    g_slist_free group''
    freeMem stock_id'
    return result'

-- method RadioToolButton::new_from_widget
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TInterface "Gtk" "RadioToolButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TInterface "Gtk" "RadioToolButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioToolButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_tool_button_new_from_widget" gtk_radio_tool_button_new_from_widget :: 
    Ptr RadioToolButton ->                  -- group : TInterface "Gtk" "RadioToolButton"
    IO (Ptr RadioToolButton)


radioToolButtonNewFromWidget ::
    (MonadIO m, RadioToolButtonK a) =>
    Maybe (a) ->                            -- group
    m RadioToolButton
radioToolButtonNewFromWidget group = liftIO $ do
    maybeGroup <- case group of
        Nothing -> return nullPtr
        Just jGroup -> do
            let jGroup' = unsafeManagedPtrCastPtr jGroup
            return jGroup'
    result <- gtk_radio_tool_button_new_from_widget maybeGroup
    checkUnexpectedReturnNULL "gtk_radio_tool_button_new_from_widget" result
    result' <- (newObject RadioToolButton) result
    whenJust group touchManagedPtr
    return result'

-- method RadioToolButton::new_with_stock_from_widget
-- method type : Constructor
-- Args : [Arg {argName = "group", argType = TInterface "Gtk" "RadioToolButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "group", argType = TInterface "Gtk" "RadioToolButton", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RadioToolButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_tool_button_new_with_stock_from_widget" gtk_radio_tool_button_new_with_stock_from_widget :: 
    Ptr RadioToolButton ->                  -- group : TInterface "Gtk" "RadioToolButton"
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr RadioToolButton)

{-# DEPRECATED radioToolButtonNewWithStockFromWidget ["(Since version 3.10)","gtk_radio_tool_button_new_from_widget"]#-}
radioToolButtonNewWithStockFromWidget ::
    (MonadIO m, RadioToolButtonK a) =>
    Maybe (a) ->                            -- group
    T.Text ->                               -- stock_id
    m RadioToolButton
radioToolButtonNewWithStockFromWidget group stock_id = liftIO $ do
    maybeGroup <- case group of
        Nothing -> return nullPtr
        Just jGroup -> do
            let jGroup' = unsafeManagedPtrCastPtr jGroup
            return jGroup'
    stock_id' <- textToCString stock_id
    result <- gtk_radio_tool_button_new_with_stock_from_widget maybeGroup stock_id'
    checkUnexpectedReturnNULL "gtk_radio_tool_button_new_with_stock_from_widget" result
    result' <- (newObject RadioToolButton) result
    whenJust group touchManagedPtr
    freeMem stock_id'
    return result'

-- method RadioToolButton::get_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "RadioButton")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_tool_button_get_group" gtk_radio_tool_button_get_group :: 
    Ptr RadioToolButton ->                  -- _obj : TInterface "Gtk" "RadioToolButton"
    IO (Ptr (GSList (Ptr RadioButton)))


radioToolButtonGetGroup ::
    (MonadIO m, RadioToolButtonK a) =>
    a ->                                    -- _obj
    m [RadioButton]
radioToolButtonGetGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_radio_tool_button_get_group _obj'
    checkUnexpectedReturnNULL "gtk_radio_tool_button_get_group" result
    result' <- unpackGSList result
    result'' <- mapM (newObject RadioButton) result'
    touchManagedPtr _obj
    return result''

-- method RadioToolButton::set_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RadioToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TGSList (TInterface "Gtk" "RadioButton"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_radio_tool_button_set_group" gtk_radio_tool_button_set_group :: 
    Ptr RadioToolButton ->                  -- _obj : TInterface "Gtk" "RadioToolButton"
    Ptr (GSList (Ptr RadioButton)) ->       -- group : TGSList (TInterface "Gtk" "RadioButton")
    IO ()


radioToolButtonSetGroup ::
    (MonadIO m, RadioToolButtonK a, RadioButtonK b) =>
    a ->                                    -- _obj
    [b] ->                                  -- group
    m ()
radioToolButtonSetGroup _obj group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let group' = map unsafeManagedPtrCastPtr group
    group'' <- packGSList group'
    gtk_radio_tool_button_set_group _obj' group''
    touchManagedPtr _obj
    mapM_ touchManagedPtr group
    g_slist_free group''
    return ()

-- object Range 
newtype Range = Range (ForeignPtr Range)
noRange :: Maybe Range
noRange = Nothing

foreign import ccall "gtk_range_get_type"
    c_gtk_range_get_type :: IO GType

type instance ParentTypes Range = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject Range where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_range_get_type
    

class GObject o => RangeK o
instance (GObject o, IsDescendantOf Range o) => RangeK o

toRange :: RangeK o => o -> IO Range
toRange = unsafeCastTo Range

-- method Range::get_adjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_adjustment" gtk_range_get_adjustment :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO (Ptr Adjustment)


rangeGetAdjustment ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m Adjustment
rangeGetAdjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_adjustment _obj'
    checkUnexpectedReturnNULL "gtk_range_get_adjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method Range::get_fill_level
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_fill_level" gtk_range_get_fill_level :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO CDouble


rangeGetFillLevel ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m Double
rangeGetFillLevel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_fill_level _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Range::get_flippable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_flippable" gtk_range_get_flippable :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO CInt


rangeGetFlippable ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m Bool
rangeGetFlippable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_flippable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Range::get_inverted
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_inverted" gtk_range_get_inverted :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO CInt


rangeGetInverted ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m Bool
rangeGetInverted _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_inverted _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Range::get_lower_stepper_sensitivity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SensitivityType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_lower_stepper_sensitivity" gtk_range_get_lower_stepper_sensitivity :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO CUInt


rangeGetLowerStepperSensitivity ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m SensitivityType
rangeGetLowerStepperSensitivity _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_lower_stepper_sensitivity _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Range::get_min_slider_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_min_slider_size" gtk_range_get_min_slider_size :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO Int32


rangeGetMinSliderSize ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m Int32
rangeGetMinSliderSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_min_slider_size _obj'
    touchManagedPtr _obj
    return result

-- method Range::get_range_rect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "range_rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_range_rect" gtk_range_get_range_rect :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    Ptr Gdk.Rectangle ->                    -- range_rect : TInterface "Gdk" "Rectangle"
    IO ()


rangeGetRangeRect ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m (Gdk.Rectangle)
rangeGetRangeRect _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    range_rect <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_range_get_range_rect _obj' range_rect
    range_rect' <- (wrapBoxed Gdk.Rectangle) range_rect
    touchManagedPtr _obj
    return range_rect'

-- method Range::get_restrict_to_fill_level
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_restrict_to_fill_level" gtk_range_get_restrict_to_fill_level :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO CInt


rangeGetRestrictToFillLevel ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m Bool
rangeGetRestrictToFillLevel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_restrict_to_fill_level _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Range::get_round_digits
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_round_digits" gtk_range_get_round_digits :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO Int32


rangeGetRoundDigits ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m Int32
rangeGetRoundDigits _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_round_digits _obj'
    touchManagedPtr _obj
    return result

-- method Range::get_show_fill_level
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_show_fill_level" gtk_range_get_show_fill_level :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO CInt


rangeGetShowFillLevel ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m Bool
rangeGetShowFillLevel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_show_fill_level _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Range::get_slider_range
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "slider_start", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "slider_end", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_slider_range" gtk_range_get_slider_range :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    Ptr Int32 ->                            -- slider_start : TBasicType TInt32
    Ptr Int32 ->                            -- slider_end : TBasicType TInt32
    IO ()


rangeGetSliderRange ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
rangeGetSliderRange _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    slider_start <- allocMem :: IO (Ptr Int32)
    slider_end <- allocMem :: IO (Ptr Int32)
    gtk_range_get_slider_range _obj' slider_start slider_end
    slider_start' <- peek slider_start
    slider_end' <- peek slider_end
    touchManagedPtr _obj
    freeMem slider_start
    freeMem slider_end
    return (slider_start', slider_end')

-- method Range::get_slider_size_fixed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_slider_size_fixed" gtk_range_get_slider_size_fixed :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO CInt


rangeGetSliderSizeFixed ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m Bool
rangeGetSliderSizeFixed _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_slider_size_fixed _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Range::get_upper_stepper_sensitivity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SensitivityType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_upper_stepper_sensitivity" gtk_range_get_upper_stepper_sensitivity :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO CUInt


rangeGetUpperStepperSensitivity ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m SensitivityType
rangeGetUpperStepperSensitivity _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_upper_stepper_sensitivity _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Range::get_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_get_value" gtk_range_get_value :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    IO CDouble


rangeGetValue ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    m Double
rangeGetValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_range_get_value _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Range::set_adjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_adjustment" gtk_range_set_adjustment :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()


rangeSetAdjustment ::
    (MonadIO m, RangeK a, AdjustmentK b) =>
    a ->                                    -- _obj
    b ->                                    -- adjustment
    m ()
rangeSetAdjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let adjustment' = unsafeManagedPtrCastPtr adjustment
    gtk_range_set_adjustment _obj' adjustment'
    touchManagedPtr _obj
    touchManagedPtr adjustment
    return ()

-- method Range::set_fill_level
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fill_level", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fill_level", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_fill_level" gtk_range_set_fill_level :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    CDouble ->                              -- fill_level : TBasicType TDouble
    IO ()


rangeSetFillLevel ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    Double ->                               -- fill_level
    m ()
rangeSetFillLevel _obj fill_level = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let fill_level' = realToFrac fill_level
    gtk_range_set_fill_level _obj' fill_level'
    touchManagedPtr _obj
    return ()

-- method Range::set_flippable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flippable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flippable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_flippable" gtk_range_set_flippable :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    CInt ->                                 -- flippable : TBasicType TBoolean
    IO ()


rangeSetFlippable ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- flippable
    m ()
rangeSetFlippable _obj flippable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let flippable' = (fromIntegral . fromEnum) flippable
    gtk_range_set_flippable _obj' flippable'
    touchManagedPtr _obj
    return ()

-- method Range::set_increments
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_increments" gtk_range_set_increments :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    CDouble ->                              -- step : TBasicType TDouble
    CDouble ->                              -- page : TBasicType TDouble
    IO ()


rangeSetIncrements ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    Double ->                               -- step
    Double ->                               -- page
    m ()
rangeSetIncrements _obj step page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let step' = realToFrac step
    let page' = realToFrac page
    gtk_range_set_increments _obj' step' page'
    touchManagedPtr _obj
    return ()

-- method Range::set_inverted
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_inverted" gtk_range_set_inverted :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


rangeSetInverted ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
rangeSetInverted _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_range_set_inverted _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Range::set_lower_stepper_sensitivity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitivity", argType = TInterface "Gtk" "SensitivityType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitivity", argType = TInterface "Gtk" "SensitivityType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_lower_stepper_sensitivity" gtk_range_set_lower_stepper_sensitivity :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    CUInt ->                                -- sensitivity : TInterface "Gtk" "SensitivityType"
    IO ()


rangeSetLowerStepperSensitivity ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    SensitivityType ->                      -- sensitivity
    m ()
rangeSetLowerStepperSensitivity _obj sensitivity = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sensitivity' = (fromIntegral . fromEnum) sensitivity
    gtk_range_set_lower_stepper_sensitivity _obj' sensitivity'
    touchManagedPtr _obj
    return ()

-- method Range::set_min_slider_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min_size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min_size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_min_slider_size" gtk_range_set_min_slider_size :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    Int32 ->                                -- min_size : TBasicType TInt32
    IO ()


rangeSetMinSliderSize ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- min_size
    m ()
rangeSetMinSliderSize _obj min_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_range_set_min_slider_size _obj' min_size
    touchManagedPtr _obj
    return ()

-- method Range::set_range
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_range" gtk_range_set_range :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    CDouble ->                              -- min : TBasicType TDouble
    CDouble ->                              -- max : TBasicType TDouble
    IO ()


rangeSetRange ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    Double ->                               -- min
    Double ->                               -- max
    m ()
rangeSetRange _obj min max = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let min' = realToFrac min
    let max' = realToFrac max
    gtk_range_set_range _obj' min' max'
    touchManagedPtr _obj
    return ()

-- method Range::set_restrict_to_fill_level
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "restrict_to_fill_level", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "restrict_to_fill_level", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_restrict_to_fill_level" gtk_range_set_restrict_to_fill_level :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    CInt ->                                 -- restrict_to_fill_level : TBasicType TBoolean
    IO ()


rangeSetRestrictToFillLevel ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- restrict_to_fill_level
    m ()
rangeSetRestrictToFillLevel _obj restrict_to_fill_level = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let restrict_to_fill_level' = (fromIntegral . fromEnum) restrict_to_fill_level
    gtk_range_set_restrict_to_fill_level _obj' restrict_to_fill_level'
    touchManagedPtr _obj
    return ()

-- method Range::set_round_digits
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "round_digits", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "round_digits", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_round_digits" gtk_range_set_round_digits :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    Int32 ->                                -- round_digits : TBasicType TInt32
    IO ()


rangeSetRoundDigits ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- round_digits
    m ()
rangeSetRoundDigits _obj round_digits = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_range_set_round_digits _obj' round_digits
    touchManagedPtr _obj
    return ()

-- method Range::set_show_fill_level
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_fill_level", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_fill_level", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_show_fill_level" gtk_range_set_show_fill_level :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    CInt ->                                 -- show_fill_level : TBasicType TBoolean
    IO ()


rangeSetShowFillLevel ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_fill_level
    m ()
rangeSetShowFillLevel _obj show_fill_level = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_fill_level' = (fromIntegral . fromEnum) show_fill_level
    gtk_range_set_show_fill_level _obj' show_fill_level'
    touchManagedPtr _obj
    return ()

-- method Range::set_slider_size_fixed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size_fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size_fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_slider_size_fixed" gtk_range_set_slider_size_fixed :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    CInt ->                                 -- size_fixed : TBasicType TBoolean
    IO ()


rangeSetSliderSizeFixed ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- size_fixed
    m ()
rangeSetSliderSizeFixed _obj size_fixed = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let size_fixed' = (fromIntegral . fromEnum) size_fixed
    gtk_range_set_slider_size_fixed _obj' size_fixed'
    touchManagedPtr _obj
    return ()

-- method Range::set_upper_stepper_sensitivity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitivity", argType = TInterface "Gtk" "SensitivityType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitivity", argType = TInterface "Gtk" "SensitivityType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_upper_stepper_sensitivity" gtk_range_set_upper_stepper_sensitivity :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    CUInt ->                                -- sensitivity : TInterface "Gtk" "SensitivityType"
    IO ()


rangeSetUpperStepperSensitivity ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    SensitivityType ->                      -- sensitivity
    m ()
rangeSetUpperStepperSensitivity _obj sensitivity = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sensitivity' = (fromIntegral . fromEnum) sensitivity
    gtk_range_set_upper_stepper_sensitivity _obj' sensitivity'
    touchManagedPtr _obj
    return ()

-- method Range::set_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Range", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_range_set_value" gtk_range_set_value :: 
    Ptr Range ->                            -- _obj : TInterface "Gtk" "Range"
    CDouble ->                              -- value : TBasicType TDouble
    IO ()


rangeSetValue ::
    (MonadIO m, RangeK a) =>
    a ->                                    -- _obj
    Double ->                               -- value
    m ()
rangeSetValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = realToFrac value
    gtk_range_set_value _obj' value'
    touchManagedPtr _obj
    return ()

-- signal Range::adjust-bounds
type RangeAdjustBoundsCallback =
    Double ->
    IO ()

noRangeAdjustBoundsCallback :: Maybe RangeAdjustBoundsCallback
noRangeAdjustBoundsCallback = Nothing

type RangeAdjustBoundsCallbackC =
    Ptr () ->                               -- object
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkRangeAdjustBoundsCallback :: RangeAdjustBoundsCallbackC -> IO (FunPtr RangeAdjustBoundsCallbackC)

rangeAdjustBoundsClosure :: RangeAdjustBoundsCallback -> IO Closure
rangeAdjustBoundsClosure cb = newCClosure =<< mkRangeAdjustBoundsCallback wrapped
    where wrapped = rangeAdjustBoundsCallbackWrapper cb

rangeAdjustBoundsCallbackWrapper ::
    RangeAdjustBoundsCallback ->
    Ptr () ->
    CDouble ->
    Ptr () ->
    IO ()
rangeAdjustBoundsCallbackWrapper _cb _ value _ = do
    let value' = realToFrac value
    _cb  value'

onRangeAdjustBounds :: (GObject a, MonadIO m) => a -> RangeAdjustBoundsCallback -> m SignalHandlerId
onRangeAdjustBounds obj cb = liftIO $ connectRangeAdjustBounds obj cb SignalConnectBefore
afterRangeAdjustBounds :: (GObject a, MonadIO m) => a -> RangeAdjustBoundsCallback -> m SignalHandlerId
afterRangeAdjustBounds obj cb = connectRangeAdjustBounds obj cb SignalConnectAfter

connectRangeAdjustBounds :: (GObject a, MonadIO m) =>
                            a -> RangeAdjustBoundsCallback -> SignalConnectMode -> m SignalHandlerId
connectRangeAdjustBounds obj cb after = liftIO $ do
    cb' <- mkRangeAdjustBoundsCallback (rangeAdjustBoundsCallbackWrapper cb)
    connectSignalFunPtr obj "adjust-bounds" cb' after

-- signal Range::change-value
type RangeChangeValueCallback =
    ScrollType ->
    Double ->
    IO Bool

noRangeChangeValueCallback :: Maybe RangeChangeValueCallback
noRangeChangeValueCallback = Nothing

type RangeChangeValueCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    CDouble ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkRangeChangeValueCallback :: RangeChangeValueCallbackC -> IO (FunPtr RangeChangeValueCallbackC)

rangeChangeValueClosure :: RangeChangeValueCallback -> IO Closure
rangeChangeValueClosure cb = newCClosure =<< mkRangeChangeValueCallback wrapped
    where wrapped = rangeChangeValueCallbackWrapper cb

rangeChangeValueCallbackWrapper ::
    RangeChangeValueCallback ->
    Ptr () ->
    CUInt ->
    CDouble ->
    Ptr () ->
    IO CInt
rangeChangeValueCallbackWrapper _cb _ scroll value _ = do
    let scroll' = (toEnum . fromIntegral) scroll
    let value' = realToFrac value
    result <- _cb  scroll' value'
    let result' = (fromIntegral . fromEnum) result
    return result'

onRangeChangeValue :: (GObject a, MonadIO m) => a -> RangeChangeValueCallback -> m SignalHandlerId
onRangeChangeValue obj cb = liftIO $ connectRangeChangeValue obj cb SignalConnectBefore
afterRangeChangeValue :: (GObject a, MonadIO m) => a -> RangeChangeValueCallback -> m SignalHandlerId
afterRangeChangeValue obj cb = connectRangeChangeValue obj cb SignalConnectAfter

connectRangeChangeValue :: (GObject a, MonadIO m) =>
                           a -> RangeChangeValueCallback -> SignalConnectMode -> m SignalHandlerId
connectRangeChangeValue obj cb after = liftIO $ do
    cb' <- mkRangeChangeValueCallback (rangeChangeValueCallbackWrapper cb)
    connectSignalFunPtr obj "change-value" cb' after

-- signal Range::move-slider
type RangeMoveSliderCallback =
    ScrollType ->
    IO ()

noRangeMoveSliderCallback :: Maybe RangeMoveSliderCallback
noRangeMoveSliderCallback = Nothing

type RangeMoveSliderCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkRangeMoveSliderCallback :: RangeMoveSliderCallbackC -> IO (FunPtr RangeMoveSliderCallbackC)

rangeMoveSliderClosure :: RangeMoveSliderCallback -> IO Closure
rangeMoveSliderClosure cb = newCClosure =<< mkRangeMoveSliderCallback wrapped
    where wrapped = rangeMoveSliderCallbackWrapper cb

rangeMoveSliderCallbackWrapper ::
    RangeMoveSliderCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
rangeMoveSliderCallbackWrapper _cb _ step _ = do
    let step' = (toEnum . fromIntegral) step
    _cb  step'

onRangeMoveSlider :: (GObject a, MonadIO m) => a -> RangeMoveSliderCallback -> m SignalHandlerId
onRangeMoveSlider obj cb = liftIO $ connectRangeMoveSlider obj cb SignalConnectBefore
afterRangeMoveSlider :: (GObject a, MonadIO m) => a -> RangeMoveSliderCallback -> m SignalHandlerId
afterRangeMoveSlider obj cb = connectRangeMoveSlider obj cb SignalConnectAfter

connectRangeMoveSlider :: (GObject a, MonadIO m) =>
                          a -> RangeMoveSliderCallback -> SignalConnectMode -> m SignalHandlerId
connectRangeMoveSlider obj cb after = liftIO $ do
    cb' <- mkRangeMoveSliderCallback (rangeMoveSliderCallbackWrapper cb)
    connectSignalFunPtr obj "move-slider" cb' after

-- signal Range::value-changed
type RangeValueChangedCallback =
    IO ()

noRangeValueChangedCallback :: Maybe RangeValueChangedCallback
noRangeValueChangedCallback = Nothing

type RangeValueChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkRangeValueChangedCallback :: RangeValueChangedCallbackC -> IO (FunPtr RangeValueChangedCallbackC)

rangeValueChangedClosure :: RangeValueChangedCallback -> IO Closure
rangeValueChangedClosure cb = newCClosure =<< mkRangeValueChangedCallback wrapped
    where wrapped = rangeValueChangedCallbackWrapper cb

rangeValueChangedCallbackWrapper ::
    RangeValueChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
rangeValueChangedCallbackWrapper _cb _ _ = do
    _cb 

onRangeValueChanged :: (GObject a, MonadIO m) => a -> RangeValueChangedCallback -> m SignalHandlerId
onRangeValueChanged obj cb = liftIO $ connectRangeValueChanged obj cb SignalConnectBefore
afterRangeValueChanged :: (GObject a, MonadIO m) => a -> RangeValueChangedCallback -> m SignalHandlerId
afterRangeValueChanged obj cb = connectRangeValueChanged obj cb SignalConnectAfter

connectRangeValueChanged :: (GObject a, MonadIO m) =>
                            a -> RangeValueChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectRangeValueChanged obj cb after = liftIO $ do
    cb' <- mkRangeValueChangedCallback (rangeValueChangedCallbackWrapper cb)
    connectSignalFunPtr obj "value-changed" cb' after

-- object RangeAccessible 
newtype RangeAccessible = RangeAccessible (ForeignPtr RangeAccessible)
noRangeAccessible :: Maybe RangeAccessible
noRangeAccessible = Nothing

foreign import ccall "gtk_range_accessible_get_type"
    c_gtk_range_accessible_get_type :: IO GType

type instance ParentTypes RangeAccessible = '[WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Value]

instance GObject RangeAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_range_accessible_get_type
    

class GObject o => RangeAccessibleK o
instance (GObject o, IsDescendantOf RangeAccessible o) => RangeAccessibleK o

toRangeAccessible :: RangeAccessibleK o => o -> IO RangeAccessible
toRangeAccessible = unsafeCastTo RangeAccessible

-- struct RcContext
newtype RcContext = RcContext (ForeignPtr RcContext)
noRcContext :: Maybe RcContext
noRcContext = Nothing

-- Flags RcFlags

data RcFlags = 
      RcFlagsFg
    | RcFlagsBg
    | RcFlagsText
    | RcFlagsBase
    | AnotherRcFlags Int
    deriving (Show, Eq)

instance Enum RcFlags where
    fromEnum RcFlagsFg = 1
    fromEnum RcFlagsBg = 2
    fromEnum RcFlagsText = 4
    fromEnum RcFlagsBase = 8
    fromEnum (AnotherRcFlags k) = k

    toEnum 1 = RcFlagsFg
    toEnum 2 = RcFlagsBg
    toEnum 4 = RcFlagsText
    toEnum 8 = RcFlagsBase
    toEnum k = AnotherRcFlags k

foreign import ccall "gtk_rc_flags_get_type" c_gtk_rc_flags_get_type :: 
    IO GType

instance BoxedEnum RcFlags where
    boxedEnumType _ = c_gtk_rc_flags_get_type

instance IsGFlag RcFlags

-- struct RcProperty
newtype RcProperty = RcProperty (ForeignPtr RcProperty)
noRcProperty :: Maybe RcProperty
noRcProperty = Nothing

rcPropertyReadTypeName :: RcProperty -> IO Word32
rcPropertyReadTypeName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Word32
    return val

rcPropertyReadPropertyName :: RcProperty -> IO Word32
rcPropertyReadPropertyName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO Word32
    return val

rcPropertyReadOrigin :: RcProperty -> IO T.Text
rcPropertyReadOrigin s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

rcPropertyReadValue :: RcProperty -> IO GValue
rcPropertyReadValue s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO (Ptr GValue)
    val' <- (newBoxed GValue) val
    return val'

-- callback RcPropertyParser
rcPropertyParserClosure :: RcPropertyParser -> IO Closure
rcPropertyParserClosure cb = newCClosure =<< mkRcPropertyParser wrapped
    where wrapped = rcPropertyParserWrapper Nothing cb

type RcPropertyParserC =
    Ptr GParamSpec ->
    Ptr GLib.String ->
    Ptr GValue ->
    IO CInt

foreign import ccall "wrapper"
    mkRcPropertyParser :: RcPropertyParserC -> IO (FunPtr RcPropertyParserC)

type RcPropertyParser =
    GParamSpec ->
    GLib.String ->
    GValue ->
    IO Bool

noRcPropertyParser :: Maybe RcPropertyParser
noRcPropertyParser = Nothing

rcPropertyParserWrapper ::
    Maybe (Ptr (FunPtr (RcPropertyParserC))) ->
    RcPropertyParser ->
    Ptr GParamSpec ->
    Ptr GLib.String ->
    Ptr GValue ->
    IO CInt
rcPropertyParserWrapper funptrptr _cb pspec rc_string property_value = do
    pspec' <- newGParamSpecFromPtr pspec
    rc_string' <- (newBoxed GLib.String) rc_string
    property_value' <- (newBoxed GValue) property_value
    result <- _cb  pspec' rc_string' property_value'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- object RcStyle 
newtype RcStyle = RcStyle (ForeignPtr RcStyle)
noRcStyle :: Maybe RcStyle
noRcStyle = Nothing

foreign import ccall "gtk_rc_style_get_type"
    c_gtk_rc_style_get_type :: IO GType

type instance ParentTypes RcStyle = '[GObject.Object]

instance GObject RcStyle where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_rc_style_get_type
    

class GObject o => RcStyleK o
instance (GObject o, IsDescendantOf RcStyle o) => RcStyleK o

toRcStyle :: RcStyleK o => o -> IO RcStyle
toRcStyle = unsafeCastTo RcStyle

-- method RcStyle::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "RcStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_style_new" gtk_rc_style_new :: 
    IO (Ptr RcStyle)

{-# DEPRECATED rcStyleNew ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcStyleNew ::
    (MonadIO m) =>
    m RcStyle
rcStyleNew  = liftIO $ do
    result <- gtk_rc_style_new
    checkUnexpectedReturnNULL "gtk_rc_style_new" result
    result' <- (wrapObject RcStyle) result
    return result'

-- method RcStyle::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RcStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RcStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RcStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_style_copy" gtk_rc_style_copy :: 
    Ptr RcStyle ->                          -- _obj : TInterface "Gtk" "RcStyle"
    IO (Ptr RcStyle)

{-# DEPRECATED rcStyleCopy ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcStyleCopy ::
    (MonadIO m, RcStyleK a) =>
    a ->                                    -- _obj
    m RcStyle
rcStyleCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_rc_style_copy _obj'
    checkUnexpectedReturnNULL "gtk_rc_style_copy" result
    result' <- (wrapObject RcStyle) result
    touchManagedPtr _obj
    return result'

-- Enum RcTokenType
{-# DEPRECATED RcTokenType ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
data RcTokenType = 
      RcTokenTypeInvalid
    | RcTokenTypeInclude
    | RcTokenTypeNormal
    | RcTokenTypeActive
    | RcTokenTypePrelight
    | RcTokenTypeSelected
    | RcTokenTypeInsensitive
    | RcTokenTypeFg
    | RcTokenTypeBg
    | RcTokenTypeText
    | RcTokenTypeBase
    | RcTokenTypeXthickness
    | RcTokenTypeYthickness
    | RcTokenTypeFont
    | RcTokenTypeFontset
    | RcTokenTypeFontName
    | RcTokenTypeBgPixmap
    | RcTokenTypePixmapPath
    | RcTokenTypeStyle
    | RcTokenTypeBinding
    | RcTokenTypeBind
    | RcTokenTypeWidget
    | RcTokenTypeWidgetClass
    | RcTokenTypeClass
    | RcTokenTypeLowest
    | RcTokenTypeGtk
    | RcTokenTypeApplication
    | RcTokenTypeTheme
    | RcTokenTypeRc
    | RcTokenTypeHighest
    | RcTokenTypeEngine
    | RcTokenTypeModulePath
    | RcTokenTypeImModulePath
    | RcTokenTypeImModuleFile
    | RcTokenTypeStock
    | RcTokenTypeLtr
    | RcTokenTypeRtl
    | RcTokenTypeColor
    | RcTokenTypeUnbind
    | RcTokenTypeLast
    | AnotherRcTokenType Int
    deriving (Show, Eq)

instance Enum RcTokenType where
    fromEnum RcTokenTypeInvalid = 270
    fromEnum RcTokenTypeInclude = 271
    fromEnum RcTokenTypeNormal = 272
    fromEnum RcTokenTypeActive = 273
    fromEnum RcTokenTypePrelight = 274
    fromEnum RcTokenTypeSelected = 275
    fromEnum RcTokenTypeInsensitive = 276
    fromEnum RcTokenTypeFg = 277
    fromEnum RcTokenTypeBg = 278
    fromEnum RcTokenTypeText = 279
    fromEnum RcTokenTypeBase = 280
    fromEnum RcTokenTypeXthickness = 281
    fromEnum RcTokenTypeYthickness = 282
    fromEnum RcTokenTypeFont = 283
    fromEnum RcTokenTypeFontset = 284
    fromEnum RcTokenTypeFontName = 285
    fromEnum RcTokenTypeBgPixmap = 286
    fromEnum RcTokenTypePixmapPath = 287
    fromEnum RcTokenTypeStyle = 288
    fromEnum RcTokenTypeBinding = 289
    fromEnum RcTokenTypeBind = 290
    fromEnum RcTokenTypeWidget = 291
    fromEnum RcTokenTypeWidgetClass = 292
    fromEnum RcTokenTypeClass = 293
    fromEnum RcTokenTypeLowest = 294
    fromEnum RcTokenTypeGtk = 295
    fromEnum RcTokenTypeApplication = 296
    fromEnum RcTokenTypeTheme = 297
    fromEnum RcTokenTypeRc = 298
    fromEnum RcTokenTypeHighest = 299
    fromEnum RcTokenTypeEngine = 300
    fromEnum RcTokenTypeModulePath = 301
    fromEnum RcTokenTypeImModulePath = 302
    fromEnum RcTokenTypeImModuleFile = 303
    fromEnum RcTokenTypeStock = 304
    fromEnum RcTokenTypeLtr = 305
    fromEnum RcTokenTypeRtl = 306
    fromEnum RcTokenTypeColor = 307
    fromEnum RcTokenTypeUnbind = 308
    fromEnum RcTokenTypeLast = 309
    fromEnum (AnotherRcTokenType k) = k

    toEnum 270 = RcTokenTypeInvalid
    toEnum 271 = RcTokenTypeInclude
    toEnum 272 = RcTokenTypeNormal
    toEnum 273 = RcTokenTypeActive
    toEnum 274 = RcTokenTypePrelight
    toEnum 275 = RcTokenTypeSelected
    toEnum 276 = RcTokenTypeInsensitive
    toEnum 277 = RcTokenTypeFg
    toEnum 278 = RcTokenTypeBg
    toEnum 279 = RcTokenTypeText
    toEnum 280 = RcTokenTypeBase
    toEnum 281 = RcTokenTypeXthickness
    toEnum 282 = RcTokenTypeYthickness
    toEnum 283 = RcTokenTypeFont
    toEnum 284 = RcTokenTypeFontset
    toEnum 285 = RcTokenTypeFontName
    toEnum 286 = RcTokenTypeBgPixmap
    toEnum 287 = RcTokenTypePixmapPath
    toEnum 288 = RcTokenTypeStyle
    toEnum 289 = RcTokenTypeBinding
    toEnum 290 = RcTokenTypeBind
    toEnum 291 = RcTokenTypeWidget
    toEnum 292 = RcTokenTypeWidgetClass
    toEnum 293 = RcTokenTypeClass
    toEnum 294 = RcTokenTypeLowest
    toEnum 295 = RcTokenTypeGtk
    toEnum 296 = RcTokenTypeApplication
    toEnum 297 = RcTokenTypeTheme
    toEnum 298 = RcTokenTypeRc
    toEnum 299 = RcTokenTypeHighest
    toEnum 300 = RcTokenTypeEngine
    toEnum 301 = RcTokenTypeModulePath
    toEnum 302 = RcTokenTypeImModulePath
    toEnum 303 = RcTokenTypeImModuleFile
    toEnum 304 = RcTokenTypeStock
    toEnum 305 = RcTokenTypeLtr
    toEnum 306 = RcTokenTypeRtl
    toEnum 307 = RcTokenTypeColor
    toEnum 308 = RcTokenTypeUnbind
    toEnum 309 = RcTokenTypeLast
    toEnum k = AnotherRcTokenType k

foreign import ccall "gtk_rc_token_type_get_type" c_gtk_rc_token_type_get_type :: 
    IO GType

instance BoxedEnum RcTokenType where
    boxedEnumType _ = c_gtk_rc_token_type_get_type

-- object RecentAction 
newtype RecentAction = RecentAction (ForeignPtr RecentAction)
noRecentAction :: Maybe RecentAction
noRecentAction = Nothing

foreign import ccall "gtk_recent_action_get_type"
    c_gtk_recent_action_get_type :: IO GType

type instance ParentTypes RecentAction = '[Action, GObject.Object, Buildable, RecentChooser]

instance GObject RecentAction where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_recent_action_get_type
    

class GObject o => RecentActionK o
instance (GObject o, IsDescendantOf RecentAction o) => RecentActionK o

toRecentAction :: RecentActionK o => o -> IO RecentAction
toRecentAction = unsafeCastTo RecentAction

-- method RecentAction::new
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RecentAction"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_action_new" gtk_recent_action_new :: 
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- label : TBasicType TUTF8
    CString ->                              -- tooltip : TBasicType TUTF8
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr RecentAction)

{-# DEPRECATED recentActionNew ["(Since version 3.10)"]#-}
recentActionNew ::
    (MonadIO m) =>
    T.Text ->                               -- name
    Maybe (T.Text) ->                       -- label
    Maybe (T.Text) ->                       -- tooltip
    Maybe (T.Text) ->                       -- stock_id
    m RecentAction
recentActionNew name label tooltip stock_id = liftIO $ do
    name' <- textToCString name
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    maybeTooltip <- case tooltip of
        Nothing -> return nullPtr
        Just jTooltip -> do
            jTooltip' <- textToCString jTooltip
            return jTooltip'
    maybeStock_id <- case stock_id of
        Nothing -> return nullPtr
        Just jStock_id -> do
            jStock_id' <- textToCString jStock_id
            return jStock_id'
    result <- gtk_recent_action_new name' maybeLabel maybeTooltip maybeStock_id
    checkUnexpectedReturnNULL "gtk_recent_action_new" result
    result' <- (wrapObject RecentAction) result
    freeMem name'
    freeMem maybeLabel
    freeMem maybeTooltip
    freeMem maybeStock_id
    return result'

-- method RecentAction::new_for_manager
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "manager", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "manager", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RecentAction"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_action_new_for_manager" gtk_recent_action_new_for_manager :: 
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- label : TBasicType TUTF8
    CString ->                              -- tooltip : TBasicType TUTF8
    CString ->                              -- stock_id : TBasicType TUTF8
    Ptr RecentManager ->                    -- manager : TInterface "Gtk" "RecentManager"
    IO (Ptr RecentAction)

{-# DEPRECATED recentActionNewForManager ["(Since version 3.10)"]#-}
recentActionNewForManager ::
    (MonadIO m, RecentManagerK a) =>
    T.Text ->                               -- name
    Maybe (T.Text) ->                       -- label
    Maybe (T.Text) ->                       -- tooltip
    Maybe (T.Text) ->                       -- stock_id
    Maybe (a) ->                            -- manager
    m RecentAction
recentActionNewForManager name label tooltip stock_id manager = liftIO $ do
    name' <- textToCString name
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    maybeTooltip <- case tooltip of
        Nothing -> return nullPtr
        Just jTooltip -> do
            jTooltip' <- textToCString jTooltip
            return jTooltip'
    maybeStock_id <- case stock_id of
        Nothing -> return nullPtr
        Just jStock_id -> do
            jStock_id' <- textToCString jStock_id
            return jStock_id'
    maybeManager <- case manager of
        Nothing -> return nullPtr
        Just jManager -> do
            let jManager' = unsafeManagedPtrCastPtr jManager
            return jManager'
    result <- gtk_recent_action_new_for_manager name' maybeLabel maybeTooltip maybeStock_id maybeManager
    checkUnexpectedReturnNULL "gtk_recent_action_new_for_manager" result
    result' <- (wrapObject RecentAction) result
    whenJust manager touchManagedPtr
    freeMem name'
    freeMem maybeLabel
    freeMem maybeTooltip
    freeMem maybeStock_id
    return result'

-- method RecentAction::get_show_numbers
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_action_get_show_numbers" gtk_recent_action_get_show_numbers :: 
    Ptr RecentAction ->                     -- _obj : TInterface "Gtk" "RecentAction"
    IO CInt

{-# DEPRECATED recentActionGetShowNumbers ["(Since version 3.10)"]#-}
recentActionGetShowNumbers ::
    (MonadIO m, RecentActionK a) =>
    a ->                                    -- _obj
    m Bool
recentActionGetShowNumbers _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_action_get_show_numbers _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RecentAction::set_show_numbers
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_numbers", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_numbers", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_action_set_show_numbers" gtk_recent_action_set_show_numbers :: 
    Ptr RecentAction ->                     -- _obj : TInterface "Gtk" "RecentAction"
    CInt ->                                 -- show_numbers : TBasicType TBoolean
    IO ()

{-# DEPRECATED recentActionSetShowNumbers ["(Since version 3.10)"]#-}
recentActionSetShowNumbers ::
    (MonadIO m, RecentActionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_numbers
    m ()
recentActionSetShowNumbers _obj show_numbers = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_numbers' = (fromIntegral . fromEnum) show_numbers
    gtk_recent_action_set_show_numbers _obj' show_numbers'
    touchManagedPtr _obj
    return ()

-- interface RecentChooser 

newtype RecentChooser = RecentChooser (ForeignPtr RecentChooser)
noRecentChooser :: Maybe RecentChooser
noRecentChooser = Nothing

foreign import ccall "gtk_recent_chooser_get_type"
    c_gtk_recent_chooser_get_type :: IO GType

type instance ParentTypes RecentChooser = '[GObject.Object]

instance GObject RecentChooser where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_recent_chooser_get_type
    

class GObject o => RecentChooserK o
instance (GObject o, IsDescendantOf RecentChooser o) => RecentChooserK o

toRecentChooser :: RecentChooserK o => o -> IO RecentChooser
toRecentChooser = unsafeCastTo RecentChooser

-- method RecentChooser::add_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_add_filter" gtk_recent_chooser_add_filter :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    Ptr RecentFilter ->                     -- filter : TInterface "Gtk" "RecentFilter"
    IO ()


recentChooserAddFilter ::
    (MonadIO m, RecentChooserK a, RecentFilterK b) =>
    a ->                                    -- _obj
    b ->                                    -- filter
    m ()
recentChooserAddFilter _obj filter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let filter' = unsafeManagedPtrCastPtr filter
    gtk_recent_chooser_add_filter _obj' filter'
    touchManagedPtr _obj
    touchManagedPtr filter
    return ()

-- method RecentChooser::get_current_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RecentInfo"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_current_item" gtk_recent_chooser_get_current_item :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO (Ptr RecentInfo)


recentChooserGetCurrentItem ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m RecentInfo
recentChooserGetCurrentItem _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_current_item _obj'
    checkUnexpectedReturnNULL "gtk_recent_chooser_get_current_item" result
    result' <- (wrapBoxed RecentInfo) result
    touchManagedPtr _obj
    return result'

-- method RecentChooser::get_current_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_current_uri" gtk_recent_chooser_get_current_uri :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO CString


recentChooserGetCurrentUri ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m T.Text
recentChooserGetCurrentUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_current_uri _obj'
    checkUnexpectedReturnNULL "gtk_recent_chooser_get_current_uri" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method RecentChooser::get_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RecentFilter"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_filter" gtk_recent_chooser_get_filter :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO (Ptr RecentFilter)


recentChooserGetFilter ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m RecentFilter
recentChooserGetFilter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_filter _obj'
    checkUnexpectedReturnNULL "gtk_recent_chooser_get_filter" result
    result' <- (newObject RecentFilter) result
    touchManagedPtr _obj
    return result'

-- method RecentChooser::get_items
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "RecentInfo")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_items" gtk_recent_chooser_get_items :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO (Ptr (GList (Ptr RecentInfo)))


recentChooserGetItems ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m [RecentInfo]
recentChooserGetItems _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_items _obj'
    checkUnexpectedReturnNULL "gtk_recent_chooser_get_items" result
    result' <- unpackGList result
    result'' <- mapM (wrapBoxed RecentInfo) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method RecentChooser::get_limit
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_limit" gtk_recent_chooser_get_limit :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO Int32


recentChooserGetLimit ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m Int32
recentChooserGetLimit _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_limit _obj'
    touchManagedPtr _obj
    return result

-- method RecentChooser::get_local_only
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_local_only" gtk_recent_chooser_get_local_only :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO CInt


recentChooserGetLocalOnly ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m Bool
recentChooserGetLocalOnly _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_local_only _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RecentChooser::get_select_multiple
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_select_multiple" gtk_recent_chooser_get_select_multiple :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO CInt


recentChooserGetSelectMultiple ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m Bool
recentChooserGetSelectMultiple _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_select_multiple _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RecentChooser::get_show_icons
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_show_icons" gtk_recent_chooser_get_show_icons :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO CInt


recentChooserGetShowIcons ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m Bool
recentChooserGetShowIcons _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_show_icons _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RecentChooser::get_show_not_found
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_show_not_found" gtk_recent_chooser_get_show_not_found :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO CInt


recentChooserGetShowNotFound ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m Bool
recentChooserGetShowNotFound _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_show_not_found _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RecentChooser::get_show_private
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_show_private" gtk_recent_chooser_get_show_private :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO CInt


recentChooserGetShowPrivate ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m Bool
recentChooserGetShowPrivate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_show_private _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RecentChooser::get_show_tips
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_show_tips" gtk_recent_chooser_get_show_tips :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO CInt


recentChooserGetShowTips ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m Bool
recentChooserGetShowTips _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_show_tips _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RecentChooser::get_sort_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RecentSortType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_sort_type" gtk_recent_chooser_get_sort_type :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO CUInt


recentChooserGetSortType ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m RecentSortType
recentChooserGetSortType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_get_sort_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method RecentChooser::get_uris
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) 1 (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_uris" gtk_recent_chooser_get_uris :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    Ptr Word64 ->                           -- length : TBasicType TUInt64
    IO (Ptr CString)


recentChooserGetUris ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m ([T.Text],Word64)
recentChooserGetUris _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    length_ <- allocMem :: IO (Ptr Word64)
    result <- gtk_recent_chooser_get_uris _obj' length_
    checkUnexpectedReturnNULL "gtk_recent_chooser_get_uris" result
    result' <- unpackZeroTerminatedUTF8CArray result
    mapZeroTerminatedCArray freeMem result
    freeMem result
    length_' <- peek length_
    touchManagedPtr _obj
    freeMem length_
    return (result', length_')

-- method RecentChooser::list_filters
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "RecentFilter")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_list_filters" gtk_recent_chooser_list_filters :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO (Ptr (GSList (Ptr RecentFilter)))


recentChooserListFilters ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m [RecentFilter]
recentChooserListFilters _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_list_filters _obj'
    checkUnexpectedReturnNULL "gtk_recent_chooser_list_filters" result
    result' <- unpackGSList result
    result'' <- mapM (newObject RecentFilter) result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method RecentChooser::remove_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_remove_filter" gtk_recent_chooser_remove_filter :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    Ptr RecentFilter ->                     -- filter : TInterface "Gtk" "RecentFilter"
    IO ()


recentChooserRemoveFilter ::
    (MonadIO m, RecentChooserK a, RecentFilterK b) =>
    a ->                                    -- _obj
    b ->                                    -- filter
    m ()
recentChooserRemoveFilter _obj filter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let filter' = unsafeManagedPtrCastPtr filter
    gtk_recent_chooser_remove_filter _obj' filter'
    touchManagedPtr _obj
    touchManagedPtr filter
    return ()

-- method RecentChooser::select_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_select_all" gtk_recent_chooser_select_all :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO ()


recentChooserSelectAll ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m ()
recentChooserSelectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_recent_chooser_select_all _obj'
    touchManagedPtr _obj
    return ()

-- method RecentChooser::select_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_recent_chooser_select_uri" gtk_recent_chooser_select_uri :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    CString ->                              -- uri : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt


recentChooserSelectUri ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m ()
recentChooserSelectUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    onException (do
        _ <- propagateGError $ gtk_recent_chooser_select_uri _obj' uri'
        touchManagedPtr _obj
        freeMem uri'
        return ()
     ) (do
        freeMem uri'
     )

-- method RecentChooser::set_current_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_current_uri" gtk_recent_chooser_set_current_uri :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    CString ->                              -- uri : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt


recentChooserSetCurrentUri ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m ()
recentChooserSetCurrentUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    onException (do
        _ <- propagateGError $ gtk_recent_chooser_set_current_uri _obj' uri'
        touchManagedPtr _obj
        freeMem uri'
        return ()
     ) (do
        freeMem uri'
     )

-- method RecentChooser::set_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_filter" gtk_recent_chooser_set_filter :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    Ptr RecentFilter ->                     -- filter : TInterface "Gtk" "RecentFilter"
    IO ()


recentChooserSetFilter ::
    (MonadIO m, RecentChooserK a, RecentFilterK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- filter
    m ()
recentChooserSetFilter _obj filter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFilter <- case filter of
        Nothing -> return nullPtr
        Just jFilter -> do
            let jFilter' = unsafeManagedPtrCastPtr jFilter
            return jFilter'
    gtk_recent_chooser_set_filter _obj' maybeFilter
    touchManagedPtr _obj
    whenJust filter touchManagedPtr
    return ()

-- method RecentChooser::set_limit
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_limit" gtk_recent_chooser_set_limit :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    Int32 ->                                -- limit : TBasicType TInt32
    IO ()


recentChooserSetLimit ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- limit
    m ()
recentChooserSetLimit _obj limit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_recent_chooser_set_limit _obj' limit
    touchManagedPtr _obj
    return ()

-- method RecentChooser::set_local_only
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "local_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "local_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_local_only" gtk_recent_chooser_set_local_only :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    CInt ->                                 -- local_only : TBasicType TBoolean
    IO ()


recentChooserSetLocalOnly ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- local_only
    m ()
recentChooserSetLocalOnly _obj local_only = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let local_only' = (fromIntegral . fromEnum) local_only
    gtk_recent_chooser_set_local_only _obj' local_only'
    touchManagedPtr _obj
    return ()

-- method RecentChooser::set_select_multiple
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "select_multiple", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "select_multiple", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_select_multiple" gtk_recent_chooser_set_select_multiple :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    CInt ->                                 -- select_multiple : TBasicType TBoolean
    IO ()


recentChooserSetSelectMultiple ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- select_multiple
    m ()
recentChooserSetSelectMultiple _obj select_multiple = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let select_multiple' = (fromIntegral . fromEnum) select_multiple
    gtk_recent_chooser_set_select_multiple _obj' select_multiple'
    touchManagedPtr _obj
    return ()

-- method RecentChooser::set_show_icons
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_icons", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_icons", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_show_icons" gtk_recent_chooser_set_show_icons :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    CInt ->                                 -- show_icons : TBasicType TBoolean
    IO ()


recentChooserSetShowIcons ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_icons
    m ()
recentChooserSetShowIcons _obj show_icons = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_icons' = (fromIntegral . fromEnum) show_icons
    gtk_recent_chooser_set_show_icons _obj' show_icons'
    touchManagedPtr _obj
    return ()

-- method RecentChooser::set_show_not_found
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_not_found", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_not_found", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_show_not_found" gtk_recent_chooser_set_show_not_found :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    CInt ->                                 -- show_not_found : TBasicType TBoolean
    IO ()


recentChooserSetShowNotFound ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_not_found
    m ()
recentChooserSetShowNotFound _obj show_not_found = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_not_found' = (fromIntegral . fromEnum) show_not_found
    gtk_recent_chooser_set_show_not_found _obj' show_not_found'
    touchManagedPtr _obj
    return ()

-- method RecentChooser::set_show_private
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_private", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_private", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_show_private" gtk_recent_chooser_set_show_private :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    CInt ->                                 -- show_private : TBasicType TBoolean
    IO ()


recentChooserSetShowPrivate ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_private
    m ()
recentChooserSetShowPrivate _obj show_private = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_private' = (fromIntegral . fromEnum) show_private
    gtk_recent_chooser_set_show_private _obj' show_private'
    touchManagedPtr _obj
    return ()

-- method RecentChooser::set_show_tips
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_tips", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_tips", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_show_tips" gtk_recent_chooser_set_show_tips :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    CInt ->                                 -- show_tips : TBasicType TBoolean
    IO ()


recentChooserSetShowTips ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_tips
    m ()
recentChooserSetShowTips _obj show_tips = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_tips' = (fromIntegral . fromEnum) show_tips
    gtk_recent_chooser_set_show_tips _obj' show_tips'
    touchManagedPtr _obj
    return ()

-- method RecentChooser::set_sort_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_func", argType = TInterface "Gtk" "RecentSortFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "sort_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data_destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_func", argType = TInterface "Gtk" "RecentSortFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_sort_func" gtk_recent_chooser_set_sort_func :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    FunPtr RecentSortFuncC ->               -- sort_func : TInterface "Gtk" "RecentSortFunc"
    Ptr () ->                               -- sort_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- data_destroy : TInterface "GLib" "DestroyNotify"
    IO ()


recentChooserSetSortFunc ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    RecentSortFunc ->                       -- sort_func
    m ()
recentChooserSetSortFunc _obj sort_func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    sort_func' <- mkRecentSortFunc (recentSortFuncWrapper Nothing sort_func)
    let sort_data = castFunPtrToPtr sort_func'
    let data_destroy = safeFreeFunPtrPtr
    gtk_recent_chooser_set_sort_func _obj' sort_func' sort_data data_destroy
    touchManagedPtr _obj
    return ()

-- method RecentChooser::set_sort_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_type", argType = TInterface "Gtk" "RecentSortType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_type", argType = TInterface "Gtk" "RecentSortType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_sort_type" gtk_recent_chooser_set_sort_type :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    CUInt ->                                -- sort_type : TInterface "Gtk" "RecentSortType"
    IO ()


recentChooserSetSortType ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    RecentSortType ->                       -- sort_type
    m ()
recentChooserSetSortType _obj sort_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sort_type' = (fromIntegral . fromEnum) sort_type
    gtk_recent_chooser_set_sort_type _obj' sort_type'
    touchManagedPtr _obj
    return ()

-- method RecentChooser::unselect_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_unselect_all" gtk_recent_chooser_unselect_all :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    IO ()


recentChooserUnselectAll ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    m ()
recentChooserUnselectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_recent_chooser_unselect_all _obj'
    touchManagedPtr _obj
    return ()

-- method RecentChooser::unselect_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_unselect_uri" gtk_recent_chooser_unselect_uri :: 
    Ptr RecentChooser ->                    -- _obj : TInterface "Gtk" "RecentChooser"
    CString ->                              -- uri : TBasicType TUTF8
    IO ()


recentChooserUnselectUri ::
    (MonadIO m, RecentChooserK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m ()
recentChooserUnselectUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    gtk_recent_chooser_unselect_uri _obj' uri'
    touchManagedPtr _obj
    freeMem uri'
    return ()

-- signal RecentChooser::item-activated
type RecentChooserItemActivatedCallback =
    IO ()

noRecentChooserItemActivatedCallback :: Maybe RecentChooserItemActivatedCallback
noRecentChooserItemActivatedCallback = Nothing

type RecentChooserItemActivatedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkRecentChooserItemActivatedCallback :: RecentChooserItemActivatedCallbackC -> IO (FunPtr RecentChooserItemActivatedCallbackC)

recentChooserItemActivatedClosure :: RecentChooserItemActivatedCallback -> IO Closure
recentChooserItemActivatedClosure cb = newCClosure =<< mkRecentChooserItemActivatedCallback wrapped
    where wrapped = recentChooserItemActivatedCallbackWrapper cb

recentChooserItemActivatedCallbackWrapper ::
    RecentChooserItemActivatedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
recentChooserItemActivatedCallbackWrapper _cb _ _ = do
    _cb 

onRecentChooserItemActivated :: (GObject a, MonadIO m) => a -> RecentChooserItemActivatedCallback -> m SignalHandlerId
onRecentChooserItemActivated obj cb = liftIO $ connectRecentChooserItemActivated obj cb SignalConnectBefore
afterRecentChooserItemActivated :: (GObject a, MonadIO m) => a -> RecentChooserItemActivatedCallback -> m SignalHandlerId
afterRecentChooserItemActivated obj cb = connectRecentChooserItemActivated obj cb SignalConnectAfter

connectRecentChooserItemActivated :: (GObject a, MonadIO m) =>
                                     a -> RecentChooserItemActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectRecentChooserItemActivated obj cb after = liftIO $ do
    cb' <- mkRecentChooserItemActivatedCallback (recentChooserItemActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "item-activated" cb' after

-- signal RecentChooser::selection-changed
type RecentChooserSelectionChangedCallback =
    IO ()

noRecentChooserSelectionChangedCallback :: Maybe RecentChooserSelectionChangedCallback
noRecentChooserSelectionChangedCallback = Nothing

type RecentChooserSelectionChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkRecentChooserSelectionChangedCallback :: RecentChooserSelectionChangedCallbackC -> IO (FunPtr RecentChooserSelectionChangedCallbackC)

recentChooserSelectionChangedClosure :: RecentChooserSelectionChangedCallback -> IO Closure
recentChooserSelectionChangedClosure cb = newCClosure =<< mkRecentChooserSelectionChangedCallback wrapped
    where wrapped = recentChooserSelectionChangedCallbackWrapper cb

recentChooserSelectionChangedCallbackWrapper ::
    RecentChooserSelectionChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
recentChooserSelectionChangedCallbackWrapper _cb _ _ = do
    _cb 

onRecentChooserSelectionChanged :: (GObject a, MonadIO m) => a -> RecentChooserSelectionChangedCallback -> m SignalHandlerId
onRecentChooserSelectionChanged obj cb = liftIO $ connectRecentChooserSelectionChanged obj cb SignalConnectBefore
afterRecentChooserSelectionChanged :: (GObject a, MonadIO m) => a -> RecentChooserSelectionChangedCallback -> m SignalHandlerId
afterRecentChooserSelectionChanged obj cb = connectRecentChooserSelectionChanged obj cb SignalConnectAfter

connectRecentChooserSelectionChanged :: (GObject a, MonadIO m) =>
                                        a -> RecentChooserSelectionChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectRecentChooserSelectionChanged obj cb after = liftIO $ do
    cb' <- mkRecentChooserSelectionChangedCallback (recentChooserSelectionChangedCallbackWrapper cb)
    connectSignalFunPtr obj "selection-changed" cb' after

-- object RecentChooserDialog 
newtype RecentChooserDialog = RecentChooserDialog (ForeignPtr RecentChooserDialog)
noRecentChooserDialog :: Maybe RecentChooserDialog
noRecentChooserDialog = Nothing

foreign import ccall "gtk_recent_chooser_dialog_get_type"
    c_gtk_recent_chooser_dialog_get_type :: IO GType

type instance ParentTypes RecentChooserDialog = '[Dialog, Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, RecentChooser]

instance GObject RecentChooserDialog where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_recent_chooser_dialog_get_type
    

class GObject o => RecentChooserDialogK o
instance (GObject o, IsDescendantOf RecentChooserDialog o) => RecentChooserDialogK o

toRecentChooserDialog :: RecentChooserDialogK o => o -> IO RecentChooserDialog
toRecentChooserDialog = unsafeCastTo RecentChooserDialog

-- Enum RecentChooserError

data RecentChooserError = 
      RecentChooserErrorNotFound
    | RecentChooserErrorInvalidUri
    | AnotherRecentChooserError Int
    deriving (Show, Eq)

instance Enum RecentChooserError where
    fromEnum RecentChooserErrorNotFound = 0
    fromEnum RecentChooserErrorInvalidUri = 1
    fromEnum (AnotherRecentChooserError k) = k

    toEnum 0 = RecentChooserErrorNotFound
    toEnum 1 = RecentChooserErrorInvalidUri
    toEnum k = AnotherRecentChooserError k

instance GErrorClass RecentChooserError where
    gerrorClassDomain _ = "gtk-recent-chooser-error-quark"

catchRecentChooserError ::
    IO a ->
    (RecentChooserError -> GErrorMessage -> IO a) ->
    IO a
catchRecentChooserError = catchGErrorJustDomain

handleRecentChooserError ::
    (RecentChooserError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleRecentChooserError = handleGErrorJustDomain

foreign import ccall "gtk_recent_chooser_error_get_type" c_gtk_recent_chooser_error_get_type :: 
    IO GType

instance BoxedEnum RecentChooserError where
    boxedEnumType _ = c_gtk_recent_chooser_error_get_type

-- object RecentChooserMenu 
newtype RecentChooserMenu = RecentChooserMenu (ForeignPtr RecentChooserMenu)
noRecentChooserMenu :: Maybe RecentChooserMenu
noRecentChooserMenu = Nothing

foreign import ccall "gtk_recent_chooser_menu_get_type"
    c_gtk_recent_chooser_menu_get_type :: IO GType

type instance ParentTypes RecentChooserMenu = '[Menu, MenuShell, Container, Widget, GObject.Object, Atk.ImplementorIface, Activatable, Buildable, RecentChooser]

instance GObject RecentChooserMenu where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_recent_chooser_menu_get_type
    

class GObject o => RecentChooserMenuK o
instance (GObject o, IsDescendantOf RecentChooserMenu o) => RecentChooserMenuK o

toRecentChooserMenu :: RecentChooserMenuK o => o -> IO RecentChooserMenu
toRecentChooserMenu = unsafeCastTo RecentChooserMenu

-- method RecentChooserMenu::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "RecentChooserMenu"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_menu_new" gtk_recent_chooser_menu_new :: 
    IO (Ptr RecentChooserMenu)


recentChooserMenuNew ::
    (MonadIO m) =>
    m RecentChooserMenu
recentChooserMenuNew  = liftIO $ do
    result <- gtk_recent_chooser_menu_new
    checkUnexpectedReturnNULL "gtk_recent_chooser_menu_new" result
    result' <- (newObject RecentChooserMenu) result
    return result'

-- method RecentChooserMenu::new_for_manager
-- method type : Constructor
-- Args : [Arg {argName = "manager", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "manager", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RecentChooserMenu"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_menu_new_for_manager" gtk_recent_chooser_menu_new_for_manager :: 
    Ptr RecentManager ->                    -- manager : TInterface "Gtk" "RecentManager"
    IO (Ptr RecentChooserMenu)


recentChooserMenuNewForManager ::
    (MonadIO m, RecentManagerK a) =>
    a ->                                    -- manager
    m RecentChooserMenu
recentChooserMenuNewForManager manager = liftIO $ do
    let manager' = unsafeManagedPtrCastPtr manager
    result <- gtk_recent_chooser_menu_new_for_manager manager'
    checkUnexpectedReturnNULL "gtk_recent_chooser_menu_new_for_manager" result
    result' <- (newObject RecentChooserMenu) result
    touchManagedPtr manager
    return result'

-- method RecentChooserMenu::get_show_numbers
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooserMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooserMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_menu_get_show_numbers" gtk_recent_chooser_menu_get_show_numbers :: 
    Ptr RecentChooserMenu ->                -- _obj : TInterface "Gtk" "RecentChooserMenu"
    IO CInt


recentChooserMenuGetShowNumbers ::
    (MonadIO m, RecentChooserMenuK a) =>
    a ->                                    -- _obj
    m Bool
recentChooserMenuGetShowNumbers _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_chooser_menu_get_show_numbers _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RecentChooserMenu::set_show_numbers
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooserMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_numbers", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentChooserMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_numbers", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_menu_set_show_numbers" gtk_recent_chooser_menu_set_show_numbers :: 
    Ptr RecentChooserMenu ->                -- _obj : TInterface "Gtk" "RecentChooserMenu"
    CInt ->                                 -- show_numbers : TBasicType TBoolean
    IO ()


recentChooserMenuSetShowNumbers ::
    (MonadIO m, RecentChooserMenuK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_numbers
    m ()
recentChooserMenuSetShowNumbers _obj show_numbers = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_numbers' = (fromIntegral . fromEnum) show_numbers
    gtk_recent_chooser_menu_set_show_numbers _obj' show_numbers'
    touchManagedPtr _obj
    return ()

-- object RecentChooserWidget 
newtype RecentChooserWidget = RecentChooserWidget (ForeignPtr RecentChooserWidget)
noRecentChooserWidget :: Maybe RecentChooserWidget
noRecentChooserWidget = Nothing

foreign import ccall "gtk_recent_chooser_widget_get_type"
    c_gtk_recent_chooser_widget_get_type :: IO GType

type instance ParentTypes RecentChooserWidget = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable, RecentChooser]

instance GObject RecentChooserWidget where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_recent_chooser_widget_get_type
    

class GObject o => RecentChooserWidgetK o
instance (GObject o, IsDescendantOf RecentChooserWidget o) => RecentChooserWidgetK o

toRecentChooserWidget :: RecentChooserWidgetK o => o -> IO RecentChooserWidget
toRecentChooserWidget = unsafeCastTo RecentChooserWidget

-- method RecentChooserWidget::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "RecentChooserWidget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_widget_new" gtk_recent_chooser_widget_new :: 
    IO (Ptr RecentChooserWidget)


recentChooserWidgetNew ::
    (MonadIO m) =>
    m RecentChooserWidget
recentChooserWidgetNew  = liftIO $ do
    result <- gtk_recent_chooser_widget_new
    checkUnexpectedReturnNULL "gtk_recent_chooser_widget_new" result
    result' <- (newObject RecentChooserWidget) result
    return result'

-- method RecentChooserWidget::new_for_manager
-- method type : Constructor
-- Args : [Arg {argName = "manager", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "manager", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RecentChooserWidget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_widget_new_for_manager" gtk_recent_chooser_widget_new_for_manager :: 
    Ptr RecentManager ->                    -- manager : TInterface "Gtk" "RecentManager"
    IO (Ptr RecentChooserWidget)


recentChooserWidgetNewForManager ::
    (MonadIO m, RecentManagerK a) =>
    a ->                                    -- manager
    m RecentChooserWidget
recentChooserWidgetNewForManager manager = liftIO $ do
    let manager' = unsafeManagedPtrCastPtr manager
    result <- gtk_recent_chooser_widget_new_for_manager manager'
    checkUnexpectedReturnNULL "gtk_recent_chooser_widget_new_for_manager" result
    result' <- (newObject RecentChooserWidget) result
    touchManagedPtr manager
    return result'

-- struct RecentData
newtype RecentData = RecentData (ForeignPtr RecentData)
noRecentData :: Maybe RecentData
noRecentData = Nothing

recentDataReadDisplayName :: RecentData -> IO T.Text
recentDataReadDisplayName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

recentDataReadDescription :: RecentData -> IO T.Text
recentDataReadDescription s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

recentDataReadMimeType :: RecentData -> IO T.Text
recentDataReadMimeType s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO CString
    val' <- cstringToText val
    return val'

recentDataReadAppName :: RecentData -> IO T.Text
recentDataReadAppName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO CString
    val' <- cstringToText val
    return val'

recentDataReadAppExec :: RecentData -> IO T.Text
recentDataReadAppExec s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO CString
    val' <- cstringToText val
    return val'

recentDataReadGroups :: RecentData -> IO [T.Text]
recentDataReadGroups s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 40) :: IO (Ptr CString)
    val' <- unpackZeroTerminatedUTF8CArray val
    return val'

recentDataReadIsPrivate :: RecentData -> IO Bool
recentDataReadIsPrivate s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 48) :: IO CInt
    let val' = (/= 0) val
    return val'

-- object RecentFilter 
newtype RecentFilter = RecentFilter (ForeignPtr RecentFilter)
noRecentFilter :: Maybe RecentFilter
noRecentFilter = Nothing

foreign import ccall "gtk_recent_filter_get_type"
    c_gtk_recent_filter_get_type :: IO GType

type instance ParentTypes RecentFilter = '[GObject.Object, Buildable]

instance GObject RecentFilter where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_recent_filter_get_type
    

class GObject o => RecentFilterK o
instance (GObject o, IsDescendantOf RecentFilter o) => RecentFilterK o

toRecentFilter :: RecentFilterK o => o -> IO RecentFilter
toRecentFilter = unsafeCastTo RecentFilter

-- method RecentFilter::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "RecentFilter"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_new" gtk_recent_filter_new :: 
    IO (Ptr RecentFilter)


recentFilterNew ::
    (MonadIO m) =>
    m RecentFilter
recentFilterNew  = liftIO $ do
    result <- gtk_recent_filter_new
    checkUnexpectedReturnNULL "gtk_recent_filter_new" result
    result' <- (newObject RecentFilter) result
    return result'

-- method RecentFilter::add_age
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "days", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "days", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_add_age" gtk_recent_filter_add_age :: 
    Ptr RecentFilter ->                     -- _obj : TInterface "Gtk" "RecentFilter"
    Int32 ->                                -- days : TBasicType TInt32
    IO ()


recentFilterAddAge ::
    (MonadIO m, RecentFilterK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- days
    m ()
recentFilterAddAge _obj days = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_recent_filter_add_age _obj' days
    touchManagedPtr _obj
    return ()

-- method RecentFilter::add_application
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_add_application" gtk_recent_filter_add_application :: 
    Ptr RecentFilter ->                     -- _obj : TInterface "Gtk" "RecentFilter"
    CString ->                              -- application : TBasicType TUTF8
    IO ()


recentFilterAddApplication ::
    (MonadIO m, RecentFilterK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- application
    m ()
recentFilterAddApplication _obj application = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    application' <- textToCString application
    gtk_recent_filter_add_application _obj' application'
    touchManagedPtr _obj
    freeMem application'
    return ()

-- method RecentFilter::add_custom
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "needed", argType = TInterface "Gtk" "RecentFilterFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "RecentFilterFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data_destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "needed", argType = TInterface "Gtk" "RecentFilterFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "RecentFilterFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_add_custom" gtk_recent_filter_add_custom :: 
    Ptr RecentFilter ->                     -- _obj : TInterface "Gtk" "RecentFilter"
    CUInt ->                                -- needed : TInterface "Gtk" "RecentFilterFlags"
    FunPtr RecentFilterFuncC ->             -- func : TInterface "Gtk" "RecentFilterFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- data_destroy : TInterface "GLib" "DestroyNotify"
    IO ()


recentFilterAddCustom ::
    (MonadIO m, RecentFilterK a) =>
    a ->                                    -- _obj
    [RecentFilterFlags] ->                  -- needed
    RecentFilterFunc ->                     -- func
    m ()
recentFilterAddCustom _obj needed func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let needed' = gflagsToWord needed
    func' <- mkRecentFilterFunc (recentFilterFuncWrapper Nothing func)
    let data_ = castFunPtrToPtr func'
    let data_destroy = safeFreeFunPtrPtr
    gtk_recent_filter_add_custom _obj' needed' func' data_ data_destroy
    touchManagedPtr _obj
    return ()

-- method RecentFilter::add_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_add_group" gtk_recent_filter_add_group :: 
    Ptr RecentFilter ->                     -- _obj : TInterface "Gtk" "RecentFilter"
    CString ->                              -- group : TBasicType TUTF8
    IO ()


recentFilterAddGroup ::
    (MonadIO m, RecentFilterK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- group
    m ()
recentFilterAddGroup _obj group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    group' <- textToCString group
    gtk_recent_filter_add_group _obj' group'
    touchManagedPtr _obj
    freeMem group'
    return ()

-- method RecentFilter::add_mime_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_add_mime_type" gtk_recent_filter_add_mime_type :: 
    Ptr RecentFilter ->                     -- _obj : TInterface "Gtk" "RecentFilter"
    CString ->                              -- mime_type : TBasicType TUTF8
    IO ()


recentFilterAddMimeType ::
    (MonadIO m, RecentFilterK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- mime_type
    m ()
recentFilterAddMimeType _obj mime_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    mime_type' <- textToCString mime_type
    gtk_recent_filter_add_mime_type _obj' mime_type'
    touchManagedPtr _obj
    freeMem mime_type'
    return ()

-- method RecentFilter::add_pattern
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_add_pattern" gtk_recent_filter_add_pattern :: 
    Ptr RecentFilter ->                     -- _obj : TInterface "Gtk" "RecentFilter"
    CString ->                              -- pattern : TBasicType TUTF8
    IO ()


recentFilterAddPattern ::
    (MonadIO m, RecentFilterK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- pattern
    m ()
recentFilterAddPattern _obj pattern = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    pattern' <- textToCString pattern
    gtk_recent_filter_add_pattern _obj' pattern'
    touchManagedPtr _obj
    freeMem pattern'
    return ()

-- method RecentFilter::add_pixbuf_formats
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_add_pixbuf_formats" gtk_recent_filter_add_pixbuf_formats :: 
    Ptr RecentFilter ->                     -- _obj : TInterface "Gtk" "RecentFilter"
    IO ()


recentFilterAddPixbufFormats ::
    (MonadIO m, RecentFilterK a) =>
    a ->                                    -- _obj
    m ()
recentFilterAddPixbufFormats _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_recent_filter_add_pixbuf_formats _obj'
    touchManagedPtr _obj
    return ()

-- method RecentFilter::filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_info", argType = TInterface "Gtk" "RecentFilterInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_info", argType = TInterface "Gtk" "RecentFilterInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_filter" gtk_recent_filter_filter :: 
    Ptr RecentFilter ->                     -- _obj : TInterface "Gtk" "RecentFilter"
    Ptr RecentFilterInfo ->                 -- filter_info : TInterface "Gtk" "RecentFilterInfo"
    IO CInt


recentFilterFilter ::
    (MonadIO m, RecentFilterK a) =>
    a ->                                    -- _obj
    RecentFilterInfo ->                     -- filter_info
    m Bool
recentFilterFilter _obj filter_info = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let filter_info' = unsafeManagedPtrGetPtr filter_info
    result <- gtk_recent_filter_filter _obj' filter_info'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr filter_info
    return result'

-- method RecentFilter::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_get_name" gtk_recent_filter_get_name :: 
    Ptr RecentFilter ->                     -- _obj : TInterface "Gtk" "RecentFilter"
    IO CString


recentFilterGetName ::
    (MonadIO m, RecentFilterK a) =>
    a ->                                    -- _obj
    m T.Text
recentFilterGetName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_filter_get_name _obj'
    checkUnexpectedReturnNULL "gtk_recent_filter_get_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method RecentFilter::get_needed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RecentFilterFlags"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_get_needed" gtk_recent_filter_get_needed :: 
    Ptr RecentFilter ->                     -- _obj : TInterface "Gtk" "RecentFilter"
    IO CUInt


recentFilterGetNeeded ::
    (MonadIO m, RecentFilterK a) =>
    a ->                                    -- _obj
    m [RecentFilterFlags]
recentFilterGetNeeded _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_filter_get_needed _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method RecentFilter::set_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_filter_set_name" gtk_recent_filter_set_name :: 
    Ptr RecentFilter ->                     -- _obj : TInterface "Gtk" "RecentFilter"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


recentFilterSetName ::
    (MonadIO m, RecentFilterK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
recentFilterSetName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    gtk_recent_filter_set_name _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- Flags RecentFilterFlags

data RecentFilterFlags = 
      RecentFilterFlagsUri
    | RecentFilterFlagsDisplayName
    | RecentFilterFlagsMimeType
    | RecentFilterFlagsApplication
    | RecentFilterFlagsGroup
    | RecentFilterFlagsAge
    | AnotherRecentFilterFlags Int
    deriving (Show, Eq)

instance Enum RecentFilterFlags where
    fromEnum RecentFilterFlagsUri = 1
    fromEnum RecentFilterFlagsDisplayName = 2
    fromEnum RecentFilterFlagsMimeType = 4
    fromEnum RecentFilterFlagsApplication = 8
    fromEnum RecentFilterFlagsGroup = 16
    fromEnum RecentFilterFlagsAge = 32
    fromEnum (AnotherRecentFilterFlags k) = k

    toEnum 1 = RecentFilterFlagsUri
    toEnum 2 = RecentFilterFlagsDisplayName
    toEnum 4 = RecentFilterFlagsMimeType
    toEnum 8 = RecentFilterFlagsApplication
    toEnum 16 = RecentFilterFlagsGroup
    toEnum 32 = RecentFilterFlagsAge
    toEnum k = AnotherRecentFilterFlags k

foreign import ccall "gtk_recent_filter_flags_get_type" c_gtk_recent_filter_flags_get_type :: 
    IO GType

instance BoxedEnum RecentFilterFlags where
    boxedEnumType _ = c_gtk_recent_filter_flags_get_type

instance IsGFlag RecentFilterFlags

-- callback RecentFilterFunc
recentFilterFuncClosure :: RecentFilterFunc -> IO Closure
recentFilterFuncClosure cb = newCClosure =<< mkRecentFilterFunc wrapped
    where wrapped = recentFilterFuncWrapper Nothing cb

type RecentFilterFuncC =
    Ptr RecentFilterInfo ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkRecentFilterFunc :: RecentFilterFuncC -> IO (FunPtr RecentFilterFuncC)

type RecentFilterFunc =
    RecentFilterInfo ->
    IO Bool

noRecentFilterFunc :: Maybe RecentFilterFunc
noRecentFilterFunc = Nothing

recentFilterFuncWrapper ::
    Maybe (Ptr (FunPtr (RecentFilterFuncC))) ->
    RecentFilterFunc ->
    Ptr RecentFilterInfo ->
    Ptr () ->
    IO CInt
recentFilterFuncWrapper funptrptr _cb filter_info _ = do
    filter_info' <- (newPtr 56 RecentFilterInfo) filter_info
    result <- _cb  filter_info'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- struct RecentFilterInfo
newtype RecentFilterInfo = RecentFilterInfo (ForeignPtr RecentFilterInfo)
noRecentFilterInfo :: Maybe RecentFilterInfo
noRecentFilterInfo = Nothing

recentFilterInfoReadContains :: RecentFilterInfo -> IO [RecentFilterFlags]
recentFilterInfoReadContains s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CUInt
    let val' = wordToGFlags val
    return val'

recentFilterInfoReadUri :: RecentFilterInfo -> IO T.Text
recentFilterInfoReadUri s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

recentFilterInfoReadDisplayName :: RecentFilterInfo -> IO T.Text
recentFilterInfoReadDisplayName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO CString
    val' <- cstringToText val
    return val'

recentFilterInfoReadMimeType :: RecentFilterInfo -> IO T.Text
recentFilterInfoReadMimeType s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO CString
    val' <- cstringToText val
    return val'

recentFilterInfoReadApplications :: RecentFilterInfo -> IO [T.Text]
recentFilterInfoReadApplications s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO (Ptr CString)
    val' <- unpackZeroTerminatedUTF8CArray val
    return val'

recentFilterInfoReadGroups :: RecentFilterInfo -> IO [T.Text]
recentFilterInfoReadGroups s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 40) :: IO (Ptr CString)
    val' <- unpackZeroTerminatedUTF8CArray val
    return val'

recentFilterInfoReadAge :: RecentFilterInfo -> IO Int32
recentFilterInfoReadAge s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 48) :: IO Int32
    return val

-- struct RecentInfo
newtype RecentInfo = RecentInfo (ForeignPtr RecentInfo)
noRecentInfo :: Maybe RecentInfo
noRecentInfo = Nothing

foreign import ccall "gtk_recent_info_get_type" c_gtk_recent_info_get_type :: 
    IO GType

instance BoxedObject RecentInfo where
    boxedType _ = c_gtk_recent_info_get_type

-- method RecentInfo::create_app_info
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "AppInfo"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_recent_info_create_app_info" gtk_recent_info_create_app_info :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    CString ->                              -- app_name : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Gio.AppInfo)


recentInfoCreateAppInfo ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    Maybe (T.Text) ->                       -- app_name
    m Gio.AppInfo
recentInfoCreateAppInfo _obj app_name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    maybeApp_name <- case app_name of
        Nothing -> return nullPtr
        Just jApp_name -> do
            jApp_name' <- textToCString jApp_name
            return jApp_name'
    onException (do
        result <- propagateGError $ gtk_recent_info_create_app_info _obj' maybeApp_name
        checkUnexpectedReturnNULL "gtk_recent_info_create_app_info" result
        result' <- (wrapObject Gio.AppInfo) result
        touchManagedPtr _obj
        freeMem maybeApp_name
        return result'
     ) (do
        freeMem maybeApp_name
     )

-- method RecentInfo::exists
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_exists" gtk_recent_info_exists :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO CInt


recentInfoExists ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m Bool
recentInfoExists _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_exists _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::get_added
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt64
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_added" gtk_recent_info_get_added :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO Int64


recentInfoGetAdded ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m Int64
recentInfoGetAdded _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_added _obj'
    touchManagedPtr _obj
    return result

-- method RecentInfo::get_age
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_age" gtk_recent_info_get_age :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO Int32


recentInfoGetAge ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m Int32
recentInfoGetAge _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_age _obj'
    touchManagedPtr _obj
    return result

-- method RecentInfo::get_application_info
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_exec", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "time_", argType = TBasicType TInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_application_info" gtk_recent_info_get_application_info :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    CString ->                              -- app_name : TBasicType TUTF8
    Ptr CString ->                          -- app_exec : TBasicType TUTF8
    Ptr Word32 ->                           -- count : TBasicType TUInt32
    Ptr Int64 ->                            -- time_ : TBasicType TInt64
    IO CInt


recentInfoGetApplicationInfo ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    T.Text ->                               -- app_name
    m (Bool,T.Text,Word32,Int64)
recentInfoGetApplicationInfo _obj app_name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    app_name' <- textToCString app_name
    app_exec <- allocMem :: IO (Ptr CString)
    count <- allocMem :: IO (Ptr Word32)
    time_ <- allocMem :: IO (Ptr Int64)
    result <- gtk_recent_info_get_application_info _obj' app_name' app_exec count time_
    let result' = (/= 0) result
    app_exec' <- peek app_exec
    app_exec'' <- cstringToText app_exec'
    count' <- peek count
    time_' <- peek time_
    touchManagedPtr _obj
    freeMem app_name'
    freeMem app_exec
    freeMem count
    freeMem time_
    return (result', app_exec'', count', time_')

-- method RecentInfo::get_applications
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) 1 (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_applications" gtk_recent_info_get_applications :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    Ptr Word64 ->                           -- length : TBasicType TUInt64
    IO (Ptr CString)


recentInfoGetApplications ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m ([T.Text],Word64)
recentInfoGetApplications _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    length_ <- allocMem :: IO (Ptr Word64)
    result <- gtk_recent_info_get_applications _obj' length_
    checkUnexpectedReturnNULL "gtk_recent_info_get_applications" result
    result' <- unpackZeroTerminatedUTF8CArray result
    mapZeroTerminatedCArray freeMem result
    freeMem result
    length_' <- peek length_
    touchManagedPtr _obj
    freeMem length_
    return (result', length_')

-- method RecentInfo::get_description
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_description" gtk_recent_info_get_description :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO CString


recentInfoGetDescription ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m T.Text
recentInfoGetDescription _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_description _obj'
    checkUnexpectedReturnNULL "gtk_recent_info_get_description" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::get_display_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_display_name" gtk_recent_info_get_display_name :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO CString


recentInfoGetDisplayName ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m T.Text
recentInfoGetDisplayName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_display_name _obj'
    checkUnexpectedReturnNULL "gtk_recent_info_get_display_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::get_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_gicon" gtk_recent_info_get_gicon :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO (Ptr Gio.Icon)


recentInfoGetGicon ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m Gio.Icon
recentInfoGetGicon _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_gicon _obj'
    checkUnexpectedReturnNULL "gtk_recent_info_get_gicon" result
    result' <- (wrapObject Gio.Icon) result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::get_groups
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) 1 (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_groups" gtk_recent_info_get_groups :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    Ptr Word64 ->                           -- length : TBasicType TUInt64
    IO (Ptr CString)


recentInfoGetGroups ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m ([T.Text],Word64)
recentInfoGetGroups _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    length_ <- allocMem :: IO (Ptr Word64)
    result <- gtk_recent_info_get_groups _obj' length_
    checkUnexpectedReturnNULL "gtk_recent_info_get_groups" result
    result' <- unpackZeroTerminatedUTF8CArray result
    mapZeroTerminatedCArray freeMem result
    freeMem result
    length_' <- peek length_
    touchManagedPtr _obj
    freeMem length_
    return (result', length_')

-- method RecentInfo::get_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_icon" gtk_recent_info_get_icon :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    Int32 ->                                -- size : TBasicType TInt32
    IO (Ptr GdkPixbuf.Pixbuf)


recentInfoGetIcon ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    Int32 ->                                -- size
    m GdkPixbuf.Pixbuf
recentInfoGetIcon _obj size = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_icon _obj' size
    checkUnexpectedReturnNULL "gtk_recent_info_get_icon" result
    result' <- (wrapObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::get_mime_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_mime_type" gtk_recent_info_get_mime_type :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO CString


recentInfoGetMimeType ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m T.Text
recentInfoGetMimeType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_mime_type _obj'
    checkUnexpectedReturnNULL "gtk_recent_info_get_mime_type" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::get_modified
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt64
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_modified" gtk_recent_info_get_modified :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO Int64


recentInfoGetModified ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m Int64
recentInfoGetModified _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_modified _obj'
    touchManagedPtr _obj
    return result

-- method RecentInfo::get_private_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_private_hint" gtk_recent_info_get_private_hint :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO CInt


recentInfoGetPrivateHint ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m Bool
recentInfoGetPrivateHint _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_private_hint _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::get_short_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_short_name" gtk_recent_info_get_short_name :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO CString


recentInfoGetShortName ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m T.Text
recentInfoGetShortName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_short_name _obj'
    checkUnexpectedReturnNULL "gtk_recent_info_get_short_name" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::get_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_uri" gtk_recent_info_get_uri :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO CString


recentInfoGetUri ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m T.Text
recentInfoGetUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_uri _obj'
    checkUnexpectedReturnNULL "gtk_recent_info_get_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::get_uri_display
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_uri_display" gtk_recent_info_get_uri_display :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO CString


recentInfoGetUriDisplay ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m T.Text
recentInfoGetUriDisplay _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_uri_display _obj'
    checkUnexpectedReturnNULL "gtk_recent_info_get_uri_display" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::get_visited
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt64
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_get_visited" gtk_recent_info_get_visited :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO Int64


recentInfoGetVisited ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m Int64
recentInfoGetVisited _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_get_visited _obj'
    touchManagedPtr _obj
    return result

-- method RecentInfo::has_application
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_has_application" gtk_recent_info_has_application :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    CString ->                              -- app_name : TBasicType TUTF8
    IO CInt


recentInfoHasApplication ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    T.Text ->                               -- app_name
    m Bool
recentInfoHasApplication _obj app_name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    app_name' <- textToCString app_name
    result <- gtk_recent_info_has_application _obj' app_name'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem app_name'
    return result'

-- method RecentInfo::has_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_has_group" gtk_recent_info_has_group :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    CString ->                              -- group_name : TBasicType TUTF8
    IO CInt


recentInfoHasGroup ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    T.Text ->                               -- group_name
    m Bool
recentInfoHasGroup _obj group_name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    group_name' <- textToCString group_name
    result <- gtk_recent_info_has_group _obj' group_name'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem group_name'
    return result'

-- method RecentInfo::is_local
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_is_local" gtk_recent_info_is_local :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO CInt


recentInfoIsLocal ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m Bool
recentInfoIsLocal _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_is_local _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::last_application
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_last_application" gtk_recent_info_last_application :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO CString


recentInfoLastApplication ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m T.Text
recentInfoLastApplication _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_last_application _obj'
    checkUnexpectedReturnNULL "gtk_recent_info_last_application" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::match
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info_b", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info_b", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_match" gtk_recent_info_match :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    Ptr RecentInfo ->                       -- info_b : TInterface "Gtk" "RecentInfo"
    IO CInt


recentInfoMatch ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    RecentInfo ->                           -- info_b
    m Bool
recentInfoMatch _obj info_b = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let info_b' = unsafeManagedPtrGetPtr info_b
    result <- gtk_recent_info_match _obj' info_b'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr info_b
    return result'

-- method RecentInfo::ref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RecentInfo"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_ref" gtk_recent_info_ref :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO (Ptr RecentInfo)


recentInfoRef ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m RecentInfo
recentInfoRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_recent_info_ref _obj'
    checkUnexpectedReturnNULL "gtk_recent_info_ref" result
    result' <- (wrapBoxed RecentInfo) result
    touchManagedPtr _obj
    return result'

-- method RecentInfo::unref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_info_unref" gtk_recent_info_unref :: 
    Ptr RecentInfo ->                       -- _obj : TInterface "Gtk" "RecentInfo"
    IO ()


recentInfoUnref ::
    (MonadIO m) =>
    RecentInfo ->                           -- _obj
    m ()
recentInfoUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_recent_info_unref _obj'
    touchManagedPtr _obj
    return ()

-- object RecentManager 
newtype RecentManager = RecentManager (ForeignPtr RecentManager)
noRecentManager :: Maybe RecentManager
noRecentManager = Nothing

foreign import ccall "gtk_recent_manager_get_type"
    c_gtk_recent_manager_get_type :: IO GType

type instance ParentTypes RecentManager = '[GObject.Object]

instance GObject RecentManager where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_recent_manager_get_type
    

class GObject o => RecentManagerK o
instance (GObject o, IsDescendantOf RecentManager o) => RecentManagerK o

toRecentManager :: RecentManagerK o => o -> IO RecentManager
toRecentManager = unsafeCastTo RecentManager

-- method RecentManager::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "RecentManager"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_manager_new" gtk_recent_manager_new :: 
    IO (Ptr RecentManager)


recentManagerNew ::
    (MonadIO m) =>
    m RecentManager
recentManagerNew  = liftIO $ do
    result <- gtk_recent_manager_new
    checkUnexpectedReturnNULL "gtk_recent_manager_new" result
    result' <- (wrapObject RecentManager) result
    return result'

-- method RecentManager::add_full
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "recent_data", argType = TInterface "Gtk" "RecentData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "recent_data", argType = TInterface "Gtk" "RecentData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_manager_add_full" gtk_recent_manager_add_full :: 
    Ptr RecentManager ->                    -- _obj : TInterface "Gtk" "RecentManager"
    CString ->                              -- uri : TBasicType TUTF8
    Ptr RecentData ->                       -- recent_data : TInterface "Gtk" "RecentData"
    IO CInt


recentManagerAddFull ::
    (MonadIO m, RecentManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    RecentData ->                           -- recent_data
    m Bool
recentManagerAddFull _obj uri recent_data = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    let recent_data' = unsafeManagedPtrGetPtr recent_data
    result <- gtk_recent_manager_add_full _obj' uri' recent_data'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr recent_data
    freeMem uri'
    return result'

-- method RecentManager::add_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_manager_add_item" gtk_recent_manager_add_item :: 
    Ptr RecentManager ->                    -- _obj : TInterface "Gtk" "RecentManager"
    CString ->                              -- uri : TBasicType TUTF8
    IO CInt


recentManagerAddItem ::
    (MonadIO m, RecentManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m Bool
recentManagerAddItem _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    result <- gtk_recent_manager_add_item _obj' uri'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem uri'
    return result'

-- method RecentManager::get_items
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "RecentInfo")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_manager_get_items" gtk_recent_manager_get_items :: 
    Ptr RecentManager ->                    -- _obj : TInterface "Gtk" "RecentManager"
    IO (Ptr (GList (Ptr RecentInfo)))


recentManagerGetItems ::
    (MonadIO m, RecentManagerK a) =>
    a ->                                    -- _obj
    m [RecentInfo]
recentManagerGetItems _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_recent_manager_get_items _obj'
    checkUnexpectedReturnNULL "gtk_recent_manager_get_items" result
    result' <- unpackGList result
    result'' <- mapM (wrapBoxed RecentInfo) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method RecentManager::has_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_manager_has_item" gtk_recent_manager_has_item :: 
    Ptr RecentManager ->                    -- _obj : TInterface "Gtk" "RecentManager"
    CString ->                              -- uri : TBasicType TUTF8
    IO CInt


recentManagerHasItem ::
    (MonadIO m, RecentManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m Bool
recentManagerHasItem _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    result <- gtk_recent_manager_has_item _obj' uri'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem uri'
    return result'

-- method RecentManager::lookup_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RecentInfo"
-- throws : True
-- Skip return : False

foreign import ccall "gtk_recent_manager_lookup_item" gtk_recent_manager_lookup_item :: 
    Ptr RecentManager ->                    -- _obj : TInterface "Gtk" "RecentManager"
    CString ->                              -- uri : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr RecentInfo)


recentManagerLookupItem ::
    (MonadIO m, RecentManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m RecentInfo
recentManagerLookupItem _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    onException (do
        result <- propagateGError $ gtk_recent_manager_lookup_item _obj' uri'
        checkUnexpectedReturnNULL "gtk_recent_manager_lookup_item" result
        result' <- (wrapBoxed RecentInfo) result
        touchManagedPtr _obj
        freeMem uri'
        return result'
     ) (do
        freeMem uri'
     )

-- method RecentManager::move_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_recent_manager_move_item" gtk_recent_manager_move_item :: 
    Ptr RecentManager ->                    -- _obj : TInterface "Gtk" "RecentManager"
    CString ->                              -- uri : TBasicType TUTF8
    CString ->                              -- new_uri : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt


recentManagerMoveItem ::
    (MonadIO m, RecentManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    Maybe (T.Text) ->                       -- new_uri
    m ()
recentManagerMoveItem _obj uri new_uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    maybeNew_uri <- case new_uri of
        Nothing -> return nullPtr
        Just jNew_uri -> do
            jNew_uri' <- textToCString jNew_uri
            return jNew_uri'
    onException (do
        _ <- propagateGError $ gtk_recent_manager_move_item _obj' uri' maybeNew_uri
        touchManagedPtr _obj
        freeMem uri'
        freeMem maybeNew_uri
        return ()
     ) (do
        freeMem uri'
        freeMem maybeNew_uri
     )

-- method RecentManager::purge_items
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : True
-- Skip return : False

foreign import ccall "gtk_recent_manager_purge_items" gtk_recent_manager_purge_items :: 
    Ptr RecentManager ->                    -- _obj : TInterface "Gtk" "RecentManager"
    Ptr (Ptr GError) ->                     -- error
    IO Int32


recentManagerPurgeItems ::
    (MonadIO m, RecentManagerK a) =>
    a ->                                    -- _obj
    m Int32
recentManagerPurgeItems _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    onException (do
        result <- propagateGError $ gtk_recent_manager_purge_items _obj'
        touchManagedPtr _obj
        return result
     ) (do
        return ()
     )

-- method RecentManager::remove_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_recent_manager_remove_item" gtk_recent_manager_remove_item :: 
    Ptr RecentManager ->                    -- _obj : TInterface "Gtk" "RecentManager"
    CString ->                              -- uri : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt


recentManagerRemoveItem ::
    (MonadIO m, RecentManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m ()
recentManagerRemoveItem _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    onException (do
        _ <- propagateGError $ gtk_recent_manager_remove_item _obj' uri'
        touchManagedPtr _obj
        freeMem uri'
        return ()
     ) (do
        freeMem uri'
     )

-- method RecentManager::get_default
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "RecentManager"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_manager_get_default" gtk_recent_manager_get_default :: 
    IO (Ptr RecentManager)


recentManagerGetDefault ::
    (MonadIO m) =>
    m RecentManager
recentManagerGetDefault  = liftIO $ do
    result <- gtk_recent_manager_get_default
    checkUnexpectedReturnNULL "gtk_recent_manager_get_default" result
    result' <- (newObject RecentManager) result
    return result'

-- signal RecentManager::changed
type RecentManagerChangedCallback =
    IO ()

noRecentManagerChangedCallback :: Maybe RecentManagerChangedCallback
noRecentManagerChangedCallback = Nothing

type RecentManagerChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkRecentManagerChangedCallback :: RecentManagerChangedCallbackC -> IO (FunPtr RecentManagerChangedCallbackC)

recentManagerChangedClosure :: RecentManagerChangedCallback -> IO Closure
recentManagerChangedClosure cb = newCClosure =<< mkRecentManagerChangedCallback wrapped
    where wrapped = recentManagerChangedCallbackWrapper cb

recentManagerChangedCallbackWrapper ::
    RecentManagerChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
recentManagerChangedCallbackWrapper _cb _ _ = do
    _cb 

onRecentManagerChanged :: (GObject a, MonadIO m) => a -> RecentManagerChangedCallback -> m SignalHandlerId
onRecentManagerChanged obj cb = liftIO $ connectRecentManagerChanged obj cb SignalConnectBefore
afterRecentManagerChanged :: (GObject a, MonadIO m) => a -> RecentManagerChangedCallback -> m SignalHandlerId
afterRecentManagerChanged obj cb = connectRecentManagerChanged obj cb SignalConnectAfter

connectRecentManagerChanged :: (GObject a, MonadIO m) =>
                               a -> RecentManagerChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectRecentManagerChanged obj cb after = liftIO $ do
    cb' <- mkRecentManagerChangedCallback (recentManagerChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- Enum RecentManagerError

data RecentManagerError = 
      RecentManagerErrorNotFound
    | RecentManagerErrorInvalidUri
    | RecentManagerErrorInvalidEncoding
    | RecentManagerErrorNotRegistered
    | RecentManagerErrorRead
    | RecentManagerErrorWrite
    | RecentManagerErrorUnknown
    | AnotherRecentManagerError Int
    deriving (Show, Eq)

instance Enum RecentManagerError where
    fromEnum RecentManagerErrorNotFound = 0
    fromEnum RecentManagerErrorInvalidUri = 1
    fromEnum RecentManagerErrorInvalidEncoding = 2
    fromEnum RecentManagerErrorNotRegistered = 3
    fromEnum RecentManagerErrorRead = 4
    fromEnum RecentManagerErrorWrite = 5
    fromEnum RecentManagerErrorUnknown = 6
    fromEnum (AnotherRecentManagerError k) = k

    toEnum 0 = RecentManagerErrorNotFound
    toEnum 1 = RecentManagerErrorInvalidUri
    toEnum 2 = RecentManagerErrorInvalidEncoding
    toEnum 3 = RecentManagerErrorNotRegistered
    toEnum 4 = RecentManagerErrorRead
    toEnum 5 = RecentManagerErrorWrite
    toEnum 6 = RecentManagerErrorUnknown
    toEnum k = AnotherRecentManagerError k

instance GErrorClass RecentManagerError where
    gerrorClassDomain _ = "gtk-recent-manager-error-quark"

catchRecentManagerError ::
    IO a ->
    (RecentManagerError -> GErrorMessage -> IO a) ->
    IO a
catchRecentManagerError = catchGErrorJustDomain

handleRecentManagerError ::
    (RecentManagerError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleRecentManagerError = handleGErrorJustDomain

foreign import ccall "gtk_recent_manager_error_get_type" c_gtk_recent_manager_error_get_type :: 
    IO GType

instance BoxedEnum RecentManagerError where
    boxedEnumType _ = c_gtk_recent_manager_error_get_type

-- callback RecentSortFunc
recentSortFuncClosure :: RecentSortFunc -> IO Closure
recentSortFuncClosure cb = newCClosure =<< mkRecentSortFunc wrapped
    where wrapped = recentSortFuncWrapper Nothing cb

type RecentSortFuncC =
    Ptr RecentInfo ->
    Ptr RecentInfo ->
    Ptr () ->
    IO Int32

foreign import ccall "wrapper"
    mkRecentSortFunc :: RecentSortFuncC -> IO (FunPtr RecentSortFuncC)

type RecentSortFunc =
    RecentInfo ->
    RecentInfo ->
    IO Int32

noRecentSortFunc :: Maybe RecentSortFunc
noRecentSortFunc = Nothing

recentSortFuncWrapper ::
    Maybe (Ptr (FunPtr (RecentSortFuncC))) ->
    RecentSortFunc ->
    Ptr RecentInfo ->
    Ptr RecentInfo ->
    Ptr () ->
    IO Int32
recentSortFuncWrapper funptrptr _cb a b _ = do
    a' <- (newBoxed RecentInfo) a
    b' <- (newBoxed RecentInfo) b
    result <- _cb  a' b'
    maybeReleaseFunPtr funptrptr
    return result

-- Enum RecentSortType

data RecentSortType = 
      RecentSortTypeNone
    | RecentSortTypeMru
    | RecentSortTypeLru
    | RecentSortTypeCustom
    | AnotherRecentSortType Int
    deriving (Show, Eq)

instance Enum RecentSortType where
    fromEnum RecentSortTypeNone = 0
    fromEnum RecentSortTypeMru = 1
    fromEnum RecentSortTypeLru = 2
    fromEnum RecentSortTypeCustom = 3
    fromEnum (AnotherRecentSortType k) = k

    toEnum 0 = RecentSortTypeNone
    toEnum 1 = RecentSortTypeMru
    toEnum 2 = RecentSortTypeLru
    toEnum 3 = RecentSortTypeCustom
    toEnum k = AnotherRecentSortType k

foreign import ccall "gtk_recent_sort_type_get_type" c_gtk_recent_sort_type_get_type :: 
    IO GType

instance BoxedEnum RecentSortType where
    boxedEnumType _ = c_gtk_recent_sort_type_get_type

-- Flags RegionFlags

data RegionFlags = 
      RegionFlagsEven
    | RegionFlagsOdd
    | RegionFlagsFirst
    | RegionFlagsLast
    | RegionFlagsOnly
    | RegionFlagsSorted
    | AnotherRegionFlags Int
    deriving (Show, Eq)

instance Enum RegionFlags where
    fromEnum RegionFlagsEven = 1
    fromEnum RegionFlagsOdd = 2
    fromEnum RegionFlagsFirst = 4
    fromEnum RegionFlagsLast = 8
    fromEnum RegionFlagsOnly = 16
    fromEnum RegionFlagsSorted = 32
    fromEnum (AnotherRegionFlags k) = k

    toEnum 1 = RegionFlagsEven
    toEnum 2 = RegionFlagsOdd
    toEnum 4 = RegionFlagsFirst
    toEnum 8 = RegionFlagsLast
    toEnum 16 = RegionFlagsOnly
    toEnum 32 = RegionFlagsSorted
    toEnum k = AnotherRegionFlags k

foreign import ccall "gtk_region_flags_get_type" c_gtk_region_flags_get_type :: 
    IO GType

instance BoxedEnum RegionFlags where
    boxedEnumType _ = c_gtk_region_flags_get_type

instance IsGFlag RegionFlags

-- Enum ReliefStyle

data ReliefStyle = 
      ReliefStyleNormal
    | ReliefStyleHalf
    | ReliefStyleNone
    | AnotherReliefStyle Int
    deriving (Show, Eq)

instance Enum ReliefStyle where
    fromEnum ReliefStyleNormal = 0
    fromEnum ReliefStyleHalf = 1
    fromEnum ReliefStyleNone = 2
    fromEnum (AnotherReliefStyle k) = k

    toEnum 0 = ReliefStyleNormal
    toEnum 1 = ReliefStyleHalf
    toEnum 2 = ReliefStyleNone
    toEnum k = AnotherReliefStyle k

foreign import ccall "gtk_relief_style_get_type" c_gtk_relief_style_get_type :: 
    IO GType

instance BoxedEnum ReliefStyle where
    boxedEnumType _ = c_gtk_relief_style_get_type

-- object RendererCellAccessible 
newtype RendererCellAccessible = RendererCellAccessible (ForeignPtr RendererCellAccessible)
noRendererCellAccessible :: Maybe RendererCellAccessible
noRendererCellAccessible = Nothing

foreign import ccall "gtk_renderer_cell_accessible_get_type"
    c_gtk_renderer_cell_accessible_get_type :: IO GType

type instance ParentTypes RendererCellAccessible = '[CellAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component]

instance GObject RendererCellAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_renderer_cell_accessible_get_type
    

class GObject o => RendererCellAccessibleK o
instance (GObject o, IsDescendantOf RendererCellAccessible o) => RendererCellAccessibleK o

toRendererCellAccessible :: RendererCellAccessibleK o => o -> IO RendererCellAccessible
toRendererCellAccessible = unsafeCastTo RendererCellAccessible

-- method RendererCellAccessible::new
-- method type : Constructor
-- Args : [Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RendererCellAccessible"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_renderer_cell_accessible_new" gtk_renderer_cell_accessible_new :: 
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    IO (Ptr RendererCellAccessible)


rendererCellAccessibleNew ::
    (MonadIO m, CellRendererK a) =>
    a ->                                    -- renderer
    m RendererCellAccessible
rendererCellAccessibleNew renderer = liftIO $ do
    let renderer' = unsafeManagedPtrCastPtr renderer
    result <- gtk_renderer_cell_accessible_new renderer'
    checkUnexpectedReturnNULL "gtk_renderer_cell_accessible_new" result
    result' <- (wrapObject RendererCellAccessible) result
    touchManagedPtr renderer
    return result'

-- struct RequestedSize
newtype RequestedSize = RequestedSize (ForeignPtr RequestedSize)
noRequestedSize :: Maybe RequestedSize
noRequestedSize = Nothing

requestedSizeReadData :: RequestedSize -> IO (Ptr ())
requestedSizeReadData s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO (Ptr ())
    return val

requestedSizeReadMinimumSize :: RequestedSize -> IO Int32
requestedSizeReadMinimumSize s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Int32
    return val

requestedSizeReadNaturalSize :: RequestedSize -> IO Int32
requestedSizeReadNaturalSize s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 12) :: IO Int32
    return val

-- struct Requisition
newtype Requisition = Requisition (ForeignPtr Requisition)
noRequisition :: Maybe Requisition
noRequisition = Nothing

foreign import ccall "gtk_requisition_get_type" c_gtk_requisition_get_type :: 
    IO GType

instance BoxedObject Requisition where
    boxedType _ = c_gtk_requisition_get_type

requisitionReadWidth :: Requisition -> IO Int32
requisitionReadWidth s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Int32
    return val

requisitionReadHeight :: Requisition -> IO Int32
requisitionReadHeight s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO Int32
    return val

-- method Requisition::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Requisition"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_requisition_new" gtk_requisition_new :: 
    IO (Ptr Requisition)


requisitionNew ::
    (MonadIO m) =>
    m Requisition
requisitionNew  = liftIO $ do
    result <- gtk_requisition_new
    checkUnexpectedReturnNULL "gtk_requisition_new" result
    result' <- (wrapBoxed Requisition) result
    return result'

-- method Requisition::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Requisition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Requisition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Requisition"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_requisition_copy" gtk_requisition_copy :: 
    Ptr Requisition ->                      -- _obj : TInterface "Gtk" "Requisition"
    IO (Ptr Requisition)


requisitionCopy ::
    (MonadIO m) =>
    Requisition ->                          -- _obj
    m Requisition
requisitionCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_requisition_copy _obj'
    checkUnexpectedReturnNULL "gtk_requisition_copy" result
    result' <- (wrapBoxed Requisition) result
    touchManagedPtr _obj
    return result'

-- method Requisition::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Requisition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Requisition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_requisition_free" gtk_requisition_free :: 
    Ptr Requisition ->                      -- _obj : TInterface "Gtk" "Requisition"
    IO ()


requisitionFree ::
    (MonadIO m) =>
    Requisition ->                          -- _obj
    m ()
requisitionFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_requisition_free _obj'
    touchManagedPtr _obj
    return ()

-- Enum ResizeMode

data ResizeMode = 
      ResizeModeParent
    | ResizeModeQueue
    | ResizeModeImmediate
    | AnotherResizeMode Int
    deriving (Show, Eq)

instance Enum ResizeMode where
    fromEnum ResizeModeParent = 0
    fromEnum ResizeModeQueue = 1
    fromEnum ResizeModeImmediate = 2
    fromEnum (AnotherResizeMode k) = k

    toEnum 0 = ResizeModeParent
    toEnum 1 = ResizeModeQueue
    toEnum 2 = ResizeModeImmediate
    toEnum k = AnotherResizeMode k

foreign import ccall "gtk_resize_mode_get_type" c_gtk_resize_mode_get_type :: 
    IO GType

instance BoxedEnum ResizeMode where
    boxedEnumType _ = c_gtk_resize_mode_get_type

-- Enum ResponseType

data ResponseType = 
      ResponseTypeNone
    | ResponseTypeReject
    | ResponseTypeAccept
    | ResponseTypeDeleteEvent
    | ResponseTypeOk
    | ResponseTypeCancel
    | ResponseTypeClose
    | ResponseTypeYes
    | ResponseTypeNo
    | ResponseTypeApply
    | ResponseTypeHelp
    | AnotherResponseType Int
    deriving (Show, Eq)

instance Enum ResponseType where
    fromEnum ResponseTypeNone = -1
    fromEnum ResponseTypeReject = -2
    fromEnum ResponseTypeAccept = -3
    fromEnum ResponseTypeDeleteEvent = -4
    fromEnum ResponseTypeOk = -5
    fromEnum ResponseTypeCancel = -6
    fromEnum ResponseTypeClose = -7
    fromEnum ResponseTypeYes = -8
    fromEnum ResponseTypeNo = -9
    fromEnum ResponseTypeApply = -10
    fromEnum ResponseTypeHelp = -11
    fromEnum (AnotherResponseType k) = k

    toEnum -11 = ResponseTypeHelp
    toEnum -10 = ResponseTypeApply
    toEnum -9 = ResponseTypeNo
    toEnum -8 = ResponseTypeYes
    toEnum -7 = ResponseTypeClose
    toEnum -6 = ResponseTypeCancel
    toEnum -5 = ResponseTypeOk
    toEnum -4 = ResponseTypeDeleteEvent
    toEnum -3 = ResponseTypeAccept
    toEnum -2 = ResponseTypeReject
    toEnum -1 = ResponseTypeNone
    toEnum k = AnotherResponseType k

foreign import ccall "gtk_response_type_get_type" c_gtk_response_type_get_type :: 
    IO GType

instance BoxedEnum ResponseType where
    boxedEnumType _ = c_gtk_response_type_get_type

-- object Revealer 
newtype Revealer = Revealer (ForeignPtr Revealer)
noRevealer :: Maybe Revealer
noRevealer = Nothing

foreign import ccall "gtk_revealer_get_type"
    c_gtk_revealer_get_type :: IO GType

type instance ParentTypes Revealer = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Revealer where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_revealer_get_type
    

class GObject o => RevealerK o
instance (GObject o, IsDescendantOf Revealer o) => RevealerK o

toRevealer :: RevealerK o => o -> IO Revealer
toRevealer = unsafeCastTo Revealer

-- method Revealer::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Revealer"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_revealer_new" gtk_revealer_new :: 
    IO (Ptr Revealer)


revealerNew ::
    (MonadIO m) =>
    m Revealer
revealerNew  = liftIO $ do
    result <- gtk_revealer_new
    checkUnexpectedReturnNULL "gtk_revealer_new" result
    result' <- (newObject Revealer) result
    return result'

-- method Revealer::get_child_revealed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_revealer_get_child_revealed" gtk_revealer_get_child_revealed :: 
    Ptr Revealer ->                         -- _obj : TInterface "Gtk" "Revealer"
    IO CInt


revealerGetChildRevealed ::
    (MonadIO m, RevealerK a) =>
    a ->                                    -- _obj
    m Bool
revealerGetChildRevealed _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_revealer_get_child_revealed _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Revealer::get_reveal_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_revealer_get_reveal_child" gtk_revealer_get_reveal_child :: 
    Ptr Revealer ->                         -- _obj : TInterface "Gtk" "Revealer"
    IO CInt


revealerGetRevealChild ::
    (MonadIO m, RevealerK a) =>
    a ->                                    -- _obj
    m Bool
revealerGetRevealChild _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_revealer_get_reveal_child _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Revealer::get_transition_duration
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_revealer_get_transition_duration" gtk_revealer_get_transition_duration :: 
    Ptr Revealer ->                         -- _obj : TInterface "Gtk" "Revealer"
    IO Word32


revealerGetTransitionDuration ::
    (MonadIO m, RevealerK a) =>
    a ->                                    -- _obj
    m Word32
revealerGetTransitionDuration _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_revealer_get_transition_duration _obj'
    touchManagedPtr _obj
    return result

-- method Revealer::get_transition_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RevealerTransitionType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_revealer_get_transition_type" gtk_revealer_get_transition_type :: 
    Ptr Revealer ->                         -- _obj : TInterface "Gtk" "Revealer"
    IO CUInt


revealerGetTransitionType ::
    (MonadIO m, RevealerK a) =>
    a ->                                    -- _obj
    m RevealerTransitionType
revealerGetTransitionType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_revealer_get_transition_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Revealer::set_reveal_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reveal_child", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reveal_child", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_revealer_set_reveal_child" gtk_revealer_set_reveal_child :: 
    Ptr Revealer ->                         -- _obj : TInterface "Gtk" "Revealer"
    CInt ->                                 -- reveal_child : TBasicType TBoolean
    IO ()


revealerSetRevealChild ::
    (MonadIO m, RevealerK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- reveal_child
    m ()
revealerSetRevealChild _obj reveal_child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let reveal_child' = (fromIntegral . fromEnum) reveal_child
    gtk_revealer_set_reveal_child _obj' reveal_child'
    touchManagedPtr _obj
    return ()

-- method Revealer::set_transition_duration
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "duration", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "duration", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_revealer_set_transition_duration" gtk_revealer_set_transition_duration :: 
    Ptr Revealer ->                         -- _obj : TInterface "Gtk" "Revealer"
    Word32 ->                               -- duration : TBasicType TUInt32
    IO ()


revealerSetTransitionDuration ::
    (MonadIO m, RevealerK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- duration
    m ()
revealerSetTransitionDuration _obj duration = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_revealer_set_transition_duration _obj' duration
    touchManagedPtr _obj
    return ()

-- method Revealer::set_transition_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "transition", argType = TInterface "Gtk" "RevealerTransitionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Revealer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "transition", argType = TInterface "Gtk" "RevealerTransitionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_revealer_set_transition_type" gtk_revealer_set_transition_type :: 
    Ptr Revealer ->                         -- _obj : TInterface "Gtk" "Revealer"
    CUInt ->                                -- transition : TInterface "Gtk" "RevealerTransitionType"
    IO ()


revealerSetTransitionType ::
    (MonadIO m, RevealerK a) =>
    a ->                                    -- _obj
    RevealerTransitionType ->               -- transition
    m ()
revealerSetTransitionType _obj transition = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let transition' = (fromIntegral . fromEnum) transition
    gtk_revealer_set_transition_type _obj' transition'
    touchManagedPtr _obj
    return ()

-- Enum RevealerTransitionType

data RevealerTransitionType = 
      RevealerTransitionTypeNone
    | RevealerTransitionTypeCrossfade
    | RevealerTransitionTypeSlideRight
    | RevealerTransitionTypeSlideLeft
    | RevealerTransitionTypeSlideUp
    | RevealerTransitionTypeSlideDown
    | AnotherRevealerTransitionType Int
    deriving (Show, Eq)

instance Enum RevealerTransitionType where
    fromEnum RevealerTransitionTypeNone = 0
    fromEnum RevealerTransitionTypeCrossfade = 1
    fromEnum RevealerTransitionTypeSlideRight = 2
    fromEnum RevealerTransitionTypeSlideLeft = 3
    fromEnum RevealerTransitionTypeSlideUp = 4
    fromEnum RevealerTransitionTypeSlideDown = 5
    fromEnum (AnotherRevealerTransitionType k) = k

    toEnum 0 = RevealerTransitionTypeNone
    toEnum 1 = RevealerTransitionTypeCrossfade
    toEnum 2 = RevealerTransitionTypeSlideRight
    toEnum 3 = RevealerTransitionTypeSlideLeft
    toEnum 4 = RevealerTransitionTypeSlideUp
    toEnum 5 = RevealerTransitionTypeSlideDown
    toEnum k = AnotherRevealerTransitionType k

foreign import ccall "gtk_revealer_transition_type_get_type" c_gtk_revealer_transition_type_get_type :: 
    IO GType

instance BoxedEnum RevealerTransitionType where
    boxedEnumType _ = c_gtk_revealer_transition_type_get_type

-- object Scale 
newtype Scale = Scale (ForeignPtr Scale)
noScale :: Maybe Scale
noScale = Nothing

foreign import ccall "gtk_scale_get_type"
    c_gtk_scale_get_type :: IO GType

type instance ParentTypes Scale = '[Range, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject Scale where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_scale_get_type
    

class GObject o => ScaleK o
instance (GObject o, IsDescendantOf Scale o) => ScaleK o

toScale :: ScaleK o => o -> IO Scale
toScale = unsafeCastTo Scale

-- method Scale::new
-- method type : Constructor
-- Args : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Scale"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_new" gtk_scale_new :: 
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO (Ptr Scale)


scaleNew ::
    (MonadIO m, AdjustmentK a) =>
    Orientation ->                          -- orientation
    Maybe (a) ->                            -- adjustment
    m Scale
scaleNew orientation adjustment = liftIO $ do
    let orientation' = (fromIntegral . fromEnum) orientation
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    result <- gtk_scale_new orientation' maybeAdjustment
    checkUnexpectedReturnNULL "gtk_scale_new" result
    result' <- (newObject Scale) result
    whenJust adjustment touchManagedPtr
    return result'

-- method Scale::new_with_range
-- method type : Constructor
-- Args : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Scale"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_new_with_range" gtk_scale_new_with_range :: 
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    CDouble ->                              -- min : TBasicType TDouble
    CDouble ->                              -- max : TBasicType TDouble
    CDouble ->                              -- step : TBasicType TDouble
    IO (Ptr Scale)


scaleNewWithRange ::
    (MonadIO m) =>
    Orientation ->                          -- orientation
    Double ->                               -- min
    Double ->                               -- max
    Double ->                               -- step
    m Scale
scaleNewWithRange orientation min max step = liftIO $ do
    let orientation' = (fromIntegral . fromEnum) orientation
    let min' = realToFrac min
    let max' = realToFrac max
    let step' = realToFrac step
    result <- gtk_scale_new_with_range orientation' min' max' step'
    checkUnexpectedReturnNULL "gtk_scale_new_with_range" result
    result' <- (newObject Scale) result
    return result'

-- method Scale::add_mark
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_add_mark" gtk_scale_add_mark :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    CDouble ->                              -- value : TBasicType TDouble
    CUInt ->                                -- position : TInterface "Gtk" "PositionType"
    CString ->                              -- markup : TBasicType TUTF8
    IO ()


scaleAddMark ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    Double ->                               -- value
    PositionType ->                         -- position
    Maybe (T.Text) ->                       -- markup
    m ()
scaleAddMark _obj value position markup = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = realToFrac value
    let position' = (fromIntegral . fromEnum) position
    maybeMarkup <- case markup of
        Nothing -> return nullPtr
        Just jMarkup -> do
            jMarkup' <- textToCString jMarkup
            return jMarkup'
    gtk_scale_add_mark _obj' value' position' maybeMarkup
    touchManagedPtr _obj
    freeMem maybeMarkup
    return ()

-- method Scale::clear_marks
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_clear_marks" gtk_scale_clear_marks :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    IO ()


scaleClearMarks ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    m ()
scaleClearMarks _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_scale_clear_marks _obj'
    touchManagedPtr _obj
    return ()

-- method Scale::get_digits
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_get_digits" gtk_scale_get_digits :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    IO Int32


scaleGetDigits ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    m Int32
scaleGetDigits _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scale_get_digits _obj'
    touchManagedPtr _obj
    return result

-- method Scale::get_draw_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_get_draw_value" gtk_scale_get_draw_value :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    IO CInt


scaleGetDrawValue ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    m Bool
scaleGetDrawValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scale_get_draw_value _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Scale::get_has_origin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_get_has_origin" gtk_scale_get_has_origin :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    IO CInt


scaleGetHasOrigin ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    m Bool
scaleGetHasOrigin _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scale_get_has_origin _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Scale::get_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Layout"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_get_layout" gtk_scale_get_layout :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    IO (Ptr Pango.Layout)


scaleGetLayout ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    m Pango.Layout
scaleGetLayout _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scale_get_layout _obj'
    checkUnexpectedReturnNULL "gtk_scale_get_layout" result
    result' <- (newObject Pango.Layout) result
    touchManagedPtr _obj
    return result'

-- method Scale::get_layout_offsets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_get_layout_offsets" gtk_scale_get_layout_offsets :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO ()


scaleGetLayoutOffsets ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
scaleGetLayoutOffsets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    x <- allocMem :: IO (Ptr Int32)
    y <- allocMem :: IO (Ptr Int32)
    gtk_scale_get_layout_offsets _obj' x y
    x' <- peek x
    y' <- peek y
    touchManagedPtr _obj
    freeMem x
    freeMem y
    return (x', y')

-- method Scale::get_value_pos
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PositionType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_get_value_pos" gtk_scale_get_value_pos :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    IO CUInt


scaleGetValuePos ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    m PositionType
scaleGetValuePos _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scale_get_value_pos _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Scale::set_digits
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "digits", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "digits", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_set_digits" gtk_scale_set_digits :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    Int32 ->                                -- digits : TBasicType TInt32
    IO ()


scaleSetDigits ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- digits
    m ()
scaleSetDigits _obj digits = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_scale_set_digits _obj' digits
    touchManagedPtr _obj
    return ()

-- method Scale::set_draw_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_set_draw_value" gtk_scale_set_draw_value :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    CInt ->                                 -- draw_value : TBasicType TBoolean
    IO ()


scaleSetDrawValue ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- draw_value
    m ()
scaleSetDrawValue _obj draw_value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let draw_value' = (fromIntegral . fromEnum) draw_value
    gtk_scale_set_draw_value _obj' draw_value'
    touchManagedPtr _obj
    return ()

-- method Scale::set_has_origin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_origin", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_origin", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_set_has_origin" gtk_scale_set_has_origin :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    CInt ->                                 -- has_origin : TBasicType TBoolean
    IO ()


scaleSetHasOrigin ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_origin
    m ()
scaleSetHasOrigin _obj has_origin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_origin' = (fromIntegral . fromEnum) has_origin
    gtk_scale_set_has_origin _obj' has_origin'
    touchManagedPtr _obj
    return ()

-- method Scale::set_value_pos
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scale", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_set_value_pos" gtk_scale_set_value_pos :: 
    Ptr Scale ->                            -- _obj : TInterface "Gtk" "Scale"
    CUInt ->                                -- pos : TInterface "Gtk" "PositionType"
    IO ()


scaleSetValuePos ::
    (MonadIO m, ScaleK a) =>
    a ->                                    -- _obj
    PositionType ->                         -- pos
    m ()
scaleSetValuePos _obj pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let pos' = (fromIntegral . fromEnum) pos
    gtk_scale_set_value_pos _obj' pos'
    touchManagedPtr _obj
    return ()

-- signal Scale::format-value
type ScaleFormatValueCallback =
    Double ->
    IO T.Text

noScaleFormatValueCallback :: Maybe ScaleFormatValueCallback
noScaleFormatValueCallback = Nothing

type ScaleFormatValueCallbackC =
    Ptr () ->                               -- object
    CDouble ->
    Ptr () ->                               -- user_data
    IO CString

foreign import ccall "wrapper"
    mkScaleFormatValueCallback :: ScaleFormatValueCallbackC -> IO (FunPtr ScaleFormatValueCallbackC)

scaleFormatValueClosure :: ScaleFormatValueCallback -> IO Closure
scaleFormatValueClosure cb = newCClosure =<< mkScaleFormatValueCallback wrapped
    where wrapped = scaleFormatValueCallbackWrapper cb

scaleFormatValueCallbackWrapper ::
    ScaleFormatValueCallback ->
    Ptr () ->
    CDouble ->
    Ptr () ->
    IO CString
scaleFormatValueCallbackWrapper _cb _ value _ = do
    let value' = realToFrac value
    result <- _cb  value'
    result' <- textToCString result
    return result'

onScaleFormatValue :: (GObject a, MonadIO m) => a -> ScaleFormatValueCallback -> m SignalHandlerId
onScaleFormatValue obj cb = liftIO $ connectScaleFormatValue obj cb SignalConnectBefore
afterScaleFormatValue :: (GObject a, MonadIO m) => a -> ScaleFormatValueCallback -> m SignalHandlerId
afterScaleFormatValue obj cb = connectScaleFormatValue obj cb SignalConnectAfter

connectScaleFormatValue :: (GObject a, MonadIO m) =>
                           a -> ScaleFormatValueCallback -> SignalConnectMode -> m SignalHandlerId
connectScaleFormatValue obj cb after = liftIO $ do
    cb' <- mkScaleFormatValueCallback (scaleFormatValueCallbackWrapper cb)
    connectSignalFunPtr obj "format-value" cb' after

-- object ScaleAccessible 
newtype ScaleAccessible = ScaleAccessible (ForeignPtr ScaleAccessible)
noScaleAccessible :: Maybe ScaleAccessible
noScaleAccessible = Nothing

foreign import ccall "gtk_scale_accessible_get_type"
    c_gtk_scale_accessible_get_type :: IO GType

type instance ParentTypes ScaleAccessible = '[RangeAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Value]

instance GObject ScaleAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_scale_accessible_get_type
    

class GObject o => ScaleAccessibleK o
instance (GObject o, IsDescendantOf ScaleAccessible o) => ScaleAccessibleK o

toScaleAccessible :: ScaleAccessibleK o => o -> IO ScaleAccessible
toScaleAccessible = unsafeCastTo ScaleAccessible

-- object ScaleButton 
newtype ScaleButton = ScaleButton (ForeignPtr ScaleButton)
noScaleButton :: Maybe ScaleButton
noScaleButton = Nothing

foreign import ccall "gtk_scale_button_get_type"
    c_gtk_scale_button_get_type :: IO GType

type instance ParentTypes ScaleButton = '[Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable, Orientable]

instance GObject ScaleButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_scale_button_get_type
    

class GObject o => ScaleButtonK o
instance (GObject o, IsDescendantOf ScaleButton o) => ScaleButtonK o

toScaleButton :: ScaleButtonK o => o -> IO ScaleButton
toScaleButton = unsafeCastTo ScaleButton

-- method ScaleButton::new
-- method type : Constructor
-- Args : [Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icons", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icons", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ScaleButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_button_new" gtk_scale_button_new :: 
    Int32 ->                                -- size : TBasicType TInt32
    CDouble ->                              -- min : TBasicType TDouble
    CDouble ->                              -- max : TBasicType TDouble
    CDouble ->                              -- step : TBasicType TDouble
    Ptr CString ->                          -- icons : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO (Ptr ScaleButton)


scaleButtonNew ::
    (MonadIO m) =>
    Int32 ->                                -- size
    Double ->                               -- min
    Double ->                               -- max
    Double ->                               -- step
    Maybe ([T.Text]) ->                     -- icons
    m ScaleButton
scaleButtonNew size min max step icons = liftIO $ do
    let min' = realToFrac min
    let max' = realToFrac max
    let step' = realToFrac step
    maybeIcons <- case icons of
        Nothing -> return nullPtr
        Just jIcons -> do
            jIcons' <- packZeroTerminatedUTF8CArray jIcons
            return jIcons'
    result <- gtk_scale_button_new size min' max' step' maybeIcons
    checkUnexpectedReturnNULL "gtk_scale_button_new" result
    result' <- (newObject ScaleButton) result
    mapZeroTerminatedCArray freeMem maybeIcons
    freeMem maybeIcons
    return result'

-- method ScaleButton::get_adjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_button_get_adjustment" gtk_scale_button_get_adjustment :: 
    Ptr ScaleButton ->                      -- _obj : TInterface "Gtk" "ScaleButton"
    IO (Ptr Adjustment)


scaleButtonGetAdjustment ::
    (MonadIO m, ScaleButtonK a) =>
    a ->                                    -- _obj
    m Adjustment
scaleButtonGetAdjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scale_button_get_adjustment _obj'
    checkUnexpectedReturnNULL "gtk_scale_button_get_adjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method ScaleButton::get_minus_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Button"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_button_get_minus_button" gtk_scale_button_get_minus_button :: 
    Ptr ScaleButton ->                      -- _obj : TInterface "Gtk" "ScaleButton"
    IO (Ptr Button)


scaleButtonGetMinusButton ::
    (MonadIO m, ScaleButtonK a) =>
    a ->                                    -- _obj
    m Button
scaleButtonGetMinusButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scale_button_get_minus_button _obj'
    checkUnexpectedReturnNULL "gtk_scale_button_get_minus_button" result
    result' <- (newObject Button) result
    touchManagedPtr _obj
    return result'

-- method ScaleButton::get_plus_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Button"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_button_get_plus_button" gtk_scale_button_get_plus_button :: 
    Ptr ScaleButton ->                      -- _obj : TInterface "Gtk" "ScaleButton"
    IO (Ptr Button)


scaleButtonGetPlusButton ::
    (MonadIO m, ScaleButtonK a) =>
    a ->                                    -- _obj
    m Button
scaleButtonGetPlusButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scale_button_get_plus_button _obj'
    checkUnexpectedReturnNULL "gtk_scale_button_get_plus_button" result
    result' <- (newObject Button) result
    touchManagedPtr _obj
    return result'

-- method ScaleButton::get_popup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_button_get_popup" gtk_scale_button_get_popup :: 
    Ptr ScaleButton ->                      -- _obj : TInterface "Gtk" "ScaleButton"
    IO (Ptr Widget)


scaleButtonGetPopup ::
    (MonadIO m, ScaleButtonK a) =>
    a ->                                    -- _obj
    m Widget
scaleButtonGetPopup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scale_button_get_popup _obj'
    checkUnexpectedReturnNULL "gtk_scale_button_get_popup" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method ScaleButton::get_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_button_get_value" gtk_scale_button_get_value :: 
    Ptr ScaleButton ->                      -- _obj : TInterface "Gtk" "ScaleButton"
    IO CDouble


scaleButtonGetValue ::
    (MonadIO m, ScaleButtonK a) =>
    a ->                                    -- _obj
    m Double
scaleButtonGetValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scale_button_get_value _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method ScaleButton::set_adjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_button_set_adjustment" gtk_scale_button_set_adjustment :: 
    Ptr ScaleButton ->                      -- _obj : TInterface "Gtk" "ScaleButton"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()


scaleButtonSetAdjustment ::
    (MonadIO m, ScaleButtonK a, AdjustmentK b) =>
    a ->                                    -- _obj
    b ->                                    -- adjustment
    m ()
scaleButtonSetAdjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let adjustment' = unsafeManagedPtrCastPtr adjustment
    gtk_scale_button_set_adjustment _obj' adjustment'
    touchManagedPtr _obj
    touchManagedPtr adjustment
    return ()

-- method ScaleButton::set_icons
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icons", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icons", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_button_set_icons" gtk_scale_button_set_icons :: 
    Ptr ScaleButton ->                      -- _obj : TInterface "Gtk" "ScaleButton"
    Ptr CString ->                          -- icons : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()


scaleButtonSetIcons ::
    (MonadIO m, ScaleButtonK a) =>
    a ->                                    -- _obj
    [T.Text] ->                             -- icons
    m ()
scaleButtonSetIcons _obj icons = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icons' <- packZeroTerminatedUTF8CArray icons
    gtk_scale_button_set_icons _obj' icons'
    touchManagedPtr _obj
    mapZeroTerminatedCArray freeMem icons'
    freeMem icons'
    return ()

-- method ScaleButton::set_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScaleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scale_button_set_value" gtk_scale_button_set_value :: 
    Ptr ScaleButton ->                      -- _obj : TInterface "Gtk" "ScaleButton"
    CDouble ->                              -- value : TBasicType TDouble
    IO ()


scaleButtonSetValue ::
    (MonadIO m, ScaleButtonK a) =>
    a ->                                    -- _obj
    Double ->                               -- value
    m ()
scaleButtonSetValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = realToFrac value
    gtk_scale_button_set_value _obj' value'
    touchManagedPtr _obj
    return ()

-- signal ScaleButton::popdown
type ScaleButtonPopdownCallback =
    IO ()

noScaleButtonPopdownCallback :: Maybe ScaleButtonPopdownCallback
noScaleButtonPopdownCallback = Nothing

type ScaleButtonPopdownCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkScaleButtonPopdownCallback :: ScaleButtonPopdownCallbackC -> IO (FunPtr ScaleButtonPopdownCallbackC)

scaleButtonPopdownClosure :: ScaleButtonPopdownCallback -> IO Closure
scaleButtonPopdownClosure cb = newCClosure =<< mkScaleButtonPopdownCallback wrapped
    where wrapped = scaleButtonPopdownCallbackWrapper cb

scaleButtonPopdownCallbackWrapper ::
    ScaleButtonPopdownCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
scaleButtonPopdownCallbackWrapper _cb _ _ = do
    _cb 

onScaleButtonPopdown :: (GObject a, MonadIO m) => a -> ScaleButtonPopdownCallback -> m SignalHandlerId
onScaleButtonPopdown obj cb = liftIO $ connectScaleButtonPopdown obj cb SignalConnectBefore
afterScaleButtonPopdown :: (GObject a, MonadIO m) => a -> ScaleButtonPopdownCallback -> m SignalHandlerId
afterScaleButtonPopdown obj cb = connectScaleButtonPopdown obj cb SignalConnectAfter

connectScaleButtonPopdown :: (GObject a, MonadIO m) =>
                             a -> ScaleButtonPopdownCallback -> SignalConnectMode -> m SignalHandlerId
connectScaleButtonPopdown obj cb after = liftIO $ do
    cb' <- mkScaleButtonPopdownCallback (scaleButtonPopdownCallbackWrapper cb)
    connectSignalFunPtr obj "popdown" cb' after

-- signal ScaleButton::popup
type ScaleButtonPopupCallback =
    IO ()

noScaleButtonPopupCallback :: Maybe ScaleButtonPopupCallback
noScaleButtonPopupCallback = Nothing

type ScaleButtonPopupCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkScaleButtonPopupCallback :: ScaleButtonPopupCallbackC -> IO (FunPtr ScaleButtonPopupCallbackC)

scaleButtonPopupClosure :: ScaleButtonPopupCallback -> IO Closure
scaleButtonPopupClosure cb = newCClosure =<< mkScaleButtonPopupCallback wrapped
    where wrapped = scaleButtonPopupCallbackWrapper cb

scaleButtonPopupCallbackWrapper ::
    ScaleButtonPopupCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
scaleButtonPopupCallbackWrapper _cb _ _ = do
    _cb 

onScaleButtonPopup :: (GObject a, MonadIO m) => a -> ScaleButtonPopupCallback -> m SignalHandlerId
onScaleButtonPopup obj cb = liftIO $ connectScaleButtonPopup obj cb SignalConnectBefore
afterScaleButtonPopup :: (GObject a, MonadIO m) => a -> ScaleButtonPopupCallback -> m SignalHandlerId
afterScaleButtonPopup obj cb = connectScaleButtonPopup obj cb SignalConnectAfter

connectScaleButtonPopup :: (GObject a, MonadIO m) =>
                           a -> ScaleButtonPopupCallback -> SignalConnectMode -> m SignalHandlerId
connectScaleButtonPopup obj cb after = liftIO $ do
    cb' <- mkScaleButtonPopupCallback (scaleButtonPopupCallbackWrapper cb)
    connectSignalFunPtr obj "popup" cb' after

-- signal ScaleButton::value-changed
type ScaleButtonValueChangedCallback =
    Double ->
    IO ()

noScaleButtonValueChangedCallback :: Maybe ScaleButtonValueChangedCallback
noScaleButtonValueChangedCallback = Nothing

type ScaleButtonValueChangedCallbackC =
    Ptr () ->                               -- object
    CDouble ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkScaleButtonValueChangedCallback :: ScaleButtonValueChangedCallbackC -> IO (FunPtr ScaleButtonValueChangedCallbackC)

scaleButtonValueChangedClosure :: ScaleButtonValueChangedCallback -> IO Closure
scaleButtonValueChangedClosure cb = newCClosure =<< mkScaleButtonValueChangedCallback wrapped
    where wrapped = scaleButtonValueChangedCallbackWrapper cb

scaleButtonValueChangedCallbackWrapper ::
    ScaleButtonValueChangedCallback ->
    Ptr () ->
    CDouble ->
    Ptr () ->
    IO ()
scaleButtonValueChangedCallbackWrapper _cb _ value _ = do
    let value' = realToFrac value
    _cb  value'

onScaleButtonValueChanged :: (GObject a, MonadIO m) => a -> ScaleButtonValueChangedCallback -> m SignalHandlerId
onScaleButtonValueChanged obj cb = liftIO $ connectScaleButtonValueChanged obj cb SignalConnectBefore
afterScaleButtonValueChanged :: (GObject a, MonadIO m) => a -> ScaleButtonValueChangedCallback -> m SignalHandlerId
afterScaleButtonValueChanged obj cb = connectScaleButtonValueChanged obj cb SignalConnectAfter

connectScaleButtonValueChanged :: (GObject a, MonadIO m) =>
                                  a -> ScaleButtonValueChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectScaleButtonValueChanged obj cb after = liftIO $ do
    cb' <- mkScaleButtonValueChangedCallback (scaleButtonValueChangedCallbackWrapper cb)
    connectSignalFunPtr obj "value-changed" cb' after

-- object ScaleButtonAccessible 
newtype ScaleButtonAccessible = ScaleButtonAccessible (ForeignPtr ScaleButtonAccessible)
noScaleButtonAccessible :: Maybe ScaleButtonAccessible
noScaleButtonAccessible = Nothing

foreign import ccall "gtk_scale_button_accessible_get_type"
    c_gtk_scale_button_accessible_get_type :: IO GType

type instance ParentTypes ScaleButtonAccessible = '[ButtonAccessible, ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Image, Atk.Value]

instance GObject ScaleButtonAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_scale_button_accessible_get_type
    

class GObject o => ScaleButtonAccessibleK o
instance (GObject o, IsDescendantOf ScaleButtonAccessible o) => ScaleButtonAccessibleK o

toScaleButtonAccessible :: ScaleButtonAccessibleK o => o -> IO ScaleButtonAccessible
toScaleButtonAccessible = unsafeCastTo ScaleButtonAccessible

-- Enum ScrollStep

data ScrollStep = 
      ScrollStepSteps
    | ScrollStepPages
    | ScrollStepEnds
    | ScrollStepHorizontalSteps
    | ScrollStepHorizontalPages
    | ScrollStepHorizontalEnds
    | AnotherScrollStep Int
    deriving (Show, Eq)

instance Enum ScrollStep where
    fromEnum ScrollStepSteps = 0
    fromEnum ScrollStepPages = 1
    fromEnum ScrollStepEnds = 2
    fromEnum ScrollStepHorizontalSteps = 3
    fromEnum ScrollStepHorizontalPages = 4
    fromEnum ScrollStepHorizontalEnds = 5
    fromEnum (AnotherScrollStep k) = k

    toEnum 0 = ScrollStepSteps
    toEnum 1 = ScrollStepPages
    toEnum 2 = ScrollStepEnds
    toEnum 3 = ScrollStepHorizontalSteps
    toEnum 4 = ScrollStepHorizontalPages
    toEnum 5 = ScrollStepHorizontalEnds
    toEnum k = AnotherScrollStep k

foreign import ccall "gtk_scroll_step_get_type" c_gtk_scroll_step_get_type :: 
    IO GType

instance BoxedEnum ScrollStep where
    boxedEnumType _ = c_gtk_scroll_step_get_type

-- Enum ScrollType

data ScrollType = 
      ScrollTypeNone
    | ScrollTypeJump
    | ScrollTypeStepBackward
    | ScrollTypeStepForward
    | ScrollTypePageBackward
    | ScrollTypePageForward
    | ScrollTypeStepUp
    | ScrollTypeStepDown
    | ScrollTypePageUp
    | ScrollTypePageDown
    | ScrollTypeStepLeft
    | ScrollTypeStepRight
    | ScrollTypePageLeft
    | ScrollTypePageRight
    | ScrollTypeStart
    | ScrollTypeEnd
    | AnotherScrollType Int
    deriving (Show, Eq)

instance Enum ScrollType where
    fromEnum ScrollTypeNone = 0
    fromEnum ScrollTypeJump = 1
    fromEnum ScrollTypeStepBackward = 2
    fromEnum ScrollTypeStepForward = 3
    fromEnum ScrollTypePageBackward = 4
    fromEnum ScrollTypePageForward = 5
    fromEnum ScrollTypeStepUp = 6
    fromEnum ScrollTypeStepDown = 7
    fromEnum ScrollTypePageUp = 8
    fromEnum ScrollTypePageDown = 9
    fromEnum ScrollTypeStepLeft = 10
    fromEnum ScrollTypeStepRight = 11
    fromEnum ScrollTypePageLeft = 12
    fromEnum ScrollTypePageRight = 13
    fromEnum ScrollTypeStart = 14
    fromEnum ScrollTypeEnd = 15
    fromEnum (AnotherScrollType k) = k

    toEnum 0 = ScrollTypeNone
    toEnum 1 = ScrollTypeJump
    toEnum 2 = ScrollTypeStepBackward
    toEnum 3 = ScrollTypeStepForward
    toEnum 4 = ScrollTypePageBackward
    toEnum 5 = ScrollTypePageForward
    toEnum 6 = ScrollTypeStepUp
    toEnum 7 = ScrollTypeStepDown
    toEnum 8 = ScrollTypePageUp
    toEnum 9 = ScrollTypePageDown
    toEnum 10 = ScrollTypeStepLeft
    toEnum 11 = ScrollTypeStepRight
    toEnum 12 = ScrollTypePageLeft
    toEnum 13 = ScrollTypePageRight
    toEnum 14 = ScrollTypeStart
    toEnum 15 = ScrollTypeEnd
    toEnum k = AnotherScrollType k

foreign import ccall "gtk_scroll_type_get_type" c_gtk_scroll_type_get_type :: 
    IO GType

instance BoxedEnum ScrollType where
    boxedEnumType _ = c_gtk_scroll_type_get_type

-- interface Scrollable 

newtype Scrollable = Scrollable (ForeignPtr Scrollable)
noScrollable :: Maybe Scrollable
noScrollable = Nothing

foreign import ccall "gtk_scrollable_get_type"
    c_gtk_scrollable_get_type :: IO GType

type instance ParentTypes Scrollable = '[GObject.Object]

instance GObject Scrollable where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_scrollable_get_type
    

class GObject o => ScrollableK o
instance (GObject o, IsDescendantOf Scrollable o) => ScrollableK o

toScrollable :: ScrollableK o => o -> IO Scrollable
toScrollable = unsafeCastTo Scrollable

-- method Scrollable::get_border
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border", argType = TInterface "Gtk" "Border", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border", argType = TInterface "Gtk" "Border", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrollable_get_border" gtk_scrollable_get_border :: 
    Ptr Scrollable ->                       -- _obj : TInterface "Gtk" "Scrollable"
    Ptr Border ->                           -- border : TInterface "Gtk" "Border"
    IO CInt


scrollableGetBorder ::
    (MonadIO m, ScrollableK a) =>
    a ->                                    -- _obj
    Border ->                               -- border
    m Bool
scrollableGetBorder _obj border = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let border' = unsafeManagedPtrGetPtr border
    result <- gtk_scrollable_get_border _obj' border'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr border
    return result'

-- method Scrollable::get_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrollable_get_hadjustment" gtk_scrollable_get_hadjustment :: 
    Ptr Scrollable ->                       -- _obj : TInterface "Gtk" "Scrollable"
    IO (Ptr Adjustment)


scrollableGetHadjustment ::
    (MonadIO m, ScrollableK a) =>
    a ->                                    -- _obj
    m Adjustment
scrollableGetHadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrollable_get_hadjustment _obj'
    checkUnexpectedReturnNULL "gtk_scrollable_get_hadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method Scrollable::get_hscroll_policy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ScrollablePolicy"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrollable_get_hscroll_policy" gtk_scrollable_get_hscroll_policy :: 
    Ptr Scrollable ->                       -- _obj : TInterface "Gtk" "Scrollable"
    IO CUInt


scrollableGetHscrollPolicy ::
    (MonadIO m, ScrollableK a) =>
    a ->                                    -- _obj
    m ScrollablePolicy
scrollableGetHscrollPolicy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrollable_get_hscroll_policy _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Scrollable::get_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrollable_get_vadjustment" gtk_scrollable_get_vadjustment :: 
    Ptr Scrollable ->                       -- _obj : TInterface "Gtk" "Scrollable"
    IO (Ptr Adjustment)


scrollableGetVadjustment ::
    (MonadIO m, ScrollableK a) =>
    a ->                                    -- _obj
    m Adjustment
scrollableGetVadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrollable_get_vadjustment _obj'
    checkUnexpectedReturnNULL "gtk_scrollable_get_vadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method Scrollable::get_vscroll_policy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ScrollablePolicy"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrollable_get_vscroll_policy" gtk_scrollable_get_vscroll_policy :: 
    Ptr Scrollable ->                       -- _obj : TInterface "Gtk" "Scrollable"
    IO CUInt


scrollableGetVscrollPolicy ::
    (MonadIO m, ScrollableK a) =>
    a ->                                    -- _obj
    m ScrollablePolicy
scrollableGetVscrollPolicy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrollable_get_vscroll_policy _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Scrollable::set_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrollable_set_hadjustment" gtk_scrollable_set_hadjustment :: 
    Ptr Scrollable ->                       -- _obj : TInterface "Gtk" "Scrollable"
    Ptr Adjustment ->                       -- hadjustment : TInterface "Gtk" "Adjustment"
    IO ()


scrollableSetHadjustment ::
    (MonadIO m, ScrollableK a, AdjustmentK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- hadjustment
    m ()
scrollableSetHadjustment _obj hadjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeHadjustment <- case hadjustment of
        Nothing -> return nullPtr
        Just jHadjustment -> do
            let jHadjustment' = unsafeManagedPtrCastPtr jHadjustment
            return jHadjustment'
    gtk_scrollable_set_hadjustment _obj' maybeHadjustment
    touchManagedPtr _obj
    whenJust hadjustment touchManagedPtr
    return ()

-- method Scrollable::set_hscroll_policy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "policy", argType = TInterface "Gtk" "ScrollablePolicy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "policy", argType = TInterface "Gtk" "ScrollablePolicy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrollable_set_hscroll_policy" gtk_scrollable_set_hscroll_policy :: 
    Ptr Scrollable ->                       -- _obj : TInterface "Gtk" "Scrollable"
    CUInt ->                                -- policy : TInterface "Gtk" "ScrollablePolicy"
    IO ()


scrollableSetHscrollPolicy ::
    (MonadIO m, ScrollableK a) =>
    a ->                                    -- _obj
    ScrollablePolicy ->                     -- policy
    m ()
scrollableSetHscrollPolicy _obj policy = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let policy' = (fromIntegral . fromEnum) policy
    gtk_scrollable_set_hscroll_policy _obj' policy'
    touchManagedPtr _obj
    return ()

-- method Scrollable::set_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrollable_set_vadjustment" gtk_scrollable_set_vadjustment :: 
    Ptr Scrollable ->                       -- _obj : TInterface "Gtk" "Scrollable"
    Ptr Adjustment ->                       -- vadjustment : TInterface "Gtk" "Adjustment"
    IO ()


scrollableSetVadjustment ::
    (MonadIO m, ScrollableK a, AdjustmentK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- vadjustment
    m ()
scrollableSetVadjustment _obj vadjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeVadjustment <- case vadjustment of
        Nothing -> return nullPtr
        Just jVadjustment -> do
            let jVadjustment' = unsafeManagedPtrCastPtr jVadjustment
            return jVadjustment'
    gtk_scrollable_set_vadjustment _obj' maybeVadjustment
    touchManagedPtr _obj
    whenJust vadjustment touchManagedPtr
    return ()

-- method Scrollable::set_vscroll_policy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "policy", argType = TInterface "Gtk" "ScrollablePolicy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Scrollable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "policy", argType = TInterface "Gtk" "ScrollablePolicy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrollable_set_vscroll_policy" gtk_scrollable_set_vscroll_policy :: 
    Ptr Scrollable ->                       -- _obj : TInterface "Gtk" "Scrollable"
    CUInt ->                                -- policy : TInterface "Gtk" "ScrollablePolicy"
    IO ()


scrollableSetVscrollPolicy ::
    (MonadIO m, ScrollableK a) =>
    a ->                                    -- _obj
    ScrollablePolicy ->                     -- policy
    m ()
scrollableSetVscrollPolicy _obj policy = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let policy' = (fromIntegral . fromEnum) policy
    gtk_scrollable_set_vscroll_policy _obj' policy'
    touchManagedPtr _obj
    return ()

-- Enum ScrollablePolicy

data ScrollablePolicy = 
      ScrollablePolicyMinimum
    | ScrollablePolicyNatural
    | AnotherScrollablePolicy Int
    deriving (Show, Eq)

instance Enum ScrollablePolicy where
    fromEnum ScrollablePolicyMinimum = 0
    fromEnum ScrollablePolicyNatural = 1
    fromEnum (AnotherScrollablePolicy k) = k

    toEnum 0 = ScrollablePolicyMinimum
    toEnum 1 = ScrollablePolicyNatural
    toEnum k = AnotherScrollablePolicy k

foreign import ccall "gtk_scrollable_policy_get_type" c_gtk_scrollable_policy_get_type :: 
    IO GType

instance BoxedEnum ScrollablePolicy where
    boxedEnumType _ = c_gtk_scrollable_policy_get_type

-- object Scrollbar 
newtype Scrollbar = Scrollbar (ForeignPtr Scrollbar)
noScrollbar :: Maybe Scrollbar
noScrollbar = Nothing

foreign import ccall "gtk_scrollbar_get_type"
    c_gtk_scrollbar_get_type :: IO GType

type instance ParentTypes Scrollbar = '[Range, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject Scrollbar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_scrollbar_get_type
    

class GObject o => ScrollbarK o
instance (GObject o, IsDescendantOf Scrollbar o) => ScrollbarK o

toScrollbar :: ScrollbarK o => o -> IO Scrollbar
toScrollbar = unsafeCastTo Scrollbar

-- method Scrollbar::new
-- method type : Constructor
-- Args : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Scrollbar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrollbar_new" gtk_scrollbar_new :: 
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO (Ptr Scrollbar)


scrollbarNew ::
    (MonadIO m, AdjustmentK a) =>
    Orientation ->                          -- orientation
    Maybe (a) ->                            -- adjustment
    m Scrollbar
scrollbarNew orientation adjustment = liftIO $ do
    let orientation' = (fromIntegral . fromEnum) orientation
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    result <- gtk_scrollbar_new orientation' maybeAdjustment
    checkUnexpectedReturnNULL "gtk_scrollbar_new" result
    result' <- (newObject Scrollbar) result
    whenJust adjustment touchManagedPtr
    return result'

-- object ScrolledWindow 
newtype ScrolledWindow = ScrolledWindow (ForeignPtr ScrolledWindow)
noScrolledWindow :: Maybe ScrolledWindow
noScrolledWindow = Nothing

foreign import ccall "gtk_scrolled_window_get_type"
    c_gtk_scrolled_window_get_type :: IO GType

type instance ParentTypes ScrolledWindow = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject ScrolledWindow where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_scrolled_window_get_type
    

class GObject o => ScrolledWindowK o
instance (GObject o, IsDescendantOf ScrolledWindow o) => ScrolledWindowK o

toScrolledWindow :: ScrolledWindowK o => o -> IO ScrolledWindow
toScrolledWindow = unsafeCastTo ScrolledWindow

-- method ScrolledWindow::new
-- method type : Constructor
-- Args : [Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ScrolledWindow"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_new" gtk_scrolled_window_new :: 
    Ptr Adjustment ->                       -- hadjustment : TInterface "Gtk" "Adjustment"
    Ptr Adjustment ->                       -- vadjustment : TInterface "Gtk" "Adjustment"
    IO (Ptr ScrolledWindow)


scrolledWindowNew ::
    (MonadIO m, AdjustmentK a, AdjustmentK b) =>
    Maybe (a) ->                            -- hadjustment
    Maybe (b) ->                            -- vadjustment
    m ScrolledWindow
scrolledWindowNew hadjustment vadjustment = liftIO $ do
    maybeHadjustment <- case hadjustment of
        Nothing -> return nullPtr
        Just jHadjustment -> do
            let jHadjustment' = unsafeManagedPtrCastPtr jHadjustment
            return jHadjustment'
    maybeVadjustment <- case vadjustment of
        Nothing -> return nullPtr
        Just jVadjustment -> do
            let jVadjustment' = unsafeManagedPtrCastPtr jVadjustment
            return jVadjustment'
    result <- gtk_scrolled_window_new maybeHadjustment maybeVadjustment
    checkUnexpectedReturnNULL "gtk_scrolled_window_new" result
    result' <- (newObject ScrolledWindow) result
    whenJust hadjustment touchManagedPtr
    whenJust vadjustment touchManagedPtr
    return result'

-- method ScrolledWindow::add_with_viewport
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_add_with_viewport" gtk_scrolled_window_add_with_viewport :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()

{-# DEPRECATED scrolledWindowAddWithViewport ["(Since version 3.8)","gtk_container_add() will automatically add","a #GtkViewport if the child doesn\8217t implement #GtkScrollable."]#-}
scrolledWindowAddWithViewport ::
    (MonadIO m, ScrolledWindowK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
scrolledWindowAddWithViewport _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_scrolled_window_add_with_viewport _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method ScrolledWindow::get_capture_button_press
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_capture_button_press" gtk_scrolled_window_get_capture_button_press :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO CInt


scrolledWindowGetCaptureButtonPress ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m Bool
scrolledWindowGetCaptureButtonPress _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrolled_window_get_capture_button_press _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ScrolledWindow::get_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_hadjustment" gtk_scrolled_window_get_hadjustment :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO (Ptr Adjustment)


scrolledWindowGetHadjustment ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m Adjustment
scrolledWindowGetHadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrolled_window_get_hadjustment _obj'
    checkUnexpectedReturnNULL "gtk_scrolled_window_get_hadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method ScrolledWindow::get_hscrollbar
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_hscrollbar" gtk_scrolled_window_get_hscrollbar :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO (Ptr Widget)


scrolledWindowGetHscrollbar ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m Widget
scrolledWindowGetHscrollbar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrolled_window_get_hscrollbar _obj'
    checkUnexpectedReturnNULL "gtk_scrolled_window_get_hscrollbar" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method ScrolledWindow::get_kinetic_scrolling
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_kinetic_scrolling" gtk_scrolled_window_get_kinetic_scrolling :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO CInt


scrolledWindowGetKineticScrolling ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m Bool
scrolledWindowGetKineticScrolling _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrolled_window_get_kinetic_scrolling _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ScrolledWindow::get_min_content_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_min_content_height" gtk_scrolled_window_get_min_content_height :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO Int32


scrolledWindowGetMinContentHeight ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m Int32
scrolledWindowGetMinContentHeight _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrolled_window_get_min_content_height _obj'
    touchManagedPtr _obj
    return result

-- method ScrolledWindow::get_min_content_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_min_content_width" gtk_scrolled_window_get_min_content_width :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO Int32


scrolledWindowGetMinContentWidth ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m Int32
scrolledWindowGetMinContentWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrolled_window_get_min_content_width _obj'
    touchManagedPtr _obj
    return result

-- method ScrolledWindow::get_overlay_scrolling
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_overlay_scrolling" gtk_scrolled_window_get_overlay_scrolling :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO CInt


scrolledWindowGetOverlayScrolling ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m Bool
scrolledWindowGetOverlayScrolling _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrolled_window_get_overlay_scrolling _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ScrolledWindow::get_placement
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CornerType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_placement" gtk_scrolled_window_get_placement :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO CUInt


scrolledWindowGetPlacement ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m CornerType
scrolledWindowGetPlacement _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrolled_window_get_placement _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ScrolledWindow::get_policy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hscrollbar_policy", argType = TInterface "Gtk" "PolicyType", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "vscrollbar_policy", argType = TInterface "Gtk" "PolicyType", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_policy" gtk_scrolled_window_get_policy :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    Ptr CUInt ->                            -- hscrollbar_policy : TInterface "Gtk" "PolicyType"
    Ptr CUInt ->                            -- vscrollbar_policy : TInterface "Gtk" "PolicyType"
    IO ()


scrolledWindowGetPolicy ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m (PolicyType,PolicyType)
scrolledWindowGetPolicy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    hscrollbar_policy <- allocMem :: IO (Ptr CUInt)
    vscrollbar_policy <- allocMem :: IO (Ptr CUInt)
    gtk_scrolled_window_get_policy _obj' hscrollbar_policy vscrollbar_policy
    hscrollbar_policy' <- peek hscrollbar_policy
    let hscrollbar_policy'' = (toEnum . fromIntegral) hscrollbar_policy'
    vscrollbar_policy' <- peek vscrollbar_policy
    let vscrollbar_policy'' = (toEnum . fromIntegral) vscrollbar_policy'
    touchManagedPtr _obj
    freeMem hscrollbar_policy
    freeMem vscrollbar_policy
    return (hscrollbar_policy'', vscrollbar_policy'')

-- method ScrolledWindow::get_shadow_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ShadowType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_shadow_type" gtk_scrolled_window_get_shadow_type :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO CUInt


scrolledWindowGetShadowType ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m ShadowType
scrolledWindowGetShadowType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrolled_window_get_shadow_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ScrolledWindow::get_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_vadjustment" gtk_scrolled_window_get_vadjustment :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO (Ptr Adjustment)


scrolledWindowGetVadjustment ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m Adjustment
scrolledWindowGetVadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrolled_window_get_vadjustment _obj'
    checkUnexpectedReturnNULL "gtk_scrolled_window_get_vadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method ScrolledWindow::get_vscrollbar
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_get_vscrollbar" gtk_scrolled_window_get_vscrollbar :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO (Ptr Widget)


scrolledWindowGetVscrollbar ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m Widget
scrolledWindowGetVscrollbar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_scrolled_window_get_vscrollbar _obj'
    checkUnexpectedReturnNULL "gtk_scrolled_window_get_vscrollbar" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method ScrolledWindow::set_capture_button_press
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "capture_button_press", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "capture_button_press", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_set_capture_button_press" gtk_scrolled_window_set_capture_button_press :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    CInt ->                                 -- capture_button_press : TBasicType TBoolean
    IO ()


scrolledWindowSetCaptureButtonPress ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- capture_button_press
    m ()
scrolledWindowSetCaptureButtonPress _obj capture_button_press = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let capture_button_press' = (fromIntegral . fromEnum) capture_button_press
    gtk_scrolled_window_set_capture_button_press _obj' capture_button_press'
    touchManagedPtr _obj
    return ()

-- method ScrolledWindow::set_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_set_hadjustment" gtk_scrolled_window_set_hadjustment :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    Ptr Adjustment ->                       -- hadjustment : TInterface "Gtk" "Adjustment"
    IO ()


scrolledWindowSetHadjustment ::
    (MonadIO m, ScrolledWindowK a, AdjustmentK b) =>
    a ->                                    -- _obj
    b ->                                    -- hadjustment
    m ()
scrolledWindowSetHadjustment _obj hadjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let hadjustment' = unsafeManagedPtrCastPtr hadjustment
    gtk_scrolled_window_set_hadjustment _obj' hadjustment'
    touchManagedPtr _obj
    touchManagedPtr hadjustment
    return ()

-- method ScrolledWindow::set_kinetic_scrolling
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "kinetic_scrolling", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "kinetic_scrolling", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_set_kinetic_scrolling" gtk_scrolled_window_set_kinetic_scrolling :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    CInt ->                                 -- kinetic_scrolling : TBasicType TBoolean
    IO ()


scrolledWindowSetKineticScrolling ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- kinetic_scrolling
    m ()
scrolledWindowSetKineticScrolling _obj kinetic_scrolling = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let kinetic_scrolling' = (fromIntegral . fromEnum) kinetic_scrolling
    gtk_scrolled_window_set_kinetic_scrolling _obj' kinetic_scrolling'
    touchManagedPtr _obj
    return ()

-- method ScrolledWindow::set_min_content_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_set_min_content_height" gtk_scrolled_window_set_min_content_height :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


scrolledWindowSetMinContentHeight ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- height
    m ()
scrolledWindowSetMinContentHeight _obj height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_scrolled_window_set_min_content_height _obj' height
    touchManagedPtr _obj
    return ()

-- method ScrolledWindow::set_min_content_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_set_min_content_width" gtk_scrolled_window_set_min_content_width :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    Int32 ->                                -- width : TBasicType TInt32
    IO ()


scrolledWindowSetMinContentWidth ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    m ()
scrolledWindowSetMinContentWidth _obj width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_scrolled_window_set_min_content_width _obj' width
    touchManagedPtr _obj
    return ()

-- method ScrolledWindow::set_overlay_scrolling
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "overlay_scrolling", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "overlay_scrolling", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_set_overlay_scrolling" gtk_scrolled_window_set_overlay_scrolling :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    CInt ->                                 -- overlay_scrolling : TBasicType TBoolean
    IO ()


scrolledWindowSetOverlayScrolling ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- overlay_scrolling
    m ()
scrolledWindowSetOverlayScrolling _obj overlay_scrolling = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let overlay_scrolling' = (fromIntegral . fromEnum) overlay_scrolling
    gtk_scrolled_window_set_overlay_scrolling _obj' overlay_scrolling'
    touchManagedPtr _obj
    return ()

-- method ScrolledWindow::set_placement
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window_placement", argType = TInterface "Gtk" "CornerType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window_placement", argType = TInterface "Gtk" "CornerType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_set_placement" gtk_scrolled_window_set_placement :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    CUInt ->                                -- window_placement : TInterface "Gtk" "CornerType"
    IO ()


scrolledWindowSetPlacement ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    CornerType ->                           -- window_placement
    m ()
scrolledWindowSetPlacement _obj window_placement = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window_placement' = (fromIntegral . fromEnum) window_placement
    gtk_scrolled_window_set_placement _obj' window_placement'
    touchManagedPtr _obj
    return ()

-- method ScrolledWindow::set_policy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hscrollbar_policy", argType = TInterface "Gtk" "PolicyType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vscrollbar_policy", argType = TInterface "Gtk" "PolicyType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hscrollbar_policy", argType = TInterface "Gtk" "PolicyType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vscrollbar_policy", argType = TInterface "Gtk" "PolicyType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_set_policy" gtk_scrolled_window_set_policy :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    CUInt ->                                -- hscrollbar_policy : TInterface "Gtk" "PolicyType"
    CUInt ->                                -- vscrollbar_policy : TInterface "Gtk" "PolicyType"
    IO ()


scrolledWindowSetPolicy ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    PolicyType ->                           -- hscrollbar_policy
    PolicyType ->                           -- vscrollbar_policy
    m ()
scrolledWindowSetPolicy _obj hscrollbar_policy vscrollbar_policy = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let hscrollbar_policy' = (fromIntegral . fromEnum) hscrollbar_policy
    let vscrollbar_policy' = (fromIntegral . fromEnum) vscrollbar_policy
    gtk_scrolled_window_set_policy _obj' hscrollbar_policy' vscrollbar_policy'
    touchManagedPtr _obj
    return ()

-- method ScrolledWindow::set_shadow_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_set_shadow_type" gtk_scrolled_window_set_shadow_type :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    CUInt ->                                -- type : TInterface "Gtk" "ShadowType"
    IO ()


scrolledWindowSetShadowType ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    ShadowType ->                           -- type
    m ()
scrolledWindowSetShadowType _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    gtk_scrolled_window_set_shadow_type _obj' type_'
    touchManagedPtr _obj
    return ()

-- method ScrolledWindow::set_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_set_vadjustment" gtk_scrolled_window_set_vadjustment :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    Ptr Adjustment ->                       -- vadjustment : TInterface "Gtk" "Adjustment"
    IO ()


scrolledWindowSetVadjustment ::
    (MonadIO m, ScrolledWindowK a, AdjustmentK b) =>
    a ->                                    -- _obj
    b ->                                    -- vadjustment
    m ()
scrolledWindowSetVadjustment _obj vadjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let vadjustment' = unsafeManagedPtrCastPtr vadjustment
    gtk_scrolled_window_set_vadjustment _obj' vadjustment'
    touchManagedPtr _obj
    touchManagedPtr vadjustment
    return ()

-- method ScrolledWindow::unset_placement
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ScrolledWindow", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_scrolled_window_unset_placement" gtk_scrolled_window_unset_placement :: 
    Ptr ScrolledWindow ->                   -- _obj : TInterface "Gtk" "ScrolledWindow"
    IO ()


scrolledWindowUnsetPlacement ::
    (MonadIO m, ScrolledWindowK a) =>
    a ->                                    -- _obj
    m ()
scrolledWindowUnsetPlacement _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_scrolled_window_unset_placement _obj'
    touchManagedPtr _obj
    return ()

-- signal ScrolledWindow::edge-overshot
type ScrolledWindowEdgeOvershotCallback =
    PositionType ->
    IO ()

noScrolledWindowEdgeOvershotCallback :: Maybe ScrolledWindowEdgeOvershotCallback
noScrolledWindowEdgeOvershotCallback = Nothing

type ScrolledWindowEdgeOvershotCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkScrolledWindowEdgeOvershotCallback :: ScrolledWindowEdgeOvershotCallbackC -> IO (FunPtr ScrolledWindowEdgeOvershotCallbackC)

scrolledWindowEdgeOvershotClosure :: ScrolledWindowEdgeOvershotCallback -> IO Closure
scrolledWindowEdgeOvershotClosure cb = newCClosure =<< mkScrolledWindowEdgeOvershotCallback wrapped
    where wrapped = scrolledWindowEdgeOvershotCallbackWrapper cb

scrolledWindowEdgeOvershotCallbackWrapper ::
    ScrolledWindowEdgeOvershotCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
scrolledWindowEdgeOvershotCallbackWrapper _cb _ pos _ = do
    let pos' = (toEnum . fromIntegral) pos
    _cb  pos'

onScrolledWindowEdgeOvershot :: (GObject a, MonadIO m) => a -> ScrolledWindowEdgeOvershotCallback -> m SignalHandlerId
onScrolledWindowEdgeOvershot obj cb = liftIO $ connectScrolledWindowEdgeOvershot obj cb SignalConnectBefore
afterScrolledWindowEdgeOvershot :: (GObject a, MonadIO m) => a -> ScrolledWindowEdgeOvershotCallback -> m SignalHandlerId
afterScrolledWindowEdgeOvershot obj cb = connectScrolledWindowEdgeOvershot obj cb SignalConnectAfter

connectScrolledWindowEdgeOvershot :: (GObject a, MonadIO m) =>
                                     a -> ScrolledWindowEdgeOvershotCallback -> SignalConnectMode -> m SignalHandlerId
connectScrolledWindowEdgeOvershot obj cb after = liftIO $ do
    cb' <- mkScrolledWindowEdgeOvershotCallback (scrolledWindowEdgeOvershotCallbackWrapper cb)
    connectSignalFunPtr obj "edge-overshot" cb' after

-- signal ScrolledWindow::edge-reached
type ScrolledWindowEdgeReachedCallback =
    PositionType ->
    IO ()

noScrolledWindowEdgeReachedCallback :: Maybe ScrolledWindowEdgeReachedCallback
noScrolledWindowEdgeReachedCallback = Nothing

type ScrolledWindowEdgeReachedCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkScrolledWindowEdgeReachedCallback :: ScrolledWindowEdgeReachedCallbackC -> IO (FunPtr ScrolledWindowEdgeReachedCallbackC)

scrolledWindowEdgeReachedClosure :: ScrolledWindowEdgeReachedCallback -> IO Closure
scrolledWindowEdgeReachedClosure cb = newCClosure =<< mkScrolledWindowEdgeReachedCallback wrapped
    where wrapped = scrolledWindowEdgeReachedCallbackWrapper cb

scrolledWindowEdgeReachedCallbackWrapper ::
    ScrolledWindowEdgeReachedCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
scrolledWindowEdgeReachedCallbackWrapper _cb _ pos _ = do
    let pos' = (toEnum . fromIntegral) pos
    _cb  pos'

onScrolledWindowEdgeReached :: (GObject a, MonadIO m) => a -> ScrolledWindowEdgeReachedCallback -> m SignalHandlerId
onScrolledWindowEdgeReached obj cb = liftIO $ connectScrolledWindowEdgeReached obj cb SignalConnectBefore
afterScrolledWindowEdgeReached :: (GObject a, MonadIO m) => a -> ScrolledWindowEdgeReachedCallback -> m SignalHandlerId
afterScrolledWindowEdgeReached obj cb = connectScrolledWindowEdgeReached obj cb SignalConnectAfter

connectScrolledWindowEdgeReached :: (GObject a, MonadIO m) =>
                                    a -> ScrolledWindowEdgeReachedCallback -> SignalConnectMode -> m SignalHandlerId
connectScrolledWindowEdgeReached obj cb after = liftIO $ do
    cb' <- mkScrolledWindowEdgeReachedCallback (scrolledWindowEdgeReachedCallbackWrapper cb)
    connectSignalFunPtr obj "edge-reached" cb' after

-- signal ScrolledWindow::move-focus-out
type ScrolledWindowMoveFocusOutCallback =
    DirectionType ->
    IO ()

noScrolledWindowMoveFocusOutCallback :: Maybe ScrolledWindowMoveFocusOutCallback
noScrolledWindowMoveFocusOutCallback = Nothing

type ScrolledWindowMoveFocusOutCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkScrolledWindowMoveFocusOutCallback :: ScrolledWindowMoveFocusOutCallbackC -> IO (FunPtr ScrolledWindowMoveFocusOutCallbackC)

scrolledWindowMoveFocusOutClosure :: ScrolledWindowMoveFocusOutCallback -> IO Closure
scrolledWindowMoveFocusOutClosure cb = newCClosure =<< mkScrolledWindowMoveFocusOutCallback wrapped
    where wrapped = scrolledWindowMoveFocusOutCallbackWrapper cb

scrolledWindowMoveFocusOutCallbackWrapper ::
    ScrolledWindowMoveFocusOutCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
scrolledWindowMoveFocusOutCallbackWrapper _cb _ direction_type _ = do
    let direction_type' = (toEnum . fromIntegral) direction_type
    _cb  direction_type'

onScrolledWindowMoveFocusOut :: (GObject a, MonadIO m) => a -> ScrolledWindowMoveFocusOutCallback -> m SignalHandlerId
onScrolledWindowMoveFocusOut obj cb = liftIO $ connectScrolledWindowMoveFocusOut obj cb SignalConnectBefore
afterScrolledWindowMoveFocusOut :: (GObject a, MonadIO m) => a -> ScrolledWindowMoveFocusOutCallback -> m SignalHandlerId
afterScrolledWindowMoveFocusOut obj cb = connectScrolledWindowMoveFocusOut obj cb SignalConnectAfter

connectScrolledWindowMoveFocusOut :: (GObject a, MonadIO m) =>
                                     a -> ScrolledWindowMoveFocusOutCallback -> SignalConnectMode -> m SignalHandlerId
connectScrolledWindowMoveFocusOut obj cb after = liftIO $ do
    cb' <- mkScrolledWindowMoveFocusOutCallback (scrolledWindowMoveFocusOutCallbackWrapper cb)
    connectSignalFunPtr obj "move-focus-out" cb' after

-- signal ScrolledWindow::scroll-child
type ScrolledWindowScrollChildCallback =
    ScrollType ->
    Bool ->
    IO Bool

noScrolledWindowScrollChildCallback :: Maybe ScrolledWindowScrollChildCallback
noScrolledWindowScrollChildCallback = Nothing

type ScrolledWindowScrollChildCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    CInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkScrolledWindowScrollChildCallback :: ScrolledWindowScrollChildCallbackC -> IO (FunPtr ScrolledWindowScrollChildCallbackC)

scrolledWindowScrollChildClosure :: ScrolledWindowScrollChildCallback -> IO Closure
scrolledWindowScrollChildClosure cb = newCClosure =<< mkScrolledWindowScrollChildCallback wrapped
    where wrapped = scrolledWindowScrollChildCallbackWrapper cb

scrolledWindowScrollChildCallbackWrapper ::
    ScrolledWindowScrollChildCallback ->
    Ptr () ->
    CUInt ->
    CInt ->
    Ptr () ->
    IO CInt
scrolledWindowScrollChildCallbackWrapper _cb _ scroll horizontal _ = do
    let scroll' = (toEnum . fromIntegral) scroll
    let horizontal' = (/= 0) horizontal
    result <- _cb  scroll' horizontal'
    let result' = (fromIntegral . fromEnum) result
    return result'

onScrolledWindowScrollChild :: (GObject a, MonadIO m) => a -> ScrolledWindowScrollChildCallback -> m SignalHandlerId
onScrolledWindowScrollChild obj cb = liftIO $ connectScrolledWindowScrollChild obj cb SignalConnectBefore
afterScrolledWindowScrollChild :: (GObject a, MonadIO m) => a -> ScrolledWindowScrollChildCallback -> m SignalHandlerId
afterScrolledWindowScrollChild obj cb = connectScrolledWindowScrollChild obj cb SignalConnectAfter

connectScrolledWindowScrollChild :: (GObject a, MonadIO m) =>
                                    a -> ScrolledWindowScrollChildCallback -> SignalConnectMode -> m SignalHandlerId
connectScrolledWindowScrollChild obj cb after = liftIO $ do
    cb' <- mkScrolledWindowScrollChildCallback (scrolledWindowScrollChildCallbackWrapper cb)
    connectSignalFunPtr obj "scroll-child" cb' after

-- object ScrolledWindowAccessible 
newtype ScrolledWindowAccessible = ScrolledWindowAccessible (ForeignPtr ScrolledWindowAccessible)
noScrolledWindowAccessible :: Maybe ScrolledWindowAccessible
noScrolledWindowAccessible = Nothing

foreign import ccall "gtk_scrolled_window_accessible_get_type"
    c_gtk_scrolled_window_accessible_get_type :: IO GType

type instance ParentTypes ScrolledWindowAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component]

instance GObject ScrolledWindowAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_scrolled_window_accessible_get_type
    

class GObject o => ScrolledWindowAccessibleK o
instance (GObject o, IsDescendantOf ScrolledWindowAccessible o) => ScrolledWindowAccessibleK o

toScrolledWindowAccessible :: ScrolledWindowAccessibleK o => o -> IO ScrolledWindowAccessible
toScrolledWindowAccessible = unsafeCastTo ScrolledWindowAccessible

-- object SearchBar 
newtype SearchBar = SearchBar (ForeignPtr SearchBar)
noSearchBar :: Maybe SearchBar
noSearchBar = Nothing

foreign import ccall "gtk_search_bar_get_type"
    c_gtk_search_bar_get_type :: IO GType

type instance ParentTypes SearchBar = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject SearchBar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_search_bar_get_type
    

class GObject o => SearchBarK o
instance (GObject o, IsDescendantOf SearchBar o) => SearchBarK o

toSearchBar :: SearchBarK o => o -> IO SearchBar
toSearchBar = unsafeCastTo SearchBar

-- method SearchBar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "SearchBar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_search_bar_new" gtk_search_bar_new :: 
    IO (Ptr SearchBar)


searchBarNew ::
    (MonadIO m) =>
    m SearchBar
searchBarNew  = liftIO $ do
    result <- gtk_search_bar_new
    checkUnexpectedReturnNULL "gtk_search_bar_new" result
    result' <- (newObject SearchBar) result
    return result'

-- method SearchBar::connect_entry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "entry", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "entry", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_search_bar_connect_entry" gtk_search_bar_connect_entry :: 
    Ptr SearchBar ->                        -- _obj : TInterface "Gtk" "SearchBar"
    Ptr Entry ->                            -- entry : TInterface "Gtk" "Entry"
    IO ()


searchBarConnectEntry ::
    (MonadIO m, SearchBarK a, EntryK b) =>
    a ->                                    -- _obj
    b ->                                    -- entry
    m ()
searchBarConnectEntry _obj entry = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let entry' = unsafeManagedPtrCastPtr entry
    gtk_search_bar_connect_entry _obj' entry'
    touchManagedPtr _obj
    touchManagedPtr entry
    return ()

-- method SearchBar::get_search_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_search_bar_get_search_mode" gtk_search_bar_get_search_mode :: 
    Ptr SearchBar ->                        -- _obj : TInterface "Gtk" "SearchBar"
    IO CInt


searchBarGetSearchMode ::
    (MonadIO m, SearchBarK a) =>
    a ->                                    -- _obj
    m Bool
searchBarGetSearchMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_search_bar_get_search_mode _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method SearchBar::get_show_close_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_search_bar_get_show_close_button" gtk_search_bar_get_show_close_button :: 
    Ptr SearchBar ->                        -- _obj : TInterface "Gtk" "SearchBar"
    IO CInt


searchBarGetShowCloseButton ::
    (MonadIO m, SearchBarK a) =>
    a ->                                    -- _obj
    m Bool
searchBarGetShowCloseButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_search_bar_get_show_close_button _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method SearchBar::handle_event
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_search_bar_handle_event" gtk_search_bar_handle_event :: 
    Ptr SearchBar ->                        -- _obj : TInterface "Gtk" "SearchBar"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    IO CInt


searchBarHandleEvent ::
    (MonadIO m, SearchBarK a) =>
    a ->                                    -- _obj
    Gdk.Event ->                            -- event
    m Bool
searchBarHandleEvent _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_search_bar_handle_event _obj' event'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event
    return result'

-- method SearchBar::set_search_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "search_mode", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "search_mode", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_search_bar_set_search_mode" gtk_search_bar_set_search_mode :: 
    Ptr SearchBar ->                        -- _obj : TInterface "Gtk" "SearchBar"
    CInt ->                                 -- search_mode : TBasicType TBoolean
    IO ()


searchBarSetSearchMode ::
    (MonadIO m, SearchBarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- search_mode
    m ()
searchBarSetSearchMode _obj search_mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let search_mode' = (fromIntegral . fromEnum) search_mode
    gtk_search_bar_set_search_mode _obj' search_mode'
    touchManagedPtr _obj
    return ()

-- method SearchBar::set_show_close_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchBar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_search_bar_set_show_close_button" gtk_search_bar_set_show_close_button :: 
    Ptr SearchBar ->                        -- _obj : TInterface "Gtk" "SearchBar"
    CInt ->                                 -- visible : TBasicType TBoolean
    IO ()


searchBarSetShowCloseButton ::
    (MonadIO m, SearchBarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible
    m ()
searchBarSetShowCloseButton _obj visible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible' = (fromIntegral . fromEnum) visible
    gtk_search_bar_set_show_close_button _obj' visible'
    touchManagedPtr _obj
    return ()

-- object SearchEntry 
newtype SearchEntry = SearchEntry (ForeignPtr SearchEntry)
noSearchEntry :: Maybe SearchEntry
noSearchEntry = Nothing

foreign import ccall "gtk_search_entry_get_type"
    c_gtk_search_entry_get_type :: IO GType

type instance ParentTypes SearchEntry = '[Entry, Widget, GObject.Object, Atk.ImplementorIface, Buildable, CellEditable, Editable]

instance GObject SearchEntry where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_search_entry_get_type
    

class GObject o => SearchEntryK o
instance (GObject o, IsDescendantOf SearchEntry o) => SearchEntryK o

toSearchEntry :: SearchEntryK o => o -> IO SearchEntry
toSearchEntry = unsafeCastTo SearchEntry

-- method SearchEntry::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "SearchEntry"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_search_entry_new" gtk_search_entry_new :: 
    IO (Ptr SearchEntry)


searchEntryNew ::
    (MonadIO m) =>
    m SearchEntry
searchEntryNew  = liftIO $ do
    result <- gtk_search_entry_new
    checkUnexpectedReturnNULL "gtk_search_entry_new" result
    result' <- (newObject SearchEntry) result
    return result'

-- method SearchEntry::handle_event
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SearchEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_search_entry_handle_event" gtk_search_entry_handle_event :: 
    Ptr SearchEntry ->                      -- _obj : TInterface "Gtk" "SearchEntry"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    IO CInt


searchEntryHandleEvent ::
    (MonadIO m, SearchEntryK a) =>
    a ->                                    -- _obj
    Gdk.Event ->                            -- event
    m Bool
searchEntryHandleEvent _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_search_entry_handle_event _obj' event'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event
    return result'

-- signal SearchEntry::next-match
type SearchEntryNextMatchCallback =
    IO ()

noSearchEntryNextMatchCallback :: Maybe SearchEntryNextMatchCallback
noSearchEntryNextMatchCallback = Nothing

type SearchEntryNextMatchCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkSearchEntryNextMatchCallback :: SearchEntryNextMatchCallbackC -> IO (FunPtr SearchEntryNextMatchCallbackC)

searchEntryNextMatchClosure :: SearchEntryNextMatchCallback -> IO Closure
searchEntryNextMatchClosure cb = newCClosure =<< mkSearchEntryNextMatchCallback wrapped
    where wrapped = searchEntryNextMatchCallbackWrapper cb

searchEntryNextMatchCallbackWrapper ::
    SearchEntryNextMatchCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
searchEntryNextMatchCallbackWrapper _cb _ _ = do
    _cb 

onSearchEntryNextMatch :: (GObject a, MonadIO m) => a -> SearchEntryNextMatchCallback -> m SignalHandlerId
onSearchEntryNextMatch obj cb = liftIO $ connectSearchEntryNextMatch obj cb SignalConnectBefore
afterSearchEntryNextMatch :: (GObject a, MonadIO m) => a -> SearchEntryNextMatchCallback -> m SignalHandlerId
afterSearchEntryNextMatch obj cb = connectSearchEntryNextMatch obj cb SignalConnectAfter

connectSearchEntryNextMatch :: (GObject a, MonadIO m) =>
                               a -> SearchEntryNextMatchCallback -> SignalConnectMode -> m SignalHandlerId
connectSearchEntryNextMatch obj cb after = liftIO $ do
    cb' <- mkSearchEntryNextMatchCallback (searchEntryNextMatchCallbackWrapper cb)
    connectSignalFunPtr obj "next-match" cb' after

-- signal SearchEntry::previous-match
type SearchEntryPreviousMatchCallback =
    IO ()

noSearchEntryPreviousMatchCallback :: Maybe SearchEntryPreviousMatchCallback
noSearchEntryPreviousMatchCallback = Nothing

type SearchEntryPreviousMatchCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkSearchEntryPreviousMatchCallback :: SearchEntryPreviousMatchCallbackC -> IO (FunPtr SearchEntryPreviousMatchCallbackC)

searchEntryPreviousMatchClosure :: SearchEntryPreviousMatchCallback -> IO Closure
searchEntryPreviousMatchClosure cb = newCClosure =<< mkSearchEntryPreviousMatchCallback wrapped
    where wrapped = searchEntryPreviousMatchCallbackWrapper cb

searchEntryPreviousMatchCallbackWrapper ::
    SearchEntryPreviousMatchCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
searchEntryPreviousMatchCallbackWrapper _cb _ _ = do
    _cb 

onSearchEntryPreviousMatch :: (GObject a, MonadIO m) => a -> SearchEntryPreviousMatchCallback -> m SignalHandlerId
onSearchEntryPreviousMatch obj cb = liftIO $ connectSearchEntryPreviousMatch obj cb SignalConnectBefore
afterSearchEntryPreviousMatch :: (GObject a, MonadIO m) => a -> SearchEntryPreviousMatchCallback -> m SignalHandlerId
afterSearchEntryPreviousMatch obj cb = connectSearchEntryPreviousMatch obj cb SignalConnectAfter

connectSearchEntryPreviousMatch :: (GObject a, MonadIO m) =>
                                   a -> SearchEntryPreviousMatchCallback -> SignalConnectMode -> m SignalHandlerId
connectSearchEntryPreviousMatch obj cb after = liftIO $ do
    cb' <- mkSearchEntryPreviousMatchCallback (searchEntryPreviousMatchCallbackWrapper cb)
    connectSignalFunPtr obj "previous-match" cb' after

-- signal SearchEntry::search-changed
type SearchEntrySearchChangedCallback =
    IO ()

noSearchEntrySearchChangedCallback :: Maybe SearchEntrySearchChangedCallback
noSearchEntrySearchChangedCallback = Nothing

type SearchEntrySearchChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkSearchEntrySearchChangedCallback :: SearchEntrySearchChangedCallbackC -> IO (FunPtr SearchEntrySearchChangedCallbackC)

searchEntrySearchChangedClosure :: SearchEntrySearchChangedCallback -> IO Closure
searchEntrySearchChangedClosure cb = newCClosure =<< mkSearchEntrySearchChangedCallback wrapped
    where wrapped = searchEntrySearchChangedCallbackWrapper cb

searchEntrySearchChangedCallbackWrapper ::
    SearchEntrySearchChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
searchEntrySearchChangedCallbackWrapper _cb _ _ = do
    _cb 

onSearchEntrySearchChanged :: (GObject a, MonadIO m) => a -> SearchEntrySearchChangedCallback -> m SignalHandlerId
onSearchEntrySearchChanged obj cb = liftIO $ connectSearchEntrySearchChanged obj cb SignalConnectBefore
afterSearchEntrySearchChanged :: (GObject a, MonadIO m) => a -> SearchEntrySearchChangedCallback -> m SignalHandlerId
afterSearchEntrySearchChanged obj cb = connectSearchEntrySearchChanged obj cb SignalConnectAfter

connectSearchEntrySearchChanged :: (GObject a, MonadIO m) =>
                                   a -> SearchEntrySearchChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectSearchEntrySearchChanged obj cb after = liftIO $ do
    cb' <- mkSearchEntrySearchChangedCallback (searchEntrySearchChangedCallbackWrapper cb)
    connectSignalFunPtr obj "search-changed" cb' after

-- signal SearchEntry::stop-search
type SearchEntryStopSearchCallback =
    IO ()

noSearchEntryStopSearchCallback :: Maybe SearchEntryStopSearchCallback
noSearchEntryStopSearchCallback = Nothing

type SearchEntryStopSearchCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkSearchEntryStopSearchCallback :: SearchEntryStopSearchCallbackC -> IO (FunPtr SearchEntryStopSearchCallbackC)

searchEntryStopSearchClosure :: SearchEntryStopSearchCallback -> IO Closure
searchEntryStopSearchClosure cb = newCClosure =<< mkSearchEntryStopSearchCallback wrapped
    where wrapped = searchEntryStopSearchCallbackWrapper cb

searchEntryStopSearchCallbackWrapper ::
    SearchEntryStopSearchCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
searchEntryStopSearchCallbackWrapper _cb _ _ = do
    _cb 

onSearchEntryStopSearch :: (GObject a, MonadIO m) => a -> SearchEntryStopSearchCallback -> m SignalHandlerId
onSearchEntryStopSearch obj cb = liftIO $ connectSearchEntryStopSearch obj cb SignalConnectBefore
afterSearchEntryStopSearch :: (GObject a, MonadIO m) => a -> SearchEntryStopSearchCallback -> m SignalHandlerId
afterSearchEntryStopSearch obj cb = connectSearchEntryStopSearch obj cb SignalConnectAfter

connectSearchEntryStopSearch :: (GObject a, MonadIO m) =>
                                a -> SearchEntryStopSearchCallback -> SignalConnectMode -> m SignalHandlerId
connectSearchEntryStopSearch obj cb after = liftIO $ do
    cb' <- mkSearchEntryStopSearchCallback (searchEntryStopSearchCallbackWrapper cb)
    connectSignalFunPtr obj "stop-search" cb' after

-- struct SelectionData
newtype SelectionData = SelectionData (ForeignPtr SelectionData)
noSelectionData :: Maybe SelectionData
noSelectionData = Nothing

foreign import ccall "gtk_selection_data_get_type" c_gtk_selection_data_get_type :: 
    IO GType

instance BoxedObject SelectionData where
    boxedType _ = c_gtk_selection_data_get_type

-- method SelectionData::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SelectionData"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_copy" gtk_selection_data_copy :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO (Ptr SelectionData)


selectionDataCopy ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m SelectionData
selectionDataCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_copy _obj'
    checkUnexpectedReturnNULL "gtk_selection_data_copy" result
    result' <- (wrapBoxed SelectionData) result
    touchManagedPtr _obj
    return result'

-- method SelectionData::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_free" gtk_selection_data_free :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO ()


selectionDataFree ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m ()
selectionDataFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_selection_data_free _obj'
    touchManagedPtr _obj
    return ()

-- method SelectionData::get_data_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Atom"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_get_data_type" gtk_selection_data_get_data_type :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO (Ptr Gdk.Atom)


selectionDataGetDataType ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m Gdk.Atom
selectionDataGetDataType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_get_data_type _obj'
    checkUnexpectedReturnNULL "gtk_selection_data_get_data_type" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> Gdk.Atom <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    return result'

-- method SelectionData::get_data
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 1 (TBasicType TUInt8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_get_data_with_length" gtk_selection_data_get_data_with_length :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    Ptr Int32 ->                            -- length : TBasicType TInt32
    IO (Ptr Word8)


selectionDataGetData ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m ByteString
selectionDataGetData _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    length_ <- allocMem :: IO (Ptr Int32)
    result <- gtk_selection_data_get_data_with_length _obj' length_
    length_' <- peek length_
    checkUnexpectedReturnNULL "gtk_selection_data_get_data_with_length" result
    result' <- (unpackByteStringWithLength length_') result
    touchManagedPtr _obj
    freeMem length_
    return result'

-- method SelectionData::get_display
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Display"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_get_display" gtk_selection_data_get_display :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO (Ptr Gdk.Display)


selectionDataGetDisplay ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m Gdk.Display
selectionDataGetDisplay _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_get_display _obj'
    checkUnexpectedReturnNULL "gtk_selection_data_get_display" result
    result' <- (newObject Gdk.Display) result
    touchManagedPtr _obj
    return result'

-- method SelectionData::get_format
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_get_format" gtk_selection_data_get_format :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO Int32


selectionDataGetFormat ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m Int32
selectionDataGetFormat _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_get_format _obj'
    touchManagedPtr _obj
    return result

-- method SelectionData::get_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_get_length" gtk_selection_data_get_length :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO Int32


selectionDataGetLength ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m Int32
selectionDataGetLength _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_get_length _obj'
    touchManagedPtr _obj
    return result

-- method SelectionData::get_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_get_pixbuf" gtk_selection_data_get_pixbuf :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO (Ptr GdkPixbuf.Pixbuf)


selectionDataGetPixbuf ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m GdkPixbuf.Pixbuf
selectionDataGetPixbuf _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_get_pixbuf _obj'
    checkUnexpectedReturnNULL "gtk_selection_data_get_pixbuf" result
    result' <- (wrapObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method SelectionData::get_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Atom"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_get_selection" gtk_selection_data_get_selection :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO (Ptr Gdk.Atom)


selectionDataGetSelection ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m Gdk.Atom
selectionDataGetSelection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_get_selection _obj'
    checkUnexpectedReturnNULL "gtk_selection_data_get_selection" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> Gdk.Atom <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    return result'

-- method SelectionData::get_target
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Atom"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_get_target" gtk_selection_data_get_target :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO (Ptr Gdk.Atom)


selectionDataGetTarget ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m Gdk.Atom
selectionDataGetTarget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_get_target _obj'
    checkUnexpectedReturnNULL "gtk_selection_data_get_target" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> Gdk.Atom <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    return result'

-- method SelectionData::get_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 2 (TInterface "Gdk" "Atom"), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferContainer},Arg {argName = "n_atoms", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_atoms", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_get_targets" gtk_selection_data_get_targets :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    Ptr (Ptr (Ptr Gdk.Atom)) ->             -- targets : TCArray False (-1) 2 (TInterface "Gdk" "Atom")
    Ptr Int32 ->                            -- n_atoms : TBasicType TInt32
    IO CInt


selectionDataGetTargets ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m (Bool,[Gdk.Atom])
selectionDataGetTargets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    targets <- allocMem :: IO (Ptr (Ptr (Ptr Gdk.Atom)))
    n_atoms <- allocMem :: IO (Ptr Int32)
    result <- gtk_selection_data_get_targets _obj' targets n_atoms
    n_atoms' <- peek n_atoms
    let result' = (/= 0) result
    targets' <- peek targets
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    targets'' <- (unpackPtrArrayWithLength n_atoms') targets'
    targets''' <- mapM (\x -> Gdk.Atom <$> newForeignPtr_ x) targets''
    freeMem targets'
    touchManagedPtr _obj
    freeMem targets
    freeMem n_atoms
    return (result', targets''')

-- method SelectionData::get_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_get_text" gtk_selection_data_get_text :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO CString


selectionDataGetText ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m T.Text
selectionDataGetText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_get_text _obj'
    checkUnexpectedReturnNULL "gtk_selection_data_get_text" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method SelectionData::get_uris
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_get_uris" gtk_selection_data_get_uris :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO (Ptr CString)


selectionDataGetUris ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m [T.Text]
selectionDataGetUris _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_get_uris _obj'
    checkUnexpectedReturnNULL "gtk_selection_data_get_uris" result
    result' <- unpackZeroTerminatedUTF8CArray result
    mapZeroTerminatedCArray freeMem result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method SelectionData::set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TCArray False (-1) 4 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TCArray False (-1) 4 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_set" gtk_selection_data_set :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    Ptr Gdk.Atom ->                         -- type : TInterface "Gdk" "Atom"
    Int32 ->                                -- format : TBasicType TInt32
    Ptr Word8 ->                            -- data : TCArray False (-1) 4 (TBasicType TUInt8)
    Int32 ->                                -- length : TBasicType TInt32
    IO ()


selectionDataSet ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    Gdk.Atom ->                             -- type
    Int32 ->                                -- format
    ByteString ->                           -- data
    m ()
selectionDataSet _obj type_ format data_ = liftIO $ do
    let length_ = fromIntegral $ B.length data_
    let _obj' = unsafeManagedPtrGetPtr _obj
    let type_' = unsafeManagedPtrGetPtr type_
    data_' <- packByteString data_
    gtk_selection_data_set _obj' type_' format data_' length_
    touchManagedPtr _obj
    touchManagedPtr type_
    freeMem data_'
    return ()

-- method SelectionData::set_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_set_pixbuf" gtk_selection_data_set_pixbuf :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO CInt


selectionDataSetPixbuf ::
    (MonadIO m, GdkPixbuf.PixbufK a) =>
    SelectionData ->                        -- _obj
    a ->                                    -- pixbuf
    m Bool
selectionDataSetPixbuf _obj pixbuf = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    result <- gtk_selection_data_set_pixbuf _obj' pixbuf'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr pixbuf
    return result'

-- method SelectionData::set_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_set_text" gtk_selection_data_set_text :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    CString ->                              -- str : TBasicType TUTF8
    Int32 ->                                -- len : TBasicType TInt32
    IO CInt


selectionDataSetText ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    T.Text ->                               -- str
    Int32 ->                                -- len
    m Bool
selectionDataSetText _obj str len = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    str' <- textToCString str
    result <- gtk_selection_data_set_text _obj' str' len
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem str'
    return result'

-- method SelectionData::set_uris
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uris", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uris", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_set_uris" gtk_selection_data_set_uris :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    Ptr CString ->                          -- uris : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO CInt


selectionDataSetUris ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    [T.Text] ->                             -- uris
    m Bool
selectionDataSetUris _obj uris = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    uris' <- packZeroTerminatedUTF8CArray uris
    result <- gtk_selection_data_set_uris _obj' uris'
    let result' = (/= 0) result
    touchManagedPtr _obj
    mapZeroTerminatedCArray freeMem uris'
    freeMem uris'
    return result'

-- method SelectionData::targets_include_image
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "writable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "writable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_targets_include_image" gtk_selection_data_targets_include_image :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    CInt ->                                 -- writable : TBasicType TBoolean
    IO CInt


selectionDataTargetsIncludeImage ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    Bool ->                                 -- writable
    m Bool
selectionDataTargetsIncludeImage _obj writable = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let writable' = (fromIntegral . fromEnum) writable
    result <- gtk_selection_data_targets_include_image _obj' writable'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method SelectionData::targets_include_rich_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_targets_include_rich_text" gtk_selection_data_targets_include_rich_text :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    Ptr TextBuffer ->                       -- buffer : TInterface "Gtk" "TextBuffer"
    IO CInt


selectionDataTargetsIncludeRichText ::
    (MonadIO m, TextBufferK a) =>
    SelectionData ->                        -- _obj
    a ->                                    -- buffer
    m Bool
selectionDataTargetsIncludeRichText _obj buffer = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let buffer' = unsafeManagedPtrCastPtr buffer
    result <- gtk_selection_data_targets_include_rich_text _obj' buffer'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr buffer
    return result'

-- method SelectionData::targets_include_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_targets_include_text" gtk_selection_data_targets_include_text :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO CInt


selectionDataTargetsIncludeText ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m Bool
selectionDataTargetsIncludeText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_targets_include_text _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method SelectionData::targets_include_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_data_targets_include_uri" gtk_selection_data_targets_include_uri :: 
    Ptr SelectionData ->                    -- _obj : TInterface "Gtk" "SelectionData"
    IO CInt


selectionDataTargetsIncludeUri ::
    (MonadIO m) =>
    SelectionData ->                        -- _obj
    m Bool
selectionDataTargetsIncludeUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_selection_data_targets_include_uri _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- Enum SelectionMode

data SelectionMode = 
      SelectionModeNone
    | SelectionModeSingle
    | SelectionModeBrowse
    | SelectionModeMultiple
    | AnotherSelectionMode Int
    deriving (Show, Eq)

instance Enum SelectionMode where
    fromEnum SelectionModeNone = 0
    fromEnum SelectionModeSingle = 1
    fromEnum SelectionModeBrowse = 2
    fromEnum SelectionModeMultiple = 3
    fromEnum (AnotherSelectionMode k) = k

    toEnum 0 = SelectionModeNone
    toEnum 1 = SelectionModeSingle
    toEnum 2 = SelectionModeBrowse
    toEnum 3 = SelectionModeMultiple
    toEnum k = AnotherSelectionMode k

foreign import ccall "gtk_selection_mode_get_type" c_gtk_selection_mode_get_type :: 
    IO GType

instance BoxedEnum SelectionMode where
    boxedEnumType _ = c_gtk_selection_mode_get_type

-- Enum SensitivityType

data SensitivityType = 
      SensitivityTypeAuto
    | SensitivityTypeOn
    | SensitivityTypeOff
    | AnotherSensitivityType Int
    deriving (Show, Eq)

instance Enum SensitivityType where
    fromEnum SensitivityTypeAuto = 0
    fromEnum SensitivityTypeOn = 1
    fromEnum SensitivityTypeOff = 2
    fromEnum (AnotherSensitivityType k) = k

    toEnum 0 = SensitivityTypeAuto
    toEnum 1 = SensitivityTypeOn
    toEnum 2 = SensitivityTypeOff
    toEnum k = AnotherSensitivityType k

foreign import ccall "gtk_sensitivity_type_get_type" c_gtk_sensitivity_type_get_type :: 
    IO GType

instance BoxedEnum SensitivityType where
    boxedEnumType _ = c_gtk_sensitivity_type_get_type

-- object Separator 
newtype Separator = Separator (ForeignPtr Separator)
noSeparator :: Maybe Separator
noSeparator = Nothing

foreign import ccall "gtk_separator_get_type"
    c_gtk_separator_get_type :: IO GType

type instance ParentTypes Separator = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject Separator where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_separator_get_type
    

class GObject o => SeparatorK o
instance (GObject o, IsDescendantOf Separator o) => SeparatorK o

toSeparator :: SeparatorK o => o -> IO Separator
toSeparator = unsafeCastTo Separator

-- method Separator::new
-- method type : Constructor
-- Args : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Separator"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_separator_new" gtk_separator_new :: 
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    IO (Ptr Separator)


separatorNew ::
    (MonadIO m) =>
    Orientation ->                          -- orientation
    m Separator
separatorNew orientation = liftIO $ do
    let orientation' = (fromIntegral . fromEnum) orientation
    result <- gtk_separator_new orientation'
    checkUnexpectedReturnNULL "gtk_separator_new" result
    result' <- (newObject Separator) result
    return result'

-- object SeparatorMenuItem 
newtype SeparatorMenuItem = SeparatorMenuItem (ForeignPtr SeparatorMenuItem)
noSeparatorMenuItem :: Maybe SeparatorMenuItem
noSeparatorMenuItem = Nothing

foreign import ccall "gtk_separator_menu_item_get_type"
    c_gtk_separator_menu_item_get_type :: IO GType

type instance ParentTypes SeparatorMenuItem = '[MenuItem, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject SeparatorMenuItem where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_separator_menu_item_get_type
    

class GObject o => SeparatorMenuItemK o
instance (GObject o, IsDescendantOf SeparatorMenuItem o) => SeparatorMenuItemK o

toSeparatorMenuItem :: SeparatorMenuItemK o => o -> IO SeparatorMenuItem
toSeparatorMenuItem = unsafeCastTo SeparatorMenuItem

-- method SeparatorMenuItem::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "SeparatorMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_separator_menu_item_new" gtk_separator_menu_item_new :: 
    IO (Ptr SeparatorMenuItem)


separatorMenuItemNew ::
    (MonadIO m) =>
    m SeparatorMenuItem
separatorMenuItemNew  = liftIO $ do
    result <- gtk_separator_menu_item_new
    checkUnexpectedReturnNULL "gtk_separator_menu_item_new" result
    result' <- (newObject SeparatorMenuItem) result
    return result'

-- object SeparatorToolItem 
newtype SeparatorToolItem = SeparatorToolItem (ForeignPtr SeparatorToolItem)
noSeparatorToolItem :: Maybe SeparatorToolItem
noSeparatorToolItem = Nothing

foreign import ccall "gtk_separator_tool_item_get_type"
    c_gtk_separator_tool_item_get_type :: IO GType

type instance ParentTypes SeparatorToolItem = '[ToolItem, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Activatable, Buildable]

instance GObject SeparatorToolItem where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_separator_tool_item_get_type
    

class GObject o => SeparatorToolItemK o
instance (GObject o, IsDescendantOf SeparatorToolItem o) => SeparatorToolItemK o

toSeparatorToolItem :: SeparatorToolItemK o => o -> IO SeparatorToolItem
toSeparatorToolItem = unsafeCastTo SeparatorToolItem

-- method SeparatorToolItem::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "SeparatorToolItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_separator_tool_item_new" gtk_separator_tool_item_new :: 
    IO (Ptr SeparatorToolItem)


separatorToolItemNew ::
    (MonadIO m) =>
    m SeparatorToolItem
separatorToolItemNew  = liftIO $ do
    result <- gtk_separator_tool_item_new
    checkUnexpectedReturnNULL "gtk_separator_tool_item_new" result
    result' <- (newObject SeparatorToolItem) result
    return result'

-- method SeparatorToolItem::get_draw
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SeparatorToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SeparatorToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_separator_tool_item_get_draw" gtk_separator_tool_item_get_draw :: 
    Ptr SeparatorToolItem ->                -- _obj : TInterface "Gtk" "SeparatorToolItem"
    IO CInt


separatorToolItemGetDraw ::
    (MonadIO m, SeparatorToolItemK a) =>
    a ->                                    -- _obj
    m Bool
separatorToolItemGetDraw _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_separator_tool_item_get_draw _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method SeparatorToolItem::set_draw
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SeparatorToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SeparatorToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_separator_tool_item_set_draw" gtk_separator_tool_item_set_draw :: 
    Ptr SeparatorToolItem ->                -- _obj : TInterface "Gtk" "SeparatorToolItem"
    CInt ->                                 -- draw : TBasicType TBoolean
    IO ()


separatorToolItemSetDraw ::
    (MonadIO m, SeparatorToolItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- draw
    m ()
separatorToolItemSetDraw _obj draw = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let draw' = (fromIntegral . fromEnum) draw
    gtk_separator_tool_item_set_draw _obj' draw'
    touchManagedPtr _obj
    return ()

-- object Settings 
newtype Settings = Settings (ForeignPtr Settings)
noSettings :: Maybe Settings
noSettings = Nothing

foreign import ccall "gtk_settings_get_type"
    c_gtk_settings_get_type :: IO GType

type instance ParentTypes Settings = '[GObject.Object, StyleProvider]

instance GObject Settings where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_settings_get_type
    

class GObject o => SettingsK o
instance (GObject o, IsDescendantOf Settings o) => SettingsK o

toSettings :: SettingsK o => o -> IO Settings
toSettings = unsafeCastTo Settings

-- method Settings::set_double_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "v_double", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "origin", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "v_double", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "origin", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_settings_set_double_property" gtk_settings_set_double_property :: 
    Ptr Settings ->                         -- _obj : TInterface "Gtk" "Settings"
    CString ->                              -- name : TBasicType TUTF8
    CDouble ->                              -- v_double : TBasicType TDouble
    CString ->                              -- origin : TBasicType TUTF8
    IO ()

{-# DEPRECATED settingsSetDoubleProperty ["(Since version 3.16)","Use g_object_set() instead."]#-}
settingsSetDoubleProperty ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    Double ->                               -- v_double
    T.Text ->                               -- origin
    m ()
settingsSetDoubleProperty _obj name v_double origin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    let v_double' = realToFrac v_double
    origin' <- textToCString origin
    gtk_settings_set_double_property _obj' name' v_double' origin'
    touchManagedPtr _obj
    freeMem name'
    freeMem origin'
    return ()

-- method Settings::set_long_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "v_long", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "origin", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "v_long", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "origin", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_settings_set_long_property" gtk_settings_set_long_property :: 
    Ptr Settings ->                         -- _obj : TInterface "Gtk" "Settings"
    CString ->                              -- name : TBasicType TUTF8
    Int64 ->                                -- v_long : TBasicType TInt64
    CString ->                              -- origin : TBasicType TUTF8
    IO ()

{-# DEPRECATED settingsSetLongProperty ["(Since version 3.16)","Use g_object_set() instead."]#-}
settingsSetLongProperty ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    Int64 ->                                -- v_long
    T.Text ->                               -- origin
    m ()
settingsSetLongProperty _obj name v_long origin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    origin' <- textToCString origin
    gtk_settings_set_long_property _obj' name' v_long origin'
    touchManagedPtr _obj
    freeMem name'
    freeMem origin'
    return ()

-- method Settings::set_property_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "svalue", argType = TInterface "Gtk" "SettingsValue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "svalue", argType = TInterface "Gtk" "SettingsValue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_settings_set_property_value" gtk_settings_set_property_value :: 
    Ptr Settings ->                         -- _obj : TInterface "Gtk" "Settings"
    CString ->                              -- name : TBasicType TUTF8
    Ptr SettingsValue ->                    -- svalue : TInterface "Gtk" "SettingsValue"
    IO ()

{-# DEPRECATED settingsSetPropertyValue ["(Since version 3.16)","Use g_object_set() instead."]#-}
settingsSetPropertyValue ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    SettingsValue ->                        -- svalue
    m ()
settingsSetPropertyValue _obj name svalue = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    let svalue' = unsafeManagedPtrGetPtr svalue
    gtk_settings_set_property_value _obj' name' svalue'
    touchManagedPtr _obj
    touchManagedPtr svalue
    freeMem name'
    return ()

-- method Settings::set_string_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "v_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "origin", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "v_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "origin", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_settings_set_string_property" gtk_settings_set_string_property :: 
    Ptr Settings ->                         -- _obj : TInterface "Gtk" "Settings"
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- v_string : TBasicType TUTF8
    CString ->                              -- origin : TBasicType TUTF8
    IO ()

{-# DEPRECATED settingsSetStringProperty ["(Since version 3.16)","Use g_object_set() instead."]#-}
settingsSetStringProperty ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    T.Text ->                               -- v_string
    T.Text ->                               -- origin
    m ()
settingsSetStringProperty _obj name v_string origin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    v_string' <- textToCString v_string
    origin' <- textToCString origin
    gtk_settings_set_string_property _obj' name' v_string' origin'
    touchManagedPtr _obj
    freeMem name'
    freeMem v_string'
    freeMem origin'
    return ()

-- method Settings::get_default
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Settings"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_settings_get_default" gtk_settings_get_default :: 
    IO (Ptr Settings)


settingsGetDefault ::
    (MonadIO m) =>
    m Settings
settingsGetDefault  = liftIO $ do
    result <- gtk_settings_get_default
    checkUnexpectedReturnNULL "gtk_settings_get_default" result
    result' <- (newObject Settings) result
    return result'

-- method Settings::get_for_screen
-- method type : MemberFunction
-- Args : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Settings"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_settings_get_for_screen" gtk_settings_get_for_screen :: 
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO (Ptr Settings)


settingsGetForScreen ::
    (MonadIO m, Gdk.ScreenK a) =>
    a ->                                    -- screen
    m Settings
settingsGetForScreen screen = liftIO $ do
    let screen' = unsafeManagedPtrCastPtr screen
    result <- gtk_settings_get_for_screen screen'
    checkUnexpectedReturnNULL "gtk_settings_get_for_screen" result
    result' <- (newObject Settings) result
    touchManagedPtr screen
    return result'

-- method Settings::install_property
-- method type : MemberFunction
-- Args : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_settings_install_property" gtk_settings_install_property :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    IO ()

{-# DEPRECATED settingsInstallProperty ["(Since version 3.16)","This function is not useful outside GTK+."]#-}
settingsInstallProperty ::
    (MonadIO m) =>
    GParamSpec ->                           -- pspec
    m ()
settingsInstallProperty pspec = liftIO $ do
    let pspec' = unsafeManagedPtrGetPtr pspec
    gtk_settings_install_property pspec'
    return ()

-- method Settings::install_property_parser
-- method type : MemberFunction
-- Args : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parser", argType = TInterface "Gtk" "RcPropertyParser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parser", argType = TInterface "Gtk" "RcPropertyParser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_settings_install_property_parser" gtk_settings_install_property_parser :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    FunPtr RcPropertyParserC ->             -- parser : TInterface "Gtk" "RcPropertyParser"
    IO ()

{-# DEPRECATED settingsInstallPropertyParser ["(Since version 3.16)","This function is not useful outside GTK+."]#-}
settingsInstallPropertyParser ::
    (MonadIO m) =>
    GParamSpec ->                           -- pspec
    RcPropertyParser ->                     -- parser
    m ()
settingsInstallPropertyParser pspec parser = liftIO $ do
    let pspec' = unsafeManagedPtrGetPtr pspec
    parser' <- mkRcPropertyParser (rcPropertyParserWrapper Nothing parser)
    gtk_settings_install_property_parser pspec' parser'
    safeFreeFunPtr $ castFunPtrToPtr parser'
    return ()

-- struct SettingsValue
newtype SettingsValue = SettingsValue (ForeignPtr SettingsValue)
noSettingsValue :: Maybe SettingsValue
noSettingsValue = Nothing

settingsValueReadOrigin :: SettingsValue -> IO T.Text
settingsValueReadOrigin s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

settingsValueReadValue :: SettingsValue -> IO GValue
settingsValueReadValue s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO (Ptr GValue)
    val' <- (newBoxed GValue) val
    return val'

-- Enum ShadowType

data ShadowType = 
      ShadowTypeNone
    | ShadowTypeIn
    | ShadowTypeOut
    | ShadowTypeEtchedIn
    | ShadowTypeEtchedOut
    | AnotherShadowType Int
    deriving (Show, Eq)

instance Enum ShadowType where
    fromEnum ShadowTypeNone = 0
    fromEnum ShadowTypeIn = 1
    fromEnum ShadowTypeOut = 2
    fromEnum ShadowTypeEtchedIn = 3
    fromEnum ShadowTypeEtchedOut = 4
    fromEnum (AnotherShadowType k) = k

    toEnum 0 = ShadowTypeNone
    toEnum 1 = ShadowTypeIn
    toEnum 2 = ShadowTypeOut
    toEnum 3 = ShadowTypeEtchedIn
    toEnum 4 = ShadowTypeEtchedOut
    toEnum k = AnotherShadowType k

foreign import ccall "gtk_shadow_type_get_type" c_gtk_shadow_type_get_type :: 
    IO GType

instance BoxedEnum ShadowType where
    boxedEnumType _ = c_gtk_shadow_type_get_type

-- object SizeGroup 
newtype SizeGroup = SizeGroup (ForeignPtr SizeGroup)
noSizeGroup :: Maybe SizeGroup
noSizeGroup = Nothing

foreign import ccall "gtk_size_group_get_type"
    c_gtk_size_group_get_type :: IO GType

type instance ParentTypes SizeGroup = '[GObject.Object, Buildable]

instance GObject SizeGroup where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_size_group_get_type
    

class GObject o => SizeGroupK o
instance (GObject o, IsDescendantOf SizeGroup o) => SizeGroupK o

toSizeGroup :: SizeGroupK o => o -> IO SizeGroup
toSizeGroup = unsafeCastTo SizeGroup

-- method SizeGroup::new
-- method type : Constructor
-- Args : [Arg {argName = "mode", argType = TInterface "Gtk" "SizeGroupMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mode", argType = TInterface "Gtk" "SizeGroupMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SizeGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_size_group_new" gtk_size_group_new :: 
    CUInt ->                                -- mode : TInterface "Gtk" "SizeGroupMode"
    IO (Ptr SizeGroup)


sizeGroupNew ::
    (MonadIO m) =>
    SizeGroupMode ->                        -- mode
    m SizeGroup
sizeGroupNew mode = liftIO $ do
    let mode' = (fromIntegral . fromEnum) mode
    result <- gtk_size_group_new mode'
    checkUnexpectedReturnNULL "gtk_size_group_new" result
    result' <- (wrapObject SizeGroup) result
    return result'

-- method SizeGroup::add_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_size_group_add_widget" gtk_size_group_add_widget :: 
    Ptr SizeGroup ->                        -- _obj : TInterface "Gtk" "SizeGroup"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


sizeGroupAddWidget ::
    (MonadIO m, SizeGroupK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    m ()
sizeGroupAddWidget _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_size_group_add_widget _obj' widget'
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- method SizeGroup::get_ignore_hidden
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_size_group_get_ignore_hidden" gtk_size_group_get_ignore_hidden :: 
    Ptr SizeGroup ->                        -- _obj : TInterface "Gtk" "SizeGroup"
    IO CInt


sizeGroupGetIgnoreHidden ::
    (MonadIO m, SizeGroupK a) =>
    a ->                                    -- _obj
    m Bool
sizeGroupGetIgnoreHidden _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_size_group_get_ignore_hidden _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method SizeGroup::get_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SizeGroupMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_size_group_get_mode" gtk_size_group_get_mode :: 
    Ptr SizeGroup ->                        -- _obj : TInterface "Gtk" "SizeGroup"
    IO CUInt


sizeGroupGetMode ::
    (MonadIO m, SizeGroupK a) =>
    a ->                                    -- _obj
    m SizeGroupMode
sizeGroupGetMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_size_group_get_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method SizeGroup::get_widgets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "Widget")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_size_group_get_widgets" gtk_size_group_get_widgets :: 
    Ptr SizeGroup ->                        -- _obj : TInterface "Gtk" "SizeGroup"
    IO (Ptr (GSList (Ptr Widget)))


sizeGroupGetWidgets ::
    (MonadIO m, SizeGroupK a) =>
    a ->                                    -- _obj
    m [Widget]
sizeGroupGetWidgets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_size_group_get_widgets _obj'
    checkUnexpectedReturnNULL "gtk_size_group_get_widgets" result
    result' <- unpackGSList result
    result'' <- mapM (newObject Widget) result'
    touchManagedPtr _obj
    return result''

-- method SizeGroup::remove_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_size_group_remove_widget" gtk_size_group_remove_widget :: 
    Ptr SizeGroup ->                        -- _obj : TInterface "Gtk" "SizeGroup"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


sizeGroupRemoveWidget ::
    (MonadIO m, SizeGroupK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    m ()
sizeGroupRemoveWidget _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_size_group_remove_widget _obj' widget'
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- method SizeGroup::set_ignore_hidden
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ignore_hidden", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ignore_hidden", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_size_group_set_ignore_hidden" gtk_size_group_set_ignore_hidden :: 
    Ptr SizeGroup ->                        -- _obj : TInterface "Gtk" "SizeGroup"
    CInt ->                                 -- ignore_hidden : TBasicType TBoolean
    IO ()


sizeGroupSetIgnoreHidden ::
    (MonadIO m, SizeGroupK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- ignore_hidden
    m ()
sizeGroupSetIgnoreHidden _obj ignore_hidden = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let ignore_hidden' = (fromIntegral . fromEnum) ignore_hidden
    gtk_size_group_set_ignore_hidden _obj' ignore_hidden'
    touchManagedPtr _obj
    return ()

-- method SizeGroup::set_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Gtk" "SizeGroupMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SizeGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mode", argType = TInterface "Gtk" "SizeGroupMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_size_group_set_mode" gtk_size_group_set_mode :: 
    Ptr SizeGroup ->                        -- _obj : TInterface "Gtk" "SizeGroup"
    CUInt ->                                -- mode : TInterface "Gtk" "SizeGroupMode"
    IO ()


sizeGroupSetMode ::
    (MonadIO m, SizeGroupK a) =>
    a ->                                    -- _obj
    SizeGroupMode ->                        -- mode
    m ()
sizeGroupSetMode _obj mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mode' = (fromIntegral . fromEnum) mode
    gtk_size_group_set_mode _obj' mode'
    touchManagedPtr _obj
    return ()

-- Enum SizeGroupMode

data SizeGroupMode = 
      SizeGroupModeNone
    | SizeGroupModeHorizontal
    | SizeGroupModeVertical
    | SizeGroupModeBoth
    | AnotherSizeGroupMode Int
    deriving (Show, Eq)

instance Enum SizeGroupMode where
    fromEnum SizeGroupModeNone = 0
    fromEnum SizeGroupModeHorizontal = 1
    fromEnum SizeGroupModeVertical = 2
    fromEnum SizeGroupModeBoth = 3
    fromEnum (AnotherSizeGroupMode k) = k

    toEnum 0 = SizeGroupModeNone
    toEnum 1 = SizeGroupModeHorizontal
    toEnum 2 = SizeGroupModeVertical
    toEnum 3 = SizeGroupModeBoth
    toEnum k = AnotherSizeGroupMode k

foreign import ccall "gtk_size_group_mode_get_type" c_gtk_size_group_mode_get_type :: 
    IO GType

instance BoxedEnum SizeGroupMode where
    boxedEnumType _ = c_gtk_size_group_mode_get_type

-- Enum SizeRequestMode

data SizeRequestMode = 
      SizeRequestModeHeightForWidth
    | SizeRequestModeWidthForHeight
    | SizeRequestModeConstantSize
    | AnotherSizeRequestMode Int
    deriving (Show, Eq)

instance Enum SizeRequestMode where
    fromEnum SizeRequestModeHeightForWidth = 0
    fromEnum SizeRequestModeWidthForHeight = 1
    fromEnum SizeRequestModeConstantSize = 2
    fromEnum (AnotherSizeRequestMode k) = k

    toEnum 0 = SizeRequestModeHeightForWidth
    toEnum 1 = SizeRequestModeWidthForHeight
    toEnum 2 = SizeRequestModeConstantSize
    toEnum k = AnotherSizeRequestMode k

foreign import ccall "gtk_size_request_mode_get_type" c_gtk_size_request_mode_get_type :: 
    IO GType

instance BoxedEnum SizeRequestMode where
    boxedEnumType _ = c_gtk_size_request_mode_get_type

-- object Socket 
newtype Socket = Socket (ForeignPtr Socket)
noSocket :: Maybe Socket
noSocket = Nothing

foreign import ccall "gtk_socket_get_type"
    c_gtk_socket_get_type :: IO GType

type instance ParentTypes Socket = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Socket where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_socket_get_type
    

class GObject o => SocketK o
instance (GObject o, IsDescendantOf Socket o) => SocketK o

toSocket :: SocketK o => o -> IO Socket
toSocket = unsafeCastTo Socket

-- method Socket::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Socket"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_socket_new" gtk_socket_new :: 
    IO (Ptr Socket)


socketNew ::
    (MonadIO m) =>
    m Socket
socketNew  = liftIO $ do
    result <- gtk_socket_new
    checkUnexpectedReturnNULL "gtk_socket_new" result
    result' <- (newObject Socket) result
    return result'

-- method Socket::add_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Socket", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Socket", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_socket_add_id" gtk_socket_add_id :: 
    Ptr Socket ->                           -- _obj : TInterface "Gtk" "Socket"
    Word64 ->                               -- window : TBasicType TUInt64
    IO ()


socketAddId ::
    (MonadIO m, SocketK a) =>
    a ->                                    -- _obj
    Word64 ->                               -- window
    m ()
socketAddId _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_socket_add_id _obj' window
    touchManagedPtr _obj
    return ()

-- method Socket::get_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Socket", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Socket", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False

foreign import ccall "gtk_socket_get_id" gtk_socket_get_id :: 
    Ptr Socket ->                           -- _obj : TInterface "Gtk" "Socket"
    IO Word64


socketGetId ::
    (MonadIO m, SocketK a) =>
    a ->                                    -- _obj
    m Word64
socketGetId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_socket_get_id _obj'
    touchManagedPtr _obj
    return result

-- method Socket::get_plug_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Socket", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Socket", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_socket_get_plug_window" gtk_socket_get_plug_window :: 
    Ptr Socket ->                           -- _obj : TInterface "Gtk" "Socket"
    IO (Ptr Gdk.Window)


socketGetPlugWindow ::
    (MonadIO m, SocketK a) =>
    a ->                                    -- _obj
    m Gdk.Window
socketGetPlugWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_socket_get_plug_window _obj'
    checkUnexpectedReturnNULL "gtk_socket_get_plug_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- signal Socket::plug-added
type SocketPlugAddedCallback =
    IO ()

noSocketPlugAddedCallback :: Maybe SocketPlugAddedCallback
noSocketPlugAddedCallback = Nothing

type SocketPlugAddedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkSocketPlugAddedCallback :: SocketPlugAddedCallbackC -> IO (FunPtr SocketPlugAddedCallbackC)

socketPlugAddedClosure :: SocketPlugAddedCallback -> IO Closure
socketPlugAddedClosure cb = newCClosure =<< mkSocketPlugAddedCallback wrapped
    where wrapped = socketPlugAddedCallbackWrapper cb

socketPlugAddedCallbackWrapper ::
    SocketPlugAddedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
socketPlugAddedCallbackWrapper _cb _ _ = do
    _cb 

onSocketPlugAdded :: (GObject a, MonadIO m) => a -> SocketPlugAddedCallback -> m SignalHandlerId
onSocketPlugAdded obj cb = liftIO $ connectSocketPlugAdded obj cb SignalConnectBefore
afterSocketPlugAdded :: (GObject a, MonadIO m) => a -> SocketPlugAddedCallback -> m SignalHandlerId
afterSocketPlugAdded obj cb = connectSocketPlugAdded obj cb SignalConnectAfter

connectSocketPlugAdded :: (GObject a, MonadIO m) =>
                          a -> SocketPlugAddedCallback -> SignalConnectMode -> m SignalHandlerId
connectSocketPlugAdded obj cb after = liftIO $ do
    cb' <- mkSocketPlugAddedCallback (socketPlugAddedCallbackWrapper cb)
    connectSignalFunPtr obj "plug-added" cb' after

-- signal Socket::plug-removed
type SocketPlugRemovedCallback =
    IO Bool

noSocketPlugRemovedCallback :: Maybe SocketPlugRemovedCallback
noSocketPlugRemovedCallback = Nothing

type SocketPlugRemovedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkSocketPlugRemovedCallback :: SocketPlugRemovedCallbackC -> IO (FunPtr SocketPlugRemovedCallbackC)

socketPlugRemovedClosure :: SocketPlugRemovedCallback -> IO Closure
socketPlugRemovedClosure cb = newCClosure =<< mkSocketPlugRemovedCallback wrapped
    where wrapped = socketPlugRemovedCallbackWrapper cb

socketPlugRemovedCallbackWrapper ::
    SocketPlugRemovedCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
socketPlugRemovedCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onSocketPlugRemoved :: (GObject a, MonadIO m) => a -> SocketPlugRemovedCallback -> m SignalHandlerId
onSocketPlugRemoved obj cb = liftIO $ connectSocketPlugRemoved obj cb SignalConnectBefore
afterSocketPlugRemoved :: (GObject a, MonadIO m) => a -> SocketPlugRemovedCallback -> m SignalHandlerId
afterSocketPlugRemoved obj cb = connectSocketPlugRemoved obj cb SignalConnectAfter

connectSocketPlugRemoved :: (GObject a, MonadIO m) =>
                            a -> SocketPlugRemovedCallback -> SignalConnectMode -> m SignalHandlerId
connectSocketPlugRemoved obj cb after = liftIO $ do
    cb' <- mkSocketPlugRemovedCallback (socketPlugRemovedCallbackWrapper cb)
    connectSignalFunPtr obj "plug-removed" cb' after

-- Enum SortType

data SortType = 
      SortTypeAscending
    | SortTypeDescending
    | AnotherSortType Int
    deriving (Show, Eq)

instance Enum SortType where
    fromEnum SortTypeAscending = 0
    fromEnum SortTypeDescending = 1
    fromEnum (AnotherSortType k) = k

    toEnum 0 = SortTypeAscending
    toEnum 1 = SortTypeDescending
    toEnum k = AnotherSortType k

foreign import ccall "gtk_sort_type_get_type" c_gtk_sort_type_get_type :: 
    IO GType

instance BoxedEnum SortType where
    boxedEnumType _ = c_gtk_sort_type_get_type

-- object SpinButton 
newtype SpinButton = SpinButton (ForeignPtr SpinButton)
noSpinButton :: Maybe SpinButton
noSpinButton = Nothing

foreign import ccall "gtk_spin_button_get_type"
    c_gtk_spin_button_get_type :: IO GType

type instance ParentTypes SpinButton = '[Entry, Widget, GObject.Object, Atk.ImplementorIface, Buildable, CellEditable, Editable, Orientable]

instance GObject SpinButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_spin_button_get_type
    

class GObject o => SpinButtonK o
instance (GObject o, IsDescendantOf SpinButton o) => SpinButtonK o

toSpinButton :: SpinButtonK o => o -> IO SpinButton
toSpinButton = unsafeCastTo SpinButton

-- method SpinButton::new
-- method type : Constructor
-- Args : [Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "climb_rate", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "digits", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "climb_rate", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "digits", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SpinButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_new" gtk_spin_button_new :: 
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    CDouble ->                              -- climb_rate : TBasicType TDouble
    Word32 ->                               -- digits : TBasicType TUInt32
    IO (Ptr SpinButton)


spinButtonNew ::
    (MonadIO m, AdjustmentK a) =>
    Maybe (a) ->                            -- adjustment
    Double ->                               -- climb_rate
    Word32 ->                               -- digits
    m SpinButton
spinButtonNew adjustment climb_rate digits = liftIO $ do
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    let climb_rate' = realToFrac climb_rate
    result <- gtk_spin_button_new maybeAdjustment climb_rate' digits
    checkUnexpectedReturnNULL "gtk_spin_button_new" result
    result' <- (newObject SpinButton) result
    whenJust adjustment touchManagedPtr
    return result'

-- method SpinButton::new_with_range
-- method type : Constructor
-- Args : [Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SpinButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_new_with_range" gtk_spin_button_new_with_range :: 
    CDouble ->                              -- min : TBasicType TDouble
    CDouble ->                              -- max : TBasicType TDouble
    CDouble ->                              -- step : TBasicType TDouble
    IO (Ptr SpinButton)


spinButtonNewWithRange ::
    (MonadIO m) =>
    Double ->                               -- min
    Double ->                               -- max
    Double ->                               -- step
    m SpinButton
spinButtonNewWithRange min max step = liftIO $ do
    let min' = realToFrac min
    let max' = realToFrac max
    let step' = realToFrac step
    result <- gtk_spin_button_new_with_range min' max' step'
    checkUnexpectedReturnNULL "gtk_spin_button_new_with_range" result
    result' <- (newObject SpinButton) result
    return result'

-- method SpinButton::configure
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "climb_rate", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "digits", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "climb_rate", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "digits", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_configure" gtk_spin_button_configure :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    CDouble ->                              -- climb_rate : TBasicType TDouble
    Word32 ->                               -- digits : TBasicType TUInt32
    IO ()


spinButtonConfigure ::
    (MonadIO m, SpinButtonK a, AdjustmentK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- adjustment
    Double ->                               -- climb_rate
    Word32 ->                               -- digits
    m ()
spinButtonConfigure _obj adjustment climb_rate digits = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    let climb_rate' = realToFrac climb_rate
    gtk_spin_button_configure _obj' maybeAdjustment climb_rate' digits
    touchManagedPtr _obj
    whenJust adjustment touchManagedPtr
    return ()

-- method SpinButton::get_adjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_get_adjustment" gtk_spin_button_get_adjustment :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    IO (Ptr Adjustment)


spinButtonGetAdjustment ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    m Adjustment
spinButtonGetAdjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_spin_button_get_adjustment _obj'
    checkUnexpectedReturnNULL "gtk_spin_button_get_adjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method SpinButton::get_digits
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_get_digits" gtk_spin_button_get_digits :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    IO Word32


spinButtonGetDigits ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    m Word32
spinButtonGetDigits _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_spin_button_get_digits _obj'
    touchManagedPtr _obj
    return result

-- method SpinButton::get_increments
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "page", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_get_increments" gtk_spin_button_get_increments :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    Ptr CDouble ->                          -- step : TBasicType TDouble
    Ptr CDouble ->                          -- page : TBasicType TDouble
    IO ()


spinButtonGetIncrements ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    m (Double,Double)
spinButtonGetIncrements _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    step <- allocMem :: IO (Ptr CDouble)
    page <- allocMem :: IO (Ptr CDouble)
    gtk_spin_button_get_increments _obj' step page
    step' <- peek step
    let step'' = realToFrac step'
    page' <- peek page
    let page'' = realToFrac page'
    touchManagedPtr _obj
    freeMem step
    freeMem page
    return (step'', page'')

-- method SpinButton::get_numeric
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_get_numeric" gtk_spin_button_get_numeric :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    IO CInt


spinButtonGetNumeric ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    m Bool
spinButtonGetNumeric _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_spin_button_get_numeric _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method SpinButton::get_range
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_get_range" gtk_spin_button_get_range :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    Ptr CDouble ->                          -- min : TBasicType TDouble
    Ptr CDouble ->                          -- max : TBasicType TDouble
    IO ()


spinButtonGetRange ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    m (Double,Double)
spinButtonGetRange _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    min <- allocMem :: IO (Ptr CDouble)
    max <- allocMem :: IO (Ptr CDouble)
    gtk_spin_button_get_range _obj' min max
    min' <- peek min
    let min'' = realToFrac min'
    max' <- peek max
    let max'' = realToFrac max'
    touchManagedPtr _obj
    freeMem min
    freeMem max
    return (min'', max'')

-- method SpinButton::get_snap_to_ticks
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_get_snap_to_ticks" gtk_spin_button_get_snap_to_ticks :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    IO CInt


spinButtonGetSnapToTicks ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    m Bool
spinButtonGetSnapToTicks _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_spin_button_get_snap_to_ticks _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method SpinButton::get_update_policy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SpinButtonUpdatePolicy"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_get_update_policy" gtk_spin_button_get_update_policy :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    IO CUInt


spinButtonGetUpdatePolicy ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    m SpinButtonUpdatePolicy
spinButtonGetUpdatePolicy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_spin_button_get_update_policy _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method SpinButton::get_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_get_value" gtk_spin_button_get_value :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    IO CDouble


spinButtonGetValue ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    m Double
spinButtonGetValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_spin_button_get_value _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method SpinButton::get_value_as_int
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_get_value_as_int" gtk_spin_button_get_value_as_int :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    IO Int32


spinButtonGetValueAsInt ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    m Int32
spinButtonGetValueAsInt _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_spin_button_get_value_as_int _obj'
    touchManagedPtr _obj
    return result

-- method SpinButton::get_wrap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_get_wrap" gtk_spin_button_get_wrap :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    IO CInt


spinButtonGetWrap ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    m Bool
spinButtonGetWrap _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_spin_button_get_wrap _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method SpinButton::set_adjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_set_adjustment" gtk_spin_button_set_adjustment :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()


spinButtonSetAdjustment ::
    (MonadIO m, SpinButtonK a, AdjustmentK b) =>
    a ->                                    -- _obj
    b ->                                    -- adjustment
    m ()
spinButtonSetAdjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let adjustment' = unsafeManagedPtrCastPtr adjustment
    gtk_spin_button_set_adjustment _obj' adjustment'
    touchManagedPtr _obj
    touchManagedPtr adjustment
    return ()

-- method SpinButton::set_digits
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "digits", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "digits", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_set_digits" gtk_spin_button_set_digits :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    Word32 ->                               -- digits : TBasicType TUInt32
    IO ()


spinButtonSetDigits ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- digits
    m ()
spinButtonSetDigits _obj digits = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_spin_button_set_digits _obj' digits
    touchManagedPtr _obj
    return ()

-- method SpinButton::set_increments
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_set_increments" gtk_spin_button_set_increments :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    CDouble ->                              -- step : TBasicType TDouble
    CDouble ->                              -- page : TBasicType TDouble
    IO ()


spinButtonSetIncrements ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    Double ->                               -- step
    Double ->                               -- page
    m ()
spinButtonSetIncrements _obj step page = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let step' = realToFrac step
    let page' = realToFrac page
    gtk_spin_button_set_increments _obj' step' page'
    touchManagedPtr _obj
    return ()

-- method SpinButton::set_numeric
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "numeric", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "numeric", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_set_numeric" gtk_spin_button_set_numeric :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    CInt ->                                 -- numeric : TBasicType TBoolean
    IO ()


spinButtonSetNumeric ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- numeric
    m ()
spinButtonSetNumeric _obj numeric = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let numeric' = (fromIntegral . fromEnum) numeric
    gtk_spin_button_set_numeric _obj' numeric'
    touchManagedPtr _obj
    return ()

-- method SpinButton::set_range
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_set_range" gtk_spin_button_set_range :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    CDouble ->                              -- min : TBasicType TDouble
    CDouble ->                              -- max : TBasicType TDouble
    IO ()


spinButtonSetRange ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    Double ->                               -- min
    Double ->                               -- max
    m ()
spinButtonSetRange _obj min max = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let min' = realToFrac min
    let max' = realToFrac max
    gtk_spin_button_set_range _obj' min' max'
    touchManagedPtr _obj
    return ()

-- method SpinButton::set_snap_to_ticks
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "snap_to_ticks", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "snap_to_ticks", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_set_snap_to_ticks" gtk_spin_button_set_snap_to_ticks :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    CInt ->                                 -- snap_to_ticks : TBasicType TBoolean
    IO ()


spinButtonSetSnapToTicks ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- snap_to_ticks
    m ()
spinButtonSetSnapToTicks _obj snap_to_ticks = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let snap_to_ticks' = (fromIntegral . fromEnum) snap_to_ticks
    gtk_spin_button_set_snap_to_ticks _obj' snap_to_ticks'
    touchManagedPtr _obj
    return ()

-- method SpinButton::set_update_policy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "policy", argType = TInterface "Gtk" "SpinButtonUpdatePolicy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "policy", argType = TInterface "Gtk" "SpinButtonUpdatePolicy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_set_update_policy" gtk_spin_button_set_update_policy :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    CUInt ->                                -- policy : TInterface "Gtk" "SpinButtonUpdatePolicy"
    IO ()


spinButtonSetUpdatePolicy ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    SpinButtonUpdatePolicy ->               -- policy
    m ()
spinButtonSetUpdatePolicy _obj policy = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let policy' = (fromIntegral . fromEnum) policy
    gtk_spin_button_set_update_policy _obj' policy'
    touchManagedPtr _obj
    return ()

-- method SpinButton::set_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_set_value" gtk_spin_button_set_value :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    CDouble ->                              -- value : TBasicType TDouble
    IO ()


spinButtonSetValue ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    Double ->                               -- value
    m ()
spinButtonSetValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = realToFrac value
    gtk_spin_button_set_value _obj' value'
    touchManagedPtr _obj
    return ()

-- method SpinButton::set_wrap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_set_wrap" gtk_spin_button_set_wrap :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    CInt ->                                 -- wrap : TBasicType TBoolean
    IO ()


spinButtonSetWrap ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- wrap
    m ()
spinButtonSetWrap _obj wrap = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let wrap' = (fromIntegral . fromEnum) wrap
    gtk_spin_button_set_wrap _obj' wrap'
    touchManagedPtr _obj
    return ()

-- method SpinButton::spin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "SpinType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "SpinType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_spin" gtk_spin_button_spin :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    CUInt ->                                -- direction : TInterface "Gtk" "SpinType"
    CDouble ->                              -- increment : TBasicType TDouble
    IO ()


spinButtonSpin ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    SpinType ->                             -- direction
    Double ->                               -- increment
    m ()
spinButtonSpin _obj direction increment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let direction' = (fromIntegral . fromEnum) direction
    let increment' = realToFrac increment
    gtk_spin_button_spin _obj' direction' increment'
    touchManagedPtr _obj
    return ()

-- method SpinButton::update
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spin_button_update" gtk_spin_button_update :: 
    Ptr SpinButton ->                       -- _obj : TInterface "Gtk" "SpinButton"
    IO ()


spinButtonUpdate ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- _obj
    m ()
spinButtonUpdate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_spin_button_update _obj'
    touchManagedPtr _obj
    return ()

-- signal SpinButton::change-value
type SpinButtonChangeValueCallback =
    ScrollType ->
    IO ()

noSpinButtonChangeValueCallback :: Maybe SpinButtonChangeValueCallback
noSpinButtonChangeValueCallback = Nothing

type SpinButtonChangeValueCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkSpinButtonChangeValueCallback :: SpinButtonChangeValueCallbackC -> IO (FunPtr SpinButtonChangeValueCallbackC)

spinButtonChangeValueClosure :: SpinButtonChangeValueCallback -> IO Closure
spinButtonChangeValueClosure cb = newCClosure =<< mkSpinButtonChangeValueCallback wrapped
    where wrapped = spinButtonChangeValueCallbackWrapper cb

spinButtonChangeValueCallbackWrapper ::
    SpinButtonChangeValueCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
spinButtonChangeValueCallbackWrapper _cb _ scroll _ = do
    let scroll' = (toEnum . fromIntegral) scroll
    _cb  scroll'

onSpinButtonChangeValue :: (GObject a, MonadIO m) => a -> SpinButtonChangeValueCallback -> m SignalHandlerId
onSpinButtonChangeValue obj cb = liftIO $ connectSpinButtonChangeValue obj cb SignalConnectBefore
afterSpinButtonChangeValue :: (GObject a, MonadIO m) => a -> SpinButtonChangeValueCallback -> m SignalHandlerId
afterSpinButtonChangeValue obj cb = connectSpinButtonChangeValue obj cb SignalConnectAfter

connectSpinButtonChangeValue :: (GObject a, MonadIO m) =>
                                a -> SpinButtonChangeValueCallback -> SignalConnectMode -> m SignalHandlerId
connectSpinButtonChangeValue obj cb after = liftIO $ do
    cb' <- mkSpinButtonChangeValueCallback (spinButtonChangeValueCallbackWrapper cb)
    connectSignalFunPtr obj "change-value" cb' after

-- signal SpinButton::input
type SpinButtonInputCallback =
    IO (Int32,Double)

noSpinButtonInputCallback :: Maybe SpinButtonInputCallback
noSpinButtonInputCallback = Nothing

type SpinButtonInputCallbackC =
    Ptr () ->                               -- object
    Ptr CDouble ->
    Ptr () ->                               -- user_data
    IO Int32

foreign import ccall "wrapper"
    mkSpinButtonInputCallback :: SpinButtonInputCallbackC -> IO (FunPtr SpinButtonInputCallbackC)

spinButtonInputClosure :: SpinButtonInputCallback -> IO Closure
spinButtonInputClosure cb = newCClosure =<< mkSpinButtonInputCallback wrapped
    where wrapped = spinButtonInputCallbackWrapper cb

spinButtonInputCallbackWrapper ::
    SpinButtonInputCallback ->
    Ptr () ->
    Ptr CDouble ->
    Ptr () ->
    IO Int32
spinButtonInputCallbackWrapper _cb _ new_value _ = do
    (result, outnew_value) <- _cb 
    let outnew_value' = realToFrac outnew_value
    poke new_value outnew_value'
    return result

onSpinButtonInput :: (GObject a, MonadIO m) => a -> SpinButtonInputCallback -> m SignalHandlerId
onSpinButtonInput obj cb = liftIO $ connectSpinButtonInput obj cb SignalConnectBefore
afterSpinButtonInput :: (GObject a, MonadIO m) => a -> SpinButtonInputCallback -> m SignalHandlerId
afterSpinButtonInput obj cb = connectSpinButtonInput obj cb SignalConnectAfter

connectSpinButtonInput :: (GObject a, MonadIO m) =>
                          a -> SpinButtonInputCallback -> SignalConnectMode -> m SignalHandlerId
connectSpinButtonInput obj cb after = liftIO $ do
    cb' <- mkSpinButtonInputCallback (spinButtonInputCallbackWrapper cb)
    connectSignalFunPtr obj "input" cb' after

-- signal SpinButton::output
type SpinButtonOutputCallback =
    IO Bool

noSpinButtonOutputCallback :: Maybe SpinButtonOutputCallback
noSpinButtonOutputCallback = Nothing

type SpinButtonOutputCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkSpinButtonOutputCallback :: SpinButtonOutputCallbackC -> IO (FunPtr SpinButtonOutputCallbackC)

spinButtonOutputClosure :: SpinButtonOutputCallback -> IO Closure
spinButtonOutputClosure cb = newCClosure =<< mkSpinButtonOutputCallback wrapped
    where wrapped = spinButtonOutputCallbackWrapper cb

spinButtonOutputCallbackWrapper ::
    SpinButtonOutputCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
spinButtonOutputCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onSpinButtonOutput :: (GObject a, MonadIO m) => a -> SpinButtonOutputCallback -> m SignalHandlerId
onSpinButtonOutput obj cb = liftIO $ connectSpinButtonOutput obj cb SignalConnectBefore
afterSpinButtonOutput :: (GObject a, MonadIO m) => a -> SpinButtonOutputCallback -> m SignalHandlerId
afterSpinButtonOutput obj cb = connectSpinButtonOutput obj cb SignalConnectAfter

connectSpinButtonOutput :: (GObject a, MonadIO m) =>
                           a -> SpinButtonOutputCallback -> SignalConnectMode -> m SignalHandlerId
connectSpinButtonOutput obj cb after = liftIO $ do
    cb' <- mkSpinButtonOutputCallback (spinButtonOutputCallbackWrapper cb)
    connectSignalFunPtr obj "output" cb' after

-- signal SpinButton::value-changed
type SpinButtonValueChangedCallback =
    IO ()

noSpinButtonValueChangedCallback :: Maybe SpinButtonValueChangedCallback
noSpinButtonValueChangedCallback = Nothing

type SpinButtonValueChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkSpinButtonValueChangedCallback :: SpinButtonValueChangedCallbackC -> IO (FunPtr SpinButtonValueChangedCallbackC)

spinButtonValueChangedClosure :: SpinButtonValueChangedCallback -> IO Closure
spinButtonValueChangedClosure cb = newCClosure =<< mkSpinButtonValueChangedCallback wrapped
    where wrapped = spinButtonValueChangedCallbackWrapper cb

spinButtonValueChangedCallbackWrapper ::
    SpinButtonValueChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
spinButtonValueChangedCallbackWrapper _cb _ _ = do
    _cb 

onSpinButtonValueChanged :: (GObject a, MonadIO m) => a -> SpinButtonValueChangedCallback -> m SignalHandlerId
onSpinButtonValueChanged obj cb = liftIO $ connectSpinButtonValueChanged obj cb SignalConnectBefore
afterSpinButtonValueChanged :: (GObject a, MonadIO m) => a -> SpinButtonValueChangedCallback -> m SignalHandlerId
afterSpinButtonValueChanged obj cb = connectSpinButtonValueChanged obj cb SignalConnectAfter

connectSpinButtonValueChanged :: (GObject a, MonadIO m) =>
                                 a -> SpinButtonValueChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectSpinButtonValueChanged obj cb after = liftIO $ do
    cb' <- mkSpinButtonValueChangedCallback (spinButtonValueChangedCallbackWrapper cb)
    connectSignalFunPtr obj "value-changed" cb' after

-- signal SpinButton::wrapped
type SpinButtonWrappedCallback =
    IO ()

noSpinButtonWrappedCallback :: Maybe SpinButtonWrappedCallback
noSpinButtonWrappedCallback = Nothing

type SpinButtonWrappedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkSpinButtonWrappedCallback :: SpinButtonWrappedCallbackC -> IO (FunPtr SpinButtonWrappedCallbackC)

spinButtonWrappedClosure :: SpinButtonWrappedCallback -> IO Closure
spinButtonWrappedClosure cb = newCClosure =<< mkSpinButtonWrappedCallback wrapped
    where wrapped = spinButtonWrappedCallbackWrapper cb

spinButtonWrappedCallbackWrapper ::
    SpinButtonWrappedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
spinButtonWrappedCallbackWrapper _cb _ _ = do
    _cb 

onSpinButtonWrapped :: (GObject a, MonadIO m) => a -> SpinButtonWrappedCallback -> m SignalHandlerId
onSpinButtonWrapped obj cb = liftIO $ connectSpinButtonWrapped obj cb SignalConnectBefore
afterSpinButtonWrapped :: (GObject a, MonadIO m) => a -> SpinButtonWrappedCallback -> m SignalHandlerId
afterSpinButtonWrapped obj cb = connectSpinButtonWrapped obj cb SignalConnectAfter

connectSpinButtonWrapped :: (GObject a, MonadIO m) =>
                            a -> SpinButtonWrappedCallback -> SignalConnectMode -> m SignalHandlerId
connectSpinButtonWrapped obj cb after = liftIO $ do
    cb' <- mkSpinButtonWrappedCallback (spinButtonWrappedCallbackWrapper cb)
    connectSignalFunPtr obj "wrapped" cb' after

-- object SpinButtonAccessible 
newtype SpinButtonAccessible = SpinButtonAccessible (ForeignPtr SpinButtonAccessible)
noSpinButtonAccessible :: Maybe SpinButtonAccessible
noSpinButtonAccessible = Nothing

foreign import ccall "gtk_spin_button_accessible_get_type"
    c_gtk_spin_button_accessible_get_type :: IO GType

type instance ParentTypes SpinButtonAccessible = '[EntryAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.EditableText, Atk.Text, Atk.Value]

instance GObject SpinButtonAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_spin_button_accessible_get_type
    

class GObject o => SpinButtonAccessibleK o
instance (GObject o, IsDescendantOf SpinButtonAccessible o) => SpinButtonAccessibleK o

toSpinButtonAccessible :: SpinButtonAccessibleK o => o -> IO SpinButtonAccessible
toSpinButtonAccessible = unsafeCastTo SpinButtonAccessible

-- Enum SpinButtonUpdatePolicy

data SpinButtonUpdatePolicy = 
      SpinButtonUpdatePolicyAlways
    | SpinButtonUpdatePolicyIfValid
    | AnotherSpinButtonUpdatePolicy Int
    deriving (Show, Eq)

instance Enum SpinButtonUpdatePolicy where
    fromEnum SpinButtonUpdatePolicyAlways = 0
    fromEnum SpinButtonUpdatePolicyIfValid = 1
    fromEnum (AnotherSpinButtonUpdatePolicy k) = k

    toEnum 0 = SpinButtonUpdatePolicyAlways
    toEnum 1 = SpinButtonUpdatePolicyIfValid
    toEnum k = AnotherSpinButtonUpdatePolicy k

foreign import ccall "gtk_spin_button_update_policy_get_type" c_gtk_spin_button_update_policy_get_type :: 
    IO GType

instance BoxedEnum SpinButtonUpdatePolicy where
    boxedEnumType _ = c_gtk_spin_button_update_policy_get_type

-- Enum SpinType

data SpinType = 
      SpinTypeStepForward
    | SpinTypeStepBackward
    | SpinTypePageForward
    | SpinTypePageBackward
    | SpinTypeHome
    | SpinTypeEnd
    | SpinTypeUserDefined
    | AnotherSpinType Int
    deriving (Show, Eq)

instance Enum SpinType where
    fromEnum SpinTypeStepForward = 0
    fromEnum SpinTypeStepBackward = 1
    fromEnum SpinTypePageForward = 2
    fromEnum SpinTypePageBackward = 3
    fromEnum SpinTypeHome = 4
    fromEnum SpinTypeEnd = 5
    fromEnum SpinTypeUserDefined = 6
    fromEnum (AnotherSpinType k) = k

    toEnum 0 = SpinTypeStepForward
    toEnum 1 = SpinTypeStepBackward
    toEnum 2 = SpinTypePageForward
    toEnum 3 = SpinTypePageBackward
    toEnum 4 = SpinTypeHome
    toEnum 5 = SpinTypeEnd
    toEnum 6 = SpinTypeUserDefined
    toEnum k = AnotherSpinType k

foreign import ccall "gtk_spin_type_get_type" c_gtk_spin_type_get_type :: 
    IO GType

instance BoxedEnum SpinType where
    boxedEnumType _ = c_gtk_spin_type_get_type

-- object Spinner 
newtype Spinner = Spinner (ForeignPtr Spinner)
noSpinner :: Maybe Spinner
noSpinner = Nothing

foreign import ccall "gtk_spinner_get_type"
    c_gtk_spinner_get_type :: IO GType

type instance ParentTypes Spinner = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Spinner where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_spinner_get_type
    

class GObject o => SpinnerK o
instance (GObject o, IsDescendantOf Spinner o) => SpinnerK o

toSpinner :: SpinnerK o => o -> IO Spinner
toSpinner = unsafeCastTo Spinner

-- method Spinner::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Spinner"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spinner_new" gtk_spinner_new :: 
    IO (Ptr Spinner)


spinnerNew ::
    (MonadIO m) =>
    m Spinner
spinnerNew  = liftIO $ do
    result <- gtk_spinner_new
    checkUnexpectedReturnNULL "gtk_spinner_new" result
    result' <- (newObject Spinner) result
    return result'

-- method Spinner::start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Spinner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Spinner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spinner_start" gtk_spinner_start :: 
    Ptr Spinner ->                          -- _obj : TInterface "Gtk" "Spinner"
    IO ()


spinnerStart ::
    (MonadIO m, SpinnerK a) =>
    a ->                                    -- _obj
    m ()
spinnerStart _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_spinner_start _obj'
    touchManagedPtr _obj
    return ()

-- method Spinner::stop
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Spinner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Spinner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_spinner_stop" gtk_spinner_stop :: 
    Ptr Spinner ->                          -- _obj : TInterface "Gtk" "Spinner"
    IO ()


spinnerStop ::
    (MonadIO m, SpinnerK a) =>
    a ->                                    -- _obj
    m ()
spinnerStop _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_spinner_stop _obj'
    touchManagedPtr _obj
    return ()

-- object SpinnerAccessible 
newtype SpinnerAccessible = SpinnerAccessible (ForeignPtr SpinnerAccessible)
noSpinnerAccessible :: Maybe SpinnerAccessible
noSpinnerAccessible = Nothing

foreign import ccall "gtk_spinner_accessible_get_type"
    c_gtk_spinner_accessible_get_type :: IO GType

type instance ParentTypes SpinnerAccessible = '[WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Image]

instance GObject SpinnerAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_spinner_accessible_get_type
    

class GObject o => SpinnerAccessibleK o
instance (GObject o, IsDescendantOf SpinnerAccessible o) => SpinnerAccessibleK o

toSpinnerAccessible :: SpinnerAccessibleK o => o -> IO SpinnerAccessible
toSpinnerAccessible = unsafeCastTo SpinnerAccessible

-- object Stack 
newtype Stack = Stack (ForeignPtr Stack)
noStack :: Maybe Stack
noStack = Nothing

foreign import ccall "gtk_stack_get_type"
    c_gtk_stack_get_type :: IO GType

type instance ParentTypes Stack = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Stack where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_stack_get_type
    

class GObject o => StackK o
instance (GObject o, IsDescendantOf Stack o) => StackK o

toStack :: StackK o => o -> IO Stack
toStack = unsafeCastTo Stack

-- method Stack::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Stack"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_new" gtk_stack_new :: 
    IO (Ptr Stack)


stackNew ::
    (MonadIO m) =>
    m Stack
stackNew  = liftIO $ do
    result <- gtk_stack_new
    checkUnexpectedReturnNULL "gtk_stack_new" result
    result' <- (newObject Stack) result
    return result'

-- method Stack::add_named
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_add_named" gtk_stack_add_named :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


stackAddNamed ::
    (MonadIO m, StackK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    T.Text ->                               -- name
    m ()
stackAddNamed _obj child name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    name' <- textToCString name
    gtk_stack_add_named _obj' child' name'
    touchManagedPtr _obj
    touchManagedPtr child
    freeMem name'
    return ()

-- method Stack::add_titled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_add_titled" gtk_stack_add_titled :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- title : TBasicType TUTF8
    IO ()


stackAddTitled ::
    (MonadIO m, StackK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    T.Text ->                               -- name
    T.Text ->                               -- title
    m ()
stackAddTitled _obj child name title = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    name' <- textToCString name
    title' <- textToCString title
    gtk_stack_add_titled _obj' child' name' title'
    touchManagedPtr _obj
    touchManagedPtr child
    freeMem name'
    freeMem title'
    return ()

-- method Stack::get_child_by_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_get_child_by_name" gtk_stack_get_child_by_name :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr Widget)


stackGetChildByName ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m Widget
stackGetChildByName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    result <- gtk_stack_get_child_by_name _obj' name'
    checkUnexpectedReturnNULL "gtk_stack_get_child_by_name" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    freeMem name'
    return result'

-- method Stack::get_hhomogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_get_hhomogeneous" gtk_stack_get_hhomogeneous :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    IO CInt


stackGetHhomogeneous ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    m Bool
stackGetHhomogeneous _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_stack_get_hhomogeneous _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Stack::get_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_get_homogeneous" gtk_stack_get_homogeneous :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    IO CInt


stackGetHomogeneous ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    m Bool
stackGetHomogeneous _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_stack_get_homogeneous _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Stack::get_interpolate_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_get_interpolate_size" gtk_stack_get_interpolate_size :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    IO CInt


stackGetInterpolateSize ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    m Bool
stackGetInterpolateSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_stack_get_interpolate_size _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Stack::get_transition_duration
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_get_transition_duration" gtk_stack_get_transition_duration :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    IO Word32


stackGetTransitionDuration ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    m Word32
stackGetTransitionDuration _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_stack_get_transition_duration _obj'
    touchManagedPtr _obj
    return result

-- method Stack::get_transition_running
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_get_transition_running" gtk_stack_get_transition_running :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    IO CInt


stackGetTransitionRunning ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    m Bool
stackGetTransitionRunning _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_stack_get_transition_running _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Stack::get_transition_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StackTransitionType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_get_transition_type" gtk_stack_get_transition_type :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    IO CUInt


stackGetTransitionType ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    m StackTransitionType
stackGetTransitionType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_stack_get_transition_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Stack::get_vhomogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_get_vhomogeneous" gtk_stack_get_vhomogeneous :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    IO CInt


stackGetVhomogeneous ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    m Bool
stackGetVhomogeneous _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_stack_get_vhomogeneous _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Stack::get_visible_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_get_visible_child" gtk_stack_get_visible_child :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    IO (Ptr Widget)


stackGetVisibleChild ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    m Widget
stackGetVisibleChild _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_stack_get_visible_child _obj'
    checkUnexpectedReturnNULL "gtk_stack_get_visible_child" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Stack::get_visible_child_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_get_visible_child_name" gtk_stack_get_visible_child_name :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    IO CString


stackGetVisibleChildName ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    m T.Text
stackGetVisibleChildName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_stack_get_visible_child_name _obj'
    checkUnexpectedReturnNULL "gtk_stack_get_visible_child_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Stack::set_hhomogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hhomogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hhomogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_set_hhomogeneous" gtk_stack_set_hhomogeneous :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    CInt ->                                 -- hhomogeneous : TBasicType TBoolean
    IO ()


stackSetHhomogeneous ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- hhomogeneous
    m ()
stackSetHhomogeneous _obj hhomogeneous = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let hhomogeneous' = (fromIntegral . fromEnum) hhomogeneous
    gtk_stack_set_hhomogeneous _obj' hhomogeneous'
    touchManagedPtr _obj
    return ()

-- method Stack::set_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_set_homogeneous" gtk_stack_set_homogeneous :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    CInt ->                                 -- homogeneous : TBasicType TBoolean
    IO ()


stackSetHomogeneous ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- homogeneous
    m ()
stackSetHomogeneous _obj homogeneous = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let homogeneous' = (fromIntegral . fromEnum) homogeneous
    gtk_stack_set_homogeneous _obj' homogeneous'
    touchManagedPtr _obj
    return ()

-- method Stack::set_interpolate_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interpolate_size", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interpolate_size", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_set_interpolate_size" gtk_stack_set_interpolate_size :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    CInt ->                                 -- interpolate_size : TBasicType TBoolean
    IO ()


stackSetInterpolateSize ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- interpolate_size
    m ()
stackSetInterpolateSize _obj interpolate_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let interpolate_size' = (fromIntegral . fromEnum) interpolate_size
    gtk_stack_set_interpolate_size _obj' interpolate_size'
    touchManagedPtr _obj
    return ()

-- method Stack::set_transition_duration
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "duration", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "duration", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_set_transition_duration" gtk_stack_set_transition_duration :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    Word32 ->                               -- duration : TBasicType TUInt32
    IO ()


stackSetTransitionDuration ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- duration
    m ()
stackSetTransitionDuration _obj duration = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_stack_set_transition_duration _obj' duration
    touchManagedPtr _obj
    return ()

-- method Stack::set_transition_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "transition", argType = TInterface "Gtk" "StackTransitionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "transition", argType = TInterface "Gtk" "StackTransitionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_set_transition_type" gtk_stack_set_transition_type :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    CUInt ->                                -- transition : TInterface "Gtk" "StackTransitionType"
    IO ()


stackSetTransitionType ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    StackTransitionType ->                  -- transition
    m ()
stackSetTransitionType _obj transition = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let transition' = (fromIntegral . fromEnum) transition
    gtk_stack_set_transition_type _obj' transition'
    touchManagedPtr _obj
    return ()

-- method Stack::set_vhomogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vhomogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vhomogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_set_vhomogeneous" gtk_stack_set_vhomogeneous :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    CInt ->                                 -- vhomogeneous : TBasicType TBoolean
    IO ()


stackSetVhomogeneous ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- vhomogeneous
    m ()
stackSetVhomogeneous _obj vhomogeneous = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let vhomogeneous' = (fromIntegral . fromEnum) vhomogeneous
    gtk_stack_set_vhomogeneous _obj' vhomogeneous'
    touchManagedPtr _obj
    return ()

-- method Stack::set_visible_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_set_visible_child" gtk_stack_set_visible_child :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    IO ()


stackSetVisibleChild ::
    (MonadIO m, StackK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
stackSetVisibleChild _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_stack_set_visible_child _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Stack::set_visible_child_full
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "transition", argType = TInterface "Gtk" "StackTransitionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "transition", argType = TInterface "Gtk" "StackTransitionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_set_visible_child_full" gtk_stack_set_visible_child_full :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    CString ->                              -- name : TBasicType TUTF8
    CUInt ->                                -- transition : TInterface "Gtk" "StackTransitionType"
    IO ()


stackSetVisibleChildFull ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    StackTransitionType ->                  -- transition
    m ()
stackSetVisibleChildFull _obj name transition = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    let transition' = (fromIntegral . fromEnum) transition
    gtk_stack_set_visible_child_full _obj' name' transition'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method Stack::set_visible_child_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_set_visible_child_name" gtk_stack_set_visible_child_name :: 
    Ptr Stack ->                            -- _obj : TInterface "Gtk" "Stack"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


stackSetVisibleChildName ::
    (MonadIO m, StackK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
stackSetVisibleChildName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    gtk_stack_set_visible_child_name _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- object StackSidebar 
newtype StackSidebar = StackSidebar (ForeignPtr StackSidebar)
noStackSidebar :: Maybe StackSidebar
noStackSidebar = Nothing

foreign import ccall "gtk_stack_sidebar_get_type"
    c_gtk_stack_sidebar_get_type :: IO GType

type instance ParentTypes StackSidebar = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject StackSidebar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_stack_sidebar_get_type
    

class GObject o => StackSidebarK o
instance (GObject o, IsDescendantOf StackSidebar o) => StackSidebarK o

toStackSidebar :: StackSidebarK o => o -> IO StackSidebar
toStackSidebar = unsafeCastTo StackSidebar

-- method StackSidebar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "StackSidebar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_sidebar_new" gtk_stack_sidebar_new :: 
    IO (Ptr StackSidebar)


stackSidebarNew ::
    (MonadIO m) =>
    m StackSidebar
stackSidebarNew  = liftIO $ do
    result <- gtk_stack_sidebar_new
    checkUnexpectedReturnNULL "gtk_stack_sidebar_new" result
    result' <- (newObject StackSidebar) result
    return result'

-- method StackSidebar::get_stack
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StackSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StackSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Stack"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_sidebar_get_stack" gtk_stack_sidebar_get_stack :: 
    Ptr StackSidebar ->                     -- _obj : TInterface "Gtk" "StackSidebar"
    IO (Ptr Stack)


stackSidebarGetStack ::
    (MonadIO m, StackSidebarK a) =>
    a ->                                    -- _obj
    m Stack
stackSidebarGetStack _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_stack_sidebar_get_stack _obj'
    checkUnexpectedReturnNULL "gtk_stack_sidebar_get_stack" result
    result' <- (wrapObject Stack) result
    touchManagedPtr _obj
    return result'

-- method StackSidebar::set_stack
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StackSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stack", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StackSidebar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stack", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_sidebar_set_stack" gtk_stack_sidebar_set_stack :: 
    Ptr StackSidebar ->                     -- _obj : TInterface "Gtk" "StackSidebar"
    Ptr Stack ->                            -- stack : TInterface "Gtk" "Stack"
    IO ()


stackSidebarSetStack ::
    (MonadIO m, StackSidebarK a, StackK b) =>
    a ->                                    -- _obj
    b ->                                    -- stack
    m ()
stackSidebarSetStack _obj stack = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let stack' = unsafeManagedPtrCastPtr stack
    gtk_stack_sidebar_set_stack _obj' stack'
    touchManagedPtr _obj
    touchManagedPtr stack
    return ()

-- object StackSwitcher 
newtype StackSwitcher = StackSwitcher (ForeignPtr StackSwitcher)
noStackSwitcher :: Maybe StackSwitcher
noStackSwitcher = Nothing

foreign import ccall "gtk_stack_switcher_get_type"
    c_gtk_stack_switcher_get_type :: IO GType

type instance ParentTypes StackSwitcher = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject StackSwitcher where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_stack_switcher_get_type
    

class GObject o => StackSwitcherK o
instance (GObject o, IsDescendantOf StackSwitcher o) => StackSwitcherK o

toStackSwitcher :: StackSwitcherK o => o -> IO StackSwitcher
toStackSwitcher = unsafeCastTo StackSwitcher

-- method StackSwitcher::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "StackSwitcher"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_switcher_new" gtk_stack_switcher_new :: 
    IO (Ptr StackSwitcher)


stackSwitcherNew ::
    (MonadIO m) =>
    m StackSwitcher
stackSwitcherNew  = liftIO $ do
    result <- gtk_stack_switcher_new
    checkUnexpectedReturnNULL "gtk_stack_switcher_new" result
    result' <- (newObject StackSwitcher) result
    return result'

-- method StackSwitcher::get_stack
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StackSwitcher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StackSwitcher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Stack"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_switcher_get_stack" gtk_stack_switcher_get_stack :: 
    Ptr StackSwitcher ->                    -- _obj : TInterface "Gtk" "StackSwitcher"
    IO (Ptr Stack)


stackSwitcherGetStack ::
    (MonadIO m, StackSwitcherK a) =>
    a ->                                    -- _obj
    m Stack
stackSwitcherGetStack _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_stack_switcher_get_stack _obj'
    checkUnexpectedReturnNULL "gtk_stack_switcher_get_stack" result
    result' <- (newObject Stack) result
    touchManagedPtr _obj
    return result'

-- method StackSwitcher::set_stack
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StackSwitcher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stack", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StackSwitcher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stack", argType = TInterface "Gtk" "Stack", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stack_switcher_set_stack" gtk_stack_switcher_set_stack :: 
    Ptr StackSwitcher ->                    -- _obj : TInterface "Gtk" "StackSwitcher"
    Ptr Stack ->                            -- stack : TInterface "Gtk" "Stack"
    IO ()


stackSwitcherSetStack ::
    (MonadIO m, StackSwitcherK a, StackK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- stack
    m ()
stackSwitcherSetStack _obj stack = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeStack <- case stack of
        Nothing -> return nullPtr
        Just jStack -> do
            let jStack' = unsafeManagedPtrCastPtr jStack
            return jStack'
    gtk_stack_switcher_set_stack _obj' maybeStack
    touchManagedPtr _obj
    whenJust stack touchManagedPtr
    return ()

-- Enum StackTransitionType

data StackTransitionType = 
      StackTransitionTypeNone
    | StackTransitionTypeCrossfade
    | StackTransitionTypeSlideRight
    | StackTransitionTypeSlideLeft
    | StackTransitionTypeSlideUp
    | StackTransitionTypeSlideDown
    | StackTransitionTypeSlideLeftRight
    | StackTransitionTypeSlideUpDown
    | StackTransitionTypeOverUp
    | StackTransitionTypeOverDown
    | StackTransitionTypeOverLeft
    | StackTransitionTypeOverRight
    | StackTransitionTypeUnderUp
    | StackTransitionTypeUnderDown
    | StackTransitionTypeUnderLeft
    | StackTransitionTypeUnderRight
    | StackTransitionTypeOverUpDown
    | StackTransitionTypeOverDownUp
    | StackTransitionTypeOverLeftRight
    | StackTransitionTypeOverRightLeft
    | AnotherStackTransitionType Int
    deriving (Show, Eq)

instance Enum StackTransitionType where
    fromEnum StackTransitionTypeNone = 0
    fromEnum StackTransitionTypeCrossfade = 1
    fromEnum StackTransitionTypeSlideRight = 2
    fromEnum StackTransitionTypeSlideLeft = 3
    fromEnum StackTransitionTypeSlideUp = 4
    fromEnum StackTransitionTypeSlideDown = 5
    fromEnum StackTransitionTypeSlideLeftRight = 6
    fromEnum StackTransitionTypeSlideUpDown = 7
    fromEnum StackTransitionTypeOverUp = 8
    fromEnum StackTransitionTypeOverDown = 9
    fromEnum StackTransitionTypeOverLeft = 10
    fromEnum StackTransitionTypeOverRight = 11
    fromEnum StackTransitionTypeUnderUp = 12
    fromEnum StackTransitionTypeUnderDown = 13
    fromEnum StackTransitionTypeUnderLeft = 14
    fromEnum StackTransitionTypeUnderRight = 15
    fromEnum StackTransitionTypeOverUpDown = 16
    fromEnum StackTransitionTypeOverDownUp = 17
    fromEnum StackTransitionTypeOverLeftRight = 18
    fromEnum StackTransitionTypeOverRightLeft = 19
    fromEnum (AnotherStackTransitionType k) = k

    toEnum 0 = StackTransitionTypeNone
    toEnum 1 = StackTransitionTypeCrossfade
    toEnum 2 = StackTransitionTypeSlideRight
    toEnum 3 = StackTransitionTypeSlideLeft
    toEnum 4 = StackTransitionTypeSlideUp
    toEnum 5 = StackTransitionTypeSlideDown
    toEnum 6 = StackTransitionTypeSlideLeftRight
    toEnum 7 = StackTransitionTypeSlideUpDown
    toEnum 8 = StackTransitionTypeOverUp
    toEnum 9 = StackTransitionTypeOverDown
    toEnum 10 = StackTransitionTypeOverLeft
    toEnum 11 = StackTransitionTypeOverRight
    toEnum 12 = StackTransitionTypeUnderUp
    toEnum 13 = StackTransitionTypeUnderDown
    toEnum 14 = StackTransitionTypeUnderLeft
    toEnum 15 = StackTransitionTypeUnderRight
    toEnum 16 = StackTransitionTypeOverUpDown
    toEnum 17 = StackTransitionTypeOverDownUp
    toEnum 18 = StackTransitionTypeOverLeftRight
    toEnum 19 = StackTransitionTypeOverRightLeft
    toEnum k = AnotherStackTransitionType k

foreign import ccall "gtk_stack_transition_type_get_type" c_gtk_stack_transition_type_get_type :: 
    IO GType

instance BoxedEnum StackTransitionType where
    boxedEnumType _ = c_gtk_stack_transition_type_get_type

-- Flags StateFlags

data StateFlags = 
      StateFlagsNormal
    | StateFlagsActive
    | StateFlagsPrelight
    | StateFlagsSelected
    | StateFlagsInsensitive
    | StateFlagsInconsistent
    | StateFlagsFocused
    | StateFlagsBackdrop
    | StateFlagsDirLtr
    | StateFlagsDirRtl
    | StateFlagsLink
    | StateFlagsVisited
    | StateFlagsChecked
    | AnotherStateFlags Int
    deriving (Show, Eq)

instance Enum StateFlags where
    fromEnum StateFlagsNormal = 0
    fromEnum StateFlagsActive = 1
    fromEnum StateFlagsPrelight = 2
    fromEnum StateFlagsSelected = 4
    fromEnum StateFlagsInsensitive = 8
    fromEnum StateFlagsInconsistent = 16
    fromEnum StateFlagsFocused = 32
    fromEnum StateFlagsBackdrop = 64
    fromEnum StateFlagsDirLtr = 128
    fromEnum StateFlagsDirRtl = 256
    fromEnum StateFlagsLink = 512
    fromEnum StateFlagsVisited = 1024
    fromEnum StateFlagsChecked = 2048
    fromEnum (AnotherStateFlags k) = k

    toEnum 0 = StateFlagsNormal
    toEnum 1 = StateFlagsActive
    toEnum 2 = StateFlagsPrelight
    toEnum 4 = StateFlagsSelected
    toEnum 8 = StateFlagsInsensitive
    toEnum 16 = StateFlagsInconsistent
    toEnum 32 = StateFlagsFocused
    toEnum 64 = StateFlagsBackdrop
    toEnum 128 = StateFlagsDirLtr
    toEnum 256 = StateFlagsDirRtl
    toEnum 512 = StateFlagsLink
    toEnum 1024 = StateFlagsVisited
    toEnum 2048 = StateFlagsChecked
    toEnum k = AnotherStateFlags k

foreign import ccall "gtk_state_flags_get_type" c_gtk_state_flags_get_type :: 
    IO GType

instance BoxedEnum StateFlags where
    boxedEnumType _ = c_gtk_state_flags_get_type

instance IsGFlag StateFlags

-- Enum StateType
{-# DEPRECATED StateType ["(Since version 3.14)","All APIs that are using this enumeration have been deprecated","    in favor of alternatives using #GtkStateFlags."]#-}
data StateType = 
      StateTypeNormal
    | StateTypeActive
    | StateTypePrelight
    | StateTypeSelected
    | StateTypeInsensitive
    | StateTypeInconsistent
    | StateTypeFocused
    | AnotherStateType Int
    deriving (Show, Eq)

instance Enum StateType where
    fromEnum StateTypeNormal = 0
    fromEnum StateTypeActive = 1
    fromEnum StateTypePrelight = 2
    fromEnum StateTypeSelected = 3
    fromEnum StateTypeInsensitive = 4
    fromEnum StateTypeInconsistent = 5
    fromEnum StateTypeFocused = 6
    fromEnum (AnotherStateType k) = k

    toEnum 0 = StateTypeNormal
    toEnum 1 = StateTypeActive
    toEnum 2 = StateTypePrelight
    toEnum 3 = StateTypeSelected
    toEnum 4 = StateTypeInsensitive
    toEnum 5 = StateTypeInconsistent
    toEnum 6 = StateTypeFocused
    toEnum k = AnotherStateType k

foreign import ccall "gtk_state_type_get_type" c_gtk_state_type_get_type :: 
    IO GType

instance BoxedEnum StateType where
    boxedEnumType _ = c_gtk_state_type_get_type

-- object StatusIcon 
newtype StatusIcon = StatusIcon (ForeignPtr StatusIcon)
noStatusIcon :: Maybe StatusIcon
noStatusIcon = Nothing

foreign import ccall "gtk_status_icon_get_type"
    c_gtk_status_icon_get_type :: IO GType

type instance ParentTypes StatusIcon = '[GObject.Object]

instance GObject StatusIcon where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_status_icon_get_type
    

class GObject o => StatusIconK o
instance (GObject o, IsDescendantOf StatusIcon o) => StatusIconK o

toStatusIcon :: StatusIconK o => o -> IO StatusIcon
toStatusIcon = unsafeCastTo StatusIcon

-- method StatusIcon::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "StatusIcon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_new" gtk_status_icon_new :: 
    IO (Ptr StatusIcon)

{-# DEPRECATED statusIconNew ["(Since version 3.14)","Use notifications"]#-}
statusIconNew ::
    (MonadIO m) =>
    m StatusIcon
statusIconNew  = liftIO $ do
    result <- gtk_status_icon_new
    checkUnexpectedReturnNULL "gtk_status_icon_new" result
    result' <- (wrapObject StatusIcon) result
    return result'

-- method StatusIcon::new_from_file
-- method type : Constructor
-- Args : [Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StatusIcon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_new_from_file" gtk_status_icon_new_from_file :: 
    CString ->                              -- filename : TBasicType TFileName
    IO (Ptr StatusIcon)

{-# DEPRECATED statusIconNewFromFile ["(Since version 3.14)","Use notifications"]#-}
statusIconNewFromFile ::
    (MonadIO m) =>
    [Char] ->                               -- filename
    m StatusIcon
statusIconNewFromFile filename = liftIO $ do
    filename' <- stringToCString filename
    result <- gtk_status_icon_new_from_file filename'
    checkUnexpectedReturnNULL "gtk_status_icon_new_from_file" result
    result' <- (wrapObject StatusIcon) result
    freeMem filename'
    return result'

-- method StatusIcon::new_from_gicon
-- method type : Constructor
-- Args : [Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StatusIcon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_new_from_gicon" gtk_status_icon_new_from_gicon :: 
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    IO (Ptr StatusIcon)

{-# DEPRECATED statusIconNewFromGicon ["(Since version 3.14)","Use notifications"]#-}
statusIconNewFromGicon ::
    (MonadIO m, Gio.IconK a) =>
    a ->                                    -- icon
    m StatusIcon
statusIconNewFromGicon icon = liftIO $ do
    let icon' = unsafeManagedPtrCastPtr icon
    result <- gtk_status_icon_new_from_gicon icon'
    checkUnexpectedReturnNULL "gtk_status_icon_new_from_gicon" result
    result' <- (wrapObject StatusIcon) result
    touchManagedPtr icon
    return result'

-- method StatusIcon::new_from_icon_name
-- method type : Constructor
-- Args : [Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StatusIcon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_new_from_icon_name" gtk_status_icon_new_from_icon_name :: 
    CString ->                              -- icon_name : TBasicType TUTF8
    IO (Ptr StatusIcon)

{-# DEPRECATED statusIconNewFromIconName ["(Since version 3.14)","Use notifications"]#-}
statusIconNewFromIconName ::
    (MonadIO m) =>
    T.Text ->                               -- icon_name
    m StatusIcon
statusIconNewFromIconName icon_name = liftIO $ do
    icon_name' <- textToCString icon_name
    result <- gtk_status_icon_new_from_icon_name icon_name'
    checkUnexpectedReturnNULL "gtk_status_icon_new_from_icon_name" result
    result' <- (wrapObject StatusIcon) result
    freeMem icon_name'
    return result'

-- method StatusIcon::new_from_pixbuf
-- method type : Constructor
-- Args : [Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StatusIcon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_new_from_pixbuf" gtk_status_icon_new_from_pixbuf :: 
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO (Ptr StatusIcon)

{-# DEPRECATED statusIconNewFromPixbuf ["(Since version 3.14)","Use notifications"]#-}
statusIconNewFromPixbuf ::
    (MonadIO m, GdkPixbuf.PixbufK a) =>
    a ->                                    -- pixbuf
    m StatusIcon
statusIconNewFromPixbuf pixbuf = liftIO $ do
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    result <- gtk_status_icon_new_from_pixbuf pixbuf'
    checkUnexpectedReturnNULL "gtk_status_icon_new_from_pixbuf" result
    result' <- (wrapObject StatusIcon) result
    touchManagedPtr pixbuf
    return result'

-- method StatusIcon::new_from_stock
-- method type : Constructor
-- Args : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StatusIcon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_new_from_stock" gtk_status_icon_new_from_stock :: 
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr StatusIcon)

{-# DEPRECATED statusIconNewFromStock ["(Since version 3.10)","Use gtk_status_icon_new_from_icon_name() instead."]#-}
statusIconNewFromStock ::
    (MonadIO m) =>
    T.Text ->                               -- stock_id
    m StatusIcon
statusIconNewFromStock stock_id = liftIO $ do
    stock_id' <- textToCString stock_id
    result <- gtk_status_icon_new_from_stock stock_id'
    checkUnexpectedReturnNULL "gtk_status_icon_new_from_stock" result
    result' <- (wrapObject StatusIcon) result
    freeMem stock_id'
    return result'

-- method StatusIcon::get_geometry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "area", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_geometry" gtk_status_icon_get_geometry :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    Ptr (Ptr Gdk.Screen) ->                 -- screen : TInterface "Gdk" "Screen"
    Ptr Gdk.Rectangle ->                    -- area : TInterface "Gdk" "Rectangle"
    Ptr CUInt ->                            -- orientation : TInterface "Gtk" "Orientation"
    IO CInt

{-# DEPRECATED statusIconGetGeometry ["(Since version 3.14)","Use notifications"]#-}
statusIconGetGeometry ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m (Bool,Gdk.Screen,Gdk.Rectangle,Orientation)
statusIconGetGeometry _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    screen <- allocMem :: IO (Ptr (Ptr Gdk.Screen))
    area <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    orientation <- allocMem :: IO (Ptr CUInt)
    result <- gtk_status_icon_get_geometry _obj' screen area orientation
    let result' = (/= 0) result
    screen' <- peek screen
    screen'' <- (newObject Gdk.Screen) screen'
    area' <- (wrapBoxed Gdk.Rectangle) area
    orientation' <- peek orientation
    let orientation'' = (toEnum . fromIntegral) orientation'
    touchManagedPtr _obj
    freeMem screen
    freeMem orientation
    return (result', screen'', area', orientation'')

-- method StatusIcon::get_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_gicon" gtk_status_icon_get_gicon :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO (Ptr Gio.Icon)

{-# DEPRECATED statusIconGetGicon ["(Since version 3.14)","Use notifications"]#-}
statusIconGetGicon ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m Gio.Icon
statusIconGetGicon _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_gicon _obj'
    checkUnexpectedReturnNULL "gtk_status_icon_get_gicon" result
    result' <- (newObject Gio.Icon) result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::get_has_tooltip
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_has_tooltip" gtk_status_icon_get_has_tooltip :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO CInt

{-# DEPRECATED statusIconGetHasTooltip ["(Since version 3.14)","Use notifications"]#-}
statusIconGetHasTooltip ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m Bool
statusIconGetHasTooltip _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_has_tooltip _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::get_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_icon_name" gtk_status_icon_get_icon_name :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO CString

{-# DEPRECATED statusIconGetIconName ["(Since version 3.14)","Use notifications"]#-}
statusIconGetIconName ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m T.Text
statusIconGetIconName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_icon_name _obj'
    checkUnexpectedReturnNULL "gtk_status_icon_get_icon_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::get_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_pixbuf" gtk_status_icon_get_pixbuf :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED statusIconGetPixbuf ["(Since version 3.14)","Use notifications"]#-}
statusIconGetPixbuf ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m GdkPixbuf.Pixbuf
statusIconGetPixbuf _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_pixbuf _obj'
    checkUnexpectedReturnNULL "gtk_status_icon_get_pixbuf" result
    result' <- (newObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::get_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Screen"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_screen" gtk_status_icon_get_screen :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO (Ptr Gdk.Screen)

{-# DEPRECATED statusIconGetScreen ["(Since version 3.14)","Use notifications"]#-}
statusIconGetScreen ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m Gdk.Screen
statusIconGetScreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_screen _obj'
    checkUnexpectedReturnNULL "gtk_status_icon_get_screen" result
    result' <- (newObject Gdk.Screen) result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::get_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_size" gtk_status_icon_get_size :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO Int32

{-# DEPRECATED statusIconGetSize ["(Since version 3.14)","Use notifications"]#-}
statusIconGetSize ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m Int32
statusIconGetSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_size _obj'
    touchManagedPtr _obj
    return result

-- method StatusIcon::get_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_stock" gtk_status_icon_get_stock :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO CString

{-# DEPRECATED statusIconGetStock ["(Since version 3.10)","Use gtk_status_icon_get_icon_name() instead."]#-}
statusIconGetStock ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m T.Text
statusIconGetStock _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_stock _obj'
    checkUnexpectedReturnNULL "gtk_status_icon_get_stock" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::get_storage_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ImageType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_storage_type" gtk_status_icon_get_storage_type :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO CUInt

{-# DEPRECATED statusIconGetStorageType ["(Since version 3.14)","Use notifications"]#-}
statusIconGetStorageType ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m ImageType
statusIconGetStorageType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_storage_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_title" gtk_status_icon_get_title :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO CString

{-# DEPRECATED statusIconGetTitle ["(Since version 3.14)","Use notifications"]#-}
statusIconGetTitle ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m T.Text
statusIconGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_title _obj'
    checkUnexpectedReturnNULL "gtk_status_icon_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::get_tooltip_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_tooltip_markup" gtk_status_icon_get_tooltip_markup :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO CString

{-# DEPRECATED statusIconGetTooltipMarkup ["(Since version 3.14)","Use notifications"]#-}
statusIconGetTooltipMarkup ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m T.Text
statusIconGetTooltipMarkup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_tooltip_markup _obj'
    checkUnexpectedReturnNULL "gtk_status_icon_get_tooltip_markup" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::get_tooltip_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_tooltip_text" gtk_status_icon_get_tooltip_text :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO CString

{-# DEPRECATED statusIconGetTooltipText ["(Since version 3.14)","Use notifications"]#-}
statusIconGetTooltipText ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m T.Text
statusIconGetTooltipText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_tooltip_text _obj'
    checkUnexpectedReturnNULL "gtk_status_icon_get_tooltip_text" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::get_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_visible" gtk_status_icon_get_visible :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO CInt

{-# DEPRECATED statusIconGetVisible ["(Since version 3.14)","Use notifications"]#-}
statusIconGetVisible ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m Bool
statusIconGetVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::get_x11_window_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_get_x11_window_id" gtk_status_icon_get_x11_window_id :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO Word32

{-# DEPRECATED statusIconGetX11WindowId ["(Since version 3.14)","Use notifications"]#-}
statusIconGetX11WindowId ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m Word32
statusIconGetX11WindowId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_get_x11_window_id _obj'
    touchManagedPtr _obj
    return result

-- method StatusIcon::is_embedded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_is_embedded" gtk_status_icon_is_embedded :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    IO CInt

{-# DEPRECATED statusIconIsEmbedded ["(Since version 3.14)","Use notifications"]#-}
statusIconIsEmbedded ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    m Bool
statusIconIsEmbedded _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_status_icon_is_embedded _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method StatusIcon::set_from_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_from_file" gtk_status_icon_set_from_file :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    CString ->                              -- filename : TBasicType TFileName
    IO ()

{-# DEPRECATED statusIconSetFromFile ["(Since version 3.14)","Use notifications"]#-}
statusIconSetFromFile ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- filename
    m ()
statusIconSetFromFile _obj filename = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filename' <- stringToCString filename
    gtk_status_icon_set_from_file _obj' filename'
    touchManagedPtr _obj
    freeMem filename'
    return ()

-- method StatusIcon::set_from_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_from_gicon" gtk_status_icon_set_from_gicon :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    IO ()

{-# DEPRECATED statusIconSetFromGicon ["(Since version 3.14)","Use notifications"]#-}
statusIconSetFromGicon ::
    (MonadIO m, StatusIconK a, Gio.IconK b) =>
    a ->                                    -- _obj
    b ->                                    -- icon
    m ()
statusIconSetFromGicon _obj icon = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon' = unsafeManagedPtrCastPtr icon
    gtk_status_icon_set_from_gicon _obj' icon'
    touchManagedPtr _obj
    touchManagedPtr icon
    return ()

-- method StatusIcon::set_from_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_from_icon_name" gtk_status_icon_set_from_icon_name :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()

{-# DEPRECATED statusIconSetFromIconName ["(Since version 3.14)","Use notifications"]#-}
statusIconSetFromIconName ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- icon_name
    m ()
statusIconSetFromIconName _obj icon_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name' <- textToCString icon_name
    gtk_status_icon_set_from_icon_name _obj' icon_name'
    touchManagedPtr _obj
    freeMem icon_name'
    return ()

-- method StatusIcon::set_from_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_from_pixbuf" gtk_status_icon_set_from_pixbuf :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO ()

{-# DEPRECATED statusIconSetFromPixbuf ["(Since version 3.14)","Use notifications"]#-}
statusIconSetFromPixbuf ::
    (MonadIO m, StatusIconK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- pixbuf
    m ()
statusIconSetFromPixbuf _obj pixbuf = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePixbuf <- case pixbuf of
        Nothing -> return nullPtr
        Just jPixbuf -> do
            let jPixbuf' = unsafeManagedPtrCastPtr jPixbuf
            return jPixbuf'
    gtk_status_icon_set_from_pixbuf _obj' maybePixbuf
    touchManagedPtr _obj
    whenJust pixbuf touchManagedPtr
    return ()

-- method StatusIcon::set_from_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_from_stock" gtk_status_icon_set_from_stock :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    CString ->                              -- stock_id : TBasicType TUTF8
    IO ()

{-# DEPRECATED statusIconSetFromStock ["(Since version 3.10)","Use gtk_status_icon_set_from_icon_name() instead."]#-}
statusIconSetFromStock ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- stock_id
    m ()
statusIconSetFromStock _obj stock_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    stock_id' <- textToCString stock_id
    gtk_status_icon_set_from_stock _obj' stock_id'
    touchManagedPtr _obj
    freeMem stock_id'
    return ()

-- method StatusIcon::set_has_tooltip
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_tooltip", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_tooltip", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_has_tooltip" gtk_status_icon_set_has_tooltip :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    CInt ->                                 -- has_tooltip : TBasicType TBoolean
    IO ()

{-# DEPRECATED statusIconSetHasTooltip ["(Since version 3.14)","Use notifications"]#-}
statusIconSetHasTooltip ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_tooltip
    m ()
statusIconSetHasTooltip _obj has_tooltip = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_tooltip' = (fromIntegral . fromEnum) has_tooltip
    gtk_status_icon_set_has_tooltip _obj' has_tooltip'
    touchManagedPtr _obj
    return ()

-- method StatusIcon::set_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_name" gtk_status_icon_set_name :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    CString ->                              -- name : TBasicType TUTF8
    IO ()

{-# DEPRECATED statusIconSetName ["(Since version 3.14)","Use notifications"]#-}
statusIconSetName ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
statusIconSetName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    gtk_status_icon_set_name _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method StatusIcon::set_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_screen" gtk_status_icon_set_screen :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO ()

{-# DEPRECATED statusIconSetScreen ["(Since version 3.14)","Use notifications"]#-}
statusIconSetScreen ::
    (MonadIO m, StatusIconK a, Gdk.ScreenK b) =>
    a ->                                    -- _obj
    b ->                                    -- screen
    m ()
statusIconSetScreen _obj screen = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let screen' = unsafeManagedPtrCastPtr screen
    gtk_status_icon_set_screen _obj' screen'
    touchManagedPtr _obj
    touchManagedPtr screen
    return ()

-- method StatusIcon::set_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_title" gtk_status_icon_set_title :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    CString ->                              -- title : TBasicType TUTF8
    IO ()

{-# DEPRECATED statusIconSetTitle ["(Since version 3.14)","Use notifications"]#-}
statusIconSetTitle ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- title
    m ()
statusIconSetTitle _obj title = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    title' <- textToCString title
    gtk_status_icon_set_title _obj' title'
    touchManagedPtr _obj
    freeMem title'
    return ()

-- method StatusIcon::set_tooltip_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_tooltip_markup" gtk_status_icon_set_tooltip_markup :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    CString ->                              -- markup : TBasicType TUTF8
    IO ()

{-# DEPRECATED statusIconSetTooltipMarkup ["(Since version 3.14)","Use notifications"]#-}
statusIconSetTooltipMarkup ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- markup
    m ()
statusIconSetTooltipMarkup _obj markup = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeMarkup <- case markup of
        Nothing -> return nullPtr
        Just jMarkup -> do
            jMarkup' <- textToCString jMarkup
            return jMarkup'
    gtk_status_icon_set_tooltip_markup _obj' maybeMarkup
    touchManagedPtr _obj
    freeMem maybeMarkup
    return ()

-- method StatusIcon::set_tooltip_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_tooltip_text" gtk_status_icon_set_tooltip_text :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    CString ->                              -- text : TBasicType TUTF8
    IO ()

{-# DEPRECATED statusIconSetTooltipText ["(Since version 3.14)","Use notifications"]#-}
statusIconSetTooltipText ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    m ()
statusIconSetTooltipText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_status_icon_set_tooltip_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method StatusIcon::set_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_set_visible" gtk_status_icon_set_visible :: 
    Ptr StatusIcon ->                       -- _obj : TInterface "Gtk" "StatusIcon"
    CInt ->                                 -- visible : TBasicType TBoolean
    IO ()

{-# DEPRECATED statusIconSetVisible ["(Since version 3.14)","Use notifications"]#-}
statusIconSetVisible ::
    (MonadIO m, StatusIconK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible
    m ()
statusIconSetVisible _obj visible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible' = (fromIntegral . fromEnum) visible
    gtk_status_icon_set_visible _obj' visible'
    touchManagedPtr _obj
    return ()

-- method StatusIcon::position_menu
-- method type : MemberFunction
-- Args : [Arg {argName = "menu", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "push_in", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "user_data", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "menu", argType = TInterface "Gtk" "Menu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "user_data", argType = TInterface "Gtk" "StatusIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_status_icon_position_menu" gtk_status_icon_position_menu :: 
    Ptr Menu ->                             -- menu : TInterface "Gtk" "Menu"
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    Ptr CInt ->                             -- push_in : TBasicType TBoolean
    Ptr StatusIcon ->                       -- user_data : TInterface "Gtk" "StatusIcon"
    IO ()

{-# DEPRECATED statusIconPositionMenu ["(Since version 3.14)","Use notifications"]#-}
statusIconPositionMenu ::
    (MonadIO m, MenuK a, StatusIconK b) =>
    a ->                                    -- menu
    Int32 ->                                -- x
    Int32 ->                                -- y
    b ->                                    -- user_data
    m (Int32,Int32,Bool)
statusIconPositionMenu menu x y user_data = liftIO $ do
    let menu' = unsafeManagedPtrCastPtr menu
    x' <- allocMem :: IO (Ptr Int32)
    poke x' x
    y' <- allocMem :: IO (Ptr Int32)
    poke y' y
    push_in <- allocMem :: IO (Ptr CInt)
    let user_data' = unsafeManagedPtrCastPtr user_data
    gtk_status_icon_position_menu menu' x' y' push_in user_data'
    x'' <- peek x'
    y'' <- peek y'
    push_in' <- peek push_in
    let push_in'' = (/= 0) push_in'
    touchManagedPtr menu
    touchManagedPtr user_data
    freeMem x'
    freeMem y'
    freeMem push_in
    return (x'', y'', push_in'')

-- signal StatusIcon::activate
type StatusIconActivateCallback =
    IO ()

noStatusIconActivateCallback :: Maybe StatusIconActivateCallback
noStatusIconActivateCallback = Nothing

type StatusIconActivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkStatusIconActivateCallback :: StatusIconActivateCallbackC -> IO (FunPtr StatusIconActivateCallbackC)

statusIconActivateClosure :: StatusIconActivateCallback -> IO Closure
statusIconActivateClosure cb = newCClosure =<< mkStatusIconActivateCallback wrapped
    where wrapped = statusIconActivateCallbackWrapper cb

statusIconActivateCallbackWrapper ::
    StatusIconActivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
statusIconActivateCallbackWrapper _cb _ _ = do
    _cb 

onStatusIconActivate :: (GObject a, MonadIO m) => a -> StatusIconActivateCallback -> m SignalHandlerId
onStatusIconActivate obj cb = liftIO $ connectStatusIconActivate obj cb SignalConnectBefore
afterStatusIconActivate :: (GObject a, MonadIO m) => a -> StatusIconActivateCallback -> m SignalHandlerId
afterStatusIconActivate obj cb = connectStatusIconActivate obj cb SignalConnectAfter

connectStatusIconActivate :: (GObject a, MonadIO m) =>
                             a -> StatusIconActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectStatusIconActivate obj cb after = liftIO $ do
    cb' <- mkStatusIconActivateCallback (statusIconActivateCallbackWrapper cb)
    connectSignalFunPtr obj "activate" cb' after

-- signal StatusIcon::button-press-event
type StatusIconButtonPressEventCallback =
    Gdk.EventButton ->
    IO Bool

noStatusIconButtonPressEventCallback :: Maybe StatusIconButtonPressEventCallback
noStatusIconButtonPressEventCallback = Nothing

type StatusIconButtonPressEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventButton ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkStatusIconButtonPressEventCallback :: StatusIconButtonPressEventCallbackC -> IO (FunPtr StatusIconButtonPressEventCallbackC)

statusIconButtonPressEventClosure :: StatusIconButtonPressEventCallback -> IO Closure
statusIconButtonPressEventClosure cb = newCClosure =<< mkStatusIconButtonPressEventCallback wrapped
    where wrapped = statusIconButtonPressEventCallbackWrapper cb

statusIconButtonPressEventCallbackWrapper ::
    StatusIconButtonPressEventCallback ->
    Ptr () ->
    Ptr Gdk.EventButton ->
    Ptr () ->
    IO CInt
statusIconButtonPressEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 80 Gdk.EventButton) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onStatusIconButtonPressEvent :: (GObject a, MonadIO m) => a -> StatusIconButtonPressEventCallback -> m SignalHandlerId
onStatusIconButtonPressEvent obj cb = liftIO $ connectStatusIconButtonPressEvent obj cb SignalConnectBefore
afterStatusIconButtonPressEvent :: (GObject a, MonadIO m) => a -> StatusIconButtonPressEventCallback -> m SignalHandlerId
afterStatusIconButtonPressEvent obj cb = connectStatusIconButtonPressEvent obj cb SignalConnectAfter

connectStatusIconButtonPressEvent :: (GObject a, MonadIO m) =>
                                     a -> StatusIconButtonPressEventCallback -> SignalConnectMode -> m SignalHandlerId
connectStatusIconButtonPressEvent obj cb after = liftIO $ do
    cb' <- mkStatusIconButtonPressEventCallback (statusIconButtonPressEventCallbackWrapper cb)
    connectSignalFunPtr obj "button-press-event" cb' after

-- signal StatusIcon::button-release-event
type StatusIconButtonReleaseEventCallback =
    Gdk.EventButton ->
    IO Bool

noStatusIconButtonReleaseEventCallback :: Maybe StatusIconButtonReleaseEventCallback
noStatusIconButtonReleaseEventCallback = Nothing

type StatusIconButtonReleaseEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventButton ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkStatusIconButtonReleaseEventCallback :: StatusIconButtonReleaseEventCallbackC -> IO (FunPtr StatusIconButtonReleaseEventCallbackC)

statusIconButtonReleaseEventClosure :: StatusIconButtonReleaseEventCallback -> IO Closure
statusIconButtonReleaseEventClosure cb = newCClosure =<< mkStatusIconButtonReleaseEventCallback wrapped
    where wrapped = statusIconButtonReleaseEventCallbackWrapper cb

statusIconButtonReleaseEventCallbackWrapper ::
    StatusIconButtonReleaseEventCallback ->
    Ptr () ->
    Ptr Gdk.EventButton ->
    Ptr () ->
    IO CInt
statusIconButtonReleaseEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 80 Gdk.EventButton) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onStatusIconButtonReleaseEvent :: (GObject a, MonadIO m) => a -> StatusIconButtonReleaseEventCallback -> m SignalHandlerId
onStatusIconButtonReleaseEvent obj cb = liftIO $ connectStatusIconButtonReleaseEvent obj cb SignalConnectBefore
afterStatusIconButtonReleaseEvent :: (GObject a, MonadIO m) => a -> StatusIconButtonReleaseEventCallback -> m SignalHandlerId
afterStatusIconButtonReleaseEvent obj cb = connectStatusIconButtonReleaseEvent obj cb SignalConnectAfter

connectStatusIconButtonReleaseEvent :: (GObject a, MonadIO m) =>
                                       a -> StatusIconButtonReleaseEventCallback -> SignalConnectMode -> m SignalHandlerId
connectStatusIconButtonReleaseEvent obj cb after = liftIO $ do
    cb' <- mkStatusIconButtonReleaseEventCallback (statusIconButtonReleaseEventCallbackWrapper cb)
    connectSignalFunPtr obj "button-release-event" cb' after

-- signal StatusIcon::popup-menu
type StatusIconPopupMenuCallback =
    Word32 ->
    Word32 ->
    IO ()

noStatusIconPopupMenuCallback :: Maybe StatusIconPopupMenuCallback
noStatusIconPopupMenuCallback = Nothing

type StatusIconPopupMenuCallbackC =
    Ptr () ->                               -- object
    Word32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkStatusIconPopupMenuCallback :: StatusIconPopupMenuCallbackC -> IO (FunPtr StatusIconPopupMenuCallbackC)

statusIconPopupMenuClosure :: StatusIconPopupMenuCallback -> IO Closure
statusIconPopupMenuClosure cb = newCClosure =<< mkStatusIconPopupMenuCallback wrapped
    where wrapped = statusIconPopupMenuCallbackWrapper cb

statusIconPopupMenuCallbackWrapper ::
    StatusIconPopupMenuCallback ->
    Ptr () ->
    Word32 ->
    Word32 ->
    Ptr () ->
    IO ()
statusIconPopupMenuCallbackWrapper _cb _ button activate_time _ = do
    _cb  button activate_time

onStatusIconPopupMenu :: (GObject a, MonadIO m) => a -> StatusIconPopupMenuCallback -> m SignalHandlerId
onStatusIconPopupMenu obj cb = liftIO $ connectStatusIconPopupMenu obj cb SignalConnectBefore
afterStatusIconPopupMenu :: (GObject a, MonadIO m) => a -> StatusIconPopupMenuCallback -> m SignalHandlerId
afterStatusIconPopupMenu obj cb = connectStatusIconPopupMenu obj cb SignalConnectAfter

connectStatusIconPopupMenu :: (GObject a, MonadIO m) =>
                              a -> StatusIconPopupMenuCallback -> SignalConnectMode -> m SignalHandlerId
connectStatusIconPopupMenu obj cb after = liftIO $ do
    cb' <- mkStatusIconPopupMenuCallback (statusIconPopupMenuCallbackWrapper cb)
    connectSignalFunPtr obj "popup-menu" cb' after

-- signal StatusIcon::query-tooltip
type StatusIconQueryTooltipCallback =
    Int32 ->
    Int32 ->
    Bool ->
    Tooltip ->
    IO Bool

noStatusIconQueryTooltipCallback :: Maybe StatusIconQueryTooltipCallback
noStatusIconQueryTooltipCallback = Nothing

type StatusIconQueryTooltipCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Int32 ->
    CInt ->
    Ptr Tooltip ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkStatusIconQueryTooltipCallback :: StatusIconQueryTooltipCallbackC -> IO (FunPtr StatusIconQueryTooltipCallbackC)

statusIconQueryTooltipClosure :: StatusIconQueryTooltipCallback -> IO Closure
statusIconQueryTooltipClosure cb = newCClosure =<< mkStatusIconQueryTooltipCallback wrapped
    where wrapped = statusIconQueryTooltipCallbackWrapper cb

statusIconQueryTooltipCallbackWrapper ::
    StatusIconQueryTooltipCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    CInt ->
    Ptr Tooltip ->
    Ptr () ->
    IO CInt
statusIconQueryTooltipCallbackWrapper _cb _ x y keyboard_mode tooltip _ = do
    let keyboard_mode' = (/= 0) keyboard_mode
    tooltip' <- (newObject Tooltip) tooltip
    result <- _cb  x y keyboard_mode' tooltip'
    let result' = (fromIntegral . fromEnum) result
    return result'

onStatusIconQueryTooltip :: (GObject a, MonadIO m) => a -> StatusIconQueryTooltipCallback -> m SignalHandlerId
onStatusIconQueryTooltip obj cb = liftIO $ connectStatusIconQueryTooltip obj cb SignalConnectBefore
afterStatusIconQueryTooltip :: (GObject a, MonadIO m) => a -> StatusIconQueryTooltipCallback -> m SignalHandlerId
afterStatusIconQueryTooltip obj cb = connectStatusIconQueryTooltip obj cb SignalConnectAfter

connectStatusIconQueryTooltip :: (GObject a, MonadIO m) =>
                                 a -> StatusIconQueryTooltipCallback -> SignalConnectMode -> m SignalHandlerId
connectStatusIconQueryTooltip obj cb after = liftIO $ do
    cb' <- mkStatusIconQueryTooltipCallback (statusIconQueryTooltipCallbackWrapper cb)
    connectSignalFunPtr obj "query-tooltip" cb' after

-- signal StatusIcon::scroll-event
type StatusIconScrollEventCallback =
    Gdk.EventScroll ->
    IO Bool

noStatusIconScrollEventCallback :: Maybe StatusIconScrollEventCallback
noStatusIconScrollEventCallback = Nothing

type StatusIconScrollEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventScroll ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkStatusIconScrollEventCallback :: StatusIconScrollEventCallbackC -> IO (FunPtr StatusIconScrollEventCallbackC)

statusIconScrollEventClosure :: StatusIconScrollEventCallback -> IO Closure
statusIconScrollEventClosure cb = newCClosure =<< mkStatusIconScrollEventCallback wrapped
    where wrapped = statusIconScrollEventCallbackWrapper cb

statusIconScrollEventCallbackWrapper ::
    StatusIconScrollEventCallback ->
    Ptr () ->
    Ptr Gdk.EventScroll ->
    Ptr () ->
    IO CInt
statusIconScrollEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 88 Gdk.EventScroll) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onStatusIconScrollEvent :: (GObject a, MonadIO m) => a -> StatusIconScrollEventCallback -> m SignalHandlerId
onStatusIconScrollEvent obj cb = liftIO $ connectStatusIconScrollEvent obj cb SignalConnectBefore
afterStatusIconScrollEvent :: (GObject a, MonadIO m) => a -> StatusIconScrollEventCallback -> m SignalHandlerId
afterStatusIconScrollEvent obj cb = connectStatusIconScrollEvent obj cb SignalConnectAfter

connectStatusIconScrollEvent :: (GObject a, MonadIO m) =>
                                a -> StatusIconScrollEventCallback -> SignalConnectMode -> m SignalHandlerId
connectStatusIconScrollEvent obj cb after = liftIO $ do
    cb' <- mkStatusIconScrollEventCallback (statusIconScrollEventCallbackWrapper cb)
    connectSignalFunPtr obj "scroll-event" cb' after

-- signal StatusIcon::size-changed
type StatusIconSizeChangedCallback =
    Int32 ->
    IO Bool

noStatusIconSizeChangedCallback :: Maybe StatusIconSizeChangedCallback
noStatusIconSizeChangedCallback = Nothing

type StatusIconSizeChangedCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkStatusIconSizeChangedCallback :: StatusIconSizeChangedCallbackC -> IO (FunPtr StatusIconSizeChangedCallbackC)

statusIconSizeChangedClosure :: StatusIconSizeChangedCallback -> IO Closure
statusIconSizeChangedClosure cb = newCClosure =<< mkStatusIconSizeChangedCallback wrapped
    where wrapped = statusIconSizeChangedCallbackWrapper cb

statusIconSizeChangedCallbackWrapper ::
    StatusIconSizeChangedCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO CInt
statusIconSizeChangedCallbackWrapper _cb _ size _ = do
    result <- _cb  size
    let result' = (fromIntegral . fromEnum) result
    return result'

onStatusIconSizeChanged :: (GObject a, MonadIO m) => a -> StatusIconSizeChangedCallback -> m SignalHandlerId
onStatusIconSizeChanged obj cb = liftIO $ connectStatusIconSizeChanged obj cb SignalConnectBefore
afterStatusIconSizeChanged :: (GObject a, MonadIO m) => a -> StatusIconSizeChangedCallback -> m SignalHandlerId
afterStatusIconSizeChanged obj cb = connectStatusIconSizeChanged obj cb SignalConnectAfter

connectStatusIconSizeChanged :: (GObject a, MonadIO m) =>
                                a -> StatusIconSizeChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectStatusIconSizeChanged obj cb after = liftIO $ do
    cb' <- mkStatusIconSizeChangedCallback (statusIconSizeChangedCallbackWrapper cb)
    connectSignalFunPtr obj "size-changed" cb' after

-- object Statusbar 
newtype Statusbar = Statusbar (ForeignPtr Statusbar)
noStatusbar :: Maybe Statusbar
noStatusbar = Nothing

foreign import ccall "gtk_statusbar_get_type"
    c_gtk_statusbar_get_type :: IO GType

type instance ParentTypes Statusbar = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject Statusbar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_statusbar_get_type
    

class GObject o => StatusbarK o
instance (GObject o, IsDescendantOf Statusbar o) => StatusbarK o

toStatusbar :: StatusbarK o => o -> IO Statusbar
toStatusbar = unsafeCastTo Statusbar

-- method Statusbar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Statusbar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_statusbar_new" gtk_statusbar_new :: 
    IO (Ptr Statusbar)


statusbarNew ::
    (MonadIO m) =>
    m Statusbar
statusbarNew  = liftIO $ do
    result <- gtk_statusbar_new
    checkUnexpectedReturnNULL "gtk_statusbar_new" result
    result' <- (newObject Statusbar) result
    return result'

-- method Statusbar::get_context_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_statusbar_get_context_id" gtk_statusbar_get_context_id :: 
    Ptr Statusbar ->                        -- _obj : TInterface "Gtk" "Statusbar"
    CString ->                              -- context_description : TBasicType TUTF8
    IO Word32


statusbarGetContextId ::
    (MonadIO m, StatusbarK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- context_description
    m Word32
statusbarGetContextId _obj context_description = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    context_description' <- textToCString context_description
    result <- gtk_statusbar_get_context_id _obj' context_description'
    touchManagedPtr _obj
    freeMem context_description'
    return result

-- method Statusbar::get_message_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Box"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_statusbar_get_message_area" gtk_statusbar_get_message_area :: 
    Ptr Statusbar ->                        -- _obj : TInterface "Gtk" "Statusbar"
    IO (Ptr Box)


statusbarGetMessageArea ::
    (MonadIO m, StatusbarK a) =>
    a ->                                    -- _obj
    m Box
statusbarGetMessageArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_statusbar_get_message_area _obj'
    checkUnexpectedReturnNULL "gtk_statusbar_get_message_area" result
    result' <- (newObject Box) result
    touchManagedPtr _obj
    return result'

-- method Statusbar::pop
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_statusbar_pop" gtk_statusbar_pop :: 
    Ptr Statusbar ->                        -- _obj : TInterface "Gtk" "Statusbar"
    Word32 ->                               -- context_id : TBasicType TUInt32
    IO ()


statusbarPop ::
    (MonadIO m, StatusbarK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- context_id
    m ()
statusbarPop _obj context_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_statusbar_pop _obj' context_id
    touchManagedPtr _obj
    return ()

-- method Statusbar::push
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_statusbar_push" gtk_statusbar_push :: 
    Ptr Statusbar ->                        -- _obj : TInterface "Gtk" "Statusbar"
    Word32 ->                               -- context_id : TBasicType TUInt32
    CString ->                              -- text : TBasicType TUTF8
    IO Word32


statusbarPush ::
    (MonadIO m, StatusbarK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- context_id
    T.Text ->                               -- text
    m Word32
statusbarPush _obj context_id text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    result <- gtk_statusbar_push _obj' context_id text'
    touchManagedPtr _obj
    freeMem text'
    return result

-- method Statusbar::remove
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "message_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "message_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_statusbar_remove" gtk_statusbar_remove :: 
    Ptr Statusbar ->                        -- _obj : TInterface "Gtk" "Statusbar"
    Word32 ->                               -- context_id : TBasicType TUInt32
    Word32 ->                               -- message_id : TBasicType TUInt32
    IO ()


statusbarRemove ::
    (MonadIO m, StatusbarK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- context_id
    Word32 ->                               -- message_id
    m ()
statusbarRemove _obj context_id message_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_statusbar_remove _obj' context_id message_id
    touchManagedPtr _obj
    return ()

-- method Statusbar::remove_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Statusbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_statusbar_remove_all" gtk_statusbar_remove_all :: 
    Ptr Statusbar ->                        -- _obj : TInterface "Gtk" "Statusbar"
    Word32 ->                               -- context_id : TBasicType TUInt32
    IO ()


statusbarRemoveAll ::
    (MonadIO m, StatusbarK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- context_id
    m ()
statusbarRemoveAll _obj context_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_statusbar_remove_all _obj' context_id
    touchManagedPtr _obj
    return ()

-- signal Statusbar::text-popped
type StatusbarTextPoppedCallback =
    Word32 ->
    T.Text ->
    IO ()

noStatusbarTextPoppedCallback :: Maybe StatusbarTextPoppedCallback
noStatusbarTextPoppedCallback = Nothing

type StatusbarTextPoppedCallbackC =
    Ptr () ->                               -- object
    Word32 ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkStatusbarTextPoppedCallback :: StatusbarTextPoppedCallbackC -> IO (FunPtr StatusbarTextPoppedCallbackC)

statusbarTextPoppedClosure :: StatusbarTextPoppedCallback -> IO Closure
statusbarTextPoppedClosure cb = newCClosure =<< mkStatusbarTextPoppedCallback wrapped
    where wrapped = statusbarTextPoppedCallbackWrapper cb

statusbarTextPoppedCallbackWrapper ::
    StatusbarTextPoppedCallback ->
    Ptr () ->
    Word32 ->
    CString ->
    Ptr () ->
    IO ()
statusbarTextPoppedCallbackWrapper _cb _ context_id text _ = do
    text' <- cstringToText text
    _cb  context_id text'

onStatusbarTextPopped :: (GObject a, MonadIO m) => a -> StatusbarTextPoppedCallback -> m SignalHandlerId
onStatusbarTextPopped obj cb = liftIO $ connectStatusbarTextPopped obj cb SignalConnectBefore
afterStatusbarTextPopped :: (GObject a, MonadIO m) => a -> StatusbarTextPoppedCallback -> m SignalHandlerId
afterStatusbarTextPopped obj cb = connectStatusbarTextPopped obj cb SignalConnectAfter

connectStatusbarTextPopped :: (GObject a, MonadIO m) =>
                              a -> StatusbarTextPoppedCallback -> SignalConnectMode -> m SignalHandlerId
connectStatusbarTextPopped obj cb after = liftIO $ do
    cb' <- mkStatusbarTextPoppedCallback (statusbarTextPoppedCallbackWrapper cb)
    connectSignalFunPtr obj "text-popped" cb' after

-- signal Statusbar::text-pushed
type StatusbarTextPushedCallback =
    Word32 ->
    T.Text ->
    IO ()

noStatusbarTextPushedCallback :: Maybe StatusbarTextPushedCallback
noStatusbarTextPushedCallback = Nothing

type StatusbarTextPushedCallbackC =
    Ptr () ->                               -- object
    Word32 ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkStatusbarTextPushedCallback :: StatusbarTextPushedCallbackC -> IO (FunPtr StatusbarTextPushedCallbackC)

statusbarTextPushedClosure :: StatusbarTextPushedCallback -> IO Closure
statusbarTextPushedClosure cb = newCClosure =<< mkStatusbarTextPushedCallback wrapped
    where wrapped = statusbarTextPushedCallbackWrapper cb

statusbarTextPushedCallbackWrapper ::
    StatusbarTextPushedCallback ->
    Ptr () ->
    Word32 ->
    CString ->
    Ptr () ->
    IO ()
statusbarTextPushedCallbackWrapper _cb _ context_id text _ = do
    text' <- cstringToText text
    _cb  context_id text'

onStatusbarTextPushed :: (GObject a, MonadIO m) => a -> StatusbarTextPushedCallback -> m SignalHandlerId
onStatusbarTextPushed obj cb = liftIO $ connectStatusbarTextPushed obj cb SignalConnectBefore
afterStatusbarTextPushed :: (GObject a, MonadIO m) => a -> StatusbarTextPushedCallback -> m SignalHandlerId
afterStatusbarTextPushed obj cb = connectStatusbarTextPushed obj cb SignalConnectAfter

connectStatusbarTextPushed :: (GObject a, MonadIO m) =>
                              a -> StatusbarTextPushedCallback -> SignalConnectMode -> m SignalHandlerId
connectStatusbarTextPushed obj cb after = liftIO $ do
    cb' <- mkStatusbarTextPushedCallback (statusbarTextPushedCallbackWrapper cb)
    connectSignalFunPtr obj "text-pushed" cb' after

-- object StatusbarAccessible 
newtype StatusbarAccessible = StatusbarAccessible (ForeignPtr StatusbarAccessible)
noStatusbarAccessible :: Maybe StatusbarAccessible
noStatusbarAccessible = Nothing

foreign import ccall "gtk_statusbar_accessible_get_type"
    c_gtk_statusbar_accessible_get_type :: IO GType

type instance ParentTypes StatusbarAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component]

instance GObject StatusbarAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_statusbar_accessible_get_type
    

class GObject o => StatusbarAccessibleK o
instance (GObject o, IsDescendantOf StatusbarAccessible o) => StatusbarAccessibleK o

toStatusbarAccessible :: StatusbarAccessibleK o => o -> IO StatusbarAccessible
toStatusbarAccessible = unsafeCastTo StatusbarAccessible

-- struct StockItem
newtype StockItem = StockItem (ForeignPtr StockItem)
noStockItem :: Maybe StockItem
noStockItem = Nothing

stockItemReadStockId :: StockItem -> IO T.Text
stockItemReadStockId s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

stockItemReadLabel :: StockItem -> IO T.Text
stockItemReadLabel s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

stockItemReadModifier :: StockItem -> IO [Gdk.ModifierType]
stockItemReadModifier s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO CUInt
    let val' = wordToGFlags val
    return val'

stockItemReadKeyval :: StockItem -> IO Word32
stockItemReadKeyval s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 20) :: IO Word32
    return val

stockItemReadTranslationDomain :: StockItem -> IO T.Text
stockItemReadTranslationDomain s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO CString
    val' <- cstringToText val
    return val'

-- method StockItem::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StockItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StockItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stock_item_free" gtk_stock_item_free :: 
    Ptr StockItem ->                        -- _obj : TInterface "Gtk" "StockItem"
    IO ()

{-# DEPRECATED stockItemFree ["(Since version 3.10)"]#-}
stockItemFree ::
    (MonadIO m) =>
    StockItem ->                            -- _obj
    m ()
stockItemFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_stock_item_free _obj'
    touchManagedPtr _obj
    return ()

-- object Style 
newtype Style = Style (ForeignPtr Style)
noStyle :: Maybe Style
noStyle = Nothing

foreign import ccall "gtk_style_get_type"
    c_gtk_style_get_type :: IO GType

type instance ParentTypes Style = '[GObject.Object]

instance GObject Style where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_style_get_type
    

class GObject o => StyleK o
instance (GObject o, IsDescendantOf Style o) => StyleK o

toStyle :: StyleK o => o -> IO Style
toStyle = unsafeCastTo Style

-- method Style::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Style"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_new" gtk_style_new :: 
    IO (Ptr Style)

{-# DEPRECATED styleNew ["(Since version 3.0)","Use #GtkStyleContext"]#-}
styleNew ::
    (MonadIO m) =>
    m Style
styleNew  = liftIO $ do
    result <- gtk_style_new
    checkUnexpectedReturnNULL "gtk_style_new" result
    result' <- (wrapObject Style) result
    return result'

-- method Style::apply_default_background
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_apply_default_background" gtk_style_apply_default_background :: 
    Ptr Style ->                            -- _obj : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED styleApplyDefaultBackground ["(Since version 3.0)","Use #GtkStyleContext instead"]#-}
styleApplyDefaultBackground ::
    (MonadIO m, StyleK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    Cairo.Context ->                        -- cr
    b ->                                    -- window
    StateType ->                            -- state_type
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
styleApplyDefaultBackground _obj cr window state_type x y width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cr' = unsafeManagedPtrGetPtr cr
    let window' = unsafeManagedPtrCastPtr window
    let state_type' = (fromIntegral . fromEnum) state_type
    gtk_style_apply_default_background _obj' cr' window' state_type' x y width height
    touchManagedPtr _obj
    touchManagedPtr cr
    touchManagedPtr window
    return ()

-- method Style::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Style"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_copy" gtk_style_copy :: 
    Ptr Style ->                            -- _obj : TInterface "Gtk" "Style"
    IO (Ptr Style)

{-# DEPRECATED styleCopy ["(Since version 3.0)","Use #GtkStyleContext instead"]#-}
styleCopy ::
    (MonadIO m, StyleK a) =>
    a ->                                    -- _obj
    m Style
styleCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_copy _obj'
    checkUnexpectedReturnNULL "gtk_style_copy" result
    result' <- (wrapObject Style) result
    touchManagedPtr _obj
    return result'

-- method Style::detach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_detach" gtk_style_detach :: 
    Ptr Style ->                            -- _obj : TInterface "Gtk" "Style"
    IO ()

{-# DEPRECATED styleDetach ["(Since version 3.0)","Use #GtkStyleContext instead"]#-}
styleDetach ::
    (MonadIO m, StyleK a) =>
    a ->                                    -- _obj
    m ()
styleDetach _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_style_detach _obj'
    touchManagedPtr _obj
    return ()

-- method Style::get_style_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_get_style_property" gtk_style_get_style_property :: 
    Ptr Style ->                            -- _obj : TInterface "Gtk" "Style"
    CGType ->                               -- widget_type : TBasicType TGType
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


styleGetStyleProperty ::
    (MonadIO m, StyleK a) =>
    a ->                                    -- _obj
    GType ->                                -- widget_type
    T.Text ->                               -- property_name
    m (GValue)
styleGetStyleProperty _obj widget_type property_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget_type' = gtypeToCGType widget_type
    property_name' <- textToCString property_name
    value <- callocBoxedBytes 24 :: IO (Ptr GValue)
    gtk_style_get_style_property _obj' widget_type' property_name' value
    value' <- (wrapBoxed GValue) value
    touchManagedPtr _obj
    freeMem property_name'
    return value'

-- method Style::has_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_has_context" gtk_style_has_context :: 
    Ptr Style ->                            -- _obj : TInterface "Gtk" "Style"
    IO CInt


styleHasContext ::
    (MonadIO m, StyleK a) =>
    a ->                                    -- _obj
    m Bool
styleHasContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_has_context _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Style::lookup_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_lookup_color" gtk_style_lookup_color :: 
    Ptr Style ->                            -- _obj : TInterface "Gtk" "Style"
    CString ->                              -- color_name : TBasicType TUTF8
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO CInt

{-# DEPRECATED styleLookupColor ["(Since version 3.0)","Use gtk_style_context_lookup_color() instead"]#-}
styleLookupColor ::
    (MonadIO m, StyleK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- color_name
    m (Bool,Gdk.Color)
styleLookupColor _obj color_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    color_name' <- textToCString color_name
    color <- callocBoxedBytes 12 :: IO (Ptr Gdk.Color)
    result <- gtk_style_lookup_color _obj' color_name' color
    let result' = (/= 0) result
    color' <- (wrapBoxed Gdk.Color) color
    touchManagedPtr _obj
    freeMem color_name'
    return (result', color')

-- method Style::lookup_icon_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconSet"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_lookup_icon_set" gtk_style_lookup_icon_set :: 
    Ptr Style ->                            -- _obj : TInterface "Gtk" "Style"
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr IconSet)

{-# DEPRECATED styleLookupIconSet ["(Since version 3.0)","Use gtk_style_context_lookup_icon_set() instead"]#-}
styleLookupIconSet ::
    (MonadIO m, StyleK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- stock_id
    m IconSet
styleLookupIconSet _obj stock_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    stock_id' <- textToCString stock_id
    result <- gtk_style_lookup_icon_set _obj' stock_id'
    checkUnexpectedReturnNULL "gtk_style_lookup_icon_set" result
    result' <- (newBoxed IconSet) result
    touchManagedPtr _obj
    freeMem stock_id'
    return result'

-- method Style::render_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "source", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "source", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_render_icon" gtk_style_render_icon :: 
    Ptr Style ->                            -- _obj : TInterface "Gtk" "Style"
    Ptr IconSource ->                       -- source : TInterface "Gtk" "IconSource"
    CUInt ->                                -- direction : TInterface "Gtk" "TextDirection"
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    Int32 ->                                -- size : TBasicType TInt32
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED styleRenderIcon ["(Since version 3.0)","Use gtk_render_icon_pixbuf() instead"]#-}
styleRenderIcon ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- _obj
    IconSource ->                           -- source
    TextDirection ->                        -- direction
    StateType ->                            -- state
    Int32 ->                                -- size
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    m GdkPixbuf.Pixbuf
styleRenderIcon _obj source direction state size widget detail = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let source' = unsafeManagedPtrGetPtr source
    let direction' = (fromIntegral . fromEnum) direction
    let state' = (fromIntegral . fromEnum) state
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    result <- gtk_style_render_icon _obj' source' direction' state' size maybeWidget maybeDetail
    checkUnexpectedReturnNULL "gtk_style_render_icon" result
    result' <- (wrapObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    touchManagedPtr source
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return result'

-- method Style::set_background
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_set_background" gtk_style_set_background :: 
    Ptr Style ->                            -- _obj : TInterface "Gtk" "Style"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    IO ()

{-# DEPRECATED styleSetBackground ["(Since version 3.0)","Use gtk_style_context_set_background() instead"]#-}
styleSetBackground ::
    (MonadIO m, StyleK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    StateType ->                            -- state_type
    m ()
styleSetBackground _obj window state_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window' = unsafeManagedPtrCastPtr window
    let state_type' = (fromIntegral . fromEnum) state_type
    gtk_style_set_background _obj' window' state_type'
    touchManagedPtr _obj
    touchManagedPtr window
    return ()

-- signal Style::realize
type StyleRealizeCallback =
    IO ()

noStyleRealizeCallback :: Maybe StyleRealizeCallback
noStyleRealizeCallback = Nothing

type StyleRealizeCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkStyleRealizeCallback :: StyleRealizeCallbackC -> IO (FunPtr StyleRealizeCallbackC)

styleRealizeClosure :: StyleRealizeCallback -> IO Closure
styleRealizeClosure cb = newCClosure =<< mkStyleRealizeCallback wrapped
    where wrapped = styleRealizeCallbackWrapper cb

styleRealizeCallbackWrapper ::
    StyleRealizeCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
styleRealizeCallbackWrapper _cb _ _ = do
    _cb 

onStyleRealize :: (GObject a, MonadIO m) => a -> StyleRealizeCallback -> m SignalHandlerId
onStyleRealize obj cb = liftIO $ connectStyleRealize obj cb SignalConnectBefore
afterStyleRealize :: (GObject a, MonadIO m) => a -> StyleRealizeCallback -> m SignalHandlerId
afterStyleRealize obj cb = connectStyleRealize obj cb SignalConnectAfter

connectStyleRealize :: (GObject a, MonadIO m) =>
                       a -> StyleRealizeCallback -> SignalConnectMode -> m SignalHandlerId
connectStyleRealize obj cb after = liftIO $ do
    cb' <- mkStyleRealizeCallback (styleRealizeCallbackWrapper cb)
    connectSignalFunPtr obj "realize" cb' after

-- signal Style::unrealize
type StyleUnrealizeCallback =
    IO ()

noStyleUnrealizeCallback :: Maybe StyleUnrealizeCallback
noStyleUnrealizeCallback = Nothing

type StyleUnrealizeCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkStyleUnrealizeCallback :: StyleUnrealizeCallbackC -> IO (FunPtr StyleUnrealizeCallbackC)

styleUnrealizeClosure :: StyleUnrealizeCallback -> IO Closure
styleUnrealizeClosure cb = newCClosure =<< mkStyleUnrealizeCallback wrapped
    where wrapped = styleUnrealizeCallbackWrapper cb

styleUnrealizeCallbackWrapper ::
    StyleUnrealizeCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
styleUnrealizeCallbackWrapper _cb _ _ = do
    _cb 

onStyleUnrealize :: (GObject a, MonadIO m) => a -> StyleUnrealizeCallback -> m SignalHandlerId
onStyleUnrealize obj cb = liftIO $ connectStyleUnrealize obj cb SignalConnectBefore
afterStyleUnrealize :: (GObject a, MonadIO m) => a -> StyleUnrealizeCallback -> m SignalHandlerId
afterStyleUnrealize obj cb = connectStyleUnrealize obj cb SignalConnectAfter

connectStyleUnrealize :: (GObject a, MonadIO m) =>
                         a -> StyleUnrealizeCallback -> SignalConnectMode -> m SignalHandlerId
connectStyleUnrealize obj cb after = liftIO $ do
    cb' <- mkStyleUnrealizeCallback (styleUnrealizeCallbackWrapper cb)
    connectSignalFunPtr obj "unrealize" cb' after

-- object StyleContext 
newtype StyleContext = StyleContext (ForeignPtr StyleContext)
noStyleContext :: Maybe StyleContext
noStyleContext = Nothing

foreign import ccall "gtk_style_context_get_type"
    c_gtk_style_context_get_type :: IO GType

type instance ParentTypes StyleContext = '[GObject.Object]

instance GObject StyleContext where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_style_context_get_type
    

class GObject o => StyleContextK o
instance (GObject o, IsDescendantOf StyleContext o) => StyleContextK o

toStyleContext :: StyleContextK o => o -> IO StyleContext
toStyleContext = unsafeCastTo StyleContext

-- method StyleContext::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "StyleContext"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_new" gtk_style_context_new :: 
    IO (Ptr StyleContext)


styleContextNew ::
    (MonadIO m) =>
    m StyleContext
styleContextNew  = liftIO $ do
    result <- gtk_style_context_new
    checkUnexpectedReturnNULL "gtk_style_context_new" result
    result' <- (wrapObject StyleContext) result
    return result'

-- method StyleContext::add_class
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_add_class" gtk_style_context_add_class :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CString ->                              -- class_name : TBasicType TUTF8
    IO ()


styleContextAddClass ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- class_name
    m ()
styleContextAddClass _obj class_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    class_name' <- textToCString class_name
    gtk_style_context_add_class _obj' class_name'
    touchManagedPtr _obj
    freeMem class_name'
    return ()

-- method StyleContext::add_provider
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_add_provider" gtk_style_context_add_provider :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Ptr StyleProvider ->                    -- provider : TInterface "Gtk" "StyleProvider"
    Word32 ->                               -- priority : TBasicType TUInt32
    IO ()


styleContextAddProvider ::
    (MonadIO m, StyleContextK a, StyleProviderK b) =>
    a ->                                    -- _obj
    b ->                                    -- provider
    Word32 ->                               -- priority
    m ()
styleContextAddProvider _obj provider priority = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let provider' = unsafeManagedPtrCastPtr provider
    gtk_style_context_add_provider _obj' provider' priority
    touchManagedPtr _obj
    touchManagedPtr provider
    return ()

-- method StyleContext::add_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "RegionFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "RegionFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_add_region" gtk_style_context_add_region :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CString ->                              -- region_name : TBasicType TUTF8
    CUInt ->                                -- flags : TInterface "Gtk" "RegionFlags"
    IO ()

{-# DEPRECATED styleContextAddRegion ["(Since version 3.14)"]#-}
styleContextAddRegion ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- region_name
    [RegionFlags] ->                        -- flags
    m ()
styleContextAddRegion _obj region_name flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    region_name' <- textToCString region_name
    let flags' = gflagsToWord flags
    gtk_style_context_add_region _obj' region_name' flags'
    touchManagedPtr _obj
    freeMem region_name'
    return ()

-- method StyleContext::cancel_animations
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_cancel_animations" gtk_style_context_cancel_animations :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Ptr () ->                               -- region_id : TBasicType TVoid
    IO ()

{-# DEPRECATED styleContextCancelAnimations ["(Since version 3.6)","This function does nothing."]#-}
styleContextCancelAnimations ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    Maybe (Ptr ()) ->                       -- region_id
    m ()
styleContextCancelAnimations _obj region_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeRegion_id <- case region_id of
        Nothing -> return nullPtr
        Just jRegion_id -> do
            return jRegion_id
    gtk_style_context_cancel_animations _obj' maybeRegion_id
    touchManagedPtr _obj
    return ()

-- method StyleContext::get_background_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_background_color" gtk_style_context_get_background_color :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO ()

{-# DEPRECATED styleContextGetBackgroundColor ["(Since version 3.16)","Use gtk_render_background() instead."]#-}
styleContextGetBackgroundColor ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Gdk.RGBA)
styleContextGetBackgroundColor _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    gtk_style_context_get_background_color _obj' state' color
    color' <- (wrapBoxed Gdk.RGBA) color
    touchManagedPtr _obj
    return color'

-- method StyleContext::get_border
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_border" gtk_style_context_get_border :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Border ->                           -- border : TInterface "Gtk" "Border"
    IO ()


styleContextGetBorder ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Border)
styleContextGetBorder _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    border <- callocBoxedBytes 8 :: IO (Ptr Border)
    gtk_style_context_get_border _obj' state' border
    border' <- (wrapBoxed Border) border
    touchManagedPtr _obj
    return border'

-- method StyleContext::get_border_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_border_color" gtk_style_context_get_border_color :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO ()

{-# DEPRECATED styleContextGetBorderColor ["(Since version 3.16)","Use gtk_render_border() instead."]#-}
styleContextGetBorderColor ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Gdk.RGBA)
styleContextGetBorderColor _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    gtk_style_context_get_border_color _obj' state' color
    color' <- (wrapBoxed Gdk.RGBA) color
    touchManagedPtr _obj
    return color'

-- method StyleContext::get_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_color" gtk_style_context_get_color :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO ()


styleContextGetColor ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Gdk.RGBA)
styleContextGetColor _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    gtk_style_context_get_color _obj' state' color
    color' <- (wrapBoxed Gdk.RGBA) color
    touchManagedPtr _obj
    return color'

-- method StyleContext::get_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextDirection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_direction" gtk_style_context_get_direction :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO CUInt

{-# DEPRECATED styleContextGetDirection ["(Since version 3.8)","Use gtk_style_context_get_state() and","  check for #GTK_STATE_FLAG_DIR_LTR and","  #GTK_STATE_FLAG_DIR_RTL instead."]#-}
styleContextGetDirection ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m TextDirection
styleContextGetDirection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_context_get_direction _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method StyleContext::get_font
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontDescription"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_font" gtk_style_context_get_font :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    IO (Ptr Pango.FontDescription)

{-# DEPRECATED styleContextGetFont ["(Since version 3.8)","Use gtk_style_context_get() for \"font\" or","    subproperties instead."]#-}
styleContextGetFont ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m Pango.FontDescription
styleContextGetFont _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    result <- gtk_style_context_get_font _obj' state'
    checkUnexpectedReturnNULL "gtk_style_context_get_font" result
    result' <- (newBoxed Pango.FontDescription) result
    touchManagedPtr _obj
    return result'

-- method StyleContext::get_frame_clock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "FrameClock"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_frame_clock" gtk_style_context_get_frame_clock :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO (Ptr Gdk.FrameClock)


styleContextGetFrameClock ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m Gdk.FrameClock
styleContextGetFrameClock _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_context_get_frame_clock _obj'
    checkUnexpectedReturnNULL "gtk_style_context_get_frame_clock" result
    result' <- (newObject Gdk.FrameClock) result
    touchManagedPtr _obj
    return result'

-- method StyleContext::get_junction_sides
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "JunctionSides"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_junction_sides" gtk_style_context_get_junction_sides :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO CUInt


styleContextGetJunctionSides ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m [JunctionSides]
styleContextGetJunctionSides _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_context_get_junction_sides _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method StyleContext::get_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_margin" gtk_style_context_get_margin :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Border ->                           -- margin : TInterface "Gtk" "Border"
    IO ()


styleContextGetMargin ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Border)
styleContextGetMargin _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    margin <- callocBoxedBytes 8 :: IO (Ptr Border)
    gtk_style_context_get_margin _obj' state' margin
    margin' <- (wrapBoxed Border) margin
    touchManagedPtr _obj
    return margin'

-- method StyleContext::get_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_padding" gtk_style_context_get_padding :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Border ->                           -- padding : TInterface "Gtk" "Border"
    IO ()


styleContextGetPadding ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Border)
styleContextGetPadding _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    padding <- callocBoxedBytes 8 :: IO (Ptr Border)
    gtk_style_context_get_padding _obj' state' padding
    padding' <- (wrapBoxed Border) padding
    touchManagedPtr _obj
    return padding'

-- method StyleContext::get_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StyleContext"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_parent" gtk_style_context_get_parent :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO (Ptr StyleContext)


styleContextGetParent ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m StyleContext
styleContextGetParent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_context_get_parent _obj'
    checkUnexpectedReturnNULL "gtk_style_context_get_parent" result
    result' <- (newObject StyleContext) result
    touchManagedPtr _obj
    return result'

-- method StyleContext::get_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "WidgetPath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_path" gtk_style_context_get_path :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO (Ptr WidgetPath)


styleContextGetPath ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m WidgetPath
styleContextGetPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_context_get_path _obj'
    checkUnexpectedReturnNULL "gtk_style_context_get_path" result
    result' <- (newBoxed WidgetPath) result
    touchManagedPtr _obj
    return result'

-- method StyleContext::get_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_property" gtk_style_context_get_property :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CString ->                              -- property : TBasicType TUTF8
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


styleContextGetProperty ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- property
    [StateFlags] ->                         -- state
    m (GValue)
styleContextGetProperty _obj property state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    property' <- textToCString property
    let state' = gflagsToWord state
    value <- callocBoxedBytes 24 :: IO (Ptr GValue)
    gtk_style_context_get_property _obj' property' state' value
    value' <- (wrapBoxed GValue) value
    touchManagedPtr _obj
    freeMem property'
    return value'

-- method StyleContext::get_scale
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_scale" gtk_style_context_get_scale :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO Int32


styleContextGetScale ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m Int32
styleContextGetScale _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_context_get_scale _obj'
    touchManagedPtr _obj
    return result

-- method StyleContext::get_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Screen"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_screen" gtk_style_context_get_screen :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO (Ptr Gdk.Screen)


styleContextGetScreen ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m Gdk.Screen
styleContextGetScreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_context_get_screen _obj'
    checkUnexpectedReturnNULL "gtk_style_context_get_screen" result
    result' <- (newObject Gdk.Screen) result
    touchManagedPtr _obj
    return result'

-- method StyleContext::get_section
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "CssSection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_section" gtk_style_context_get_section :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CString ->                              -- property : TBasicType TUTF8
    IO (Ptr CssSection)


styleContextGetSection ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- property
    m CssSection
styleContextGetSection _obj property = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    property' <- textToCString property
    result <- gtk_style_context_get_section _obj' property'
    checkUnexpectedReturnNULL "gtk_style_context_get_section" result
    result' <- (wrapBoxed CssSection) result
    touchManagedPtr _obj
    freeMem property'
    return result'

-- method StyleContext::get_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StateFlags"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_state" gtk_style_context_get_state :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO CUInt


styleContextGetState ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m [StateFlags]
styleContextGetState _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_context_get_state _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method StyleContext::get_style_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_get_style_property" gtk_style_context_get_style_property :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


styleContextGetStyleProperty ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- property_name
    GValue ->                               -- value
    m ()
styleContextGetStyleProperty _obj property_name value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    property_name' <- textToCString property_name
    let value' = unsafeManagedPtrGetPtr value
    gtk_style_context_get_style_property _obj' property_name' value'
    touchManagedPtr _obj
    touchManagedPtr value
    freeMem property_name'
    return ()

-- method StyleContext::has_class
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_has_class" gtk_style_context_has_class :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CString ->                              -- class_name : TBasicType TUTF8
    IO CInt


styleContextHasClass ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- class_name
    m Bool
styleContextHasClass _obj class_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    class_name' <- textToCString class_name
    result <- gtk_style_context_has_class _obj' class_name'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem class_name'
    return result'

-- method StyleContext::has_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags_return", argType = TInterface "Gtk" "RegionFlags", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_has_region" gtk_style_context_has_region :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CString ->                              -- region_name : TBasicType TUTF8
    Ptr CUInt ->                            -- flags_return : TInterface "Gtk" "RegionFlags"
    IO CInt

{-# DEPRECATED styleContextHasRegion ["(Since version 3.14)"]#-}
styleContextHasRegion ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- region_name
    m (Bool,[RegionFlags])
styleContextHasRegion _obj region_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    region_name' <- textToCString region_name
    flags_return <- allocMem :: IO (Ptr CUInt)
    result <- gtk_style_context_has_region _obj' region_name' flags_return
    let result' = (/= 0) result
    flags_return' <- peek flags_return
    let flags_return'' = wordToGFlags flags_return'
    touchManagedPtr _obj
    freeMem region_name'
    freeMem flags_return
    return (result', flags_return'')

-- method StyleContext::invalidate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_invalidate" gtk_style_context_invalidate :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO ()

{-# DEPRECATED styleContextInvalidate ["(Since version 3.12)","Style contexts are invalidated automatically."]#-}
styleContextInvalidate ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m ()
styleContextInvalidate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_style_context_invalidate _obj'
    touchManagedPtr _obj
    return ()

-- method StyleContext::list_classes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_list_classes" gtk_style_context_list_classes :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO (Ptr (GList CString))


styleContextListClasses ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m [T.Text]
styleContextListClasses _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_context_list_classes _obj'
    checkUnexpectedReturnNULL "gtk_style_context_list_classes" result
    result' <- unpackGList result
    result'' <- mapM cstringToText result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method StyleContext::list_regions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_list_regions" gtk_style_context_list_regions :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO (Ptr (GList CString))

{-# DEPRECATED styleContextListRegions ["(Since version 3.14)"]#-}
styleContextListRegions ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m [T.Text]
styleContextListRegions _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_style_context_list_regions _obj'
    checkUnexpectedReturnNULL "gtk_style_context_list_regions" result
    result' <- unpackGList result
    result'' <- mapM cstringToText result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method StyleContext::lookup_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_lookup_color" gtk_style_context_lookup_color :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CString ->                              -- color_name : TBasicType TUTF8
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO CInt


styleContextLookupColor ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- color_name
    m (Bool,Gdk.RGBA)
styleContextLookupColor _obj color_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    color_name' <- textToCString color_name
    color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    result <- gtk_style_context_lookup_color _obj' color_name' color
    let result' = (/= 0) result
    color' <- (wrapBoxed Gdk.RGBA) color
    touchManagedPtr _obj
    freeMem color_name'
    return (result', color')

-- method StyleContext::lookup_icon_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconSet"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_lookup_icon_set" gtk_style_context_lookup_icon_set :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr IconSet)

{-# DEPRECATED styleContextLookupIconSet ["(Since version 3.10)","Use gtk_icon_theme_lookup_icon() instead."]#-}
styleContextLookupIconSet ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- stock_id
    m IconSet
styleContextLookupIconSet _obj stock_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    stock_id' <- textToCString stock_id
    result <- gtk_style_context_lookup_icon_set _obj' stock_id'
    checkUnexpectedReturnNULL "gtk_style_context_lookup_icon_set" result
    result' <- (newBoxed IconSet) result
    touchManagedPtr _obj
    freeMem stock_id'
    return result'

-- method StyleContext::notify_state_change
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_notify_state_change" gtk_style_context_notify_state_change :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    Ptr () ->                               -- region_id : TBasicType TVoid
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    CInt ->                                 -- state_value : TBasicType TBoolean
    IO ()

{-# DEPRECATED styleContextNotifyStateChange ["(Since version 3.6)","This function does nothing."]#-}
styleContextNotifyStateChange ::
    (MonadIO m, StyleContextK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    Maybe (Ptr ()) ->                       -- region_id
    StateType ->                            -- state
    Bool ->                                 -- state_value
    m ()
styleContextNotifyStateChange _obj window region_id state state_value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window' = unsafeManagedPtrCastPtr window
    maybeRegion_id <- case region_id of
        Nothing -> return nullPtr
        Just jRegion_id -> do
            return jRegion_id
    let state' = (fromIntegral . fromEnum) state
    let state_value' = (fromIntegral . fromEnum) state_value
    gtk_style_context_notify_state_change _obj' window' maybeRegion_id state' state_value'
    touchManagedPtr _obj
    touchManagedPtr window
    return ()

-- method StyleContext::pop_animatable_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_pop_animatable_region" gtk_style_context_pop_animatable_region :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO ()

{-# DEPRECATED styleContextPopAnimatableRegion ["(Since version 3.6)","This function does nothing."]#-}
styleContextPopAnimatableRegion ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m ()
styleContextPopAnimatableRegion _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_style_context_pop_animatable_region _obj'
    touchManagedPtr _obj
    return ()

-- method StyleContext::push_animatable_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_id", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_push_animatable_region" gtk_style_context_push_animatable_region :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Ptr () ->                               -- region_id : TBasicType TVoid
    IO ()

{-# DEPRECATED styleContextPushAnimatableRegion ["(Since version 3.6)","This function does nothing."]#-}
styleContextPushAnimatableRegion ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    Ptr () ->                               -- region_id
    m ()
styleContextPushAnimatableRegion _obj region_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_style_context_push_animatable_region _obj' region_id
    touchManagedPtr _obj
    return ()

-- method StyleContext::remove_class
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_remove_class" gtk_style_context_remove_class :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CString ->                              -- class_name : TBasicType TUTF8
    IO ()


styleContextRemoveClass ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- class_name
    m ()
styleContextRemoveClass _obj class_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    class_name' <- textToCString class_name
    gtk_style_context_remove_class _obj' class_name'
    touchManagedPtr _obj
    freeMem class_name'
    return ()

-- method StyleContext::remove_provider
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_remove_provider" gtk_style_context_remove_provider :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Ptr StyleProvider ->                    -- provider : TInterface "Gtk" "StyleProvider"
    IO ()


styleContextRemoveProvider ::
    (MonadIO m, StyleContextK a, StyleProviderK b) =>
    a ->                                    -- _obj
    b ->                                    -- provider
    m ()
styleContextRemoveProvider _obj provider = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let provider' = unsafeManagedPtrCastPtr provider
    gtk_style_context_remove_provider _obj' provider'
    touchManagedPtr _obj
    touchManagedPtr provider
    return ()

-- method StyleContext::remove_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_remove_region" gtk_style_context_remove_region :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CString ->                              -- region_name : TBasicType TUTF8
    IO ()

{-# DEPRECATED styleContextRemoveRegion ["(Since version 3.14)"]#-}
styleContextRemoveRegion ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- region_name
    m ()
styleContextRemoveRegion _obj region_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    region_name' <- textToCString region_name
    gtk_style_context_remove_region _obj' region_name'
    touchManagedPtr _obj
    freeMem region_name'
    return ()

-- method StyleContext::restore
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_restore" gtk_style_context_restore :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO ()


styleContextRestore ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m ()
styleContextRestore _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_style_context_restore _obj'
    touchManagedPtr _obj
    return ()

-- method StyleContext::save
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_save" gtk_style_context_save :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    IO ()


styleContextSave ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    m ()
styleContextSave _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_style_context_save _obj'
    touchManagedPtr _obj
    return ()

-- method StyleContext::scroll_animations
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dy", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dy", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_scroll_animations" gtk_style_context_scroll_animations :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    Int32 ->                                -- dx : TBasicType TInt32
    Int32 ->                                -- dy : TBasicType TInt32
    IO ()

{-# DEPRECATED styleContextScrollAnimations ["(Since version 3.6)","This function does nothing."]#-}
styleContextScrollAnimations ::
    (MonadIO m, StyleContextK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    Int32 ->                                -- dx
    Int32 ->                                -- dy
    m ()
styleContextScrollAnimations _obj window dx dy = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window' = unsafeManagedPtrCastPtr window
    gtk_style_context_scroll_animations _obj' window' dx dy
    touchManagedPtr _obj
    touchManagedPtr window
    return ()

-- method StyleContext::set_background
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_background" gtk_style_context_set_background :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    IO ()

{-# DEPRECATED styleContextSetBackground ["(Since version 3.18)","Use gtk_render_background() instead.","  Note that clients still using this function are now responsible","  for calling this function again whenever @context is invalidated."]#-}
styleContextSetBackground ::
    (MonadIO m, StyleContextK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    m ()
styleContextSetBackground _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window' = unsafeManagedPtrCastPtr window
    gtk_style_context_set_background _obj' window'
    touchManagedPtr _obj
    touchManagedPtr window
    return ()

-- method StyleContext::set_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_direction" gtk_style_context_set_direction :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CUInt ->                                -- direction : TInterface "Gtk" "TextDirection"
    IO ()

{-# DEPRECATED styleContextSetDirection ["(Since version 3.8)","Use gtk_style_context_set_state() with","  #GTK_STATE_FLAG_DIR_LTR and #GTK_STATE_FLAG_DIR_RTL","  instead."]#-}
styleContextSetDirection ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    TextDirection ->                        -- direction
    m ()
styleContextSetDirection _obj direction = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let direction' = (fromIntegral . fromEnum) direction
    gtk_style_context_set_direction _obj' direction'
    touchManagedPtr _obj
    return ()

-- method StyleContext::set_frame_clock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "frame_clock", argType = TInterface "Gdk" "FrameClock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "frame_clock", argType = TInterface "Gdk" "FrameClock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_frame_clock" gtk_style_context_set_frame_clock :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Ptr Gdk.FrameClock ->                   -- frame_clock : TInterface "Gdk" "FrameClock"
    IO ()


styleContextSetFrameClock ::
    (MonadIO m, StyleContextK a, Gdk.FrameClockK b) =>
    a ->                                    -- _obj
    b ->                                    -- frame_clock
    m ()
styleContextSetFrameClock _obj frame_clock = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let frame_clock' = unsafeManagedPtrCastPtr frame_clock
    gtk_style_context_set_frame_clock _obj' frame_clock'
    touchManagedPtr _obj
    touchManagedPtr frame_clock
    return ()

-- method StyleContext::set_junction_sides
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sides", argType = TInterface "Gtk" "JunctionSides", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sides", argType = TInterface "Gtk" "JunctionSides", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_junction_sides" gtk_style_context_set_junction_sides :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CUInt ->                                -- sides : TInterface "Gtk" "JunctionSides"
    IO ()


styleContextSetJunctionSides ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    [JunctionSides] ->                      -- sides
    m ()
styleContextSetJunctionSides _obj sides = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sides' = gflagsToWord sides
    gtk_style_context_set_junction_sides _obj' sides'
    touchManagedPtr _obj
    return ()

-- method StyleContext::set_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_parent" gtk_style_context_set_parent :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Ptr StyleContext ->                     -- parent : TInterface "Gtk" "StyleContext"
    IO ()


styleContextSetParent ::
    (MonadIO m, StyleContextK a, StyleContextK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- parent
    m ()
styleContextSetParent _obj parent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    gtk_style_context_set_parent _obj' maybeParent
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    return ()

-- method StyleContext::set_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_path" gtk_style_context_set_path :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Ptr WidgetPath ->                       -- path : TInterface "Gtk" "WidgetPath"
    IO ()


styleContextSetPath ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    WidgetPath ->                           -- path
    m ()
styleContextSetPath _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    gtk_style_context_set_path _obj' path'
    touchManagedPtr _obj
    touchManagedPtr path
    return ()

-- method StyleContext::set_scale
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scale", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_scale" gtk_style_context_set_scale :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Int32 ->                                -- scale : TBasicType TInt32
    IO ()


styleContextSetScale ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- scale
    m ()
styleContextSetScale _obj scale = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_style_context_set_scale _obj' scale
    touchManagedPtr _obj
    return ()

-- method StyleContext::set_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_screen" gtk_style_context_set_screen :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO ()


styleContextSetScreen ::
    (MonadIO m, StyleContextK a, Gdk.ScreenK b) =>
    a ->                                    -- _obj
    b ->                                    -- screen
    m ()
styleContextSetScreen _obj screen = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let screen' = unsafeManagedPtrCastPtr screen
    gtk_style_context_set_screen _obj' screen'
    touchManagedPtr _obj
    touchManagedPtr screen
    return ()

-- method StyleContext::set_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_set_state" gtk_style_context_set_state :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CUInt ->                                -- flags : TInterface "Gtk" "StateFlags"
    IO ()


styleContextSetState ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- flags
    m ()
styleContextSetState _obj flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let flags' = gflagsToWord flags
    gtk_style_context_set_state _obj' flags'
    touchManagedPtr _obj
    return ()

-- method StyleContext::state_is_running
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "progress", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_state_is_running" gtk_style_context_state_is_running :: 
    Ptr StyleContext ->                     -- _obj : TInterface "Gtk" "StyleContext"
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    Ptr CDouble ->                          -- progress : TBasicType TDouble
    IO CInt

{-# DEPRECATED styleContextStateIsRunning ["(Since version 3.6)","This function always returns %FALSE"]#-}
styleContextStateIsRunning ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- _obj
    StateType ->                            -- state
    m (Bool,Double)
styleContextStateIsRunning _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = (fromIntegral . fromEnum) state
    progress <- allocMem :: IO (Ptr CDouble)
    result <- gtk_style_context_state_is_running _obj' state' progress
    let result' = (/= 0) result
    progress' <- peek progress
    let progress'' = realToFrac progress'
    touchManagedPtr _obj
    freeMem progress
    return (result', progress'')

-- method StyleContext::add_provider_for_screen
-- method type : MemberFunction
-- Args : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_add_provider_for_screen" gtk_style_context_add_provider_for_screen :: 
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    Ptr StyleProvider ->                    -- provider : TInterface "Gtk" "StyleProvider"
    Word32 ->                               -- priority : TBasicType TUInt32
    IO ()


styleContextAddProviderForScreen ::
    (MonadIO m, Gdk.ScreenK a, StyleProviderK b) =>
    a ->                                    -- screen
    b ->                                    -- provider
    Word32 ->                               -- priority
    m ()
styleContextAddProviderForScreen screen provider priority = liftIO $ do
    let screen' = unsafeManagedPtrCastPtr screen
    let provider' = unsafeManagedPtrCastPtr provider
    gtk_style_context_add_provider_for_screen screen' provider' priority
    touchManagedPtr screen
    touchManagedPtr provider
    return ()

-- method StyleContext::remove_provider_for_screen
-- method type : MemberFunction
-- Args : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "provider", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_remove_provider_for_screen" gtk_style_context_remove_provider_for_screen :: 
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    Ptr StyleProvider ->                    -- provider : TInterface "Gtk" "StyleProvider"
    IO ()


styleContextRemoveProviderForScreen ::
    (MonadIO m, Gdk.ScreenK a, StyleProviderK b) =>
    a ->                                    -- screen
    b ->                                    -- provider
    m ()
styleContextRemoveProviderForScreen screen provider = liftIO $ do
    let screen' = unsafeManagedPtrCastPtr screen
    let provider' = unsafeManagedPtrCastPtr provider
    gtk_style_context_remove_provider_for_screen screen' provider'
    touchManagedPtr screen
    touchManagedPtr provider
    return ()

-- method StyleContext::reset_widgets
-- method type : MemberFunction
-- Args : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_context_reset_widgets" gtk_style_context_reset_widgets :: 
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO ()


styleContextResetWidgets ::
    (MonadIO m, Gdk.ScreenK a) =>
    a ->                                    -- screen
    m ()
styleContextResetWidgets screen = liftIO $ do
    let screen' = unsafeManagedPtrCastPtr screen
    gtk_style_context_reset_widgets screen'
    touchManagedPtr screen
    return ()

-- signal StyleContext::changed
type StyleContextChangedCallback =
    IO ()

noStyleContextChangedCallback :: Maybe StyleContextChangedCallback
noStyleContextChangedCallback = Nothing

type StyleContextChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkStyleContextChangedCallback :: StyleContextChangedCallbackC -> IO (FunPtr StyleContextChangedCallbackC)

styleContextChangedClosure :: StyleContextChangedCallback -> IO Closure
styleContextChangedClosure cb = newCClosure =<< mkStyleContextChangedCallback wrapped
    where wrapped = styleContextChangedCallbackWrapper cb

styleContextChangedCallbackWrapper ::
    StyleContextChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
styleContextChangedCallbackWrapper _cb _ _ = do
    _cb 

onStyleContextChanged :: (GObject a, MonadIO m) => a -> StyleContextChangedCallback -> m SignalHandlerId
onStyleContextChanged obj cb = liftIO $ connectStyleContextChanged obj cb SignalConnectBefore
afterStyleContextChanged :: (GObject a, MonadIO m) => a -> StyleContextChangedCallback -> m SignalHandlerId
afterStyleContextChanged obj cb = connectStyleContextChanged obj cb SignalConnectAfter

connectStyleContextChanged :: (GObject a, MonadIO m) =>
                              a -> StyleContextChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectStyleContextChanged obj cb after = liftIO $ do
    cb' <- mkStyleContextChangedCallback (styleContextChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- object StyleProperties 
newtype StyleProperties = StyleProperties (ForeignPtr StyleProperties)
noStyleProperties :: Maybe StyleProperties
noStyleProperties = Nothing

foreign import ccall "gtk_style_properties_get_type"
    c_gtk_style_properties_get_type :: IO GType

type instance ParentTypes StyleProperties = '[GObject.Object, StyleProvider]

instance GObject StyleProperties where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_style_properties_get_type
    

class GObject o => StylePropertiesK o
instance (GObject o, IsDescendantOf StyleProperties o) => StylePropertiesK o

toStyleProperties :: StylePropertiesK o => o -> IO StyleProperties
toStyleProperties = unsafeCastTo StyleProperties

-- method StyleProperties::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "StyleProperties"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_properties_new" gtk_style_properties_new :: 
    IO (Ptr StyleProperties)

{-# DEPRECATED stylePropertiesNew ["(Since version 3.16)","#GtkStyleProperties are deprecated."]#-}
stylePropertiesNew ::
    (MonadIO m) =>
    m StyleProperties
stylePropertiesNew  = liftIO $ do
    result <- gtk_style_properties_new
    checkUnexpectedReturnNULL "gtk_style_properties_new" result
    result' <- (wrapObject StyleProperties) result
    return result'

-- method StyleProperties::clear
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_properties_clear" gtk_style_properties_clear :: 
    Ptr StyleProperties ->                  -- _obj : TInterface "Gtk" "StyleProperties"
    IO ()

{-# DEPRECATED stylePropertiesClear ["(Since version 3.16)","#GtkStyleProperties are deprecated."]#-}
stylePropertiesClear ::
    (MonadIO m, StylePropertiesK a) =>
    a ->                                    -- _obj
    m ()
stylePropertiesClear _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_style_properties_clear _obj'
    touchManagedPtr _obj
    return ()

-- method StyleProperties::get_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_properties_get_property" gtk_style_properties_get_property :: 
    Ptr StyleProperties ->                  -- _obj : TInterface "Gtk" "StyleProperties"
    CString ->                              -- property : TBasicType TUTF8
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO CInt

{-# DEPRECATED stylePropertiesGetProperty ["(Since version 3.16)","#GtkStyleProperties are deprecated."]#-}
stylePropertiesGetProperty ::
    (MonadIO m, StylePropertiesK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- property
    [StateFlags] ->                         -- state
    m (Bool,GValue)
stylePropertiesGetProperty _obj property state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    property' <- textToCString property
    let state' = gflagsToWord state
    value <- callocBoxedBytes 24 :: IO (Ptr GValue)
    result <- gtk_style_properties_get_property _obj' property' state' value
    let result' = (/= 0) result
    value' <- (wrapBoxed GValue) value
    touchManagedPtr _obj
    freeMem property'
    return (result', value')

-- method StyleProperties::lookup_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SymbolicColor"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_properties_lookup_color" gtk_style_properties_lookup_color :: 
    Ptr StyleProperties ->                  -- _obj : TInterface "Gtk" "StyleProperties"
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr SymbolicColor)

{-# DEPRECATED stylePropertiesLookupColor ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
stylePropertiesLookupColor ::
    (MonadIO m, StylePropertiesK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m SymbolicColor
stylePropertiesLookupColor _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    result <- gtk_style_properties_lookup_color _obj' name'
    checkUnexpectedReturnNULL "gtk_style_properties_lookup_color" result
    result' <- (newBoxed SymbolicColor) result
    touchManagedPtr _obj
    freeMem name'
    return result'

-- method StyleProperties::map_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_properties_map_color" gtk_style_properties_map_color :: 
    Ptr StyleProperties ->                  -- _obj : TInterface "Gtk" "StyleProperties"
    CString ->                              -- name : TBasicType TUTF8
    Ptr SymbolicColor ->                    -- color : TInterface "Gtk" "SymbolicColor"
    IO ()

{-# DEPRECATED stylePropertiesMapColor ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
stylePropertiesMapColor ::
    (MonadIO m, StylePropertiesK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    SymbolicColor ->                        -- color
    m ()
stylePropertiesMapColor _obj name color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    let color' = unsafeManagedPtrGetPtr color
    gtk_style_properties_map_color _obj' name' color'
    touchManagedPtr _obj
    touchManagedPtr color
    freeMem name'
    return ()

-- method StyleProperties::merge
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "props_to_merge", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "replace", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "props_to_merge", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "replace", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_properties_merge" gtk_style_properties_merge :: 
    Ptr StyleProperties ->                  -- _obj : TInterface "Gtk" "StyleProperties"
    Ptr StyleProperties ->                  -- props_to_merge : TInterface "Gtk" "StyleProperties"
    CInt ->                                 -- replace : TBasicType TBoolean
    IO ()

{-# DEPRECATED stylePropertiesMerge ["(Since version 3.16)","#GtkStyleProperties are deprecated."]#-}
stylePropertiesMerge ::
    (MonadIO m, StylePropertiesK a, StylePropertiesK b) =>
    a ->                                    -- _obj
    b ->                                    -- props_to_merge
    Bool ->                                 -- replace
    m ()
stylePropertiesMerge _obj props_to_merge replace = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let props_to_merge' = unsafeManagedPtrCastPtr props_to_merge
    let replace' = (fromIntegral . fromEnum) replace
    gtk_style_properties_merge _obj' props_to_merge' replace'
    touchManagedPtr _obj
    touchManagedPtr props_to_merge
    return ()

-- method StyleProperties::set_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_properties_set_property" gtk_style_properties_set_property :: 
    Ptr StyleProperties ->                  -- _obj : TInterface "Gtk" "StyleProperties"
    CString ->                              -- property : TBasicType TUTF8
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()

{-# DEPRECATED stylePropertiesSetProperty ["(Since version 3.16)","#GtkStyleProperties are deprecated."]#-}
stylePropertiesSetProperty ::
    (MonadIO m, StylePropertiesK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- property
    [StateFlags] ->                         -- state
    GValue ->                               -- value
    m ()
stylePropertiesSetProperty _obj property state value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    property' <- textToCString property
    let state' = gflagsToWord state
    let value' = unsafeManagedPtrGetPtr value
    gtk_style_properties_set_property _obj' property' state' value'
    touchManagedPtr _obj
    touchManagedPtr value
    freeMem property'
    return ()

-- method StyleProperties::unset_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_properties_unset_property" gtk_style_properties_unset_property :: 
    Ptr StyleProperties ->                  -- _obj : TInterface "Gtk" "StyleProperties"
    CString ->                              -- property : TBasicType TUTF8
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    IO ()

{-# DEPRECATED stylePropertiesUnsetProperty ["(Since version 3.16)","#GtkStyleProperties are deprecated."]#-}
stylePropertiesUnsetProperty ::
    (MonadIO m, StylePropertiesK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- property
    [StateFlags] ->                         -- state
    m ()
stylePropertiesUnsetProperty _obj property state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    property' <- textToCString property
    let state' = gflagsToWord state
    gtk_style_properties_unset_property _obj' property' state'
    touchManagedPtr _obj
    freeMem property'
    return ()

-- callback StylePropertyParser
stylePropertyParserClosure :: StylePropertyParser -> IO Closure
stylePropertyParserClosure cb = newCClosure =<< mkStylePropertyParser wrapped
    where wrapped = stylePropertyParserWrapper Nothing cb

type StylePropertyParserC =
    CString ->
    Ptr GValue ->
    IO CInt

foreign import ccall "wrapper"
    mkStylePropertyParser :: StylePropertyParserC -> IO (FunPtr StylePropertyParserC)

type StylePropertyParser =
    T.Text ->
    GValue ->
    IO Bool

noStylePropertyParser :: Maybe StylePropertyParser
noStylePropertyParser = Nothing

stylePropertyParserWrapper ::
    Maybe (Ptr (FunPtr (StylePropertyParserC))) ->
    StylePropertyParser ->
    CString ->
    Ptr GValue ->
    IO CInt
stylePropertyParserWrapper funptrptr _cb string value = do
    string' <- cstringToText string
    value' <- (newBoxed GValue) value
    result <- _cb  string' value'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- interface StyleProvider 

newtype StyleProvider = StyleProvider (ForeignPtr StyleProvider)
noStyleProvider :: Maybe StyleProvider
noStyleProvider = Nothing

class ForeignPtrNewtype a => StyleProviderK a
instance (ForeignPtrNewtype o, IsDescendantOf StyleProvider o) => StyleProviderK o
type instance ParentTypes StyleProvider = '[]

-- method StyleProvider::get_icon_factory
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconFactory"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_provider_get_icon_factory" gtk_style_provider_get_icon_factory :: 
    Ptr StyleProvider ->                    -- _obj : TInterface "Gtk" "StyleProvider"
    Ptr WidgetPath ->                       -- path : TInterface "Gtk" "WidgetPath"
    IO (Ptr IconFactory)

{-# DEPRECATED styleProviderGetIconFactory ["(Since version 3.8)","Will always return %NULL for all GTK-provided style providers."]#-}
styleProviderGetIconFactory ::
    (MonadIO m, StyleProviderK a) =>
    a ->                                    -- _obj
    WidgetPath ->                           -- path
    m IconFactory
styleProviderGetIconFactory _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_style_provider_get_icon_factory _obj' path'
    checkUnexpectedReturnNULL "gtk_style_provider_get_icon_factory" result
    result' <- (newObject IconFactory) result
    touchManagedPtr _obj
    touchManagedPtr path
    return result'

-- method StyleProvider::get_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StyleProperties"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_provider_get_style" gtk_style_provider_get_style :: 
    Ptr StyleProvider ->                    -- _obj : TInterface "Gtk" "StyleProvider"
    Ptr WidgetPath ->                       -- path : TInterface "Gtk" "WidgetPath"
    IO (Ptr StyleProperties)

{-# DEPRECATED styleProviderGetStyle ["(Since version 3.8)","Will always return %NULL for all GTK-provided style providers","    as the interface cannot correctly work the way CSS is specified."]#-}
styleProviderGetStyle ::
    (MonadIO m, StyleProviderK a) =>
    a ->                                    -- _obj
    WidgetPath ->                           -- path
    m StyleProperties
styleProviderGetStyle _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_style_provider_get_style _obj' path'
    checkUnexpectedReturnNULL "gtk_style_provider_get_style" result
    result' <- (wrapObject StyleProperties) result
    touchManagedPtr _obj
    touchManagedPtr path
    return result'

-- method StyleProvider::get_style_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "StyleProvider", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_style_provider_get_style_property" gtk_style_provider_get_style_property :: 
    Ptr StyleProvider ->                    -- _obj : TInterface "Gtk" "StyleProvider"
    Ptr WidgetPath ->                       -- path : TInterface "Gtk" "WidgetPath"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO CInt


styleProviderGetStyleProperty ::
    (MonadIO m, StyleProviderK a) =>
    a ->                                    -- _obj
    WidgetPath ->                           -- path
    [StateFlags] ->                         -- state
    GParamSpec ->                           -- pspec
    m (Bool,GValue)
styleProviderGetStyleProperty _obj path state pspec = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    let state' = gflagsToWord state
    let pspec' = unsafeManagedPtrGetPtr pspec
    value <- callocBoxedBytes 24 :: IO (Ptr GValue)
    result <- gtk_style_provider_get_style_property _obj' path' state' pspec' value
    let result' = (/= 0) result
    value' <- (wrapBoxed GValue) value
    touchManagedPtr _obj
    touchManagedPtr path
    return (result', value')

-- object Switch 
newtype Switch = Switch (ForeignPtr Switch)
noSwitch :: Maybe Switch
noSwitch = Nothing

foreign import ccall "gtk_switch_get_type"
    c_gtk_switch_get_type :: IO GType

type instance ParentTypes Switch = '[Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject Switch where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_switch_get_type
    

class GObject o => SwitchK o
instance (GObject o, IsDescendantOf Switch o) => SwitchK o

toSwitch :: SwitchK o => o -> IO Switch
toSwitch = unsafeCastTo Switch

-- method Switch::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Switch"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_switch_new" gtk_switch_new :: 
    IO (Ptr Switch)


switchNew ::
    (MonadIO m) =>
    m Switch
switchNew  = liftIO $ do
    result <- gtk_switch_new
    checkUnexpectedReturnNULL "gtk_switch_new" result
    result' <- (newObject Switch) result
    return result'

-- method Switch::get_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Switch", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Switch", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_switch_get_active" gtk_switch_get_active :: 
    Ptr Switch ->                           -- _obj : TInterface "Gtk" "Switch"
    IO CInt


switchGetActive ::
    (MonadIO m, SwitchK a) =>
    a ->                                    -- _obj
    m Bool
switchGetActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_switch_get_active _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Switch::get_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Switch", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Switch", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_switch_get_state" gtk_switch_get_state :: 
    Ptr Switch ->                           -- _obj : TInterface "Gtk" "Switch"
    IO CInt


switchGetState ::
    (MonadIO m, SwitchK a) =>
    a ->                                    -- _obj
    m Bool
switchGetState _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_switch_get_state _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Switch::set_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Switch", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Switch", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_switch_set_active" gtk_switch_set_active :: 
    Ptr Switch ->                           -- _obj : TInterface "Gtk" "Switch"
    CInt ->                                 -- is_active : TBasicType TBoolean
    IO ()


switchSetActive ::
    (MonadIO m, SwitchK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- is_active
    m ()
switchSetActive _obj is_active = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let is_active' = (fromIntegral . fromEnum) is_active
    gtk_switch_set_active _obj' is_active'
    touchManagedPtr _obj
    return ()

-- method Switch::set_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Switch", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Switch", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_switch_set_state" gtk_switch_set_state :: 
    Ptr Switch ->                           -- _obj : TInterface "Gtk" "Switch"
    CInt ->                                 -- state : TBasicType TBoolean
    IO ()


switchSetState ::
    (MonadIO m, SwitchK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- state
    m ()
switchSetState _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = (fromIntegral . fromEnum) state
    gtk_switch_set_state _obj' state'
    touchManagedPtr _obj
    return ()

-- signal Switch::activate
type SwitchActivateCallback =
    IO ()

noSwitchActivateCallback :: Maybe SwitchActivateCallback
noSwitchActivateCallback = Nothing

type SwitchActivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkSwitchActivateCallback :: SwitchActivateCallbackC -> IO (FunPtr SwitchActivateCallbackC)

switchActivateClosure :: SwitchActivateCallback -> IO Closure
switchActivateClosure cb = newCClosure =<< mkSwitchActivateCallback wrapped
    where wrapped = switchActivateCallbackWrapper cb

switchActivateCallbackWrapper ::
    SwitchActivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
switchActivateCallbackWrapper _cb _ _ = do
    _cb 

onSwitchActivate :: (GObject a, MonadIO m) => a -> SwitchActivateCallback -> m SignalHandlerId
onSwitchActivate obj cb = liftIO $ connectSwitchActivate obj cb SignalConnectBefore
afterSwitchActivate :: (GObject a, MonadIO m) => a -> SwitchActivateCallback -> m SignalHandlerId
afterSwitchActivate obj cb = connectSwitchActivate obj cb SignalConnectAfter

connectSwitchActivate :: (GObject a, MonadIO m) =>
                         a -> SwitchActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectSwitchActivate obj cb after = liftIO $ do
    cb' <- mkSwitchActivateCallback (switchActivateCallbackWrapper cb)
    connectSignalFunPtr obj "activate" cb' after

-- signal Switch::state-set
type SwitchStateSetCallback =
    Bool ->
    IO Bool

noSwitchStateSetCallback :: Maybe SwitchStateSetCallback
noSwitchStateSetCallback = Nothing

type SwitchStateSetCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkSwitchStateSetCallback :: SwitchStateSetCallbackC -> IO (FunPtr SwitchStateSetCallbackC)

switchStateSetClosure :: SwitchStateSetCallback -> IO Closure
switchStateSetClosure cb = newCClosure =<< mkSwitchStateSetCallback wrapped
    where wrapped = switchStateSetCallbackWrapper cb

switchStateSetCallbackWrapper ::
    SwitchStateSetCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO CInt
switchStateSetCallbackWrapper _cb _ state _ = do
    let state' = (/= 0) state
    result <- _cb  state'
    let result' = (fromIntegral . fromEnum) result
    return result'

onSwitchStateSet :: (GObject a, MonadIO m) => a -> SwitchStateSetCallback -> m SignalHandlerId
onSwitchStateSet obj cb = liftIO $ connectSwitchStateSet obj cb SignalConnectBefore
afterSwitchStateSet :: (GObject a, MonadIO m) => a -> SwitchStateSetCallback -> m SignalHandlerId
afterSwitchStateSet obj cb = connectSwitchStateSet obj cb SignalConnectAfter

connectSwitchStateSet :: (GObject a, MonadIO m) =>
                         a -> SwitchStateSetCallback -> SignalConnectMode -> m SignalHandlerId
connectSwitchStateSet obj cb after = liftIO $ do
    cb' <- mkSwitchStateSetCallback (switchStateSetCallbackWrapper cb)
    connectSignalFunPtr obj "state-set" cb' after

-- object SwitchAccessible 
newtype SwitchAccessible = SwitchAccessible (ForeignPtr SwitchAccessible)
noSwitchAccessible :: Maybe SwitchAccessible
noSwitchAccessible = Nothing

foreign import ccall "gtk_switch_accessible_get_type"
    c_gtk_switch_accessible_get_type :: IO GType

type instance ParentTypes SwitchAccessible = '[WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component]

instance GObject SwitchAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_switch_accessible_get_type
    

class GObject o => SwitchAccessibleK o
instance (GObject o, IsDescendantOf SwitchAccessible o) => SwitchAccessibleK o

toSwitchAccessible :: SwitchAccessibleK o => o -> IO SwitchAccessible
toSwitchAccessible = unsafeCastTo SwitchAccessible

-- struct SymbolicColor
newtype SymbolicColor = SymbolicColor (ForeignPtr SymbolicColor)
noSymbolicColor :: Maybe SymbolicColor
noSymbolicColor = Nothing

foreign import ccall "gtk_symbolic_color_get_type" c_gtk_symbolic_color_get_type :: 
    IO GType

instance BoxedObject SymbolicColor where
    boxedType _ = c_gtk_symbolic_color_get_type

-- method SymbolicColor::new_alpha
-- method type : Constructor
-- Args : [Arg {argName = "color", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "factor", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "color", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "factor", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SymbolicColor"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_symbolic_color_new_alpha" gtk_symbolic_color_new_alpha :: 
    Ptr SymbolicColor ->                    -- color : TInterface "Gtk" "SymbolicColor"
    CDouble ->                              -- factor : TBasicType TDouble
    IO (Ptr SymbolicColor)

{-# DEPRECATED symbolicColorNewAlpha ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
symbolicColorNewAlpha ::
    (MonadIO m) =>
    SymbolicColor ->                        -- color
    Double ->                               -- factor
    m SymbolicColor
symbolicColorNewAlpha color factor = liftIO $ do
    let color' = unsafeManagedPtrGetPtr color
    let factor' = realToFrac factor
    result <- gtk_symbolic_color_new_alpha color' factor'
    checkUnexpectedReturnNULL "gtk_symbolic_color_new_alpha" result
    result' <- (wrapBoxed SymbolicColor) result
    touchManagedPtr color
    return result'

-- method SymbolicColor::new_literal
-- method type : Constructor
-- Args : [Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SymbolicColor"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_symbolic_color_new_literal" gtk_symbolic_color_new_literal :: 
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO (Ptr SymbolicColor)

{-# DEPRECATED symbolicColorNewLiteral ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
symbolicColorNewLiteral ::
    (MonadIO m) =>
    Gdk.RGBA ->                             -- color
    m SymbolicColor
symbolicColorNewLiteral color = liftIO $ do
    let color' = unsafeManagedPtrGetPtr color
    result <- gtk_symbolic_color_new_literal color'
    checkUnexpectedReturnNULL "gtk_symbolic_color_new_literal" result
    result' <- (wrapBoxed SymbolicColor) result
    touchManagedPtr color
    return result'

-- method SymbolicColor::new_mix
-- method type : Constructor
-- Args : [Arg {argName = "color1", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color2", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "factor", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "color1", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color2", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "factor", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SymbolicColor"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_symbolic_color_new_mix" gtk_symbolic_color_new_mix :: 
    Ptr SymbolicColor ->                    -- color1 : TInterface "Gtk" "SymbolicColor"
    Ptr SymbolicColor ->                    -- color2 : TInterface "Gtk" "SymbolicColor"
    CDouble ->                              -- factor : TBasicType TDouble
    IO (Ptr SymbolicColor)

{-# DEPRECATED symbolicColorNewMix ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
symbolicColorNewMix ::
    (MonadIO m) =>
    SymbolicColor ->                        -- color1
    SymbolicColor ->                        -- color2
    Double ->                               -- factor
    m SymbolicColor
symbolicColorNewMix color1 color2 factor = liftIO $ do
    let color1' = unsafeManagedPtrGetPtr color1
    let color2' = unsafeManagedPtrGetPtr color2
    let factor' = realToFrac factor
    result <- gtk_symbolic_color_new_mix color1' color2' factor'
    checkUnexpectedReturnNULL "gtk_symbolic_color_new_mix" result
    result' <- (wrapBoxed SymbolicColor) result
    touchManagedPtr color1
    touchManagedPtr color2
    return result'

-- method SymbolicColor::new_name
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SymbolicColor"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_symbolic_color_new_name" gtk_symbolic_color_new_name :: 
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr SymbolicColor)

{-# DEPRECATED symbolicColorNewName ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
symbolicColorNewName ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m SymbolicColor
symbolicColorNewName name = liftIO $ do
    name' <- textToCString name
    result <- gtk_symbolic_color_new_name name'
    checkUnexpectedReturnNULL "gtk_symbolic_color_new_name" result
    result' <- (wrapBoxed SymbolicColor) result
    freeMem name'
    return result'

-- method SymbolicColor::new_shade
-- method type : Constructor
-- Args : [Arg {argName = "color", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "factor", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "color", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "factor", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SymbolicColor"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_symbolic_color_new_shade" gtk_symbolic_color_new_shade :: 
    Ptr SymbolicColor ->                    -- color : TInterface "Gtk" "SymbolicColor"
    CDouble ->                              -- factor : TBasicType TDouble
    IO (Ptr SymbolicColor)

{-# DEPRECATED symbolicColorNewShade ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
symbolicColorNewShade ::
    (MonadIO m) =>
    SymbolicColor ->                        -- color
    Double ->                               -- factor
    m SymbolicColor
symbolicColorNewShade color factor = liftIO $ do
    let color' = unsafeManagedPtrGetPtr color
    let factor' = realToFrac factor
    result <- gtk_symbolic_color_new_shade color' factor'
    checkUnexpectedReturnNULL "gtk_symbolic_color_new_shade" result
    result' <- (wrapBoxed SymbolicColor) result
    touchManagedPtr color
    return result'

-- method SymbolicColor::new_win32
-- method type : Constructor
-- Args : [Arg {argName = "theme_class", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "theme_class", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SymbolicColor"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_symbolic_color_new_win32" gtk_symbolic_color_new_win32 :: 
    CString ->                              -- theme_class : TBasicType TUTF8
    Int32 ->                                -- id : TBasicType TInt32
    IO (Ptr SymbolicColor)

{-# DEPRECATED symbolicColorNewWin32 ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
symbolicColorNewWin32 ::
    (MonadIO m) =>
    T.Text ->                               -- theme_class
    Int32 ->                                -- id
    m SymbolicColor
symbolicColorNewWin32 theme_class id = liftIO $ do
    theme_class' <- textToCString theme_class
    result <- gtk_symbolic_color_new_win32 theme_class' id
    checkUnexpectedReturnNULL "gtk_symbolic_color_new_win32" result
    result' <- (wrapBoxed SymbolicColor) result
    freeMem theme_class'
    return result'

-- method SymbolicColor::ref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SymbolicColor"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_symbolic_color_ref" gtk_symbolic_color_ref :: 
    Ptr SymbolicColor ->                    -- _obj : TInterface "Gtk" "SymbolicColor"
    IO (Ptr SymbolicColor)

{-# DEPRECATED symbolicColorRef ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
symbolicColorRef ::
    (MonadIO m) =>
    SymbolicColor ->                        -- _obj
    m SymbolicColor
symbolicColorRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_symbolic_color_ref _obj'
    checkUnexpectedReturnNULL "gtk_symbolic_color_ref" result
    result' <- (wrapBoxed SymbolicColor) result
    touchManagedPtr _obj
    return result'

-- method SymbolicColor::resolve
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "props", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resolved_color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "props", argType = TInterface "Gtk" "StyleProperties", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_symbolic_color_resolve" gtk_symbolic_color_resolve :: 
    Ptr SymbolicColor ->                    -- _obj : TInterface "Gtk" "SymbolicColor"
    Ptr StyleProperties ->                  -- props : TInterface "Gtk" "StyleProperties"
    Ptr Gdk.RGBA ->                         -- resolved_color : TInterface "Gdk" "RGBA"
    IO CInt

{-# DEPRECATED symbolicColorResolve ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
symbolicColorResolve ::
    (MonadIO m, StylePropertiesK a) =>
    SymbolicColor ->                        -- _obj
    Maybe (a) ->                            -- props
    m (Bool,Gdk.RGBA)
symbolicColorResolve _obj props = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    maybeProps <- case props of
        Nothing -> return nullPtr
        Just jProps -> do
            let jProps' = unsafeManagedPtrCastPtr jProps
            return jProps'
    resolved_color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    result <- gtk_symbolic_color_resolve _obj' maybeProps resolved_color
    let result' = (/= 0) result
    resolved_color' <- (wrapBoxed Gdk.RGBA) resolved_color
    touchManagedPtr _obj
    whenJust props touchManagedPtr
    return (result', resolved_color')

-- method SymbolicColor::to_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_symbolic_color_to_string" gtk_symbolic_color_to_string :: 
    Ptr SymbolicColor ->                    -- _obj : TInterface "Gtk" "SymbolicColor"
    IO CString

{-# DEPRECATED symbolicColorToString ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
symbolicColorToString ::
    (MonadIO m) =>
    SymbolicColor ->                        -- _obj
    m T.Text
symbolicColorToString _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_symbolic_color_to_string _obj'
    checkUnexpectedReturnNULL "gtk_symbolic_color_to_string" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method SymbolicColor::unref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SymbolicColor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_symbolic_color_unref" gtk_symbolic_color_unref :: 
    Ptr SymbolicColor ->                    -- _obj : TInterface "Gtk" "SymbolicColor"
    IO ()

{-# DEPRECATED symbolicColorUnref ["(Since version 3.8)","#GtkSymbolicColor is deprecated."]#-}
symbolicColorUnref ::
    (MonadIO m) =>
    SymbolicColor ->                        -- _obj
    m ()
symbolicColorUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_symbolic_color_unref _obj'
    touchManagedPtr _obj
    return ()

-- object Table 
newtype Table = Table (ForeignPtr Table)
noTable :: Maybe Table
noTable = Nothing

foreign import ccall "gtk_table_get_type"
    c_gtk_table_get_type :: IO GType

type instance ParentTypes Table = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Table where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_table_get_type
    

class GObject o => TableK o
instance (GObject o, IsDescendantOf Table o) => TableK o

toTable :: TableK o => o -> IO Table
toTable = unsafeCastTo Table

-- method Table::new
-- method type : Constructor
-- Args : [Arg {argName = "rows", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "rows", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Table"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_new" gtk_table_new :: 
    Word32 ->                               -- rows : TBasicType TUInt32
    Word32 ->                               -- columns : TBasicType TUInt32
    CInt ->                                 -- homogeneous : TBasicType TBoolean
    IO (Ptr Table)

{-# DEPRECATED tableNew ["(Since version 3.4)","Use gtk_grid_new()."]#-}
tableNew ::
    (MonadIO m) =>
    Word32 ->                               -- rows
    Word32 ->                               -- columns
    Bool ->                                 -- homogeneous
    m Table
tableNew rows columns homogeneous = liftIO $ do
    let homogeneous' = (fromIntegral . fromEnum) homogeneous
    result <- gtk_table_new rows columns homogeneous'
    checkUnexpectedReturnNULL "gtk_table_new" result
    result' <- (newObject Table) result
    return result'

-- method Table::attach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "right_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bottom_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xoptions", argType = TInterface "Gtk" "AttachOptions", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yoptions", argType = TInterface "Gtk" "AttachOptions", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpadding", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ypadding", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "right_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bottom_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xoptions", argType = TInterface "Gtk" "AttachOptions", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yoptions", argType = TInterface "Gtk" "AttachOptions", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpadding", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ypadding", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_attach" gtk_table_attach :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Word32 ->                               -- left_attach : TBasicType TUInt32
    Word32 ->                               -- right_attach : TBasicType TUInt32
    Word32 ->                               -- top_attach : TBasicType TUInt32
    Word32 ->                               -- bottom_attach : TBasicType TUInt32
    CUInt ->                                -- xoptions : TInterface "Gtk" "AttachOptions"
    CUInt ->                                -- yoptions : TInterface "Gtk" "AttachOptions"
    Word32 ->                               -- xpadding : TBasicType TUInt32
    Word32 ->                               -- ypadding : TBasicType TUInt32
    IO ()

{-# DEPRECATED tableAttach ["(Since version 3.4)","Use gtk_grid_attach() with #GtkGrid. Note that the attach","    arguments differ between those two functions."]#-}
tableAttach ::
    (MonadIO m, TableK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Word32 ->                               -- left_attach
    Word32 ->                               -- right_attach
    Word32 ->                               -- top_attach
    Word32 ->                               -- bottom_attach
    [AttachOptions] ->                      -- xoptions
    [AttachOptions] ->                      -- yoptions
    Word32 ->                               -- xpadding
    Word32 ->                               -- ypadding
    m ()
tableAttach _obj child left_attach right_attach top_attach bottom_attach xoptions yoptions xpadding ypadding = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let xoptions' = gflagsToWord xoptions
    let yoptions' = gflagsToWord yoptions
    gtk_table_attach _obj' child' left_attach right_attach top_attach bottom_attach xoptions' yoptions' xpadding ypadding
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method Table::attach_defaults
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "right_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bottom_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "right_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bottom_attach", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_attach_defaults" gtk_table_attach_defaults :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Word32 ->                               -- left_attach : TBasicType TUInt32
    Word32 ->                               -- right_attach : TBasicType TUInt32
    Word32 ->                               -- top_attach : TBasicType TUInt32
    Word32 ->                               -- bottom_attach : TBasicType TUInt32
    IO ()

{-# DEPRECATED tableAttachDefaults ["(Since version 3.4)","Use gtk_grid_attach() with #GtkGrid. Note that the attach","    arguments differ between those two functions."]#-}
tableAttachDefaults ::
    (MonadIO m, TableK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    Word32 ->                               -- left_attach
    Word32 ->                               -- right_attach
    Word32 ->                               -- top_attach
    Word32 ->                               -- bottom_attach
    m ()
tableAttachDefaults _obj widget left_attach right_attach top_attach bottom_attach = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_table_attach_defaults _obj' widget' left_attach right_attach top_attach bottom_attach
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- method Table::get_col_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_get_col_spacing" gtk_table_get_col_spacing :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    Word32 ->                               -- column : TBasicType TUInt32
    IO Word32

{-# DEPRECATED tableGetColSpacing ["(Since version 3.4)","#GtkGrid does not offer a replacement for this","    functionality."]#-}
tableGetColSpacing ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- column
    m Word32
tableGetColSpacing _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_table_get_col_spacing _obj' column
    touchManagedPtr _obj
    return result

-- method Table::get_default_col_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_get_default_col_spacing" gtk_table_get_default_col_spacing :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    IO Word32

{-# DEPRECATED tableGetDefaultColSpacing ["(Since version 3.4)","Use gtk_grid_get_column_spacing() with #GtkGrid."]#-}
tableGetDefaultColSpacing ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    m Word32
tableGetDefaultColSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_table_get_default_col_spacing _obj'
    touchManagedPtr _obj
    return result

-- method Table::get_default_row_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_get_default_row_spacing" gtk_table_get_default_row_spacing :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    IO Word32

{-# DEPRECATED tableGetDefaultRowSpacing ["(Since version 3.4)","Use gtk_grid_get_row_spacing() with #GtkGrid."]#-}
tableGetDefaultRowSpacing ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    m Word32
tableGetDefaultRowSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_table_get_default_row_spacing _obj'
    touchManagedPtr _obj
    return result

-- method Table::get_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_get_homogeneous" gtk_table_get_homogeneous :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    IO CInt

{-# DEPRECATED tableGetHomogeneous ["(Since version 3.4)","Use gtk_grid_get_row_homogeneous() and","    gtk_grid_get_column_homogeneous() with #GtkGrid."]#-}
tableGetHomogeneous ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    m Bool
tableGetHomogeneous _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_table_get_homogeneous _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Table::get_row_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_get_row_spacing" gtk_table_get_row_spacing :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    Word32 ->                               -- row : TBasicType TUInt32
    IO Word32

{-# DEPRECATED tableGetRowSpacing ["(Since version 3.4)","#GtkGrid does not offer a replacement for this","    functionality."]#-}
tableGetRowSpacing ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- row
    m Word32
tableGetRowSpacing _obj row = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_table_get_row_spacing _obj' row
    touchManagedPtr _obj
    return result

-- method Table::get_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rows", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "columns", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_get_size" gtk_table_get_size :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    Ptr Word32 ->                           -- rows : TBasicType TUInt32
    Ptr Word32 ->                           -- columns : TBasicType TUInt32
    IO ()

{-# DEPRECATED tableGetSize ["(Since version 3.4)","#GtkGrid does not expose the number of columns and","    rows."]#-}
tableGetSize ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    m (Word32,Word32)
tableGetSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    rows <- allocMem :: IO (Ptr Word32)
    columns <- allocMem :: IO (Ptr Word32)
    gtk_table_get_size _obj' rows columns
    rows' <- peek rows
    columns' <- peek columns
    touchManagedPtr _obj
    freeMem rows
    freeMem columns
    return (rows', columns')

-- method Table::resize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rows", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rows", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_resize" gtk_table_resize :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    Word32 ->                               -- rows : TBasicType TUInt32
    Word32 ->                               -- columns : TBasicType TUInt32
    IO ()

{-# DEPRECATED tableResize ["(Since version 3.4)","#GtkGrid resizes automatically."]#-}
tableResize ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- rows
    Word32 ->                               -- columns
    m ()
tableResize _obj rows columns = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_table_resize _obj' rows columns
    touchManagedPtr _obj
    return ()

-- method Table::set_col_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_set_col_spacing" gtk_table_set_col_spacing :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    Word32 ->                               -- column : TBasicType TUInt32
    Word32 ->                               -- spacing : TBasicType TUInt32
    IO ()

{-# DEPRECATED tableSetColSpacing ["(Since version 3.4)","Use gtk_widget_set_margin_start() and","    gtk_widget_set_margin_end() on the widgets contained in the row if","    you need this functionality. #GtkGrid does not support per-row spacing."]#-}
tableSetColSpacing ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- column
    Word32 ->                               -- spacing
    m ()
tableSetColSpacing _obj column spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_table_set_col_spacing _obj' column spacing
    touchManagedPtr _obj
    return ()

-- method Table::set_col_spacings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_set_col_spacings" gtk_table_set_col_spacings :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    Word32 ->                               -- spacing : TBasicType TUInt32
    IO ()

{-# DEPRECATED tableSetColSpacings ["(Since version 3.4)","Use gtk_grid_set_column_spacing() with #GtkGrid."]#-}
tableSetColSpacings ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- spacing
    m ()
tableSetColSpacings _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_table_set_col_spacings _obj' spacing
    touchManagedPtr _obj
    return ()

-- method Table::set_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_set_homogeneous" gtk_table_set_homogeneous :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    CInt ->                                 -- homogeneous : TBasicType TBoolean
    IO ()

{-# DEPRECATED tableSetHomogeneous ["(Since version 3.4)","Use gtk_grid_set_row_homogeneous() and","    gtk_grid_set_column_homogeneous() with #GtkGrid."]#-}
tableSetHomogeneous ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- homogeneous
    m ()
tableSetHomogeneous _obj homogeneous = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let homogeneous' = (fromIntegral . fromEnum) homogeneous
    gtk_table_set_homogeneous _obj' homogeneous'
    touchManagedPtr _obj
    return ()

-- method Table::set_row_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_set_row_spacing" gtk_table_set_row_spacing :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    Word32 ->                               -- row : TBasicType TUInt32
    Word32 ->                               -- spacing : TBasicType TUInt32
    IO ()

{-# DEPRECATED tableSetRowSpacing ["(Since version 3.4)","Use gtk_widget_set_margin_top() and","    gtk_widget_set_margin_bottom() on the widgets contained in the row if","    you need this functionality. #GtkGrid does not support per-row spacing."]#-}
tableSetRowSpacing ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- row
    Word32 ->                               -- spacing
    m ()
tableSetRowSpacing _obj row spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_table_set_row_spacing _obj' row spacing
    touchManagedPtr _obj
    return ()

-- method Table::set_row_spacings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_table_set_row_spacings" gtk_table_set_row_spacings :: 
    Ptr Table ->                            -- _obj : TInterface "Gtk" "Table"
    Word32 ->                               -- spacing : TBasicType TUInt32
    IO ()

{-# DEPRECATED tableSetRowSpacings ["(Since version 3.4)","Use gtk_grid_set_row_spacing() with #GtkGrid."]#-}
tableSetRowSpacings ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- spacing
    m ()
tableSetRowSpacings _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_table_set_row_spacings _obj' spacing
    touchManagedPtr _obj
    return ()

-- struct TableChild
newtype TableChild = TableChild (ForeignPtr TableChild)
noTableChild :: Maybe TableChild
noTableChild = Nothing

tableChildReadWidget :: TableChild -> IO Widget
tableChildReadWidget s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO (Ptr Widget)
    val' <- (newObject Widget) val
    return val'

tableChildReadLeftAttach :: TableChild -> IO Word16
tableChildReadLeftAttach s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Word16
    return val

tableChildReadRightAttach :: TableChild -> IO Word16
tableChildReadRightAttach s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 10) :: IO Word16
    return val

tableChildReadTopAttach :: TableChild -> IO Word16
tableChildReadTopAttach s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 12) :: IO Word16
    return val

tableChildReadBottomAttach :: TableChild -> IO Word16
tableChildReadBottomAttach s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 14) :: IO Word16
    return val

tableChildReadXpadding :: TableChild -> IO Word16
tableChildReadXpadding s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO Word16
    return val

tableChildReadYpadding :: TableChild -> IO Word16
tableChildReadYpadding s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 18) :: IO Word16
    return val

tableChildReadXexpand :: TableChild -> IO Word32
tableChildReadXexpand s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 20) :: IO Word32
    return val

tableChildReadYexpand :: TableChild -> IO Word32
tableChildReadYexpand s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO Word32
    return val

tableChildReadXshrink :: TableChild -> IO Word32
tableChildReadXshrink s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 28) :: IO Word32
    return val

tableChildReadYshrink :: TableChild -> IO Word32
tableChildReadYshrink s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO Word32
    return val

tableChildReadXfill :: TableChild -> IO Word32
tableChildReadXfill s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 36) :: IO Word32
    return val

tableChildReadYfill :: TableChild -> IO Word32
tableChildReadYfill s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 40) :: IO Word32
    return val

-- struct TableRowCol
newtype TableRowCol = TableRowCol (ForeignPtr TableRowCol)
noTableRowCol :: Maybe TableRowCol
noTableRowCol = Nothing

tableRowColReadRequisition :: TableRowCol -> IO Word16
tableRowColReadRequisition s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Word16
    return val

tableRowColReadAllocation :: TableRowCol -> IO Word16
tableRowColReadAllocation s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 2) :: IO Word16
    return val

tableRowColReadSpacing :: TableRowCol -> IO Word16
tableRowColReadSpacing s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO Word16
    return val

tableRowColReadNeedExpand :: TableRowCol -> IO Word32
tableRowColReadNeedExpand s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Word32
    return val

tableRowColReadNeedShrink :: TableRowCol -> IO Word32
tableRowColReadNeedShrink s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 12) :: IO Word32
    return val

tableRowColReadExpand :: TableRowCol -> IO Word32
tableRowColReadExpand s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO Word32
    return val

tableRowColReadShrink :: TableRowCol -> IO Word32
tableRowColReadShrink s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 20) :: IO Word32
    return val

tableRowColReadEmpty :: TableRowCol -> IO Word32
tableRowColReadEmpty s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO Word32
    return val

-- struct TargetEntry
newtype TargetEntry = TargetEntry (ForeignPtr TargetEntry)
noTargetEntry :: Maybe TargetEntry
noTargetEntry = Nothing

foreign import ccall "gtk_target_entry_get_type" c_gtk_target_entry_get_type :: 
    IO GType

instance BoxedObject TargetEntry where
    boxedType _ = c_gtk_target_entry_get_type

targetEntryReadTarget :: TargetEntry -> IO T.Text
targetEntryReadTarget s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

targetEntryReadFlags :: TargetEntry -> IO Word32
targetEntryReadFlags s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Word32
    return val

targetEntryReadInfo :: TargetEntry -> IO Word32
targetEntryReadInfo s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 12) :: IO Word32
    return val

-- method TargetEntry::new
-- method type : Constructor
-- Args : [Arg {argName = "target", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "target", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TargetEntry"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_entry_new" gtk_target_entry_new :: 
    CString ->                              -- target : TBasicType TUTF8
    Word32 ->                               -- flags : TBasicType TUInt32
    Word32 ->                               -- info : TBasicType TUInt32
    IO (Ptr TargetEntry)


targetEntryNew ::
    (MonadIO m) =>
    T.Text ->                               -- target
    Word32 ->                               -- flags
    Word32 ->                               -- info
    m TargetEntry
targetEntryNew target flags info = liftIO $ do
    target' <- textToCString target
    result <- gtk_target_entry_new target' flags info
    checkUnexpectedReturnNULL "gtk_target_entry_new" result
    result' <- (wrapBoxed TargetEntry) result
    freeMem target'
    return result'

-- method TargetEntry::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TargetEntry"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_entry_copy" gtk_target_entry_copy :: 
    Ptr TargetEntry ->                      -- _obj : TInterface "Gtk" "TargetEntry"
    IO (Ptr TargetEntry)


targetEntryCopy ::
    (MonadIO m) =>
    TargetEntry ->                          -- _obj
    m TargetEntry
targetEntryCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_target_entry_copy _obj'
    checkUnexpectedReturnNULL "gtk_target_entry_copy" result
    result' <- (wrapBoxed TargetEntry) result
    touchManagedPtr _obj
    return result'

-- method TargetEntry::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_entry_free" gtk_target_entry_free :: 
    Ptr TargetEntry ->                      -- _obj : TInterface "Gtk" "TargetEntry"
    IO ()


targetEntryFree ::
    (MonadIO m) =>
    TargetEntry ->                          -- _obj
    m ()
targetEntryFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_target_entry_free _obj'
    touchManagedPtr _obj
    return ()

-- Flags TargetFlags

data TargetFlags = 
      TargetFlagsSameApp
    | TargetFlagsSameWidget
    | TargetFlagsOtherApp
    | TargetFlagsOtherWidget
    | AnotherTargetFlags Int
    deriving (Show, Eq)

instance Enum TargetFlags where
    fromEnum TargetFlagsSameApp = 1
    fromEnum TargetFlagsSameWidget = 2
    fromEnum TargetFlagsOtherApp = 4
    fromEnum TargetFlagsOtherWidget = 8
    fromEnum (AnotherTargetFlags k) = k

    toEnum 1 = TargetFlagsSameApp
    toEnum 2 = TargetFlagsSameWidget
    toEnum 4 = TargetFlagsOtherApp
    toEnum 8 = TargetFlagsOtherWidget
    toEnum k = AnotherTargetFlags k

foreign import ccall "gtk_target_flags_get_type" c_gtk_target_flags_get_type :: 
    IO GType

instance BoxedEnum TargetFlags where
    boxedEnumType _ = c_gtk_target_flags_get_type

instance IsGFlag TargetFlags

-- struct TargetList
newtype TargetList = TargetList (ForeignPtr TargetList)
noTargetList :: Maybe TargetList
noTargetList = Nothing

foreign import ccall "gtk_target_list_get_type" c_gtk_target_list_get_type :: 
    IO GType

instance BoxedObject TargetList where
    boxedType _ = c_gtk_target_list_get_type

-- method TargetList::new
-- method type : Constructor
-- Args : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ntargets", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "ntargets", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TargetList"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_list_new" gtk_target_list_new :: 
    Ptr TargetEntry ->                      -- targets : TCArray False (-1) 1 (TInterface "Gtk" "TargetEntry")
    Word32 ->                               -- ntargets : TBasicType TUInt32
    IO (Ptr TargetList)


targetListNew ::
    (MonadIO m) =>
    Maybe ([TargetEntry]) ->                -- targets
    m TargetList
targetListNew targets = liftIO $ do
    let ntargets = case targets of
            Nothing -> 0
            Just jTargets -> fromIntegral $ length jTargets
    maybeTargets <- case targets of
        Nothing -> return nullPtr
        Just jTargets -> do
            let jTargets' = map unsafeManagedPtrGetPtr jTargets
            jTargets'' <- packBlockArray 16 jTargets'
            return jTargets''
    result <- gtk_target_list_new maybeTargets ntargets
    checkUnexpectedReturnNULL "gtk_target_list_new" result
    result' <- (wrapBoxed TargetList) result
    whenJust targets (mapM_ touchManagedPtr)
    freeMem maybeTargets
    return result'

-- method TargetList::add
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_list_add" gtk_target_list_add :: 
    Ptr TargetList ->                       -- _obj : TInterface "Gtk" "TargetList"
    Ptr Gdk.Atom ->                         -- target : TInterface "Gdk" "Atom"
    Word32 ->                               -- flags : TBasicType TUInt32
    Word32 ->                               -- info : TBasicType TUInt32
    IO ()


targetListAdd ::
    (MonadIO m) =>
    TargetList ->                           -- _obj
    Gdk.Atom ->                             -- target
    Word32 ->                               -- flags
    Word32 ->                               -- info
    m ()
targetListAdd _obj target flags info = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let target' = unsafeManagedPtrGetPtr target
    gtk_target_list_add _obj' target' flags info
    touchManagedPtr _obj
    touchManagedPtr target
    return ()

-- method TargetList::add_image_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "writable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "writable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_list_add_image_targets" gtk_target_list_add_image_targets :: 
    Ptr TargetList ->                       -- _obj : TInterface "Gtk" "TargetList"
    Word32 ->                               -- info : TBasicType TUInt32
    CInt ->                                 -- writable : TBasicType TBoolean
    IO ()


targetListAddImageTargets ::
    (MonadIO m) =>
    TargetList ->                           -- _obj
    Word32 ->                               -- info
    Bool ->                                 -- writable
    m ()
targetListAddImageTargets _obj info writable = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let writable' = (fromIntegral . fromEnum) writable
    gtk_target_list_add_image_targets _obj' info writable'
    touchManagedPtr _obj
    return ()

-- method TargetList::add_rich_text_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "deserializable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "deserializable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_list_add_rich_text_targets" gtk_target_list_add_rich_text_targets :: 
    Ptr TargetList ->                       -- _obj : TInterface "Gtk" "TargetList"
    Word32 ->                               -- info : TBasicType TUInt32
    CInt ->                                 -- deserializable : TBasicType TBoolean
    Ptr TextBuffer ->                       -- buffer : TInterface "Gtk" "TextBuffer"
    IO ()


targetListAddRichTextTargets ::
    (MonadIO m, TextBufferK a) =>
    TargetList ->                           -- _obj
    Word32 ->                               -- info
    Bool ->                                 -- deserializable
    a ->                                    -- buffer
    m ()
targetListAddRichTextTargets _obj info deserializable buffer = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let deserializable' = (fromIntegral . fromEnum) deserializable
    let buffer' = unsafeManagedPtrCastPtr buffer
    gtk_target_list_add_rich_text_targets _obj' info deserializable' buffer'
    touchManagedPtr _obj
    touchManagedPtr buffer
    return ()

-- method TargetList::add_table
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ntargets", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "ntargets", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_list_add_table" gtk_target_list_add_table :: 
    Ptr TargetList ->                       -- _obj : TInterface "Gtk" "TargetList"
    Ptr TargetEntry ->                      -- targets : TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry")
    Word32 ->                               -- ntargets : TBasicType TUInt32
    IO ()


targetListAddTable ::
    (MonadIO m) =>
    TargetList ->                           -- _obj
    [TargetEntry] ->                        -- targets
    m ()
targetListAddTable _obj targets = liftIO $ do
    let ntargets = fromIntegral $ length targets
    let _obj' = unsafeManagedPtrGetPtr _obj
    let targets' = map unsafeManagedPtrGetPtr targets
    targets'' <- packBlockArray 16 targets'
    gtk_target_list_add_table _obj' targets'' ntargets
    touchManagedPtr _obj
    mapM_ touchManagedPtr targets
    freeMem targets''
    return ()

-- method TargetList::add_text_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_list_add_text_targets" gtk_target_list_add_text_targets :: 
    Ptr TargetList ->                       -- _obj : TInterface "Gtk" "TargetList"
    Word32 ->                               -- info : TBasicType TUInt32
    IO ()


targetListAddTextTargets ::
    (MonadIO m) =>
    TargetList ->                           -- _obj
    Word32 ->                               -- info
    m ()
targetListAddTextTargets _obj info = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_target_list_add_text_targets _obj' info
    touchManagedPtr _obj
    return ()

-- method TargetList::add_uri_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_list_add_uri_targets" gtk_target_list_add_uri_targets :: 
    Ptr TargetList ->                       -- _obj : TInterface "Gtk" "TargetList"
    Word32 ->                               -- info : TBasicType TUInt32
    IO ()


targetListAddUriTargets ::
    (MonadIO m) =>
    TargetList ->                           -- _obj
    Word32 ->                               -- info
    m ()
targetListAddUriTargets _obj info = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_target_list_add_uri_targets _obj' info
    touchManagedPtr _obj
    return ()

-- method TargetList::find
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_list_find" gtk_target_list_find :: 
    Ptr TargetList ->                       -- _obj : TInterface "Gtk" "TargetList"
    Ptr Gdk.Atom ->                         -- target : TInterface "Gdk" "Atom"
    Ptr Word32 ->                           -- info : TBasicType TUInt32
    IO CInt


targetListFind ::
    (MonadIO m) =>
    TargetList ->                           -- _obj
    Gdk.Atom ->                             -- target
    m (Bool,Word32)
targetListFind _obj target = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let target' = unsafeManagedPtrGetPtr target
    info <- allocMem :: IO (Ptr Word32)
    result <- gtk_target_list_find _obj' target' info
    let result' = (/= 0) result
    info' <- peek info
    touchManagedPtr _obj
    touchManagedPtr target
    freeMem info
    return (result', info')

-- method TargetList::ref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TargetList"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_list_ref" gtk_target_list_ref :: 
    Ptr TargetList ->                       -- _obj : TInterface "Gtk" "TargetList"
    IO (Ptr TargetList)


targetListRef ::
    (MonadIO m) =>
    TargetList ->                           -- _obj
    m TargetList
targetListRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_target_list_ref _obj'
    checkUnexpectedReturnNULL "gtk_target_list_ref" result
    result' <- (wrapBoxed TargetList) result
    touchManagedPtr _obj
    return result'

-- method TargetList::remove
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_list_remove" gtk_target_list_remove :: 
    Ptr TargetList ->                       -- _obj : TInterface "Gtk" "TargetList"
    Ptr Gdk.Atom ->                         -- target : TInterface "Gdk" "Atom"
    IO ()


targetListRemove ::
    (MonadIO m) =>
    TargetList ->                           -- _obj
    Gdk.Atom ->                             -- target
    m ()
targetListRemove _obj target = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let target' = unsafeManagedPtrGetPtr target
    gtk_target_list_remove _obj' target'
    touchManagedPtr _obj
    touchManagedPtr target
    return ()

-- method TargetList::unref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_list_unref" gtk_target_list_unref :: 
    Ptr TargetList ->                       -- _obj : TInterface "Gtk" "TargetList"
    IO ()


targetListUnref ::
    (MonadIO m) =>
    TargetList ->                           -- _obj
    m ()
targetListUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_target_list_unref _obj'
    touchManagedPtr _obj
    return ()

-- struct TargetPair
newtype TargetPair = TargetPair (ForeignPtr TargetPair)
noTargetPair :: Maybe TargetPair
noTargetPair = Nothing

targetPairReadTarget :: TargetPair -> IO Gdk.Atom
targetPairReadTarget s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO (Ptr Gdk.Atom)
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    val' <- (\x -> Gdk.Atom <$> newForeignPtr_ x) val
    return val'

targetPairReadFlags :: TargetPair -> IO Word32
targetPairReadFlags s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Word32
    return val

targetPairReadInfo :: TargetPair -> IO Word32
targetPairReadInfo s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 12) :: IO Word32
    return val

-- object TearoffMenuItem 
newtype TearoffMenuItem = TearoffMenuItem (ForeignPtr TearoffMenuItem)
noTearoffMenuItem :: Maybe TearoffMenuItem
noTearoffMenuItem = Nothing

foreign import ccall "gtk_tearoff_menu_item_get_type"
    c_gtk_tearoff_menu_item_get_type :: IO GType

type instance ParentTypes TearoffMenuItem = '[MenuItem, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject TearoffMenuItem where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_tearoff_menu_item_get_type
    

class GObject o => TearoffMenuItemK o
instance (GObject o, IsDescendantOf TearoffMenuItem o) => TearoffMenuItemK o

toTearoffMenuItem :: TearoffMenuItemK o => o -> IO TearoffMenuItem
toTearoffMenuItem = unsafeCastTo TearoffMenuItem

-- method TearoffMenuItem::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TearoffMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tearoff_menu_item_new" gtk_tearoff_menu_item_new :: 
    IO (Ptr TearoffMenuItem)

{-# DEPRECATED tearoffMenuItemNew ["(Since version 3.4)","#GtkTearoffMenuItem is deprecated and should not be","    used in newly written code."]#-}
tearoffMenuItemNew ::
    (MonadIO m) =>
    m TearoffMenuItem
tearoffMenuItemNew  = liftIO $ do
    result <- gtk_tearoff_menu_item_new
    checkUnexpectedReturnNULL "gtk_tearoff_menu_item_new" result
    result' <- (newObject TearoffMenuItem) result
    return result'

-- struct TextAppearance
newtype TextAppearance = TextAppearance (ForeignPtr TextAppearance)
noTextAppearance :: Maybe TextAppearance
noTextAppearance = Nothing

textAppearanceReadBgColor :: TextAppearance -> IO Gdk.Color
textAppearanceReadBgColor s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO (Ptr Gdk.Color)
    val' <- (newBoxed Gdk.Color) val
    return val'

textAppearanceReadFgColor :: TextAppearance -> IO Gdk.Color
textAppearanceReadFgColor s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 12) :: IO (Ptr Gdk.Color)
    val' <- (newBoxed Gdk.Color) val
    return val'

textAppearanceReadRise :: TextAppearance -> IO Int32
textAppearanceReadRise s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO Int32
    return val

textAppearanceReadUnderline :: TextAppearance -> IO Word32
textAppearanceReadUnderline s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 28) :: IO Word32
    return val

textAppearanceReadStrikethrough :: TextAppearance -> IO Word32
textAppearanceReadStrikethrough s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO Word32
    return val

textAppearanceReadDrawBg :: TextAppearance -> IO Word32
textAppearanceReadDrawBg s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 36) :: IO Word32
    return val

textAppearanceReadInsideSelection :: TextAppearance -> IO Word32
textAppearanceReadInsideSelection s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 40) :: IO Word32
    return val

textAppearanceReadIsText :: TextAppearance -> IO Word32
textAppearanceReadIsText s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 44) :: IO Word32
    return val

-- struct TextAttributes
newtype TextAttributes = TextAttributes (ForeignPtr TextAttributes)
noTextAttributes :: Maybe TextAttributes
noTextAttributes = Nothing

foreign import ccall "gtk_text_attributes_get_type" c_gtk_text_attributes_get_type :: 
    IO GType

instance BoxedObject TextAttributes where
    boxedType _ = c_gtk_text_attributes_get_type

textAttributesReadAppearance :: TextAttributes -> IO TextAppearance
textAttributesReadAppearance s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO (Ptr TextAppearance)
    val' <- (newPtr 48 TextAppearance) val
    return val'

textAttributesReadJustification :: TextAttributes -> IO Justification
textAttributesReadJustification s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 52) :: IO CUInt
    let val' = (toEnum . fromIntegral) val
    return val'

textAttributesReadDirection :: TextAttributes -> IO TextDirection
textAttributesReadDirection s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 56) :: IO CUInt
    let val' = (toEnum . fromIntegral) val
    return val'

textAttributesReadFont :: TextAttributes -> IO Pango.FontDescription
textAttributesReadFont s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 64) :: IO (Ptr Pango.FontDescription)
    val' <- (newBoxed Pango.FontDescription) val
    return val'

textAttributesReadFontScale :: TextAttributes -> IO Double
textAttributesReadFontScale s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 72) :: IO CDouble
    let val' = realToFrac val
    return val'

textAttributesReadLeftMargin :: TextAttributes -> IO Int32
textAttributesReadLeftMargin s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 80) :: IO Int32
    return val

textAttributesReadRightMargin :: TextAttributes -> IO Int32
textAttributesReadRightMargin s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 84) :: IO Int32
    return val

textAttributesReadIndent :: TextAttributes -> IO Int32
textAttributesReadIndent s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 88) :: IO Int32
    return val

textAttributesReadPixelsAboveLines :: TextAttributes -> IO Int32
textAttributesReadPixelsAboveLines s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 92) :: IO Int32
    return val

textAttributesReadPixelsBelowLines :: TextAttributes -> IO Int32
textAttributesReadPixelsBelowLines s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 96) :: IO Int32
    return val

textAttributesReadPixelsInsideWrap :: TextAttributes -> IO Int32
textAttributesReadPixelsInsideWrap s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 100) :: IO Int32
    return val

textAttributesReadTabs :: TextAttributes -> IO Pango.TabArray
textAttributesReadTabs s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 104) :: IO (Ptr Pango.TabArray)
    val' <- (newBoxed Pango.TabArray) val
    return val'

textAttributesReadWrapMode :: TextAttributes -> IO WrapMode
textAttributesReadWrapMode s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 112) :: IO CUInt
    let val' = (toEnum . fromIntegral) val
    return val'

textAttributesReadLanguage :: TextAttributes -> IO Pango.Language
textAttributesReadLanguage s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 120) :: IO (Ptr Pango.Language)
    val' <- (newBoxed Pango.Language) val
    return val'

textAttributesReadInvisible :: TextAttributes -> IO Word32
textAttributesReadInvisible s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 136) :: IO Word32
    return val

textAttributesReadBgFullHeight :: TextAttributes -> IO Word32
textAttributesReadBgFullHeight s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 140) :: IO Word32
    return val

textAttributesReadEditable :: TextAttributes -> IO Word32
textAttributesReadEditable s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 144) :: IO Word32
    return val

textAttributesReadNoFallback :: TextAttributes -> IO Word32
textAttributesReadNoFallback s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 148) :: IO Word32
    return val

textAttributesReadLetterSpacing :: TextAttributes -> IO Int32
textAttributesReadLetterSpacing s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 160) :: IO Int32
    return val

-- method TextAttributes::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TextAttributes"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_attributes_new" gtk_text_attributes_new :: 
    IO (Ptr TextAttributes)


textAttributesNew ::
    (MonadIO m) =>
    m TextAttributes
textAttributesNew  = liftIO $ do
    result <- gtk_text_attributes_new
    checkUnexpectedReturnNULL "gtk_text_attributes_new" result
    result' <- (wrapBoxed TextAttributes) result
    return result'

-- method TextAttributes::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextAttributes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextAttributes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextAttributes"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_attributes_copy" gtk_text_attributes_copy :: 
    Ptr TextAttributes ->                   -- _obj : TInterface "Gtk" "TextAttributes"
    IO (Ptr TextAttributes)


textAttributesCopy ::
    (MonadIO m) =>
    TextAttributes ->                       -- _obj
    m TextAttributes
textAttributesCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_attributes_copy _obj'
    checkUnexpectedReturnNULL "gtk_text_attributes_copy" result
    result' <- (wrapBoxed TextAttributes) result
    touchManagedPtr _obj
    return result'

-- method TextAttributes::copy_values
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextAttributes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest", argType = TInterface "Gtk" "TextAttributes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextAttributes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest", argType = TInterface "Gtk" "TextAttributes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_attributes_copy_values" gtk_text_attributes_copy_values :: 
    Ptr TextAttributes ->                   -- _obj : TInterface "Gtk" "TextAttributes"
    Ptr TextAttributes ->                   -- dest : TInterface "Gtk" "TextAttributes"
    IO ()


textAttributesCopyValues ::
    (MonadIO m) =>
    TextAttributes ->                       -- _obj
    TextAttributes ->                       -- dest
    m ()
textAttributesCopyValues _obj dest = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let dest' = unsafeManagedPtrGetPtr dest
    gtk_text_attributes_copy_values _obj' dest'
    touchManagedPtr _obj
    touchManagedPtr dest
    return ()

-- method TextAttributes::ref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextAttributes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextAttributes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextAttributes"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_attributes_ref" gtk_text_attributes_ref :: 
    Ptr TextAttributes ->                   -- _obj : TInterface "Gtk" "TextAttributes"
    IO (Ptr TextAttributes)


textAttributesRef ::
    (MonadIO m) =>
    TextAttributes ->                       -- _obj
    m TextAttributes
textAttributesRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_attributes_ref _obj'
    checkUnexpectedReturnNULL "gtk_text_attributes_ref" result
    result' <- (wrapBoxed TextAttributes) result
    touchManagedPtr _obj
    return result'

-- method TextAttributes::unref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextAttributes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextAttributes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_attributes_unref" gtk_text_attributes_unref :: 
    Ptr TextAttributes ->                   -- _obj : TInterface "Gtk" "TextAttributes"
    IO ()


textAttributesUnref ::
    (MonadIO m) =>
    TextAttributes ->                       -- _obj
    m ()
textAttributesUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_text_attributes_unref _obj'
    touchManagedPtr _obj
    return ()

-- struct TextBTree
newtype TextBTree = TextBTree (ForeignPtr TextBTree)
noTextBTree :: Maybe TextBTree
noTextBTree = Nothing

-- object TextBuffer 
newtype TextBuffer = TextBuffer (ForeignPtr TextBuffer)
noTextBuffer :: Maybe TextBuffer
noTextBuffer = Nothing

foreign import ccall "gtk_text_buffer_get_type"
    c_gtk_text_buffer_get_type :: IO GType

type instance ParentTypes TextBuffer = '[GObject.Object]

instance GObject TextBuffer where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_text_buffer_get_type
    

class GObject o => TextBufferK o
instance (GObject o, IsDescendantOf TextBuffer o) => TextBufferK o

toTextBuffer :: TextBufferK o => o -> IO TextBuffer
toTextBuffer = unsafeCastTo TextBuffer

-- method TextBuffer::new
-- method type : Constructor
-- Args : [Arg {argName = "table", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "table", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextBuffer"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_new" gtk_text_buffer_new :: 
    Ptr TextTagTable ->                     -- table : TInterface "Gtk" "TextTagTable"
    IO (Ptr TextBuffer)


textBufferNew ::
    (MonadIO m, TextTagTableK a) =>
    Maybe (a) ->                            -- table
    m TextBuffer
textBufferNew table = liftIO $ do
    maybeTable <- case table of
        Nothing -> return nullPtr
        Just jTable -> do
            let jTable' = unsafeManagedPtrCastPtr jTable
            return jTable'
    result <- gtk_text_buffer_new maybeTable
    checkUnexpectedReturnNULL "gtk_text_buffer_new" result
    result' <- (wrapObject TextBuffer) result
    whenJust table touchManagedPtr
    return result'

-- method TextBuffer::add_mark
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "where", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "where", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_add_mark" gtk_text_buffer_add_mark :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextMark ->                         -- mark : TInterface "Gtk" "TextMark"
    Ptr TextIter ->                         -- where : TInterface "Gtk" "TextIter"
    IO ()


textBufferAddMark ::
    (MonadIO m, TextBufferK a, TextMarkK b) =>
    a ->                                    -- _obj
    b ->                                    -- mark
    TextIter ->                             -- where
    m ()
textBufferAddMark _obj mark where_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mark' = unsafeManagedPtrCastPtr mark
    let where_' = unsafeManagedPtrGetPtr where_
    gtk_text_buffer_add_mark _obj' mark' where_'
    touchManagedPtr _obj
    touchManagedPtr mark
    touchManagedPtr where_
    return ()

-- method TextBuffer::add_selection_clipboard
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clipboard", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clipboard", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_add_selection_clipboard" gtk_text_buffer_add_selection_clipboard :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr Clipboard ->                        -- clipboard : TInterface "Gtk" "Clipboard"
    IO ()


textBufferAddSelectionClipboard ::
    (MonadIO m, TextBufferK a, ClipboardK b) =>
    a ->                                    -- _obj
    b ->                                    -- clipboard
    m ()
textBufferAddSelectionClipboard _obj clipboard = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let clipboard' = unsafeManagedPtrCastPtr clipboard
    gtk_text_buffer_add_selection_clipboard _obj' clipboard'
    touchManagedPtr _obj
    touchManagedPtr clipboard
    return ()

-- method TextBuffer::apply_tag
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_apply_tag" gtk_text_buffer_apply_tag :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextTag ->                          -- tag : TInterface "Gtk" "TextTag"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO ()


textBufferApplyTag ::
    (MonadIO m, TextBufferK a, TextTagK b) =>
    a ->                                    -- _obj
    b ->                                    -- tag
    TextIter ->                             -- start
    TextIter ->                             -- end
    m ()
textBufferApplyTag _obj tag start end = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tag' = unsafeManagedPtrCastPtr tag
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    gtk_text_buffer_apply_tag _obj' tag' start' end'
    touchManagedPtr _obj
    touchManagedPtr tag
    touchManagedPtr start
    touchManagedPtr end
    return ()

-- method TextBuffer::apply_tag_by_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_apply_tag_by_name" gtk_text_buffer_apply_tag_by_name :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- name : TBasicType TUTF8
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO ()


textBufferApplyTagByName ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    TextIter ->                             -- start
    TextIter ->                             -- end
    m ()
textBufferApplyTagByName _obj name start end = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    gtk_text_buffer_apply_tag_by_name _obj' name' start' end'
    touchManagedPtr _obj
    touchManagedPtr start
    touchManagedPtr end
    freeMem name'
    return ()

-- method TextBuffer::backspace
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interactive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interactive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_backspace" gtk_text_buffer_backspace :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    CInt ->                                 -- interactive : TBasicType TBoolean
    CInt ->                                 -- default_editable : TBasicType TBoolean
    IO CInt


textBufferBackspace ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    Bool ->                                 -- interactive
    Bool ->                                 -- default_editable
    m Bool
textBufferBackspace _obj iter interactive default_editable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    let interactive' = (fromIntegral . fromEnum) interactive
    let default_editable' = (fromIntegral . fromEnum) default_editable
    result <- gtk_text_buffer_backspace _obj' iter' interactive' default_editable'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TextBuffer::begin_user_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_begin_user_action" gtk_text_buffer_begin_user_action :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    IO ()


textBufferBeginUserAction ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m ()
textBufferBeginUserAction _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_buffer_begin_user_action _obj'
    touchManagedPtr _obj
    return ()

-- method TextBuffer::copy_clipboard
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clipboard", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clipboard", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_copy_clipboard" gtk_text_buffer_copy_clipboard :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr Clipboard ->                        -- clipboard : TInterface "Gtk" "Clipboard"
    IO ()


textBufferCopyClipboard ::
    (MonadIO m, TextBufferK a, ClipboardK b) =>
    a ->                                    -- _obj
    b ->                                    -- clipboard
    m ()
textBufferCopyClipboard _obj clipboard = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let clipboard' = unsafeManagedPtrCastPtr clipboard
    gtk_text_buffer_copy_clipboard _obj' clipboard'
    touchManagedPtr _obj
    touchManagedPtr clipboard
    return ()

-- method TextBuffer::create_child_anchor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextChildAnchor"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_create_child_anchor" gtk_text_buffer_create_child_anchor :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    IO (Ptr TextChildAnchor)


textBufferCreateChildAnchor ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    m TextChildAnchor
textBufferCreateChildAnchor _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_text_buffer_create_child_anchor _obj' iter'
    checkUnexpectedReturnNULL "gtk_text_buffer_create_child_anchor" result
    result' <- (newObject TextChildAnchor) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TextBuffer::create_mark
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "where", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_gravity", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "where", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_gravity", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextMark"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_create_mark" gtk_text_buffer_create_mark :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- mark_name : TBasicType TUTF8
    Ptr TextIter ->                         -- where : TInterface "Gtk" "TextIter"
    CInt ->                                 -- left_gravity : TBasicType TBoolean
    IO (Ptr TextMark)


textBufferCreateMark ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- mark_name
    TextIter ->                             -- where
    Bool ->                                 -- left_gravity
    m TextMark
textBufferCreateMark _obj mark_name where_ left_gravity = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeMark_name <- case mark_name of
        Nothing -> return nullPtr
        Just jMark_name -> do
            jMark_name' <- textToCString jMark_name
            return jMark_name'
    let where_' = unsafeManagedPtrGetPtr where_
    let left_gravity' = (fromIntegral . fromEnum) left_gravity
    result <- gtk_text_buffer_create_mark _obj' maybeMark_name where_' left_gravity'
    checkUnexpectedReturnNULL "gtk_text_buffer_create_mark" result
    result' <- (newObject TextMark) result
    touchManagedPtr _obj
    touchManagedPtr where_
    freeMem maybeMark_name
    return result'

-- method TextBuffer::cut_clipboard
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clipboard", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clipboard", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_cut_clipboard" gtk_text_buffer_cut_clipboard :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr Clipboard ->                        -- clipboard : TInterface "Gtk" "Clipboard"
    CInt ->                                 -- default_editable : TBasicType TBoolean
    IO ()


textBufferCutClipboard ::
    (MonadIO m, TextBufferK a, ClipboardK b) =>
    a ->                                    -- _obj
    b ->                                    -- clipboard
    Bool ->                                 -- default_editable
    m ()
textBufferCutClipboard _obj clipboard default_editable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let clipboard' = unsafeManagedPtrCastPtr clipboard
    let default_editable' = (fromIntegral . fromEnum) default_editable
    gtk_text_buffer_cut_clipboard _obj' clipboard' default_editable'
    touchManagedPtr _obj
    touchManagedPtr clipboard
    return ()

-- method TextBuffer::delete
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_delete" gtk_text_buffer_delete :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO ()


textBufferDelete ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- start
    TextIter ->                             -- end
    m ()
textBufferDelete _obj start end = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    gtk_text_buffer_delete _obj' start' end'
    touchManagedPtr _obj
    touchManagedPtr start
    touchManagedPtr end
    return ()

-- method TextBuffer::delete_interactive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_delete_interactive" gtk_text_buffer_delete_interactive :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- start_iter : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end_iter : TInterface "Gtk" "TextIter"
    CInt ->                                 -- default_editable : TBasicType TBoolean
    IO CInt


textBufferDeleteInteractive ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- start_iter
    TextIter ->                             -- end_iter
    Bool ->                                 -- default_editable
    m Bool
textBufferDeleteInteractive _obj start_iter end_iter default_editable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let start_iter' = unsafeManagedPtrGetPtr start_iter
    let end_iter' = unsafeManagedPtrGetPtr end_iter
    let default_editable' = (fromIntegral . fromEnum) default_editable
    result <- gtk_text_buffer_delete_interactive _obj' start_iter' end_iter' default_editable'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr start_iter
    touchManagedPtr end_iter
    return result'

-- method TextBuffer::delete_mark
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_delete_mark" gtk_text_buffer_delete_mark :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextMark ->                         -- mark : TInterface "Gtk" "TextMark"
    IO ()


textBufferDeleteMark ::
    (MonadIO m, TextBufferK a, TextMarkK b) =>
    a ->                                    -- _obj
    b ->                                    -- mark
    m ()
textBufferDeleteMark _obj mark = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mark' = unsafeManagedPtrCastPtr mark
    gtk_text_buffer_delete_mark _obj' mark'
    touchManagedPtr _obj
    touchManagedPtr mark
    return ()

-- method TextBuffer::delete_mark_by_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_delete_mark_by_name" gtk_text_buffer_delete_mark_by_name :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


textBufferDeleteMarkByName ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
textBufferDeleteMarkByName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    gtk_text_buffer_delete_mark_by_name _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method TextBuffer::delete_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interactive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interactive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_delete_selection" gtk_text_buffer_delete_selection :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CInt ->                                 -- interactive : TBasicType TBoolean
    CInt ->                                 -- default_editable : TBasicType TBoolean
    IO CInt


textBufferDeleteSelection ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- interactive
    Bool ->                                 -- default_editable
    m Bool
textBufferDeleteSelection _obj interactive default_editable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let interactive' = (fromIntegral . fromEnum) interactive
    let default_editable' = (fromIntegral . fromEnum) default_editable
    result <- gtk_text_buffer_delete_selection _obj' interactive' default_editable'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextBuffer::deserialize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content_buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TCArray False (-1) 5 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content_buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TCArray False (-1) 5 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_text_buffer_deserialize" gtk_text_buffer_deserialize :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextBuffer ->                       -- content_buffer : TInterface "Gtk" "TextBuffer"
    Ptr Gdk.Atom ->                         -- format : TInterface "Gdk" "Atom"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Ptr Word8 ->                            -- data : TCArray False (-1) 5 (TBasicType TUInt8)
    Word64 ->                               -- length : TBasicType TUInt64
    Ptr (Ptr GError) ->                     -- error
    IO CInt


textBufferDeserialize ::
    (MonadIO m, TextBufferK a, TextBufferK b) =>
    a ->                                    -- _obj
    b ->                                    -- content_buffer
    Gdk.Atom ->                             -- format
    TextIter ->                             -- iter
    ByteString ->                           -- data
    m ()
textBufferDeserialize _obj content_buffer format iter data_ = liftIO $ do
    let length_ = fromIntegral $ B.length data_
    let _obj' = unsafeManagedPtrCastPtr _obj
    let content_buffer' = unsafeManagedPtrCastPtr content_buffer
    let format' = unsafeManagedPtrGetPtr format
    let iter' = unsafeManagedPtrGetPtr iter
    data_' <- packByteString data_
    onException (do
        _ <- propagateGError $ gtk_text_buffer_deserialize _obj' content_buffer' format' iter' data_' length_
        touchManagedPtr _obj
        touchManagedPtr content_buffer
        touchManagedPtr format
        touchManagedPtr iter
        freeMem data_'
        return ()
     ) (do
        freeMem data_'
     )

-- method TextBuffer::deserialize_get_can_create_tags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_deserialize_get_can_create_tags" gtk_text_buffer_deserialize_get_can_create_tags :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr Gdk.Atom ->                         -- format : TInterface "Gdk" "Atom"
    IO CInt


textBufferDeserializeGetCanCreateTags ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Gdk.Atom ->                             -- format
    m Bool
textBufferDeserializeGetCanCreateTags _obj format = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let format' = unsafeManagedPtrGetPtr format
    result <- gtk_text_buffer_deserialize_get_can_create_tags _obj' format'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr format
    return result'

-- method TextBuffer::deserialize_set_can_create_tags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "can_create_tags", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "can_create_tags", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_deserialize_set_can_create_tags" gtk_text_buffer_deserialize_set_can_create_tags :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr Gdk.Atom ->                         -- format : TInterface "Gdk" "Atom"
    CInt ->                                 -- can_create_tags : TBasicType TBoolean
    IO ()


textBufferDeserializeSetCanCreateTags ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Gdk.Atom ->                             -- format
    Bool ->                                 -- can_create_tags
    m ()
textBufferDeserializeSetCanCreateTags _obj format can_create_tags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let format' = unsafeManagedPtrGetPtr format
    let can_create_tags' = (fromIntegral . fromEnum) can_create_tags
    gtk_text_buffer_deserialize_set_can_create_tags _obj' format' can_create_tags'
    touchManagedPtr _obj
    touchManagedPtr format
    return ()

-- method TextBuffer::end_user_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_end_user_action" gtk_text_buffer_end_user_action :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    IO ()


textBufferEndUserAction ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m ()
textBufferEndUserAction _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_buffer_end_user_action _obj'
    touchManagedPtr _obj
    return ()

-- method TextBuffer::get_bounds
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_bounds" gtk_text_buffer_get_bounds :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO ()


textBufferGetBounds ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m (TextIter,TextIter)
textBufferGetBounds _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    start <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    end <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    gtk_text_buffer_get_bounds _obj' start end
    start' <- (wrapBoxed TextIter) start
    end' <- (wrapBoxed TextIter) end
    touchManagedPtr _obj
    return (start', end')

-- method TextBuffer::get_char_count
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_char_count" gtk_text_buffer_get_char_count :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    IO Int32


textBufferGetCharCount ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m Int32
textBufferGetCharCount _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_buffer_get_char_count _obj'
    touchManagedPtr _obj
    return result

-- method TextBuffer::get_copy_target_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TargetList"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_copy_target_list" gtk_text_buffer_get_copy_target_list :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    IO (Ptr TargetList)


textBufferGetCopyTargetList ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m TargetList
textBufferGetCopyTargetList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_buffer_get_copy_target_list _obj'
    checkUnexpectedReturnNULL "gtk_text_buffer_get_copy_target_list" result
    result' <- (newBoxed TargetList) result
    touchManagedPtr _obj
    return result'

-- method TextBuffer::get_deserialize_formats
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_formats", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_formats", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 1 (TInterface "Gdk" "Atom")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_deserialize_formats" gtk_text_buffer_get_deserialize_formats :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr Int32 ->                            -- n_formats : TBasicType TInt32
    IO (Ptr (Ptr Gdk.Atom))


textBufferGetDeserializeFormats ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m [Gdk.Atom]
textBufferGetDeserializeFormats _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    n_formats <- allocMem :: IO (Ptr Int32)
    result <- gtk_text_buffer_get_deserialize_formats _obj' n_formats
    n_formats' <- peek n_formats
    checkUnexpectedReturnNULL "gtk_text_buffer_get_deserialize_formats" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (unpackPtrArrayWithLength n_formats') result
    result'' <- mapM (\x -> Gdk.Atom <$> newForeignPtr_ x) result'
    freeMem result
    touchManagedPtr _obj
    freeMem n_formats
    return result''

-- method TextBuffer::get_end_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_end_iter" gtk_text_buffer_get_end_iter :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    IO ()


textBufferGetEndIter ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m (TextIter)
textBufferGetEndIter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    gtk_text_buffer_get_end_iter _obj' iter
    iter' <- (wrapBoxed TextIter) iter
    touchManagedPtr _obj
    return iter'

-- method TextBuffer::get_has_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_has_selection" gtk_text_buffer_get_has_selection :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    IO CInt


textBufferGetHasSelection ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m Bool
textBufferGetHasSelection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_buffer_get_has_selection _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextBuffer::get_insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextMark"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_insert" gtk_text_buffer_get_insert :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    IO (Ptr TextMark)


textBufferGetInsert ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m TextMark
textBufferGetInsert _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_buffer_get_insert _obj'
    checkUnexpectedReturnNULL "gtk_text_buffer_get_insert" result
    result' <- (newObject TextMark) result
    touchManagedPtr _obj
    return result'

-- method TextBuffer::get_iter_at_child_anchor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "anchor", argType = TInterface "Gtk" "TextChildAnchor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "anchor", argType = TInterface "Gtk" "TextChildAnchor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_iter_at_child_anchor" gtk_text_buffer_get_iter_at_child_anchor :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Ptr TextChildAnchor ->                  -- anchor : TInterface "Gtk" "TextChildAnchor"
    IO ()


textBufferGetIterAtChildAnchor ::
    (MonadIO m, TextBufferK a, TextChildAnchorK b) =>
    a ->                                    -- _obj
    b ->                                    -- anchor
    m (TextIter)
textBufferGetIterAtChildAnchor _obj anchor = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    let anchor' = unsafeManagedPtrCastPtr anchor
    gtk_text_buffer_get_iter_at_child_anchor _obj' iter anchor'
    iter' <- (wrapBoxed TextIter) iter
    touchManagedPtr _obj
    touchManagedPtr anchor
    return iter'

-- method TextBuffer::get_iter_at_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line_number", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line_number", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_iter_at_line" gtk_text_buffer_get_iter_at_line :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Int32 ->                                -- line_number : TBasicType TInt32
    IO ()


textBufferGetIterAtLine ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- line_number
    m (TextIter)
textBufferGetIterAtLine _obj line_number = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    gtk_text_buffer_get_iter_at_line _obj' iter line_number
    iter' <- (wrapBoxed TextIter) iter
    touchManagedPtr _obj
    return iter'

-- method TextBuffer::get_iter_at_line_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line_number", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "byte_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line_number", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "byte_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_iter_at_line_index" gtk_text_buffer_get_iter_at_line_index :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Int32 ->                                -- line_number : TBasicType TInt32
    Int32 ->                                -- byte_index : TBasicType TInt32
    IO ()


textBufferGetIterAtLineIndex ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- line_number
    Int32 ->                                -- byte_index
    m (TextIter)
textBufferGetIterAtLineIndex _obj line_number byte_index = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    gtk_text_buffer_get_iter_at_line_index _obj' iter line_number byte_index
    iter' <- (wrapBoxed TextIter) iter
    touchManagedPtr _obj
    return iter'

-- method TextBuffer::get_iter_at_line_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line_number", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "char_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line_number", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "char_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_iter_at_line_offset" gtk_text_buffer_get_iter_at_line_offset :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Int32 ->                                -- line_number : TBasicType TInt32
    Int32 ->                                -- char_offset : TBasicType TInt32
    IO ()


textBufferGetIterAtLineOffset ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- line_number
    Int32 ->                                -- char_offset
    m (TextIter)
textBufferGetIterAtLineOffset _obj line_number char_offset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    gtk_text_buffer_get_iter_at_line_offset _obj' iter line_number char_offset
    iter' <- (wrapBoxed TextIter) iter
    touchManagedPtr _obj
    return iter'

-- method TextBuffer::get_iter_at_mark
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_iter_at_mark" gtk_text_buffer_get_iter_at_mark :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Ptr TextMark ->                         -- mark : TInterface "Gtk" "TextMark"
    IO ()


textBufferGetIterAtMark ::
    (MonadIO m, TextBufferK a, TextMarkK b) =>
    a ->                                    -- _obj
    b ->                                    -- mark
    m (TextIter)
textBufferGetIterAtMark _obj mark = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    let mark' = unsafeManagedPtrCastPtr mark
    gtk_text_buffer_get_iter_at_mark _obj' iter mark'
    iter' <- (wrapBoxed TextIter) iter
    touchManagedPtr _obj
    touchManagedPtr mark
    return iter'

-- method TextBuffer::get_iter_at_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "char_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "char_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_iter_at_offset" gtk_text_buffer_get_iter_at_offset :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Int32 ->                                -- char_offset : TBasicType TInt32
    IO ()


textBufferGetIterAtOffset ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- char_offset
    m (TextIter)
textBufferGetIterAtOffset _obj char_offset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    gtk_text_buffer_get_iter_at_offset _obj' iter char_offset
    iter' <- (wrapBoxed TextIter) iter
    touchManagedPtr _obj
    return iter'

-- method TextBuffer::get_line_count
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_line_count" gtk_text_buffer_get_line_count :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    IO Int32


textBufferGetLineCount ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m Int32
textBufferGetLineCount _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_buffer_get_line_count _obj'
    touchManagedPtr _obj
    return result

-- method TextBuffer::get_mark
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextMark"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_mark" gtk_text_buffer_get_mark :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr TextMark)


textBufferGetMark ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m TextMark
textBufferGetMark _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    result <- gtk_text_buffer_get_mark _obj' name'
    checkUnexpectedReturnNULL "gtk_text_buffer_get_mark" result
    result' <- (newObject TextMark) result
    touchManagedPtr _obj
    freeMem name'
    return result'

-- method TextBuffer::get_modified
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_modified" gtk_text_buffer_get_modified :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    IO CInt


textBufferGetModified ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m Bool
textBufferGetModified _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_buffer_get_modified _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextBuffer::get_paste_target_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TargetList"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_paste_target_list" gtk_text_buffer_get_paste_target_list :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    IO (Ptr TargetList)


textBufferGetPasteTargetList ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m TargetList
textBufferGetPasteTargetList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_buffer_get_paste_target_list _obj'
    checkUnexpectedReturnNULL "gtk_text_buffer_get_paste_target_list" result
    result' <- (newBoxed TargetList) result
    touchManagedPtr _obj
    return result'

-- method TextBuffer::get_selection_bound
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextMark"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_selection_bound" gtk_text_buffer_get_selection_bound :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    IO (Ptr TextMark)


textBufferGetSelectionBound ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m TextMark
textBufferGetSelectionBound _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_buffer_get_selection_bound _obj'
    checkUnexpectedReturnNULL "gtk_text_buffer_get_selection_bound" result
    result' <- (newObject TextMark) result
    touchManagedPtr _obj
    return result'

-- method TextBuffer::get_selection_bounds
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_selection_bounds" gtk_text_buffer_get_selection_bounds :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO CInt


textBufferGetSelectionBounds ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m (Bool,TextIter,TextIter)
textBufferGetSelectionBounds _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    start <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    end <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    result <- gtk_text_buffer_get_selection_bounds _obj' start end
    let result' = (/= 0) result
    start' <- (wrapBoxed TextIter) start
    end' <- (wrapBoxed TextIter) end
    touchManagedPtr _obj
    return (result', start', end')

-- method TextBuffer::get_serialize_formats
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_formats", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_formats", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 1 (TInterface "Gdk" "Atom")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_serialize_formats" gtk_text_buffer_get_serialize_formats :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr Int32 ->                            -- n_formats : TBasicType TInt32
    IO (Ptr (Ptr Gdk.Atom))


textBufferGetSerializeFormats ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m [Gdk.Atom]
textBufferGetSerializeFormats _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    n_formats <- allocMem :: IO (Ptr Int32)
    result <- gtk_text_buffer_get_serialize_formats _obj' n_formats
    n_formats' <- peek n_formats
    checkUnexpectedReturnNULL "gtk_text_buffer_get_serialize_formats" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (unpackPtrArrayWithLength n_formats') result
    result'' <- mapM (\x -> Gdk.Atom <$> newForeignPtr_ x) result'
    freeMem result
    touchManagedPtr _obj
    freeMem n_formats
    return result''

-- method TextBuffer::get_slice
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "include_hidden_chars", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "include_hidden_chars", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_slice" gtk_text_buffer_get_slice :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    CInt ->                                 -- include_hidden_chars : TBasicType TBoolean
    IO CString


textBufferGetSlice ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- start
    TextIter ->                             -- end
    Bool ->                                 -- include_hidden_chars
    m T.Text
textBufferGetSlice _obj start end include_hidden_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    let include_hidden_chars' = (fromIntegral . fromEnum) include_hidden_chars
    result <- gtk_text_buffer_get_slice _obj' start' end' include_hidden_chars'
    checkUnexpectedReturnNULL "gtk_text_buffer_get_slice" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    touchManagedPtr start
    touchManagedPtr end
    return result'

-- method TextBuffer::get_start_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_start_iter" gtk_text_buffer_get_start_iter :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    IO ()


textBufferGetStartIter ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m (TextIter)
textBufferGetStartIter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    gtk_text_buffer_get_start_iter _obj' iter
    iter' <- (wrapBoxed TextIter) iter
    touchManagedPtr _obj
    return iter'

-- method TextBuffer::get_tag_table
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextTagTable"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_tag_table" gtk_text_buffer_get_tag_table :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    IO (Ptr TextTagTable)


textBufferGetTagTable ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    m TextTagTable
textBufferGetTagTable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_buffer_get_tag_table _obj'
    checkUnexpectedReturnNULL "gtk_text_buffer_get_tag_table" result
    result' <- (newObject TextTagTable) result
    touchManagedPtr _obj
    return result'

-- method TextBuffer::get_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "include_hidden_chars", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "include_hidden_chars", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_get_text" gtk_text_buffer_get_text :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    CInt ->                                 -- include_hidden_chars : TBasicType TBoolean
    IO CString


textBufferGetText ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- start
    TextIter ->                             -- end
    Bool ->                                 -- include_hidden_chars
    m T.Text
textBufferGetText _obj start end include_hidden_chars = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    let include_hidden_chars' = (fromIntegral . fromEnum) include_hidden_chars
    result <- gtk_text_buffer_get_text _obj' start' end' include_hidden_chars'
    checkUnexpectedReturnNULL "gtk_text_buffer_get_text" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    touchManagedPtr start
    touchManagedPtr end
    return result'

-- method TextBuffer::insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_insert" gtk_text_buffer_insert :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    CString ->                              -- text : TBasicType TUTF8
    Int32 ->                                -- len : TBasicType TInt32
    IO ()


textBufferInsert ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    T.Text ->                               -- text
    Int32 ->                                -- len
    m ()
textBufferInsert _obj iter text len = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    text' <- textToCString text
    gtk_text_buffer_insert _obj' iter' text' len
    touchManagedPtr _obj
    touchManagedPtr iter
    freeMem text'
    return ()

-- method TextBuffer::insert_at_cursor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_insert_at_cursor" gtk_text_buffer_insert_at_cursor :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- text : TBasicType TUTF8
    Int32 ->                                -- len : TBasicType TInt32
    IO ()


textBufferInsertAtCursor ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    Int32 ->                                -- len
    m ()
textBufferInsertAtCursor _obj text len = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_text_buffer_insert_at_cursor _obj' text' len
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method TextBuffer::insert_child_anchor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "anchor", argType = TInterface "Gtk" "TextChildAnchor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "anchor", argType = TInterface "Gtk" "TextChildAnchor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_insert_child_anchor" gtk_text_buffer_insert_child_anchor :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Ptr TextChildAnchor ->                  -- anchor : TInterface "Gtk" "TextChildAnchor"
    IO ()


textBufferInsertChildAnchor ::
    (MonadIO m, TextBufferK a, TextChildAnchorK b) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    b ->                                    -- anchor
    m ()
textBufferInsertChildAnchor _obj iter anchor = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    let anchor' = unsafeManagedPtrCastPtr anchor
    gtk_text_buffer_insert_child_anchor _obj' iter' anchor'
    touchManagedPtr _obj
    touchManagedPtr iter
    touchManagedPtr anchor
    return ()

-- method TextBuffer::insert_interactive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_insert_interactive" gtk_text_buffer_insert_interactive :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    CString ->                              -- text : TBasicType TUTF8
    Int32 ->                                -- len : TBasicType TInt32
    CInt ->                                 -- default_editable : TBasicType TBoolean
    IO CInt


textBufferInsertInteractive ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    T.Text ->                               -- text
    Int32 ->                                -- len
    Bool ->                                 -- default_editable
    m Bool
textBufferInsertInteractive _obj iter text len default_editable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    text' <- textToCString text
    let default_editable' = (fromIntegral . fromEnum) default_editable
    result <- gtk_text_buffer_insert_interactive _obj' iter' text' len default_editable'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    freeMem text'
    return result'

-- method TextBuffer::insert_interactive_at_cursor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_insert_interactive_at_cursor" gtk_text_buffer_insert_interactive_at_cursor :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- text : TBasicType TUTF8
    Int32 ->                                -- len : TBasicType TInt32
    CInt ->                                 -- default_editable : TBasicType TBoolean
    IO CInt


textBufferInsertInteractiveAtCursor ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    Int32 ->                                -- len
    Bool ->                                 -- default_editable
    m Bool
textBufferInsertInteractiveAtCursor _obj text len default_editable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    let default_editable' = (fromIntegral . fromEnum) default_editable
    result <- gtk_text_buffer_insert_interactive_at_cursor _obj' text' len default_editable'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem text'
    return result'

-- method TextBuffer::insert_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_insert_markup" gtk_text_buffer_insert_markup :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    CString ->                              -- markup : TBasicType TUTF8
    Int32 ->                                -- len : TBasicType TInt32
    IO ()


textBufferInsertMarkup ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    T.Text ->                               -- markup
    Int32 ->                                -- len
    m ()
textBufferInsertMarkup _obj iter markup len = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    markup' <- textToCString markup
    gtk_text_buffer_insert_markup _obj' iter' markup' len
    touchManagedPtr _obj
    touchManagedPtr iter
    freeMem markup'
    return ()

-- method TextBuffer::insert_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_insert_pixbuf" gtk_text_buffer_insert_pixbuf :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO ()


textBufferInsertPixbuf ::
    (MonadIO m, TextBufferK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    b ->                                    -- pixbuf
    m ()
textBufferInsertPixbuf _obj iter pixbuf = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    gtk_text_buffer_insert_pixbuf _obj' iter' pixbuf'
    touchManagedPtr _obj
    touchManagedPtr iter
    touchManagedPtr pixbuf
    return ()

-- method TextBuffer::insert_range
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_insert_range" gtk_text_buffer_insert_range :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO ()


textBufferInsertRange ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    TextIter ->                             -- start
    TextIter ->                             -- end
    m ()
textBufferInsertRange _obj iter start end = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    gtk_text_buffer_insert_range _obj' iter' start' end'
    touchManagedPtr _obj
    touchManagedPtr iter
    touchManagedPtr start
    touchManagedPtr end
    return ()

-- method TextBuffer::insert_range_interactive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_insert_range_interactive" gtk_text_buffer_insert_range_interactive :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    CInt ->                                 -- default_editable : TBasicType TBoolean
    IO CInt


textBufferInsertRangeInteractive ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    TextIter ->                             -- start
    TextIter ->                             -- end
    Bool ->                                 -- default_editable
    m Bool
textBufferInsertRangeInteractive _obj iter start end default_editable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    let default_editable' = (fromIntegral . fromEnum) default_editable
    result <- gtk_text_buffer_insert_range_interactive _obj' iter' start' end' default_editable'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    touchManagedPtr start
    touchManagedPtr end
    return result'

-- method TextBuffer::move_mark
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "where", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "where", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_move_mark" gtk_text_buffer_move_mark :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextMark ->                         -- mark : TInterface "Gtk" "TextMark"
    Ptr TextIter ->                         -- where : TInterface "Gtk" "TextIter"
    IO ()


textBufferMoveMark ::
    (MonadIO m, TextBufferK a, TextMarkK b) =>
    a ->                                    -- _obj
    b ->                                    -- mark
    TextIter ->                             -- where
    m ()
textBufferMoveMark _obj mark where_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mark' = unsafeManagedPtrCastPtr mark
    let where_' = unsafeManagedPtrGetPtr where_
    gtk_text_buffer_move_mark _obj' mark' where_'
    touchManagedPtr _obj
    touchManagedPtr mark
    touchManagedPtr where_
    return ()

-- method TextBuffer::move_mark_by_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "where", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "where", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_move_mark_by_name" gtk_text_buffer_move_mark_by_name :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- name : TBasicType TUTF8
    Ptr TextIter ->                         -- where : TInterface "Gtk" "TextIter"
    IO ()


textBufferMoveMarkByName ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    TextIter ->                             -- where
    m ()
textBufferMoveMarkByName _obj name where_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    let where_' = unsafeManagedPtrGetPtr where_
    gtk_text_buffer_move_mark_by_name _obj' name' where_'
    touchManagedPtr _obj
    touchManagedPtr where_
    freeMem name'
    return ()

-- method TextBuffer::paste_clipboard
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clipboard", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "override_location", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clipboard", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "override_location", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_paste_clipboard" gtk_text_buffer_paste_clipboard :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr Clipboard ->                        -- clipboard : TInterface "Gtk" "Clipboard"
    Ptr TextIter ->                         -- override_location : TInterface "Gtk" "TextIter"
    CInt ->                                 -- default_editable : TBasicType TBoolean
    IO ()


textBufferPasteClipboard ::
    (MonadIO m, TextBufferK a, ClipboardK b) =>
    a ->                                    -- _obj
    b ->                                    -- clipboard
    Maybe (TextIter) ->                     -- override_location
    Bool ->                                 -- default_editable
    m ()
textBufferPasteClipboard _obj clipboard override_location default_editable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let clipboard' = unsafeManagedPtrCastPtr clipboard
    maybeOverride_location <- case override_location of
        Nothing -> return nullPtr
        Just jOverride_location -> do
            let jOverride_location' = unsafeManagedPtrGetPtr jOverride_location
            return jOverride_location'
    let default_editable' = (fromIntegral . fromEnum) default_editable
    gtk_text_buffer_paste_clipboard _obj' clipboard' maybeOverride_location default_editable'
    touchManagedPtr _obj
    touchManagedPtr clipboard
    whenJust override_location touchManagedPtr
    return ()

-- method TextBuffer::place_cursor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "where", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "where", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_place_cursor" gtk_text_buffer_place_cursor :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- where : TInterface "Gtk" "TextIter"
    IO ()


textBufferPlaceCursor ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- where
    m ()
textBufferPlaceCursor _obj where_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let where_' = unsafeManagedPtrGetPtr where_
    gtk_text_buffer_place_cursor _obj' where_'
    touchManagedPtr _obj
    touchManagedPtr where_
    return ()

-- method TextBuffer::register_deserialize_format
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "function", argType = TInterface "Gtk" "TextBufferDeserializeFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data_destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "function", argType = TInterface "Gtk" "TextBufferDeserializeFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Atom"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_register_deserialize_format" gtk_text_buffer_register_deserialize_format :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- mime_type : TBasicType TUTF8
    FunPtr TextBufferDeserializeFuncC ->    -- function : TInterface "Gtk" "TextBufferDeserializeFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- user_data_destroy : TInterface "GLib" "DestroyNotify"
    IO (Ptr Gdk.Atom)


textBufferRegisterDeserializeFormat ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- mime_type
    TextBufferDeserializeFunc ->            -- function
    m Gdk.Atom
textBufferRegisterDeserializeFormat _obj mime_type function = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    mime_type' <- textToCString mime_type
    function' <- mkTextBufferDeserializeFunc (textBufferDeserializeFuncWrapper Nothing function)
    let user_data = castFunPtrToPtr function'
    let user_data_destroy = safeFreeFunPtrPtr
    result <- gtk_text_buffer_register_deserialize_format _obj' mime_type' function' user_data user_data_destroy
    checkUnexpectedReturnNULL "gtk_text_buffer_register_deserialize_format" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> Gdk.Atom <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    freeMem mime_type'
    return result'

-- method TextBuffer::register_deserialize_tagset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tagset_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tagset_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Atom"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_register_deserialize_tagset" gtk_text_buffer_register_deserialize_tagset :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- tagset_name : TBasicType TUTF8
    IO (Ptr Gdk.Atom)


textBufferRegisterDeserializeTagset ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- tagset_name
    m Gdk.Atom
textBufferRegisterDeserializeTagset _obj tagset_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeTagset_name <- case tagset_name of
        Nothing -> return nullPtr
        Just jTagset_name -> do
            jTagset_name' <- textToCString jTagset_name
            return jTagset_name'
    result <- gtk_text_buffer_register_deserialize_tagset _obj' maybeTagset_name
    checkUnexpectedReturnNULL "gtk_text_buffer_register_deserialize_tagset" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> Gdk.Atom <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    freeMem maybeTagset_name
    return result'

-- method TextBuffer::register_serialize_format
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "function", argType = TInterface "Gtk" "TextBufferSerializeFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data_destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "function", argType = TInterface "Gtk" "TextBufferSerializeFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Atom"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_register_serialize_format" gtk_text_buffer_register_serialize_format :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- mime_type : TBasicType TUTF8
    FunPtr TextBufferSerializeFuncC ->      -- function : TInterface "Gtk" "TextBufferSerializeFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- user_data_destroy : TInterface "GLib" "DestroyNotify"
    IO (Ptr Gdk.Atom)


textBufferRegisterSerializeFormat ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- mime_type
    TextBufferSerializeFunc ->              -- function
    m Gdk.Atom
textBufferRegisterSerializeFormat _obj mime_type function = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    mime_type' <- textToCString mime_type
    function' <- mkTextBufferSerializeFunc (textBufferSerializeFuncWrapper Nothing function)
    let user_data = castFunPtrToPtr function'
    let user_data_destroy = safeFreeFunPtrPtr
    result <- gtk_text_buffer_register_serialize_format _obj' mime_type' function' user_data user_data_destroy
    checkUnexpectedReturnNULL "gtk_text_buffer_register_serialize_format" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> Gdk.Atom <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    freeMem mime_type'
    return result'

-- method TextBuffer::register_serialize_tagset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tagset_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tagset_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Atom"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_register_serialize_tagset" gtk_text_buffer_register_serialize_tagset :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- tagset_name : TBasicType TUTF8
    IO (Ptr Gdk.Atom)


textBufferRegisterSerializeTagset ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- tagset_name
    m Gdk.Atom
textBufferRegisterSerializeTagset _obj tagset_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeTagset_name <- case tagset_name of
        Nothing -> return nullPtr
        Just jTagset_name -> do
            jTagset_name' <- textToCString jTagset_name
            return jTagset_name'
    result <- gtk_text_buffer_register_serialize_tagset _obj' maybeTagset_name
    checkUnexpectedReturnNULL "gtk_text_buffer_register_serialize_tagset" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> Gdk.Atom <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    freeMem maybeTagset_name
    return result'

-- method TextBuffer::remove_all_tags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_remove_all_tags" gtk_text_buffer_remove_all_tags :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO ()


textBufferRemoveAllTags ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- start
    TextIter ->                             -- end
    m ()
textBufferRemoveAllTags _obj start end = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    gtk_text_buffer_remove_all_tags _obj' start' end'
    touchManagedPtr _obj
    touchManagedPtr start
    touchManagedPtr end
    return ()

-- method TextBuffer::remove_selection_clipboard
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clipboard", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clipboard", argType = TInterface "Gtk" "Clipboard", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_remove_selection_clipboard" gtk_text_buffer_remove_selection_clipboard :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr Clipboard ->                        -- clipboard : TInterface "Gtk" "Clipboard"
    IO ()


textBufferRemoveSelectionClipboard ::
    (MonadIO m, TextBufferK a, ClipboardK b) =>
    a ->                                    -- _obj
    b ->                                    -- clipboard
    m ()
textBufferRemoveSelectionClipboard _obj clipboard = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let clipboard' = unsafeManagedPtrCastPtr clipboard
    gtk_text_buffer_remove_selection_clipboard _obj' clipboard'
    touchManagedPtr _obj
    touchManagedPtr clipboard
    return ()

-- method TextBuffer::remove_tag
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_remove_tag" gtk_text_buffer_remove_tag :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextTag ->                          -- tag : TInterface "Gtk" "TextTag"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO ()


textBufferRemoveTag ::
    (MonadIO m, TextBufferK a, TextTagK b) =>
    a ->                                    -- _obj
    b ->                                    -- tag
    TextIter ->                             -- start
    TextIter ->                             -- end
    m ()
textBufferRemoveTag _obj tag start end = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tag' = unsafeManagedPtrCastPtr tag
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    gtk_text_buffer_remove_tag _obj' tag' start' end'
    touchManagedPtr _obj
    touchManagedPtr tag
    touchManagedPtr start
    touchManagedPtr end
    return ()

-- method TextBuffer::remove_tag_by_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_remove_tag_by_name" gtk_text_buffer_remove_tag_by_name :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- name : TBasicType TUTF8
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO ()


textBufferRemoveTagByName ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    TextIter ->                             -- start
    TextIter ->                             -- end
    m ()
textBufferRemoveTagByName _obj name start end = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    gtk_text_buffer_remove_tag_by_name _obj' name' start' end'
    touchManagedPtr _obj
    touchManagedPtr start
    touchManagedPtr end
    freeMem name'
    return ()

-- method TextBuffer::select_range
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ins", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bound", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ins", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bound", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_select_range" gtk_text_buffer_select_range :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextIter ->                         -- ins : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- bound : TInterface "Gtk" "TextIter"
    IO ()


textBufferSelectRange ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- ins
    TextIter ->                             -- bound
    m ()
textBufferSelectRange _obj ins bound = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let ins' = unsafeManagedPtrGetPtr ins
    let bound' = unsafeManagedPtrGetPtr bound
    gtk_text_buffer_select_range _obj' ins' bound'
    touchManagedPtr _obj
    touchManagedPtr ins
    touchManagedPtr bound
    return ()

-- method TextBuffer::serialize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content_buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content_buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 5 (TBasicType TUInt8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_serialize" gtk_text_buffer_serialize :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr TextBuffer ->                       -- content_buffer : TInterface "Gtk" "TextBuffer"
    Ptr Gdk.Atom ->                         -- format : TInterface "Gdk" "Atom"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    Ptr Word64 ->                           -- length : TBasicType TUInt64
    IO (Ptr Word8)


textBufferSerialize ::
    (MonadIO m, TextBufferK a, TextBufferK b) =>
    a ->                                    -- _obj
    b ->                                    -- content_buffer
    Gdk.Atom ->                             -- format
    TextIter ->                             -- start
    TextIter ->                             -- end
    m ByteString
textBufferSerialize _obj content_buffer format start end = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let content_buffer' = unsafeManagedPtrCastPtr content_buffer
    let format' = unsafeManagedPtrGetPtr format
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    length_ <- allocMem :: IO (Ptr Word64)
    result <- gtk_text_buffer_serialize _obj' content_buffer' format' start' end' length_
    length_' <- peek length_
    checkUnexpectedReturnNULL "gtk_text_buffer_serialize" result
    result' <- (unpackByteStringWithLength length_') result
    freeMem result
    touchManagedPtr _obj
    touchManagedPtr content_buffer
    touchManagedPtr format
    touchManagedPtr start
    touchManagedPtr end
    freeMem length_
    return result'

-- method TextBuffer::set_modified
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_set_modified" gtk_text_buffer_set_modified :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


textBufferSetModified ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
textBufferSetModified _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_text_buffer_set_modified _obj' setting'
    touchManagedPtr _obj
    return ()

-- method TextBuffer::set_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "len", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_set_text" gtk_text_buffer_set_text :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    CString ->                              -- text : TBasicType TUTF8
    Int32 ->                                -- len : TBasicType TInt32
    IO ()


textBufferSetText ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    Int32 ->                                -- len
    m ()
textBufferSetText _obj text len = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_text_buffer_set_text _obj' text' len
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method TextBuffer::unregister_deserialize_format
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_unregister_deserialize_format" gtk_text_buffer_unregister_deserialize_format :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr Gdk.Atom ->                         -- format : TInterface "Gdk" "Atom"
    IO ()


textBufferUnregisterDeserializeFormat ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Gdk.Atom ->                             -- format
    m ()
textBufferUnregisterDeserializeFormat _obj format = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let format' = unsafeManagedPtrGetPtr format
    gtk_text_buffer_unregister_deserialize_format _obj' format'
    touchManagedPtr _obj
    touchManagedPtr format
    return ()

-- method TextBuffer::unregister_serialize_format
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "format", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_buffer_unregister_serialize_format" gtk_text_buffer_unregister_serialize_format :: 
    Ptr TextBuffer ->                       -- _obj : TInterface "Gtk" "TextBuffer"
    Ptr Gdk.Atom ->                         -- format : TInterface "Gdk" "Atom"
    IO ()


textBufferUnregisterSerializeFormat ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- _obj
    Gdk.Atom ->                             -- format
    m ()
textBufferUnregisterSerializeFormat _obj format = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let format' = unsafeManagedPtrGetPtr format
    gtk_text_buffer_unregister_serialize_format _obj' format'
    touchManagedPtr _obj
    touchManagedPtr format
    return ()

-- signal TextBuffer::apply-tag
type TextBufferApplyTagCallback =
    TextTag ->
    TextIter ->
    TextIter ->
    IO ()

noTextBufferApplyTagCallback :: Maybe TextBufferApplyTagCallback
noTextBufferApplyTagCallback = Nothing

type TextBufferApplyTagCallbackC =
    Ptr () ->                               -- object
    Ptr TextTag ->
    Ptr TextIter ->
    Ptr TextIter ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferApplyTagCallback :: TextBufferApplyTagCallbackC -> IO (FunPtr TextBufferApplyTagCallbackC)

textBufferApplyTagClosure :: TextBufferApplyTagCallback -> IO Closure
textBufferApplyTagClosure cb = newCClosure =<< mkTextBufferApplyTagCallback wrapped
    where wrapped = textBufferApplyTagCallbackWrapper cb

textBufferApplyTagCallbackWrapper ::
    TextBufferApplyTagCallback ->
    Ptr () ->
    Ptr TextTag ->
    Ptr TextIter ->
    Ptr TextIter ->
    Ptr () ->
    IO ()
textBufferApplyTagCallbackWrapper _cb _ tag start end _ = do
    tag' <- (newObject TextTag) tag
    start' <- (newBoxed TextIter) start
    end' <- (newBoxed TextIter) end
    _cb  tag' start' end'

onTextBufferApplyTag :: (GObject a, MonadIO m) => a -> TextBufferApplyTagCallback -> m SignalHandlerId
onTextBufferApplyTag obj cb = liftIO $ connectTextBufferApplyTag obj cb SignalConnectBefore
afterTextBufferApplyTag :: (GObject a, MonadIO m) => a -> TextBufferApplyTagCallback -> m SignalHandlerId
afterTextBufferApplyTag obj cb = connectTextBufferApplyTag obj cb SignalConnectAfter

connectTextBufferApplyTag :: (GObject a, MonadIO m) =>
                             a -> TextBufferApplyTagCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferApplyTag obj cb after = liftIO $ do
    cb' <- mkTextBufferApplyTagCallback (textBufferApplyTagCallbackWrapper cb)
    connectSignalFunPtr obj "apply-tag" cb' after

-- signal TextBuffer::begin-user-action
type TextBufferBeginUserActionCallback =
    IO ()

noTextBufferBeginUserActionCallback :: Maybe TextBufferBeginUserActionCallback
noTextBufferBeginUserActionCallback = Nothing

type TextBufferBeginUserActionCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferBeginUserActionCallback :: TextBufferBeginUserActionCallbackC -> IO (FunPtr TextBufferBeginUserActionCallbackC)

textBufferBeginUserActionClosure :: TextBufferBeginUserActionCallback -> IO Closure
textBufferBeginUserActionClosure cb = newCClosure =<< mkTextBufferBeginUserActionCallback wrapped
    where wrapped = textBufferBeginUserActionCallbackWrapper cb

textBufferBeginUserActionCallbackWrapper ::
    TextBufferBeginUserActionCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textBufferBeginUserActionCallbackWrapper _cb _ _ = do
    _cb 

onTextBufferBeginUserAction :: (GObject a, MonadIO m) => a -> TextBufferBeginUserActionCallback -> m SignalHandlerId
onTextBufferBeginUserAction obj cb = liftIO $ connectTextBufferBeginUserAction obj cb SignalConnectBefore
afterTextBufferBeginUserAction :: (GObject a, MonadIO m) => a -> TextBufferBeginUserActionCallback -> m SignalHandlerId
afterTextBufferBeginUserAction obj cb = connectTextBufferBeginUserAction obj cb SignalConnectAfter

connectTextBufferBeginUserAction :: (GObject a, MonadIO m) =>
                                    a -> TextBufferBeginUserActionCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferBeginUserAction obj cb after = liftIO $ do
    cb' <- mkTextBufferBeginUserActionCallback (textBufferBeginUserActionCallbackWrapper cb)
    connectSignalFunPtr obj "begin-user-action" cb' after

-- signal TextBuffer::changed
type TextBufferChangedCallback =
    IO ()

noTextBufferChangedCallback :: Maybe TextBufferChangedCallback
noTextBufferChangedCallback = Nothing

type TextBufferChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferChangedCallback :: TextBufferChangedCallbackC -> IO (FunPtr TextBufferChangedCallbackC)

textBufferChangedClosure :: TextBufferChangedCallback -> IO Closure
textBufferChangedClosure cb = newCClosure =<< mkTextBufferChangedCallback wrapped
    where wrapped = textBufferChangedCallbackWrapper cb

textBufferChangedCallbackWrapper ::
    TextBufferChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textBufferChangedCallbackWrapper _cb _ _ = do
    _cb 

onTextBufferChanged :: (GObject a, MonadIO m) => a -> TextBufferChangedCallback -> m SignalHandlerId
onTextBufferChanged obj cb = liftIO $ connectTextBufferChanged obj cb SignalConnectBefore
afterTextBufferChanged :: (GObject a, MonadIO m) => a -> TextBufferChangedCallback -> m SignalHandlerId
afterTextBufferChanged obj cb = connectTextBufferChanged obj cb SignalConnectAfter

connectTextBufferChanged :: (GObject a, MonadIO m) =>
                            a -> TextBufferChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferChanged obj cb after = liftIO $ do
    cb' <- mkTextBufferChangedCallback (textBufferChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- signal TextBuffer::delete-range
type TextBufferDeleteRangeCallback =
    TextIter ->
    TextIter ->
    IO ()

noTextBufferDeleteRangeCallback :: Maybe TextBufferDeleteRangeCallback
noTextBufferDeleteRangeCallback = Nothing

type TextBufferDeleteRangeCallbackC =
    Ptr () ->                               -- object
    Ptr TextIter ->
    Ptr TextIter ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferDeleteRangeCallback :: TextBufferDeleteRangeCallbackC -> IO (FunPtr TextBufferDeleteRangeCallbackC)

textBufferDeleteRangeClosure :: TextBufferDeleteRangeCallback -> IO Closure
textBufferDeleteRangeClosure cb = newCClosure =<< mkTextBufferDeleteRangeCallback wrapped
    where wrapped = textBufferDeleteRangeCallbackWrapper cb

textBufferDeleteRangeCallbackWrapper ::
    TextBufferDeleteRangeCallback ->
    Ptr () ->
    Ptr TextIter ->
    Ptr TextIter ->
    Ptr () ->
    IO ()
textBufferDeleteRangeCallbackWrapper _cb _ start end _ = do
    start' <- (newBoxed TextIter) start
    end' <- (newBoxed TextIter) end
    _cb  start' end'

onTextBufferDeleteRange :: (GObject a, MonadIO m) => a -> TextBufferDeleteRangeCallback -> m SignalHandlerId
onTextBufferDeleteRange obj cb = liftIO $ connectTextBufferDeleteRange obj cb SignalConnectBefore
afterTextBufferDeleteRange :: (GObject a, MonadIO m) => a -> TextBufferDeleteRangeCallback -> m SignalHandlerId
afterTextBufferDeleteRange obj cb = connectTextBufferDeleteRange obj cb SignalConnectAfter

connectTextBufferDeleteRange :: (GObject a, MonadIO m) =>
                                a -> TextBufferDeleteRangeCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferDeleteRange obj cb after = liftIO $ do
    cb' <- mkTextBufferDeleteRangeCallback (textBufferDeleteRangeCallbackWrapper cb)
    connectSignalFunPtr obj "delete-range" cb' after

-- signal TextBuffer::end-user-action
type TextBufferEndUserActionCallback =
    IO ()

noTextBufferEndUserActionCallback :: Maybe TextBufferEndUserActionCallback
noTextBufferEndUserActionCallback = Nothing

type TextBufferEndUserActionCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferEndUserActionCallback :: TextBufferEndUserActionCallbackC -> IO (FunPtr TextBufferEndUserActionCallbackC)

textBufferEndUserActionClosure :: TextBufferEndUserActionCallback -> IO Closure
textBufferEndUserActionClosure cb = newCClosure =<< mkTextBufferEndUserActionCallback wrapped
    where wrapped = textBufferEndUserActionCallbackWrapper cb

textBufferEndUserActionCallbackWrapper ::
    TextBufferEndUserActionCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textBufferEndUserActionCallbackWrapper _cb _ _ = do
    _cb 

onTextBufferEndUserAction :: (GObject a, MonadIO m) => a -> TextBufferEndUserActionCallback -> m SignalHandlerId
onTextBufferEndUserAction obj cb = liftIO $ connectTextBufferEndUserAction obj cb SignalConnectBefore
afterTextBufferEndUserAction :: (GObject a, MonadIO m) => a -> TextBufferEndUserActionCallback -> m SignalHandlerId
afterTextBufferEndUserAction obj cb = connectTextBufferEndUserAction obj cb SignalConnectAfter

connectTextBufferEndUserAction :: (GObject a, MonadIO m) =>
                                  a -> TextBufferEndUserActionCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferEndUserAction obj cb after = liftIO $ do
    cb' <- mkTextBufferEndUserActionCallback (textBufferEndUserActionCallbackWrapper cb)
    connectSignalFunPtr obj "end-user-action" cb' after

-- signal TextBuffer::insert-child-anchor
type TextBufferInsertChildAnchorCallback =
    TextIter ->
    TextChildAnchor ->
    IO ()

noTextBufferInsertChildAnchorCallback :: Maybe TextBufferInsertChildAnchorCallback
noTextBufferInsertChildAnchorCallback = Nothing

type TextBufferInsertChildAnchorCallbackC =
    Ptr () ->                               -- object
    Ptr TextIter ->
    Ptr TextChildAnchor ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferInsertChildAnchorCallback :: TextBufferInsertChildAnchorCallbackC -> IO (FunPtr TextBufferInsertChildAnchorCallbackC)

textBufferInsertChildAnchorClosure :: TextBufferInsertChildAnchorCallback -> IO Closure
textBufferInsertChildAnchorClosure cb = newCClosure =<< mkTextBufferInsertChildAnchorCallback wrapped
    where wrapped = textBufferInsertChildAnchorCallbackWrapper cb

textBufferInsertChildAnchorCallbackWrapper ::
    TextBufferInsertChildAnchorCallback ->
    Ptr () ->
    Ptr TextIter ->
    Ptr TextChildAnchor ->
    Ptr () ->
    IO ()
textBufferInsertChildAnchorCallbackWrapper _cb _ location anchor _ = do
    location' <- (newBoxed TextIter) location
    anchor' <- (newObject TextChildAnchor) anchor
    _cb  location' anchor'

onTextBufferInsertChildAnchor :: (GObject a, MonadIO m) => a -> TextBufferInsertChildAnchorCallback -> m SignalHandlerId
onTextBufferInsertChildAnchor obj cb = liftIO $ connectTextBufferInsertChildAnchor obj cb SignalConnectBefore
afterTextBufferInsertChildAnchor :: (GObject a, MonadIO m) => a -> TextBufferInsertChildAnchorCallback -> m SignalHandlerId
afterTextBufferInsertChildAnchor obj cb = connectTextBufferInsertChildAnchor obj cb SignalConnectAfter

connectTextBufferInsertChildAnchor :: (GObject a, MonadIO m) =>
                                      a -> TextBufferInsertChildAnchorCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferInsertChildAnchor obj cb after = liftIO $ do
    cb' <- mkTextBufferInsertChildAnchorCallback (textBufferInsertChildAnchorCallbackWrapper cb)
    connectSignalFunPtr obj "insert-child-anchor" cb' after

-- signal TextBuffer::insert-pixbuf
type TextBufferInsertPixbufCallback =
    TextIter ->
    GdkPixbuf.Pixbuf ->
    IO ()

noTextBufferInsertPixbufCallback :: Maybe TextBufferInsertPixbufCallback
noTextBufferInsertPixbufCallback = Nothing

type TextBufferInsertPixbufCallbackC =
    Ptr () ->                               -- object
    Ptr TextIter ->
    Ptr GdkPixbuf.Pixbuf ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferInsertPixbufCallback :: TextBufferInsertPixbufCallbackC -> IO (FunPtr TextBufferInsertPixbufCallbackC)

textBufferInsertPixbufClosure :: TextBufferInsertPixbufCallback -> IO Closure
textBufferInsertPixbufClosure cb = newCClosure =<< mkTextBufferInsertPixbufCallback wrapped
    where wrapped = textBufferInsertPixbufCallbackWrapper cb

textBufferInsertPixbufCallbackWrapper ::
    TextBufferInsertPixbufCallback ->
    Ptr () ->
    Ptr TextIter ->
    Ptr GdkPixbuf.Pixbuf ->
    Ptr () ->
    IO ()
textBufferInsertPixbufCallbackWrapper _cb _ location pixbuf _ = do
    location' <- (newBoxed TextIter) location
    pixbuf' <- (newObject GdkPixbuf.Pixbuf) pixbuf
    _cb  location' pixbuf'

onTextBufferInsertPixbuf :: (GObject a, MonadIO m) => a -> TextBufferInsertPixbufCallback -> m SignalHandlerId
onTextBufferInsertPixbuf obj cb = liftIO $ connectTextBufferInsertPixbuf obj cb SignalConnectBefore
afterTextBufferInsertPixbuf :: (GObject a, MonadIO m) => a -> TextBufferInsertPixbufCallback -> m SignalHandlerId
afterTextBufferInsertPixbuf obj cb = connectTextBufferInsertPixbuf obj cb SignalConnectAfter

connectTextBufferInsertPixbuf :: (GObject a, MonadIO m) =>
                                 a -> TextBufferInsertPixbufCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferInsertPixbuf obj cb after = liftIO $ do
    cb' <- mkTextBufferInsertPixbufCallback (textBufferInsertPixbufCallbackWrapper cb)
    connectSignalFunPtr obj "insert-pixbuf" cb' after

-- signal TextBuffer::insert-text
type TextBufferInsertTextCallback =
    TextIter ->
    T.Text ->
    Int32 ->
    IO ()

noTextBufferInsertTextCallback :: Maybe TextBufferInsertTextCallback
noTextBufferInsertTextCallback = Nothing

type TextBufferInsertTextCallbackC =
    Ptr () ->                               -- object
    Ptr TextIter ->
    CString ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferInsertTextCallback :: TextBufferInsertTextCallbackC -> IO (FunPtr TextBufferInsertTextCallbackC)

textBufferInsertTextClosure :: TextBufferInsertTextCallback -> IO Closure
textBufferInsertTextClosure cb = newCClosure =<< mkTextBufferInsertTextCallback wrapped
    where wrapped = textBufferInsertTextCallbackWrapper cb

textBufferInsertTextCallbackWrapper ::
    TextBufferInsertTextCallback ->
    Ptr () ->
    Ptr TextIter ->
    CString ->
    Int32 ->
    Ptr () ->
    IO ()
textBufferInsertTextCallbackWrapper _cb _ location text len _ = do
    location' <- (newBoxed TextIter) location
    text' <- cstringToText text
    _cb  location' text' len

onTextBufferInsertText :: (GObject a, MonadIO m) => a -> TextBufferInsertTextCallback -> m SignalHandlerId
onTextBufferInsertText obj cb = liftIO $ connectTextBufferInsertText obj cb SignalConnectBefore
afterTextBufferInsertText :: (GObject a, MonadIO m) => a -> TextBufferInsertTextCallback -> m SignalHandlerId
afterTextBufferInsertText obj cb = connectTextBufferInsertText obj cb SignalConnectAfter

connectTextBufferInsertText :: (GObject a, MonadIO m) =>
                               a -> TextBufferInsertTextCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferInsertText obj cb after = liftIO $ do
    cb' <- mkTextBufferInsertTextCallback (textBufferInsertTextCallbackWrapper cb)
    connectSignalFunPtr obj "insert-text" cb' after

-- signal TextBuffer::mark-deleted
type TextBufferMarkDeletedCallback =
    TextMark ->
    IO ()

noTextBufferMarkDeletedCallback :: Maybe TextBufferMarkDeletedCallback
noTextBufferMarkDeletedCallback = Nothing

type TextBufferMarkDeletedCallbackC =
    Ptr () ->                               -- object
    Ptr TextMark ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferMarkDeletedCallback :: TextBufferMarkDeletedCallbackC -> IO (FunPtr TextBufferMarkDeletedCallbackC)

textBufferMarkDeletedClosure :: TextBufferMarkDeletedCallback -> IO Closure
textBufferMarkDeletedClosure cb = newCClosure =<< mkTextBufferMarkDeletedCallback wrapped
    where wrapped = textBufferMarkDeletedCallbackWrapper cb

textBufferMarkDeletedCallbackWrapper ::
    TextBufferMarkDeletedCallback ->
    Ptr () ->
    Ptr TextMark ->
    Ptr () ->
    IO ()
textBufferMarkDeletedCallbackWrapper _cb _ mark _ = do
    mark' <- (newObject TextMark) mark
    _cb  mark'

onTextBufferMarkDeleted :: (GObject a, MonadIO m) => a -> TextBufferMarkDeletedCallback -> m SignalHandlerId
onTextBufferMarkDeleted obj cb = liftIO $ connectTextBufferMarkDeleted obj cb SignalConnectBefore
afterTextBufferMarkDeleted :: (GObject a, MonadIO m) => a -> TextBufferMarkDeletedCallback -> m SignalHandlerId
afterTextBufferMarkDeleted obj cb = connectTextBufferMarkDeleted obj cb SignalConnectAfter

connectTextBufferMarkDeleted :: (GObject a, MonadIO m) =>
                                a -> TextBufferMarkDeletedCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferMarkDeleted obj cb after = liftIO $ do
    cb' <- mkTextBufferMarkDeletedCallback (textBufferMarkDeletedCallbackWrapper cb)
    connectSignalFunPtr obj "mark-deleted" cb' after

-- signal TextBuffer::mark-set
type TextBufferMarkSetCallback =
    TextIter ->
    TextMark ->
    IO ()

noTextBufferMarkSetCallback :: Maybe TextBufferMarkSetCallback
noTextBufferMarkSetCallback = Nothing

type TextBufferMarkSetCallbackC =
    Ptr () ->                               -- object
    Ptr TextIter ->
    Ptr TextMark ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferMarkSetCallback :: TextBufferMarkSetCallbackC -> IO (FunPtr TextBufferMarkSetCallbackC)

textBufferMarkSetClosure :: TextBufferMarkSetCallback -> IO Closure
textBufferMarkSetClosure cb = newCClosure =<< mkTextBufferMarkSetCallback wrapped
    where wrapped = textBufferMarkSetCallbackWrapper cb

textBufferMarkSetCallbackWrapper ::
    TextBufferMarkSetCallback ->
    Ptr () ->
    Ptr TextIter ->
    Ptr TextMark ->
    Ptr () ->
    IO ()
textBufferMarkSetCallbackWrapper _cb _ location mark _ = do
    location' <- (newBoxed TextIter) location
    mark' <- (newObject TextMark) mark
    _cb  location' mark'

onTextBufferMarkSet :: (GObject a, MonadIO m) => a -> TextBufferMarkSetCallback -> m SignalHandlerId
onTextBufferMarkSet obj cb = liftIO $ connectTextBufferMarkSet obj cb SignalConnectBefore
afterTextBufferMarkSet :: (GObject a, MonadIO m) => a -> TextBufferMarkSetCallback -> m SignalHandlerId
afterTextBufferMarkSet obj cb = connectTextBufferMarkSet obj cb SignalConnectAfter

connectTextBufferMarkSet :: (GObject a, MonadIO m) =>
                            a -> TextBufferMarkSetCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferMarkSet obj cb after = liftIO $ do
    cb' <- mkTextBufferMarkSetCallback (textBufferMarkSetCallbackWrapper cb)
    connectSignalFunPtr obj "mark-set" cb' after

-- signal TextBuffer::modified-changed
type TextBufferModifiedChangedCallback =
    IO ()

noTextBufferModifiedChangedCallback :: Maybe TextBufferModifiedChangedCallback
noTextBufferModifiedChangedCallback = Nothing

type TextBufferModifiedChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferModifiedChangedCallback :: TextBufferModifiedChangedCallbackC -> IO (FunPtr TextBufferModifiedChangedCallbackC)

textBufferModifiedChangedClosure :: TextBufferModifiedChangedCallback -> IO Closure
textBufferModifiedChangedClosure cb = newCClosure =<< mkTextBufferModifiedChangedCallback wrapped
    where wrapped = textBufferModifiedChangedCallbackWrapper cb

textBufferModifiedChangedCallbackWrapper ::
    TextBufferModifiedChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textBufferModifiedChangedCallbackWrapper _cb _ _ = do
    _cb 

onTextBufferModifiedChanged :: (GObject a, MonadIO m) => a -> TextBufferModifiedChangedCallback -> m SignalHandlerId
onTextBufferModifiedChanged obj cb = liftIO $ connectTextBufferModifiedChanged obj cb SignalConnectBefore
afterTextBufferModifiedChanged :: (GObject a, MonadIO m) => a -> TextBufferModifiedChangedCallback -> m SignalHandlerId
afterTextBufferModifiedChanged obj cb = connectTextBufferModifiedChanged obj cb SignalConnectAfter

connectTextBufferModifiedChanged :: (GObject a, MonadIO m) =>
                                    a -> TextBufferModifiedChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferModifiedChanged obj cb after = liftIO $ do
    cb' <- mkTextBufferModifiedChangedCallback (textBufferModifiedChangedCallbackWrapper cb)
    connectSignalFunPtr obj "modified-changed" cb' after

-- signal TextBuffer::paste-done
type TextBufferPasteDoneCallback =
    Clipboard ->
    IO ()

noTextBufferPasteDoneCallback :: Maybe TextBufferPasteDoneCallback
noTextBufferPasteDoneCallback = Nothing

type TextBufferPasteDoneCallbackC =
    Ptr () ->                               -- object
    Ptr Clipboard ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferPasteDoneCallback :: TextBufferPasteDoneCallbackC -> IO (FunPtr TextBufferPasteDoneCallbackC)

textBufferPasteDoneClosure :: TextBufferPasteDoneCallback -> IO Closure
textBufferPasteDoneClosure cb = newCClosure =<< mkTextBufferPasteDoneCallback wrapped
    where wrapped = textBufferPasteDoneCallbackWrapper cb

textBufferPasteDoneCallbackWrapper ::
    TextBufferPasteDoneCallback ->
    Ptr () ->
    Ptr Clipboard ->
    Ptr () ->
    IO ()
textBufferPasteDoneCallbackWrapper _cb _ clipboard _ = do
    clipboard' <- (newObject Clipboard) clipboard
    _cb  clipboard'

onTextBufferPasteDone :: (GObject a, MonadIO m) => a -> TextBufferPasteDoneCallback -> m SignalHandlerId
onTextBufferPasteDone obj cb = liftIO $ connectTextBufferPasteDone obj cb SignalConnectBefore
afterTextBufferPasteDone :: (GObject a, MonadIO m) => a -> TextBufferPasteDoneCallback -> m SignalHandlerId
afterTextBufferPasteDone obj cb = connectTextBufferPasteDone obj cb SignalConnectAfter

connectTextBufferPasteDone :: (GObject a, MonadIO m) =>
                              a -> TextBufferPasteDoneCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferPasteDone obj cb after = liftIO $ do
    cb' <- mkTextBufferPasteDoneCallback (textBufferPasteDoneCallbackWrapper cb)
    connectSignalFunPtr obj "paste-done" cb' after

-- signal TextBuffer::remove-tag
type TextBufferRemoveTagCallback =
    TextTag ->
    TextIter ->
    TextIter ->
    IO ()

noTextBufferRemoveTagCallback :: Maybe TextBufferRemoveTagCallback
noTextBufferRemoveTagCallback = Nothing

type TextBufferRemoveTagCallbackC =
    Ptr () ->                               -- object
    Ptr TextTag ->
    Ptr TextIter ->
    Ptr TextIter ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextBufferRemoveTagCallback :: TextBufferRemoveTagCallbackC -> IO (FunPtr TextBufferRemoveTagCallbackC)

textBufferRemoveTagClosure :: TextBufferRemoveTagCallback -> IO Closure
textBufferRemoveTagClosure cb = newCClosure =<< mkTextBufferRemoveTagCallback wrapped
    where wrapped = textBufferRemoveTagCallbackWrapper cb

textBufferRemoveTagCallbackWrapper ::
    TextBufferRemoveTagCallback ->
    Ptr () ->
    Ptr TextTag ->
    Ptr TextIter ->
    Ptr TextIter ->
    Ptr () ->
    IO ()
textBufferRemoveTagCallbackWrapper _cb _ tag start end _ = do
    tag' <- (newObject TextTag) tag
    start' <- (newBoxed TextIter) start
    end' <- (newBoxed TextIter) end
    _cb  tag' start' end'

onTextBufferRemoveTag :: (GObject a, MonadIO m) => a -> TextBufferRemoveTagCallback -> m SignalHandlerId
onTextBufferRemoveTag obj cb = liftIO $ connectTextBufferRemoveTag obj cb SignalConnectBefore
afterTextBufferRemoveTag :: (GObject a, MonadIO m) => a -> TextBufferRemoveTagCallback -> m SignalHandlerId
afterTextBufferRemoveTag obj cb = connectTextBufferRemoveTag obj cb SignalConnectAfter

connectTextBufferRemoveTag :: (GObject a, MonadIO m) =>
                              a -> TextBufferRemoveTagCallback -> SignalConnectMode -> m SignalHandlerId
connectTextBufferRemoveTag obj cb after = liftIO $ do
    cb' <- mkTextBufferRemoveTagCallback (textBufferRemoveTagCallbackWrapper cb)
    connectSignalFunPtr obj "remove-tag" cb' after

-- callback TextBufferDeserializeFunc
textBufferDeserializeFuncClosure :: TextBufferDeserializeFunc -> IO Closure
textBufferDeserializeFuncClosure cb = newCClosure =<< mkTextBufferDeserializeFunc wrapped
    where wrapped = textBufferDeserializeFuncWrapper Nothing cb

type TextBufferDeserializeFuncC =
    Ptr TextBuffer ->
    Ptr TextBuffer ->
    Ptr TextIter ->
    Ptr Word8 ->
    Word64 ->
    CInt ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkTextBufferDeserializeFunc :: TextBufferDeserializeFuncC -> IO (FunPtr TextBufferDeserializeFuncC)

type TextBufferDeserializeFunc =
    TextBuffer ->
    TextBuffer ->
    TextIter ->
    ByteString ->
    Bool ->
    IO Bool

noTextBufferDeserializeFunc :: Maybe TextBufferDeserializeFunc
noTextBufferDeserializeFunc = Nothing

textBufferDeserializeFuncWrapper ::
    Maybe (Ptr (FunPtr (TextBufferDeserializeFuncC))) ->
    TextBufferDeserializeFunc ->
    Ptr TextBuffer ->
    Ptr TextBuffer ->
    Ptr TextIter ->
    Ptr Word8 ->
    Word64 ->
    CInt ->
    Ptr () ->
    IO CInt
textBufferDeserializeFuncWrapper funptrptr _cb register_buffer content_buffer iter data_ length_ create_tags _ = do
    register_buffer' <- (newObject TextBuffer) register_buffer
    content_buffer' <- (newObject TextBuffer) content_buffer
    iter' <- (newBoxed TextIter) iter
    data_' <- (unpackByteStringWithLength length_) data_
    let create_tags' = (/= 0) create_tags
    result <- _cb  register_buffer' content_buffer' iter' data_' create_tags'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- callback TextBufferSerializeFunc
textBufferSerializeFuncClosure :: TextBufferSerializeFunc -> IO Closure
textBufferSerializeFuncClosure cb = newCClosure =<< mkTextBufferSerializeFunc wrapped
    where wrapped = textBufferSerializeFuncWrapper Nothing cb

type TextBufferSerializeFuncC =
    Ptr TextBuffer ->
    Ptr TextBuffer ->
    Ptr TextIter ->
    Ptr TextIter ->
    Word64 ->
    Ptr () ->
    IO Word8

foreign import ccall "wrapper"
    mkTextBufferSerializeFunc :: TextBufferSerializeFuncC -> IO (FunPtr TextBufferSerializeFuncC)

type TextBufferSerializeFunc =
    TextBuffer ->
    TextBuffer ->
    TextIter ->
    TextIter ->
    Word64 ->
    IO Word8

noTextBufferSerializeFunc :: Maybe TextBufferSerializeFunc
noTextBufferSerializeFunc = Nothing

textBufferSerializeFuncWrapper ::
    Maybe (Ptr (FunPtr (TextBufferSerializeFuncC))) ->
    TextBufferSerializeFunc ->
    Ptr TextBuffer ->
    Ptr TextBuffer ->
    Ptr TextIter ->
    Ptr TextIter ->
    Word64 ->
    Ptr () ->
    IO Word8
textBufferSerializeFuncWrapper funptrptr _cb register_buffer content_buffer start end length_ _ = do
    register_buffer' <- (newObject TextBuffer) register_buffer
    content_buffer' <- (newObject TextBuffer) content_buffer
    start' <- (newBoxed TextIter) start
    end' <- (newBoxed TextIter) end
    result <- _cb  register_buffer' content_buffer' start' end' length_
    maybeReleaseFunPtr funptrptr
    return result

-- Enum TextBufferTargetInfo

data TextBufferTargetInfo = 
      TextBufferTargetInfoBufferContents
    | TextBufferTargetInfoRichText
    | TextBufferTargetInfoText
    | AnotherTextBufferTargetInfo Int
    deriving (Show, Eq)

instance Enum TextBufferTargetInfo where
    fromEnum TextBufferTargetInfoBufferContents = -1
    fromEnum TextBufferTargetInfoRichText = -2
    fromEnum TextBufferTargetInfoText = -3
    fromEnum (AnotherTextBufferTargetInfo k) = k

    toEnum -3 = TextBufferTargetInfoText
    toEnum -2 = TextBufferTargetInfoRichText
    toEnum -1 = TextBufferTargetInfoBufferContents
    toEnum k = AnotherTextBufferTargetInfo k

foreign import ccall "gtk_text_buffer_target_info_get_type" c_gtk_text_buffer_target_info_get_type :: 
    IO GType

instance BoxedEnum TextBufferTargetInfo where
    boxedEnumType _ = c_gtk_text_buffer_target_info_get_type

-- object TextCellAccessible 
newtype TextCellAccessible = TextCellAccessible (ForeignPtr TextCellAccessible)
noTextCellAccessible :: Maybe TextCellAccessible
noTextCellAccessible = Nothing

foreign import ccall "gtk_text_cell_accessible_get_type"
    c_gtk_text_cell_accessible_get_type :: IO GType

type instance ParentTypes TextCellAccessible = '[RendererCellAccessible, CellAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Text]

instance GObject TextCellAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_text_cell_accessible_get_type
    

class GObject o => TextCellAccessibleK o
instance (GObject o, IsDescendantOf TextCellAccessible o) => TextCellAccessibleK o

toTextCellAccessible :: TextCellAccessibleK o => o -> IO TextCellAccessible
toTextCellAccessible = unsafeCastTo TextCellAccessible

-- callback TextCharPredicate
textCharPredicateClosure :: TextCharPredicate -> IO Closure
textCharPredicateClosure cb = newCClosure =<< mkTextCharPredicate wrapped
    where wrapped = textCharPredicateWrapper Nothing cb

type TextCharPredicateC =
    CInt ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkTextCharPredicate :: TextCharPredicateC -> IO (FunPtr TextCharPredicateC)

type TextCharPredicate =
    Char ->
    IO Bool

noTextCharPredicate :: Maybe TextCharPredicate
noTextCharPredicate = Nothing

textCharPredicateWrapper ::
    Maybe (Ptr (FunPtr (TextCharPredicateC))) ->
    TextCharPredicate ->
    CInt ->
    Ptr () ->
    IO CInt
textCharPredicateWrapper funptrptr _cb ch _ = do
    let ch' = (chr . fromIntegral) ch
    result <- _cb  ch'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- object TextChildAnchor 
newtype TextChildAnchor = TextChildAnchor (ForeignPtr TextChildAnchor)
noTextChildAnchor :: Maybe TextChildAnchor
noTextChildAnchor = Nothing

foreign import ccall "gtk_text_child_anchor_get_type"
    c_gtk_text_child_anchor_get_type :: IO GType

type instance ParentTypes TextChildAnchor = '[GObject.Object]

instance GObject TextChildAnchor where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_text_child_anchor_get_type
    

class GObject o => TextChildAnchorK o
instance (GObject o, IsDescendantOf TextChildAnchor o) => TextChildAnchorK o

toTextChildAnchor :: TextChildAnchorK o => o -> IO TextChildAnchor
toTextChildAnchor = unsafeCastTo TextChildAnchor

-- method TextChildAnchor::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TextChildAnchor"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_child_anchor_new" gtk_text_child_anchor_new :: 
    IO (Ptr TextChildAnchor)


textChildAnchorNew ::
    (MonadIO m) =>
    m TextChildAnchor
textChildAnchorNew  = liftIO $ do
    result <- gtk_text_child_anchor_new
    checkUnexpectedReturnNULL "gtk_text_child_anchor_new" result
    result' <- (wrapObject TextChildAnchor) result
    return result'

-- method TextChildAnchor::get_deleted
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextChildAnchor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextChildAnchor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_child_anchor_get_deleted" gtk_text_child_anchor_get_deleted :: 
    Ptr TextChildAnchor ->                  -- _obj : TInterface "Gtk" "TextChildAnchor"
    IO CInt


textChildAnchorGetDeleted ::
    (MonadIO m, TextChildAnchorK a) =>
    a ->                                    -- _obj
    m Bool
textChildAnchorGetDeleted _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_child_anchor_get_deleted _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextChildAnchor::get_widgets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextChildAnchor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextChildAnchor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "Widget")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_child_anchor_get_widgets" gtk_text_child_anchor_get_widgets :: 
    Ptr TextChildAnchor ->                  -- _obj : TInterface "Gtk" "TextChildAnchor"
    IO (Ptr (GList (Ptr Widget)))


textChildAnchorGetWidgets ::
    (MonadIO m, TextChildAnchorK a) =>
    a ->                                    -- _obj
    m [Widget]
textChildAnchorGetWidgets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_child_anchor_get_widgets _obj'
    checkUnexpectedReturnNULL "gtk_text_child_anchor_get_widgets" result
    result' <- unpackGList result
    result'' <- mapM (newObject Widget) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- Enum TextDirection

data TextDirection = 
      TextDirectionNone
    | TextDirectionLtr
    | TextDirectionRtl
    | AnotherTextDirection Int
    deriving (Show, Eq)

instance Enum TextDirection where
    fromEnum TextDirectionNone = 0
    fromEnum TextDirectionLtr = 1
    fromEnum TextDirectionRtl = 2
    fromEnum (AnotherTextDirection k) = k

    toEnum 0 = TextDirectionNone
    toEnum 1 = TextDirectionLtr
    toEnum 2 = TextDirectionRtl
    toEnum k = AnotherTextDirection k

foreign import ccall "gtk_text_direction_get_type" c_gtk_text_direction_get_type :: 
    IO GType

instance BoxedEnum TextDirection where
    boxedEnumType _ = c_gtk_text_direction_get_type

-- Enum TextExtendSelection

data TextExtendSelection = 
      TextExtendSelectionWord
    | TextExtendSelectionLine
    | AnotherTextExtendSelection Int
    deriving (Show, Eq)

instance Enum TextExtendSelection where
    fromEnum TextExtendSelectionWord = 0
    fromEnum TextExtendSelectionLine = 1
    fromEnum (AnotherTextExtendSelection k) = k

    toEnum 0 = TextExtendSelectionWord
    toEnum 1 = TextExtendSelectionLine
    toEnum k = AnotherTextExtendSelection k

foreign import ccall "gtk_text_extend_selection_get_type" c_gtk_text_extend_selection_get_type :: 
    IO GType

instance BoxedEnum TextExtendSelection where
    boxedEnumType _ = c_gtk_text_extend_selection_get_type

-- struct TextIter
newtype TextIter = TextIter (ForeignPtr TextIter)
noTextIter :: Maybe TextIter
noTextIter = Nothing

foreign import ccall "gtk_text_iter_get_type" c_gtk_text_iter_get_type :: 
    IO GType

instance BoxedObject TextIter where
    boxedType _ = c_gtk_text_iter_get_type

-- method TextIter::assign
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "other", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "other", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_assign" gtk_text_iter_assign :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- other : TInterface "Gtk" "TextIter"
    IO ()


textIterAssign ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    TextIter ->                             -- other
    m ()
textIterAssign _obj other = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let other' = unsafeManagedPtrGetPtr other
    gtk_text_iter_assign _obj' other'
    touchManagedPtr _obj
    touchManagedPtr other
    return ()

-- method TextIter::backward_char
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_char" gtk_text_iter_backward_char :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterBackwardChar ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterBackwardChar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_char _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_chars" gtk_text_iter_backward_chars :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterBackwardChars ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterBackwardChars _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_chars _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_cursor_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_cursor_position" gtk_text_iter_backward_cursor_position :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterBackwardCursorPosition ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterBackwardCursorPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_cursor_position _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_cursor_positions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_cursor_positions" gtk_text_iter_backward_cursor_positions :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterBackwardCursorPositions ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterBackwardCursorPositions _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_cursor_positions _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_find_char
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pred", argType = TInterface "Gtk" "TextCharPredicate", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pred", argType = TInterface "Gtk" "TextCharPredicate", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_find_char" gtk_text_iter_backward_find_char :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    FunPtr TextCharPredicateC ->            -- pred : TInterface "Gtk" "TextCharPredicate"
    Ptr () ->                               -- user_data : TBasicType TVoid
    Ptr TextIter ->                         -- limit : TInterface "Gtk" "TextIter"
    IO CInt


textIterBackwardFindChar ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    TextCharPredicate ->                    -- pred
    Maybe (TextIter) ->                     -- limit
    m Bool
textIterBackwardFindChar _obj pred limit = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    pred' <- mkTextCharPredicate (textCharPredicateWrapper Nothing pred)
    maybeLimit <- case limit of
        Nothing -> return nullPtr
        Just jLimit -> do
            let jLimit' = unsafeManagedPtrGetPtr jLimit
            return jLimit'
    let user_data = nullPtr
    result <- gtk_text_iter_backward_find_char _obj' pred' user_data maybeLimit
    let result' = (/= 0) result
    safeFreeFunPtr $ castFunPtrToPtr pred'
    touchManagedPtr _obj
    whenJust limit touchManagedPtr
    return result'

-- method TextIter::backward_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_line" gtk_text_iter_backward_line :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterBackwardLine ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterBackwardLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_line _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_lines" gtk_text_iter_backward_lines :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterBackwardLines ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterBackwardLines _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_lines _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_search
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "TextSearchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "match_start", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "match_end", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "TextSearchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_search" gtk_text_iter_backward_search :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    CString ->                              -- str : TBasicType TUTF8
    CUInt ->                                -- flags : TInterface "Gtk" "TextSearchFlags"
    Ptr TextIter ->                         -- match_start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- match_end : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- limit : TInterface "Gtk" "TextIter"
    IO CInt


textIterBackwardSearch ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    T.Text ->                               -- str
    [TextSearchFlags] ->                    -- flags
    Maybe (TextIter) ->                     -- limit
    m (Bool,TextIter,TextIter)
textIterBackwardSearch _obj str flags limit = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    str' <- textToCString str
    let flags' = gflagsToWord flags
    match_start <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    match_end <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    maybeLimit <- case limit of
        Nothing -> return nullPtr
        Just jLimit -> do
            let jLimit' = unsafeManagedPtrGetPtr jLimit
            return jLimit'
    result <- gtk_text_iter_backward_search _obj' str' flags' match_start match_end maybeLimit
    let result' = (/= 0) result
    match_start' <- (wrapBoxed TextIter) match_start
    match_end' <- (wrapBoxed TextIter) match_end
    touchManagedPtr _obj
    whenJust limit touchManagedPtr
    freeMem str'
    return (result', match_start', match_end')

-- method TextIter::backward_sentence_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_sentence_start" gtk_text_iter_backward_sentence_start :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterBackwardSentenceStart ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterBackwardSentenceStart _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_sentence_start _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_sentence_starts
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_sentence_starts" gtk_text_iter_backward_sentence_starts :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterBackwardSentenceStarts ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterBackwardSentenceStarts _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_sentence_starts _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_to_tag_toggle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_to_tag_toggle" gtk_text_iter_backward_to_tag_toggle :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextTag ->                          -- tag : TInterface "Gtk" "TextTag"
    IO CInt


textIterBackwardToTagToggle ::
    (MonadIO m, TextTagK a) =>
    TextIter ->                             -- _obj
    Maybe (a) ->                            -- tag
    m Bool
textIterBackwardToTagToggle _obj tag = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    maybeTag <- case tag of
        Nothing -> return nullPtr
        Just jTag -> do
            let jTag' = unsafeManagedPtrCastPtr jTag
            return jTag'
    result <- gtk_text_iter_backward_to_tag_toggle _obj' maybeTag
    let result' = (/= 0) result
    touchManagedPtr _obj
    whenJust tag touchManagedPtr
    return result'

-- method TextIter::backward_visible_cursor_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_visible_cursor_position" gtk_text_iter_backward_visible_cursor_position :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterBackwardVisibleCursorPosition ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterBackwardVisibleCursorPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_visible_cursor_position _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_visible_cursor_positions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_visible_cursor_positions" gtk_text_iter_backward_visible_cursor_positions :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterBackwardVisibleCursorPositions ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterBackwardVisibleCursorPositions _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_visible_cursor_positions _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_visible_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_visible_line" gtk_text_iter_backward_visible_line :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterBackwardVisibleLine ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterBackwardVisibleLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_visible_line _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_visible_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_visible_lines" gtk_text_iter_backward_visible_lines :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterBackwardVisibleLines ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterBackwardVisibleLines _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_visible_lines _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_visible_word_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_visible_word_start" gtk_text_iter_backward_visible_word_start :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterBackwardVisibleWordStart ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterBackwardVisibleWordStart _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_visible_word_start _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_visible_word_starts
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_visible_word_starts" gtk_text_iter_backward_visible_word_starts :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterBackwardVisibleWordStarts ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterBackwardVisibleWordStarts _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_visible_word_starts _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_word_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_word_start" gtk_text_iter_backward_word_start :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterBackwardWordStart ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterBackwardWordStart _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_word_start _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::backward_word_starts
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_backward_word_starts" gtk_text_iter_backward_word_starts :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterBackwardWordStarts ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterBackwardWordStarts _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_backward_word_starts _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::begins_tag
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_begins_tag" gtk_text_iter_begins_tag :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextTag ->                          -- tag : TInterface "Gtk" "TextTag"
    IO CInt


textIterBeginsTag ::
    (MonadIO m, TextTagK a) =>
    TextIter ->                             -- _obj
    Maybe (a) ->                            -- tag
    m Bool
textIterBeginsTag _obj tag = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    maybeTag <- case tag of
        Nothing -> return nullPtr
        Just jTag -> do
            let jTag' = unsafeManagedPtrCastPtr jTag
            return jTag'
    result <- gtk_text_iter_begins_tag _obj' maybeTag
    let result' = (/= 0) result
    touchManagedPtr _obj
    whenJust tag touchManagedPtr
    return result'

-- method TextIter::can_insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editability", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_editability", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_can_insert" gtk_text_iter_can_insert :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    CInt ->                                 -- default_editability : TBasicType TBoolean
    IO CInt


textIterCanInsert ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Bool ->                                 -- default_editability
    m Bool
textIterCanInsert _obj default_editability = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let default_editability' = (fromIntegral . fromEnum) default_editability
    result <- gtk_text_iter_can_insert _obj' default_editability'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::compare
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rhs", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rhs", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_compare" gtk_text_iter_compare :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- rhs : TInterface "Gtk" "TextIter"
    IO Int32


textIterCompare ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    TextIter ->                             -- rhs
    m Int32
textIterCompare _obj rhs = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let rhs' = unsafeManagedPtrGetPtr rhs
    result <- gtk_text_iter_compare _obj' rhs'
    touchManagedPtr _obj
    touchManagedPtr rhs
    return result

-- method TextIter::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextIter"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_copy" gtk_text_iter_copy :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO (Ptr TextIter)


textIterCopy ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m TextIter
textIterCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_copy _obj'
    checkUnexpectedReturnNULL "gtk_text_iter_copy" result
    result' <- (wrapBoxed TextIter) result
    touchManagedPtr _obj
    return result'

-- method TextIter::editable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_editable" gtk_text_iter_editable :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    CInt ->                                 -- default_setting : TBasicType TBoolean
    IO CInt


textIterEditable ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Bool ->                                 -- default_setting
    m Bool
textIterEditable _obj default_setting = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let default_setting' = (fromIntegral . fromEnum) default_setting
    result <- gtk_text_iter_editable _obj' default_setting'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::ends_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_ends_line" gtk_text_iter_ends_line :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterEndsLine ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterEndsLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_ends_line _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::ends_sentence
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_ends_sentence" gtk_text_iter_ends_sentence :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterEndsSentence ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterEndsSentence _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_ends_sentence _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::ends_tag
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_ends_tag" gtk_text_iter_ends_tag :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextTag ->                          -- tag : TInterface "Gtk" "TextTag"
    IO CInt


textIterEndsTag ::
    (MonadIO m, TextTagK a) =>
    TextIter ->                             -- _obj
    Maybe (a) ->                            -- tag
    m Bool
textIterEndsTag _obj tag = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    maybeTag <- case tag of
        Nothing -> return nullPtr
        Just jTag -> do
            let jTag' = unsafeManagedPtrCastPtr jTag
            return jTag'
    result <- gtk_text_iter_ends_tag _obj' maybeTag
    let result' = (/= 0) result
    touchManagedPtr _obj
    whenJust tag touchManagedPtr
    return result'

-- method TextIter::ends_word
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_ends_word" gtk_text_iter_ends_word :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterEndsWord ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterEndsWord _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_ends_word _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::equal
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rhs", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rhs", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_equal" gtk_text_iter_equal :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- rhs : TInterface "Gtk" "TextIter"
    IO CInt


textIterEqual ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    TextIter ->                             -- rhs
    m Bool
textIterEqual _obj rhs = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let rhs' = unsafeManagedPtrGetPtr rhs
    result <- gtk_text_iter_equal _obj' rhs'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr rhs
    return result'

-- method TextIter::forward_char
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_char" gtk_text_iter_forward_char :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterForwardChar ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterForwardChar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_char _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_chars
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_chars" gtk_text_iter_forward_chars :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterForwardChars ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterForwardChars _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_chars _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_cursor_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_cursor_position" gtk_text_iter_forward_cursor_position :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterForwardCursorPosition ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterForwardCursorPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_cursor_position _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_cursor_positions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_cursor_positions" gtk_text_iter_forward_cursor_positions :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterForwardCursorPositions ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterForwardCursorPositions _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_cursor_positions _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_find_char
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pred", argType = TInterface "Gtk" "TextCharPredicate", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pred", argType = TInterface "Gtk" "TextCharPredicate", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_find_char" gtk_text_iter_forward_find_char :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    FunPtr TextCharPredicateC ->            -- pred : TInterface "Gtk" "TextCharPredicate"
    Ptr () ->                               -- user_data : TBasicType TVoid
    Ptr TextIter ->                         -- limit : TInterface "Gtk" "TextIter"
    IO CInt


textIterForwardFindChar ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    TextCharPredicate ->                    -- pred
    Maybe (TextIter) ->                     -- limit
    m Bool
textIterForwardFindChar _obj pred limit = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    pred' <- mkTextCharPredicate (textCharPredicateWrapper Nothing pred)
    maybeLimit <- case limit of
        Nothing -> return nullPtr
        Just jLimit -> do
            let jLimit' = unsafeManagedPtrGetPtr jLimit
            return jLimit'
    let user_data = nullPtr
    result <- gtk_text_iter_forward_find_char _obj' pred' user_data maybeLimit
    let result' = (/= 0) result
    safeFreeFunPtr $ castFunPtrToPtr pred'
    touchManagedPtr _obj
    whenJust limit touchManagedPtr
    return result'

-- method TextIter::forward_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_line" gtk_text_iter_forward_line :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterForwardLine ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterForwardLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_line _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_lines" gtk_text_iter_forward_lines :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterForwardLines ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterForwardLines _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_lines _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_search
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "TextSearchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "match_start", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "match_end", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "TextSearchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_search" gtk_text_iter_forward_search :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    CString ->                              -- str : TBasicType TUTF8
    CUInt ->                                -- flags : TInterface "Gtk" "TextSearchFlags"
    Ptr TextIter ->                         -- match_start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- match_end : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- limit : TInterface "Gtk" "TextIter"
    IO CInt


textIterForwardSearch ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    T.Text ->                               -- str
    [TextSearchFlags] ->                    -- flags
    Maybe (TextIter) ->                     -- limit
    m (Bool,TextIter,TextIter)
textIterForwardSearch _obj str flags limit = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    str' <- textToCString str
    let flags' = gflagsToWord flags
    match_start <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    match_end <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    maybeLimit <- case limit of
        Nothing -> return nullPtr
        Just jLimit -> do
            let jLimit' = unsafeManagedPtrGetPtr jLimit
            return jLimit'
    result <- gtk_text_iter_forward_search _obj' str' flags' match_start match_end maybeLimit
    let result' = (/= 0) result
    match_start' <- (wrapBoxed TextIter) match_start
    match_end' <- (wrapBoxed TextIter) match_end
    touchManagedPtr _obj
    whenJust limit touchManagedPtr
    freeMem str'
    return (result', match_start', match_end')

-- method TextIter::forward_sentence_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_sentence_end" gtk_text_iter_forward_sentence_end :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterForwardSentenceEnd ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterForwardSentenceEnd _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_sentence_end _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_sentence_ends
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_sentence_ends" gtk_text_iter_forward_sentence_ends :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterForwardSentenceEnds ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterForwardSentenceEnds _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_sentence_ends _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_to_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_to_end" gtk_text_iter_forward_to_end :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO ()


textIterForwardToEnd ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m ()
textIterForwardToEnd _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_text_iter_forward_to_end _obj'
    touchManagedPtr _obj
    return ()

-- method TextIter::forward_to_line_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_to_line_end" gtk_text_iter_forward_to_line_end :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterForwardToLineEnd ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterForwardToLineEnd _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_to_line_end _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_to_tag_toggle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_to_tag_toggle" gtk_text_iter_forward_to_tag_toggle :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextTag ->                          -- tag : TInterface "Gtk" "TextTag"
    IO CInt


textIterForwardToTagToggle ::
    (MonadIO m, TextTagK a) =>
    TextIter ->                             -- _obj
    Maybe (a) ->                            -- tag
    m Bool
textIterForwardToTagToggle _obj tag = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    maybeTag <- case tag of
        Nothing -> return nullPtr
        Just jTag -> do
            let jTag' = unsafeManagedPtrCastPtr jTag
            return jTag'
    result <- gtk_text_iter_forward_to_tag_toggle _obj' maybeTag
    let result' = (/= 0) result
    touchManagedPtr _obj
    whenJust tag touchManagedPtr
    return result'

-- method TextIter::forward_visible_cursor_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_visible_cursor_position" gtk_text_iter_forward_visible_cursor_position :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterForwardVisibleCursorPosition ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterForwardVisibleCursorPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_visible_cursor_position _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_visible_cursor_positions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_visible_cursor_positions" gtk_text_iter_forward_visible_cursor_positions :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterForwardVisibleCursorPositions ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterForwardVisibleCursorPositions _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_visible_cursor_positions _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_visible_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_visible_line" gtk_text_iter_forward_visible_line :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterForwardVisibleLine ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterForwardVisibleLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_visible_line _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_visible_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_visible_lines" gtk_text_iter_forward_visible_lines :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterForwardVisibleLines ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterForwardVisibleLines _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_visible_lines _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_visible_word_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_visible_word_end" gtk_text_iter_forward_visible_word_end :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterForwardVisibleWordEnd ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterForwardVisibleWordEnd _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_visible_word_end _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_visible_word_ends
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_visible_word_ends" gtk_text_iter_forward_visible_word_ends :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterForwardVisibleWordEnds ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterForwardVisibleWordEnds _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_visible_word_ends _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_word_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_word_end" gtk_text_iter_forward_word_end :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterForwardWordEnd ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterForwardWordEnd _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_word_end _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::forward_word_ends
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_forward_word_ends" gtk_text_iter_forward_word_ends :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textIterForwardWordEnds ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- count
    m Bool
textIterForwardWordEnds _obj count = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_forward_word_ends _obj' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_free" gtk_text_iter_free :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO ()


textIterFree ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m ()
textIterFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_text_iter_free _obj'
    touchManagedPtr _obj
    return ()

-- method TextIter::get_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "values", argType = TInterface "Gtk" "TextAttributes", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_attributes" gtk_text_iter_get_attributes :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextAttributes ->                   -- values : TInterface "Gtk" "TextAttributes"
    IO CInt


textIterGetAttributes ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m (Bool,TextAttributes)
textIterGetAttributes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    values <- callocBoxedBytes 168 :: IO (Ptr TextAttributes)
    result <- gtk_text_iter_get_attributes _obj' values
    let result' = (/= 0) result
    values' <- (wrapBoxed TextAttributes) values
    touchManagedPtr _obj
    return (result', values')

-- method TextIter::get_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextBuffer"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_buffer" gtk_text_iter_get_buffer :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO (Ptr TextBuffer)


textIterGetBuffer ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m TextBuffer
textIterGetBuffer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_buffer _obj'
    checkUnexpectedReturnNULL "gtk_text_iter_get_buffer" result
    result' <- (newObject TextBuffer) result
    touchManagedPtr _obj
    return result'

-- method TextIter::get_bytes_in_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_bytes_in_line" gtk_text_iter_get_bytes_in_line :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO Int32


textIterGetBytesInLine ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Int32
textIterGetBytesInLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_bytes_in_line _obj'
    touchManagedPtr _obj
    return result

-- method TextIter::get_char
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUniChar
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_char" gtk_text_iter_get_char :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterGetChar ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Char
textIterGetChar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_char _obj'
    let result' = (chr . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method TextIter::get_chars_in_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_chars_in_line" gtk_text_iter_get_chars_in_line :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO Int32


textIterGetCharsInLine ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Int32
textIterGetCharsInLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_chars_in_line _obj'
    touchManagedPtr _obj
    return result

-- method TextIter::get_child_anchor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextChildAnchor"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_child_anchor" gtk_text_iter_get_child_anchor :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO (Ptr TextChildAnchor)


textIterGetChildAnchor ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m TextChildAnchor
textIterGetChildAnchor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_child_anchor _obj'
    checkUnexpectedReturnNULL "gtk_text_iter_get_child_anchor" result
    result' <- (newObject TextChildAnchor) result
    touchManagedPtr _obj
    return result'

-- method TextIter::get_language
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Language"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_language" gtk_text_iter_get_language :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO (Ptr Pango.Language)


textIterGetLanguage ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Pango.Language
textIterGetLanguage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_language _obj'
    checkUnexpectedReturnNULL "gtk_text_iter_get_language" result
    result' <- (wrapBoxed Pango.Language) result
    touchManagedPtr _obj
    return result'

-- method TextIter::get_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_line" gtk_text_iter_get_line :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO Int32


textIterGetLine ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Int32
textIterGetLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_line _obj'
    touchManagedPtr _obj
    return result

-- method TextIter::get_line_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_line_index" gtk_text_iter_get_line_index :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO Int32


textIterGetLineIndex ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Int32
textIterGetLineIndex _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_line_index _obj'
    touchManagedPtr _obj
    return result

-- method TextIter::get_line_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_line_offset" gtk_text_iter_get_line_offset :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO Int32


textIterGetLineOffset ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Int32
textIterGetLineOffset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_line_offset _obj'
    touchManagedPtr _obj
    return result

-- method TextIter::get_marks
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "TextMark")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_marks" gtk_text_iter_get_marks :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO (Ptr (GSList (Ptr TextMark)))


textIterGetMarks ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m [TextMark]
textIterGetMarks _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_marks _obj'
    checkUnexpectedReturnNULL "gtk_text_iter_get_marks" result
    result' <- unpackGSList result
    result'' <- mapM (newObject TextMark) result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method TextIter::get_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_offset" gtk_text_iter_get_offset :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO Int32


textIterGetOffset ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Int32
textIterGetOffset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_offset _obj'
    touchManagedPtr _obj
    return result

-- method TextIter::get_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_pixbuf" gtk_text_iter_get_pixbuf :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO (Ptr GdkPixbuf.Pixbuf)


textIterGetPixbuf ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m GdkPixbuf.Pixbuf
textIterGetPixbuf _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_pixbuf _obj'
    checkUnexpectedReturnNULL "gtk_text_iter_get_pixbuf" result
    result' <- (newObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method TextIter::get_slice
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_slice" gtk_text_iter_get_slice :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO CString


textIterGetSlice ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    TextIter ->                             -- end
    m T.Text
textIterGetSlice _obj end = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let end' = unsafeManagedPtrGetPtr end
    result <- gtk_text_iter_get_slice _obj' end'
    checkUnexpectedReturnNULL "gtk_text_iter_get_slice" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    touchManagedPtr end
    return result'

-- method TextIter::get_tags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "TextTag")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_tags" gtk_text_iter_get_tags :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO (Ptr (GSList (Ptr TextTag)))


textIterGetTags ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m [TextTag]
textIterGetTags _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_tags _obj'
    checkUnexpectedReturnNULL "gtk_text_iter_get_tags" result
    result' <- unpackGSList result
    result'' <- mapM (newObject TextTag) result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method TextIter::get_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_text" gtk_text_iter_get_text :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO CString


textIterGetText ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    TextIter ->                             -- end
    m T.Text
textIterGetText _obj end = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let end' = unsafeManagedPtrGetPtr end
    result <- gtk_text_iter_get_text _obj' end'
    checkUnexpectedReturnNULL "gtk_text_iter_get_text" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    touchManagedPtr end
    return result'

-- method TextIter::get_toggled_tags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "toggled_on", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "toggled_on", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "TextTag")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_toggled_tags" gtk_text_iter_get_toggled_tags :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    CInt ->                                 -- toggled_on : TBasicType TBoolean
    IO (Ptr (GSList (Ptr TextTag)))


textIterGetToggledTags ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Bool ->                                 -- toggled_on
    m [TextTag]
textIterGetToggledTags _obj toggled_on = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let toggled_on' = (fromIntegral . fromEnum) toggled_on
    result <- gtk_text_iter_get_toggled_tags _obj' toggled_on'
    checkUnexpectedReturnNULL "gtk_text_iter_get_toggled_tags" result
    result' <- unpackGSList result
    result'' <- mapM (newObject TextTag) result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method TextIter::get_visible_line_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_visible_line_index" gtk_text_iter_get_visible_line_index :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO Int32


textIterGetVisibleLineIndex ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Int32
textIterGetVisibleLineIndex _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_visible_line_index _obj'
    touchManagedPtr _obj
    return result

-- method TextIter::get_visible_line_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_visible_line_offset" gtk_text_iter_get_visible_line_offset :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO Int32


textIterGetVisibleLineOffset ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Int32
textIterGetVisibleLineOffset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_get_visible_line_offset _obj'
    touchManagedPtr _obj
    return result

-- method TextIter::get_visible_slice
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_visible_slice" gtk_text_iter_get_visible_slice :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO CString


textIterGetVisibleSlice ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    TextIter ->                             -- end
    m T.Text
textIterGetVisibleSlice _obj end = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let end' = unsafeManagedPtrGetPtr end
    result <- gtk_text_iter_get_visible_slice _obj' end'
    checkUnexpectedReturnNULL "gtk_text_iter_get_visible_slice" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    touchManagedPtr end
    return result'

-- method TextIter::get_visible_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_get_visible_text" gtk_text_iter_get_visible_text :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO CString


textIterGetVisibleText ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    TextIter ->                             -- end
    m T.Text
textIterGetVisibleText _obj end = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let end' = unsafeManagedPtrGetPtr end
    result <- gtk_text_iter_get_visible_text _obj' end'
    checkUnexpectedReturnNULL "gtk_text_iter_get_visible_text" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    touchManagedPtr end
    return result'

-- method TextIter::has_tag
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_has_tag" gtk_text_iter_has_tag :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextTag ->                          -- tag : TInterface "Gtk" "TextTag"
    IO CInt


textIterHasTag ::
    (MonadIO m, TextTagK a) =>
    TextIter ->                             -- _obj
    a ->                                    -- tag
    m Bool
textIterHasTag _obj tag = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let tag' = unsafeManagedPtrCastPtr tag
    result <- gtk_text_iter_has_tag _obj' tag'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr tag
    return result'

-- method TextIter::in_range
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_in_range" gtk_text_iter_in_range :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- start : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- end : TInterface "Gtk" "TextIter"
    IO CInt


textIterInRange ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    TextIter ->                             -- start
    TextIter ->                             -- end
    m Bool
textIterInRange _obj start end = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let start' = unsafeManagedPtrGetPtr start
    let end' = unsafeManagedPtrGetPtr end
    result <- gtk_text_iter_in_range _obj' start' end'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr start
    touchManagedPtr end
    return result'

-- method TextIter::inside_sentence
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_inside_sentence" gtk_text_iter_inside_sentence :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterInsideSentence ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterInsideSentence _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_inside_sentence _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::inside_word
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_inside_word" gtk_text_iter_inside_word :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterInsideWord ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterInsideWord _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_inside_word _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::is_cursor_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_is_cursor_position" gtk_text_iter_is_cursor_position :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterIsCursorPosition ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterIsCursorPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_is_cursor_position _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::is_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_is_end" gtk_text_iter_is_end :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterIsEnd ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterIsEnd _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_is_end _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::is_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_is_start" gtk_text_iter_is_start :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterIsStart ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterIsStart _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_is_start _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::order
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "second", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "second", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_order" gtk_text_iter_order :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextIter ->                         -- second : TInterface "Gtk" "TextIter"
    IO ()


textIterOrder ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    TextIter ->                             -- second
    m ()
textIterOrder _obj second = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let second' = unsafeManagedPtrGetPtr second
    gtk_text_iter_order _obj' second'
    touchManagedPtr _obj
    touchManagedPtr second
    return ()

-- method TextIter::set_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line_number", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line_number", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_set_line" gtk_text_iter_set_line :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- line_number : TBasicType TInt32
    IO ()


textIterSetLine ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- line_number
    m ()
textIterSetLine _obj line_number = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_text_iter_set_line _obj' line_number
    touchManagedPtr _obj
    return ()

-- method TextIter::set_line_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "byte_on_line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "byte_on_line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_set_line_index" gtk_text_iter_set_line_index :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- byte_on_line : TBasicType TInt32
    IO ()


textIterSetLineIndex ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- byte_on_line
    m ()
textIterSetLineIndex _obj byte_on_line = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_text_iter_set_line_index _obj' byte_on_line
    touchManagedPtr _obj
    return ()

-- method TextIter::set_line_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "char_on_line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "char_on_line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_set_line_offset" gtk_text_iter_set_line_offset :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- char_on_line : TBasicType TInt32
    IO ()


textIterSetLineOffset ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- char_on_line
    m ()
textIterSetLineOffset _obj char_on_line = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_text_iter_set_line_offset _obj' char_on_line
    touchManagedPtr _obj
    return ()

-- method TextIter::set_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "char_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "char_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_set_offset" gtk_text_iter_set_offset :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- char_offset : TBasicType TInt32
    IO ()


textIterSetOffset ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- char_offset
    m ()
textIterSetOffset _obj char_offset = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_text_iter_set_offset _obj' char_offset
    touchManagedPtr _obj
    return ()

-- method TextIter::set_visible_line_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "byte_on_line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "byte_on_line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_set_visible_line_index" gtk_text_iter_set_visible_line_index :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- byte_on_line : TBasicType TInt32
    IO ()


textIterSetVisibleLineIndex ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- byte_on_line
    m ()
textIterSetVisibleLineIndex _obj byte_on_line = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_text_iter_set_visible_line_index _obj' byte_on_line
    touchManagedPtr _obj
    return ()

-- method TextIter::set_visible_line_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "char_on_line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "char_on_line", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_set_visible_line_offset" gtk_text_iter_set_visible_line_offset :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Int32 ->                                -- char_on_line : TBasicType TInt32
    IO ()


textIterSetVisibleLineOffset ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    Int32 ->                                -- char_on_line
    m ()
textIterSetVisibleLineOffset _obj char_on_line = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_text_iter_set_visible_line_offset _obj' char_on_line
    touchManagedPtr _obj
    return ()

-- method TextIter::starts_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_starts_line" gtk_text_iter_starts_line :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterStartsLine ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterStartsLine _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_starts_line _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::starts_sentence
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_starts_sentence" gtk_text_iter_starts_sentence :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterStartsSentence ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterStartsSentence _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_starts_sentence _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::starts_word
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_starts_word" gtk_text_iter_starts_word :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    IO CInt


textIterStartsWord ::
    (MonadIO m) =>
    TextIter ->                             -- _obj
    m Bool
textIterStartsWord _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_text_iter_starts_word _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextIter::toggles_tag
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_iter_toggles_tag" gtk_text_iter_toggles_tag :: 
    Ptr TextIter ->                         -- _obj : TInterface "Gtk" "TextIter"
    Ptr TextTag ->                          -- tag : TInterface "Gtk" "TextTag"
    IO CInt


textIterTogglesTag ::
    (MonadIO m, TextTagK a) =>
    TextIter ->                             -- _obj
    Maybe (a) ->                            -- tag
    m Bool
textIterTogglesTag _obj tag = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    maybeTag <- case tag of
        Nothing -> return nullPtr
        Just jTag -> do
            let jTag' = unsafeManagedPtrCastPtr jTag
            return jTag'
    result <- gtk_text_iter_toggles_tag _obj' maybeTag
    let result' = (/= 0) result
    touchManagedPtr _obj
    whenJust tag touchManagedPtr
    return result'

-- object TextMark 
newtype TextMark = TextMark (ForeignPtr TextMark)
noTextMark :: Maybe TextMark
noTextMark = Nothing

foreign import ccall "gtk_text_mark_get_type"
    c_gtk_text_mark_get_type :: IO GType

type instance ParentTypes TextMark = '[GObject.Object]

instance GObject TextMark where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_text_mark_get_type
    

class GObject o => TextMarkK o
instance (GObject o, IsDescendantOf TextMark o) => TextMarkK o

toTextMark :: TextMarkK o => o -> IO TextMark
toTextMark = unsafeCastTo TextMark

-- method TextMark::new
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_gravity", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_gravity", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextMark"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_mark_new" gtk_text_mark_new :: 
    CString ->                              -- name : TBasicType TUTF8
    CInt ->                                 -- left_gravity : TBasicType TBoolean
    IO (Ptr TextMark)


textMarkNew ::
    (MonadIO m) =>
    Maybe (T.Text) ->                       -- name
    Bool ->                                 -- left_gravity
    m TextMark
textMarkNew name left_gravity = liftIO $ do
    maybeName <- case name of
        Nothing -> return nullPtr
        Just jName -> do
            jName' <- textToCString jName
            return jName'
    let left_gravity' = (fromIntegral . fromEnum) left_gravity
    result <- gtk_text_mark_new maybeName left_gravity'
    checkUnexpectedReturnNULL "gtk_text_mark_new" result
    result' <- (wrapObject TextMark) result
    freeMem maybeName
    return result'

-- method TextMark::get_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextBuffer"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_mark_get_buffer" gtk_text_mark_get_buffer :: 
    Ptr TextMark ->                         -- _obj : TInterface "Gtk" "TextMark"
    IO (Ptr TextBuffer)


textMarkGetBuffer ::
    (MonadIO m, TextMarkK a) =>
    a ->                                    -- _obj
    m TextBuffer
textMarkGetBuffer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_mark_get_buffer _obj'
    checkUnexpectedReturnNULL "gtk_text_mark_get_buffer" result
    result' <- (newObject TextBuffer) result
    touchManagedPtr _obj
    return result'

-- method TextMark::get_deleted
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_mark_get_deleted" gtk_text_mark_get_deleted :: 
    Ptr TextMark ->                         -- _obj : TInterface "Gtk" "TextMark"
    IO CInt


textMarkGetDeleted ::
    (MonadIO m, TextMarkK a) =>
    a ->                                    -- _obj
    m Bool
textMarkGetDeleted _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_mark_get_deleted _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextMark::get_left_gravity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_mark_get_left_gravity" gtk_text_mark_get_left_gravity :: 
    Ptr TextMark ->                         -- _obj : TInterface "Gtk" "TextMark"
    IO CInt


textMarkGetLeftGravity ::
    (MonadIO m, TextMarkK a) =>
    a ->                                    -- _obj
    m Bool
textMarkGetLeftGravity _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_mark_get_left_gravity _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextMark::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_mark_get_name" gtk_text_mark_get_name :: 
    Ptr TextMark ->                         -- _obj : TInterface "Gtk" "TextMark"
    IO CString


textMarkGetName ::
    (MonadIO m, TextMarkK a) =>
    a ->                                    -- _obj
    m T.Text
textMarkGetName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_mark_get_name _obj'
    checkUnexpectedReturnNULL "gtk_text_mark_get_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method TextMark::get_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_mark_get_visible" gtk_text_mark_get_visible :: 
    Ptr TextMark ->                         -- _obj : TInterface "Gtk" "TextMark"
    IO CInt


textMarkGetVisible ::
    (MonadIO m, TextMarkK a) =>
    a ->                                    -- _obj
    m Bool
textMarkGetVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_mark_get_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextMark::set_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_mark_set_visible" gtk_text_mark_set_visible :: 
    Ptr TextMark ->                         -- _obj : TInterface "Gtk" "TextMark"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


textMarkSetVisible ::
    (MonadIO m, TextMarkK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
textMarkSetVisible _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_text_mark_set_visible _obj' setting'
    touchManagedPtr _obj
    return ()

-- Flags TextSearchFlags

data TextSearchFlags = 
      TextSearchFlagsVisibleOnly
    | TextSearchFlagsTextOnly
    | TextSearchFlagsCaseInsensitive
    | AnotherTextSearchFlags Int
    deriving (Show, Eq)

instance Enum TextSearchFlags where
    fromEnum TextSearchFlagsVisibleOnly = 1
    fromEnum TextSearchFlagsTextOnly = 2
    fromEnum TextSearchFlagsCaseInsensitive = 4
    fromEnum (AnotherTextSearchFlags k) = k

    toEnum 1 = TextSearchFlagsVisibleOnly
    toEnum 2 = TextSearchFlagsTextOnly
    toEnum 4 = TextSearchFlagsCaseInsensitive
    toEnum k = AnotherTextSearchFlags k

foreign import ccall "gtk_text_search_flags_get_type" c_gtk_text_search_flags_get_type :: 
    IO GType

instance BoxedEnum TextSearchFlags where
    boxedEnumType _ = c_gtk_text_search_flags_get_type

instance IsGFlag TextSearchFlags

-- object TextTag 
newtype TextTag = TextTag (ForeignPtr TextTag)
noTextTag :: Maybe TextTag
noTextTag = Nothing

foreign import ccall "gtk_text_tag_get_type"
    c_gtk_text_tag_get_type :: IO GType

type instance ParentTypes TextTag = '[GObject.Object]

instance GObject TextTag where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_text_tag_get_type
    

class GObject o => TextTagK o
instance (GObject o, IsDescendantOf TextTag o) => TextTagK o

toTextTag :: TextTagK o => o -> IO TextTag
toTextTag = unsafeCastTo TextTag

-- method TextTag::new
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextTag"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_tag_new" gtk_text_tag_new :: 
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr TextTag)


textTagNew ::
    (MonadIO m) =>
    Maybe (T.Text) ->                       -- name
    m TextTag
textTagNew name = liftIO $ do
    maybeName <- case name of
        Nothing -> return nullPtr
        Just jName -> do
            jName' <- textToCString jName
            return jName'
    result <- gtk_text_tag_new maybeName
    checkUnexpectedReturnNULL "gtk_text_tag_new" result
    result' <- (wrapObject TextTag) result
    freeMem maybeName
    return result'

-- method TextTag::event
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event_object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event_object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_tag_event" gtk_text_tag_event :: 
    Ptr TextTag ->                          -- _obj : TInterface "Gtk" "TextTag"
    Ptr GObject.Object ->                   -- event_object : TInterface "GObject" "Object"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    IO CInt


textTagEvent ::
    (MonadIO m, TextTagK a, GObject.ObjectK b) =>
    a ->                                    -- _obj
    b ->                                    -- event_object
    Gdk.Event ->                            -- event
    TextIter ->                             -- iter
    m Bool
textTagEvent _obj event_object event iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event_object' = unsafeManagedPtrCastPtr event_object
    let event' = unsafeManagedPtrGetPtr event
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_text_tag_event _obj' event_object' event' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event_object
    touchManagedPtr event
    touchManagedPtr iter
    return result'

-- method TextTag::get_priority
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_tag_get_priority" gtk_text_tag_get_priority :: 
    Ptr TextTag ->                          -- _obj : TInterface "Gtk" "TextTag"
    IO Int32


textTagGetPriority ::
    (MonadIO m, TextTagK a) =>
    a ->                                    -- _obj
    m Int32
textTagGetPriority _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_tag_get_priority _obj'
    touchManagedPtr _obj
    return result

-- method TextTag::set_priority
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_tag_set_priority" gtk_text_tag_set_priority :: 
    Ptr TextTag ->                          -- _obj : TInterface "Gtk" "TextTag"
    Int32 ->                                -- priority : TBasicType TInt32
    IO ()


textTagSetPriority ::
    (MonadIO m, TextTagK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- priority
    m ()
textTagSetPriority _obj priority = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_tag_set_priority _obj' priority
    touchManagedPtr _obj
    return ()

-- signal TextTag::event
type TextTagEventCallback =
    GObject.Object ->
    Gdk.Event ->
    TextIter ->
    IO Bool

noTextTagEventCallback :: Maybe TextTagEventCallback
noTextTagEventCallback = Nothing

type TextTagEventCallbackC =
    Ptr () ->                               -- object
    Ptr GObject.Object ->
    Ptr Gdk.Event ->
    Ptr TextIter ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTextTagEventCallback :: TextTagEventCallbackC -> IO (FunPtr TextTagEventCallbackC)

textTagEventClosure :: TextTagEventCallback -> IO Closure
textTagEventClosure cb = newCClosure =<< mkTextTagEventCallback wrapped
    where wrapped = textTagEventCallbackWrapper cb

textTagEventCallbackWrapper ::
    TextTagEventCallback ->
    Ptr () ->
    Ptr GObject.Object ->
    Ptr Gdk.Event ->
    Ptr TextIter ->
    Ptr () ->
    IO CInt
textTagEventCallbackWrapper _cb _ object event iter _ = do
    object' <- (newObject GObject.Object) object
    event' <- (newBoxed Gdk.Event) event
    iter' <- (newBoxed TextIter) iter
    result <- _cb  object' event' iter'
    let result' = (fromIntegral . fromEnum) result
    return result'

onTextTagEvent :: (GObject a, MonadIO m) => a -> TextTagEventCallback -> m SignalHandlerId
onTextTagEvent obj cb = liftIO $ connectTextTagEvent obj cb SignalConnectBefore
afterTextTagEvent :: (GObject a, MonadIO m) => a -> TextTagEventCallback -> m SignalHandlerId
afterTextTagEvent obj cb = connectTextTagEvent obj cb SignalConnectAfter

connectTextTagEvent :: (GObject a, MonadIO m) =>
                       a -> TextTagEventCallback -> SignalConnectMode -> m SignalHandlerId
connectTextTagEvent obj cb after = liftIO $ do
    cb' <- mkTextTagEventCallback (textTagEventCallbackWrapper cb)
    connectSignalFunPtr obj "event" cb' after

-- object TextTagTable 
newtype TextTagTable = TextTagTable (ForeignPtr TextTagTable)
noTextTagTable :: Maybe TextTagTable
noTextTagTable = Nothing

foreign import ccall "gtk_text_tag_table_get_type"
    c_gtk_text_tag_table_get_type :: IO GType

type instance ParentTypes TextTagTable = '[GObject.Object, Buildable]

instance GObject TextTagTable where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_text_tag_table_get_type
    

class GObject o => TextTagTableK o
instance (GObject o, IsDescendantOf TextTagTable o) => TextTagTableK o

toTextTagTable :: TextTagTableK o => o -> IO TextTagTable
toTextTagTable = unsafeCastTo TextTagTable

-- method TextTagTable::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TextTagTable"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_tag_table_new" gtk_text_tag_table_new :: 
    IO (Ptr TextTagTable)


textTagTableNew ::
    (MonadIO m) =>
    m TextTagTable
textTagTableNew  = liftIO $ do
    result <- gtk_text_tag_table_new
    checkUnexpectedReturnNULL "gtk_text_tag_table_new" result
    result' <- (wrapObject TextTagTable) result
    return result'

-- method TextTagTable::add
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_tag_table_add" gtk_text_tag_table_add :: 
    Ptr TextTagTable ->                     -- _obj : TInterface "Gtk" "TextTagTable"
    Ptr TextTag ->                          -- tag : TInterface "Gtk" "TextTag"
    IO CInt


textTagTableAdd ::
    (MonadIO m, TextTagTableK a, TextTagK b) =>
    a ->                                    -- _obj
    b ->                                    -- tag
    m Bool
textTagTableAdd _obj tag = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tag' = unsafeManagedPtrCastPtr tag
    result <- gtk_text_tag_table_add _obj' tag'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr tag
    return result'

-- method TextTagTable::foreach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TextTagTableForeach", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TextTagTableForeach", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_tag_table_foreach" gtk_text_tag_table_foreach :: 
    Ptr TextTagTable ->                     -- _obj : TInterface "Gtk" "TextTagTable"
    FunPtr TextTagTableForeachC ->          -- func : TInterface "Gtk" "TextTagTableForeach"
    Ptr () ->                               -- data : TBasicType TVoid
    IO ()


textTagTableForeach ::
    (MonadIO m, TextTagTableK a) =>
    a ->                                    -- _obj
    TextTagTableForeach ->                  -- func
    m ()
textTagTableForeach _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkTextTagTableForeach (textTagTableForeachWrapper Nothing func)
    let data_ = nullPtr
    gtk_text_tag_table_foreach _obj' func' data_
    safeFreeFunPtr $ castFunPtrToPtr func'
    touchManagedPtr _obj
    return ()

-- method TextTagTable::get_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_tag_table_get_size" gtk_text_tag_table_get_size :: 
    Ptr TextTagTable ->                     -- _obj : TInterface "Gtk" "TextTagTable"
    IO Int32


textTagTableGetSize ::
    (MonadIO m, TextTagTableK a) =>
    a ->                                    -- _obj
    m Int32
textTagTableGetSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_tag_table_get_size _obj'
    touchManagedPtr _obj
    return result

-- method TextTagTable::lookup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextTag"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_tag_table_lookup" gtk_text_tag_table_lookup :: 
    Ptr TextTagTable ->                     -- _obj : TInterface "Gtk" "TextTagTable"
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr TextTag)


textTagTableLookup ::
    (MonadIO m, TextTagTableK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m TextTag
textTagTableLookup _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    result <- gtk_text_tag_table_lookup _obj' name'
    checkUnexpectedReturnNULL "gtk_text_tag_table_lookup" result
    result' <- (newObject TextTag) result
    touchManagedPtr _obj
    freeMem name'
    return result'

-- method TextTagTable::remove
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextTagTable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tag", argType = TInterface "Gtk" "TextTag", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_tag_table_remove" gtk_text_tag_table_remove :: 
    Ptr TextTagTable ->                     -- _obj : TInterface "Gtk" "TextTagTable"
    Ptr TextTag ->                          -- tag : TInterface "Gtk" "TextTag"
    IO ()


textTagTableRemove ::
    (MonadIO m, TextTagTableK a, TextTagK b) =>
    a ->                                    -- _obj
    b ->                                    -- tag
    m ()
textTagTableRemove _obj tag = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tag' = unsafeManagedPtrCastPtr tag
    gtk_text_tag_table_remove _obj' tag'
    touchManagedPtr _obj
    touchManagedPtr tag
    return ()

-- signal TextTagTable::tag-added
type TextTagTableTagAddedCallback =
    TextTag ->
    IO ()

noTextTagTableTagAddedCallback :: Maybe TextTagTableTagAddedCallback
noTextTagTableTagAddedCallback = Nothing

type TextTagTableTagAddedCallbackC =
    Ptr () ->                               -- object
    Ptr TextTag ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextTagTableTagAddedCallback :: TextTagTableTagAddedCallbackC -> IO (FunPtr TextTagTableTagAddedCallbackC)

textTagTableTagAddedClosure :: TextTagTableTagAddedCallback -> IO Closure
textTagTableTagAddedClosure cb = newCClosure =<< mkTextTagTableTagAddedCallback wrapped
    where wrapped = textTagTableTagAddedCallbackWrapper cb

textTagTableTagAddedCallbackWrapper ::
    TextTagTableTagAddedCallback ->
    Ptr () ->
    Ptr TextTag ->
    Ptr () ->
    IO ()
textTagTableTagAddedCallbackWrapper _cb _ tag _ = do
    tag' <- (newObject TextTag) tag
    _cb  tag'

onTextTagTableTagAdded :: (GObject a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId
onTextTagTableTagAdded obj cb = liftIO $ connectTextTagTableTagAdded obj cb SignalConnectBefore
afterTextTagTableTagAdded :: (GObject a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId
afterTextTagTableTagAdded obj cb = connectTextTagTableTagAdded obj cb SignalConnectAfter

connectTextTagTableTagAdded :: (GObject a, MonadIO m) =>
                               a -> TextTagTableTagAddedCallback -> SignalConnectMode -> m SignalHandlerId
connectTextTagTableTagAdded obj cb after = liftIO $ do
    cb' <- mkTextTagTableTagAddedCallback (textTagTableTagAddedCallbackWrapper cb)
    connectSignalFunPtr obj "tag-added" cb' after

-- signal TextTagTable::tag-changed
type TextTagTableTagChangedCallback =
    TextTag ->
    Bool ->
    IO ()

noTextTagTableTagChangedCallback :: Maybe TextTagTableTagChangedCallback
noTextTagTableTagChangedCallback = Nothing

type TextTagTableTagChangedCallbackC =
    Ptr () ->                               -- object
    Ptr TextTag ->
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextTagTableTagChangedCallback :: TextTagTableTagChangedCallbackC -> IO (FunPtr TextTagTableTagChangedCallbackC)

textTagTableTagChangedClosure :: TextTagTableTagChangedCallback -> IO Closure
textTagTableTagChangedClosure cb = newCClosure =<< mkTextTagTableTagChangedCallback wrapped
    where wrapped = textTagTableTagChangedCallbackWrapper cb

textTagTableTagChangedCallbackWrapper ::
    TextTagTableTagChangedCallback ->
    Ptr () ->
    Ptr TextTag ->
    CInt ->
    Ptr () ->
    IO ()
textTagTableTagChangedCallbackWrapper _cb _ tag size_changed _ = do
    tag' <- (newObject TextTag) tag
    let size_changed' = (/= 0) size_changed
    _cb  tag' size_changed'

onTextTagTableTagChanged :: (GObject a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId
onTextTagTableTagChanged obj cb = liftIO $ connectTextTagTableTagChanged obj cb SignalConnectBefore
afterTextTagTableTagChanged :: (GObject a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId
afterTextTagTableTagChanged obj cb = connectTextTagTableTagChanged obj cb SignalConnectAfter

connectTextTagTableTagChanged :: (GObject a, MonadIO m) =>
                                 a -> TextTagTableTagChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTextTagTableTagChanged obj cb after = liftIO $ do
    cb' <- mkTextTagTableTagChangedCallback (textTagTableTagChangedCallbackWrapper cb)
    connectSignalFunPtr obj "tag-changed" cb' after

-- signal TextTagTable::tag-removed
type TextTagTableTagRemovedCallback =
    TextTag ->
    IO ()

noTextTagTableTagRemovedCallback :: Maybe TextTagTableTagRemovedCallback
noTextTagTableTagRemovedCallback = Nothing

type TextTagTableTagRemovedCallbackC =
    Ptr () ->                               -- object
    Ptr TextTag ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextTagTableTagRemovedCallback :: TextTagTableTagRemovedCallbackC -> IO (FunPtr TextTagTableTagRemovedCallbackC)

textTagTableTagRemovedClosure :: TextTagTableTagRemovedCallback -> IO Closure
textTagTableTagRemovedClosure cb = newCClosure =<< mkTextTagTableTagRemovedCallback wrapped
    where wrapped = textTagTableTagRemovedCallbackWrapper cb

textTagTableTagRemovedCallbackWrapper ::
    TextTagTableTagRemovedCallback ->
    Ptr () ->
    Ptr TextTag ->
    Ptr () ->
    IO ()
textTagTableTagRemovedCallbackWrapper _cb _ tag _ = do
    tag' <- (newObject TextTag) tag
    _cb  tag'

onTextTagTableTagRemoved :: (GObject a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId
onTextTagTableTagRemoved obj cb = liftIO $ connectTextTagTableTagRemoved obj cb SignalConnectBefore
afterTextTagTableTagRemoved :: (GObject a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId
afterTextTagTableTagRemoved obj cb = connectTextTagTableTagRemoved obj cb SignalConnectAfter

connectTextTagTableTagRemoved :: (GObject a, MonadIO m) =>
                                 a -> TextTagTableTagRemovedCallback -> SignalConnectMode -> m SignalHandlerId
connectTextTagTableTagRemoved obj cb after = liftIO $ do
    cb' <- mkTextTagTableTagRemovedCallback (textTagTableTagRemovedCallbackWrapper cb)
    connectSignalFunPtr obj "tag-removed" cb' after

-- callback TextTagTableForeach
textTagTableForeachClosure :: TextTagTableForeach -> IO Closure
textTagTableForeachClosure cb = newCClosure =<< mkTextTagTableForeach wrapped
    where wrapped = textTagTableForeachWrapper Nothing cb

type TextTagTableForeachC =
    Ptr TextTag ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkTextTagTableForeach :: TextTagTableForeachC -> IO (FunPtr TextTagTableForeachC)

type TextTagTableForeach =
    TextTag ->
    IO ()

noTextTagTableForeach :: Maybe TextTagTableForeach
noTextTagTableForeach = Nothing

textTagTableForeachWrapper ::
    Maybe (Ptr (FunPtr (TextTagTableForeachC))) ->
    TextTagTableForeach ->
    Ptr TextTag ->
    Ptr () ->
    IO ()
textTagTableForeachWrapper funptrptr _cb tag _ = do
    tag' <- (newObject TextTag) tag
    _cb  tag'
    maybeReleaseFunPtr funptrptr

-- object TextView 
newtype TextView = TextView (ForeignPtr TextView)
noTextView :: Maybe TextView
noTextView = Nothing

foreign import ccall "gtk_text_view_get_type"
    c_gtk_text_view_get_type :: IO GType

type instance ParentTypes TextView = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Scrollable]

instance GObject TextView where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_text_view_get_type
    

class GObject o => TextViewK o
instance (GObject o, IsDescendantOf TextView o) => TextViewK o

toTextView :: TextViewK o => o -> IO TextView
toTextView = unsafeCastTo TextView

-- method TextView::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TextView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_new" gtk_text_view_new :: 
    IO (Ptr TextView)


textViewNew ::
    (MonadIO m) =>
    m TextView
textViewNew  = liftIO $ do
    result <- gtk_text_view_new
    checkUnexpectedReturnNULL "gtk_text_view_new" result
    result' <- (newObject TextView) result
    return result'

-- method TextView::new_with_buffer
-- method type : Constructor
-- Args : [Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_new_with_buffer" gtk_text_view_new_with_buffer :: 
    Ptr TextBuffer ->                       -- buffer : TInterface "Gtk" "TextBuffer"
    IO (Ptr TextView)


textViewNewWithBuffer ::
    (MonadIO m, TextBufferK a) =>
    a ->                                    -- buffer
    m TextView
textViewNewWithBuffer buffer = liftIO $ do
    let buffer' = unsafeManagedPtrCastPtr buffer
    result <- gtk_text_view_new_with_buffer buffer'
    checkUnexpectedReturnNULL "gtk_text_view_new_with_buffer" result
    result' <- (newObject TextView) result
    touchManagedPtr buffer
    return result'

-- method TextView::add_child_at_anchor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "anchor", argType = TInterface "Gtk" "TextChildAnchor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "anchor", argType = TInterface "Gtk" "TextChildAnchor", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_add_child_at_anchor" gtk_text_view_add_child_at_anchor :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Ptr TextChildAnchor ->                  -- anchor : TInterface "Gtk" "TextChildAnchor"
    IO ()


textViewAddChildAtAnchor ::
    (MonadIO m, TextViewK a, WidgetK b, TextChildAnchorK c) =>
    a ->                                    -- _obj
    b ->                                    -- child
    c ->                                    -- anchor
    m ()
textViewAddChildAtAnchor _obj child anchor = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let anchor' = unsafeManagedPtrCastPtr anchor
    gtk_text_view_add_child_at_anchor _obj' child' anchor'
    touchManagedPtr _obj
    touchManagedPtr child
    touchManagedPtr anchor
    return ()

-- method TextView::add_child_in_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "which_window", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ypos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "which_window", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ypos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_add_child_in_window" gtk_text_view_add_child_in_window :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    CUInt ->                                -- which_window : TInterface "Gtk" "TextWindowType"
    Int32 ->                                -- xpos : TBasicType TInt32
    Int32 ->                                -- ypos : TBasicType TInt32
    IO ()


textViewAddChildInWindow ::
    (MonadIO m, TextViewK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    TextWindowType ->                       -- which_window
    Int32 ->                                -- xpos
    Int32 ->                                -- ypos
    m ()
textViewAddChildInWindow _obj child which_window xpos ypos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    let which_window' = (fromIntegral . fromEnum) which_window
    gtk_text_view_add_child_in_window _obj' child' which_window' xpos ypos
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method TextView::backward_display_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_backward_display_line" gtk_text_view_backward_display_line :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    IO CInt


textViewBackwardDisplayLine ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    m Bool
textViewBackwardDisplayLine _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_text_view_backward_display_line _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TextView::backward_display_line_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_backward_display_line_start" gtk_text_view_backward_display_line_start :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    IO CInt


textViewBackwardDisplayLineStart ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    m Bool
textViewBackwardDisplayLineStart _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_text_view_backward_display_line_start _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TextView::buffer_to_window_coords
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "win", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window_x", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "window_y", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "win", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_buffer_to_window_coords" gtk_text_view_buffer_to_window_coords :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CUInt ->                                -- win : TInterface "Gtk" "TextWindowType"
    Int32 ->                                -- buffer_x : TBasicType TInt32
    Int32 ->                                -- buffer_y : TBasicType TInt32
    Ptr Int32 ->                            -- window_x : TBasicType TInt32
    Ptr Int32 ->                            -- window_y : TBasicType TInt32
    IO ()


textViewBufferToWindowCoords ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextWindowType ->                       -- win
    Int32 ->                                -- buffer_x
    Int32 ->                                -- buffer_y
    m (Int32,Int32)
textViewBufferToWindowCoords _obj win buffer_x buffer_y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let win' = (fromIntegral . fromEnum) win
    window_x <- allocMem :: IO (Ptr Int32)
    window_y <- allocMem :: IO (Ptr Int32)
    gtk_text_view_buffer_to_window_coords _obj' win' buffer_x buffer_y window_x window_y
    window_x' <- peek window_x
    window_y' <- peek window_y
    touchManagedPtr _obj
    freeMem window_x
    freeMem window_y
    return (window_x', window_y')

-- method TextView::forward_display_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_forward_display_line" gtk_text_view_forward_display_line :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    IO CInt


textViewForwardDisplayLine ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    m Bool
textViewForwardDisplayLine _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_text_view_forward_display_line _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TextView::forward_display_line_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_forward_display_line_end" gtk_text_view_forward_display_line_end :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    IO CInt


textViewForwardDisplayLineEnd ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    m Bool
textViewForwardDisplayLineEnd _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_text_view_forward_display_line_end _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TextView::get_accepts_tab
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_accepts_tab" gtk_text_view_get_accepts_tab :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO CInt


textViewGetAcceptsTab ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Bool
textViewGetAcceptsTab _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_accepts_tab _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_border_window_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_border_window_size" gtk_text_view_get_border_window_size :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CUInt ->                                -- type : TInterface "Gtk" "TextWindowType"
    IO Int32


textViewGetBorderWindowSize ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextWindowType ->                       -- type
    m Int32
textViewGetBorderWindowSize _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    result <- gtk_text_view_get_border_window_size _obj' type_'
    touchManagedPtr _obj
    return result

-- method TextView::get_bottom_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_bottom_margin" gtk_text_view_get_bottom_margin :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO Int32


textViewGetBottomMargin ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Int32
textViewGetBottomMargin _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_bottom_margin _obj'
    touchManagedPtr _obj
    return result

-- method TextView::get_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextBuffer"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_buffer" gtk_text_view_get_buffer :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO (Ptr TextBuffer)


textViewGetBuffer ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m TextBuffer
textViewGetBuffer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_buffer _obj'
    checkUnexpectedReturnNULL "gtk_text_view_get_buffer" result
    result' <- (newObject TextBuffer) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_cursor_locations
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "strong", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "weak", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_cursor_locations" gtk_text_view_get_cursor_locations :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Ptr Gdk.Rectangle ->                    -- strong : TInterface "Gdk" "Rectangle"
    Ptr Gdk.Rectangle ->                    -- weak : TInterface "Gdk" "Rectangle"
    IO ()


textViewGetCursorLocations ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Maybe (TextIter) ->                     -- iter
    m (Gdk.Rectangle,Gdk.Rectangle)
textViewGetCursorLocations _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeIter <- case iter of
        Nothing -> return nullPtr
        Just jIter -> do
            let jIter' = unsafeManagedPtrGetPtr jIter
            return jIter'
    strong <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    weak <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_text_view_get_cursor_locations _obj' maybeIter strong weak
    strong' <- (wrapBoxed Gdk.Rectangle) strong
    weak' <- (wrapBoxed Gdk.Rectangle) weak
    touchManagedPtr _obj
    whenJust iter touchManagedPtr
    return (strong', weak')

-- method TextView::get_cursor_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_cursor_visible" gtk_text_view_get_cursor_visible :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO CInt


textViewGetCursorVisible ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Bool
textViewGetCursorVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_cursor_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_default_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextAttributes"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_default_attributes" gtk_text_view_get_default_attributes :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO (Ptr TextAttributes)


textViewGetDefaultAttributes ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m TextAttributes
textViewGetDefaultAttributes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_default_attributes _obj'
    checkUnexpectedReturnNULL "gtk_text_view_get_default_attributes" result
    result' <- (wrapBoxed TextAttributes) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_editable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_editable" gtk_text_view_get_editable :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO CInt


textViewGetEditable ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Bool
textViewGetEditable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_editable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_hadjustment" gtk_text_view_get_hadjustment :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO (Ptr Adjustment)

{-# DEPRECATED textViewGetHadjustment ["(Since version 3.0)","Use gtk_scrollable_get_hadjustment()"]#-}
textViewGetHadjustment ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Adjustment
textViewGetHadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_hadjustment _obj'
    checkUnexpectedReturnNULL "gtk_text_view_get_hadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_indent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_indent" gtk_text_view_get_indent :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO Int32


textViewGetIndent ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Int32
textViewGetIndent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_indent _obj'
    touchManagedPtr _obj
    return result

-- method TextView::get_input_hints
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "InputHints"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_input_hints" gtk_text_view_get_input_hints :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO CUInt


textViewGetInputHints ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m [InputHints]
textViewGetInputHints _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_input_hints _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method TextView::get_input_purpose
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "InputPurpose"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_input_purpose" gtk_text_view_get_input_purpose :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO CUInt


textViewGetInputPurpose ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m InputPurpose
textViewGetInputPurpose _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_input_purpose _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_iter_at_location
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_iter_at_location" gtk_text_view_get_iter_at_location :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO ()


textViewGetIterAtLocation ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m (TextIter)
textViewGetIterAtLocation _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    gtk_text_view_get_iter_at_location _obj' iter x y
    iter' <- (wrapBoxed TextIter) iter
    touchManagedPtr _obj
    return iter'

-- method TextView::get_iter_at_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "trailing", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_iter_at_position" gtk_text_view_get_iter_at_position :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Ptr Int32 ->                            -- trailing : TBasicType TInt32
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO ()


textViewGetIterAtPosition ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m (TextIter,Int32)
textViewGetIterAtPosition _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    trailing <- allocMem :: IO (Ptr Int32)
    gtk_text_view_get_iter_at_position _obj' iter trailing x y
    iter' <- (wrapBoxed TextIter) iter
    trailing' <- peek trailing
    touchManagedPtr _obj
    freeMem trailing
    return (iter', trailing')

-- method TextView::get_iter_location
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "location", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_iter_location" gtk_text_view_get_iter_location :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Ptr Gdk.Rectangle ->                    -- location : TInterface "Gdk" "Rectangle"
    IO ()


textViewGetIterLocation ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    m (Gdk.Rectangle)
textViewGetIterLocation _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    location <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_text_view_get_iter_location _obj' iter' location
    location' <- (wrapBoxed Gdk.Rectangle) location
    touchManagedPtr _obj
    touchManagedPtr iter
    return location'

-- method TextView::get_justification
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Justification"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_justification" gtk_text_view_get_justification :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO CUInt


textViewGetJustification ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Justification
textViewGetJustification _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_justification _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_left_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_left_margin" gtk_text_view_get_left_margin :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO Int32


textViewGetLeftMargin ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Int32
textViewGetLeftMargin _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_left_margin _obj'
    touchManagedPtr _obj
    return result

-- method TextView::get_line_at_y
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_iter", argType = TInterface "Gtk" "TextIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line_top", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_line_at_y" gtk_text_view_get_line_at_y :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- target_iter : TInterface "Gtk" "TextIter"
    Int32 ->                                -- y : TBasicType TInt32
    Ptr Int32 ->                            -- line_top : TBasicType TInt32
    IO ()


textViewGetLineAtY ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- y
    m (TextIter,Int32)
textViewGetLineAtY _obj y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    target_iter <- callocBoxedBytes 80 :: IO (Ptr TextIter)
    line_top <- allocMem :: IO (Ptr Int32)
    gtk_text_view_get_line_at_y _obj' target_iter y line_top
    target_iter' <- (wrapBoxed TextIter) target_iter
    line_top' <- peek line_top
    touchManagedPtr _obj
    freeMem line_top
    return (target_iter', line_top')

-- method TextView::get_line_yrange
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_line_yrange" gtk_text_view_get_line_yrange :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Ptr Int32 ->                            -- y : TBasicType TInt32
    Ptr Int32 ->                            -- height : TBasicType TInt32
    IO ()


textViewGetLineYrange ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    m (Int32,Int32)
textViewGetLineYrange _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    y <- allocMem :: IO (Ptr Int32)
    height <- allocMem :: IO (Ptr Int32)
    gtk_text_view_get_line_yrange _obj' iter' y height
    y' <- peek y
    height' <- peek height
    touchManagedPtr _obj
    touchManagedPtr iter
    freeMem y
    freeMem height
    return (y', height')

-- method TextView::get_monospace
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_monospace" gtk_text_view_get_monospace :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO CInt


textViewGetMonospace ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Bool
textViewGetMonospace _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_monospace _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_overwrite
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_overwrite" gtk_text_view_get_overwrite :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO CInt


textViewGetOverwrite ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Bool
textViewGetOverwrite _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_overwrite _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_pixels_above_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_pixels_above_lines" gtk_text_view_get_pixels_above_lines :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO Int32


textViewGetPixelsAboveLines ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Int32
textViewGetPixelsAboveLines _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_pixels_above_lines _obj'
    touchManagedPtr _obj
    return result

-- method TextView::get_pixels_below_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_pixels_below_lines" gtk_text_view_get_pixels_below_lines :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO Int32


textViewGetPixelsBelowLines ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Int32
textViewGetPixelsBelowLines _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_pixels_below_lines _obj'
    touchManagedPtr _obj
    return result

-- method TextView::get_pixels_inside_wrap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_pixels_inside_wrap" gtk_text_view_get_pixels_inside_wrap :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO Int32


textViewGetPixelsInsideWrap ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Int32
textViewGetPixelsInsideWrap _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_pixels_inside_wrap _obj'
    touchManagedPtr _obj
    return result

-- method TextView::get_right_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_right_margin" gtk_text_view_get_right_margin :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO Int32


textViewGetRightMargin ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Int32
textViewGetRightMargin _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_right_margin _obj'
    touchManagedPtr _obj
    return result

-- method TextView::get_tabs
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "TabArray"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_tabs" gtk_text_view_get_tabs :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO (Ptr Pango.TabArray)


textViewGetTabs ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Pango.TabArray
textViewGetTabs _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_tabs _obj'
    checkUnexpectedReturnNULL "gtk_text_view_get_tabs" result
    result' <- (wrapBoxed Pango.TabArray) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_top_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_top_margin" gtk_text_view_get_top_margin :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO Int32


textViewGetTopMargin ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Int32
textViewGetTopMargin _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_top_margin _obj'
    touchManagedPtr _obj
    return result

-- method TextView::get_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_vadjustment" gtk_text_view_get_vadjustment :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO (Ptr Adjustment)

{-# DEPRECATED textViewGetVadjustment ["(Since version 3.0)","Use gtk_scrollable_get_vadjustment()"]#-}
textViewGetVadjustment ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Adjustment
textViewGetVadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_vadjustment _obj'
    checkUnexpectedReturnNULL "gtk_text_view_get_vadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_visible_rect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_visible_rect" gtk_text_view_get_visible_rect :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr Gdk.Rectangle ->                    -- visible_rect : TInterface "Gdk" "Rectangle"
    IO ()


textViewGetVisibleRect ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m (Gdk.Rectangle)
textViewGetVisibleRect _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    visible_rect <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_text_view_get_visible_rect _obj' visible_rect
    visible_rect' <- (wrapBoxed Gdk.Rectangle) visible_rect
    touchManagedPtr _obj
    return visible_rect'

-- method TextView::get_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "win", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "win", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_window" gtk_text_view_get_window :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CUInt ->                                -- win : TInterface "Gtk" "TextWindowType"
    IO (Ptr Gdk.Window)


textViewGetWindow ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextWindowType ->                       -- win
    m Gdk.Window
textViewGetWindow _obj win = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let win' = (fromIntegral . fromEnum) win
    result <- gtk_text_view_get_window _obj' win'
    checkUnexpectedReturnNULL "gtk_text_view_get_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- method TextView::get_window_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextWindowType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_window_type" gtk_text_view_get_window_type :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    IO CUInt


textViewGetWindowType ::
    (MonadIO m, TextViewK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    m TextWindowType
textViewGetWindowType _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window' = unsafeManagedPtrCastPtr window
    result <- gtk_text_view_get_window_type _obj' window'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    touchManagedPtr window
    return result'

-- method TextView::get_wrap_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "WrapMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_get_wrap_mode" gtk_text_view_get_wrap_mode :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO CUInt


textViewGetWrapMode ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m WrapMode
textViewGetWrapMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_get_wrap_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method TextView::im_context_filter_keypress
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_im_context_filter_keypress" gtk_text_view_im_context_filter_keypress :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr Gdk.EventKey ->                     -- event : TInterface "Gdk" "EventKey"
    IO CInt


textViewImContextFilterKeypress ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Gdk.EventKey ->                         -- event
    m Bool
textViewImContextFilterKeypress _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_text_view_im_context_filter_keypress _obj' event'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event
    return result'

-- method TextView::move_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ypos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xpos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ypos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_move_child" gtk_text_view_move_child :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr Widget ->                           -- child : TInterface "Gtk" "Widget"
    Int32 ->                                -- xpos : TBasicType TInt32
    Int32 ->                                -- ypos : TBasicType TInt32
    IO ()


textViewMoveChild ::
    (MonadIO m, TextViewK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    Int32 ->                                -- xpos
    Int32 ->                                -- ypos
    m ()
textViewMoveChild _obj child xpos ypos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_text_view_move_child _obj' child' xpos ypos
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

-- method TextView::move_mark_onscreen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_move_mark_onscreen" gtk_text_view_move_mark_onscreen :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextMark ->                         -- mark : TInterface "Gtk" "TextMark"
    IO CInt


textViewMoveMarkOnscreen ::
    (MonadIO m, TextViewK a, TextMarkK b) =>
    a ->                                    -- _obj
    b ->                                    -- mark
    m Bool
textViewMoveMarkOnscreen _obj mark = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mark' = unsafeManagedPtrCastPtr mark
    result <- gtk_text_view_move_mark_onscreen _obj' mark'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr mark
    return result'

-- method TextView::move_visually
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_move_visually" gtk_text_view_move_visually :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    Int32 ->                                -- count : TBasicType TInt32
    IO CInt


textViewMoveVisually ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    Int32 ->                                -- count
    m Bool
textViewMoveVisually _obj iter count = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_text_view_move_visually _obj' iter' count
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TextView::place_cursor_onscreen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_place_cursor_onscreen" gtk_text_view_place_cursor_onscreen :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO CInt


textViewPlaceCursorOnscreen ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m Bool
textViewPlaceCursorOnscreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_text_view_place_cursor_onscreen _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TextView::reset_im_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_reset_im_context" gtk_text_view_reset_im_context :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    IO ()


textViewResetImContext ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    m ()
textViewResetImContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_view_reset_im_context _obj'
    touchManagedPtr _obj
    return ()

-- method TextView::scroll_mark_onscreen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_scroll_mark_onscreen" gtk_text_view_scroll_mark_onscreen :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextMark ->                         -- mark : TInterface "Gtk" "TextMark"
    IO ()


textViewScrollMarkOnscreen ::
    (MonadIO m, TextViewK a, TextMarkK b) =>
    a ->                                    -- _obj
    b ->                                    -- mark
    m ()
textViewScrollMarkOnscreen _obj mark = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mark' = unsafeManagedPtrCastPtr mark
    gtk_text_view_scroll_mark_onscreen _obj' mark'
    touchManagedPtr _obj
    touchManagedPtr mark
    return ()

-- method TextView::scroll_to_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "within_margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "within_margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_scroll_to_iter" gtk_text_view_scroll_to_iter :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    CDouble ->                              -- within_margin : TBasicType TDouble
    CInt ->                                 -- use_align : TBasicType TBoolean
    CDouble ->                              -- xalign : TBasicType TDouble
    CDouble ->                              -- yalign : TBasicType TDouble
    IO CInt


textViewScrollToIter ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    Double ->                               -- within_margin
    Bool ->                                 -- use_align
    Double ->                               -- xalign
    Double ->                               -- yalign
    m Bool
textViewScrollToIter _obj iter within_margin use_align xalign yalign = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    let within_margin' = realToFrac within_margin
    let use_align' = (fromIntegral . fromEnum) use_align
    let xalign' = realToFrac xalign
    let yalign' = realToFrac yalign
    result <- gtk_text_view_scroll_to_iter _obj' iter' within_margin' use_align' xalign' yalign'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TextView::scroll_to_mark
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "within_margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mark", argType = TInterface "Gtk" "TextMark", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "within_margin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "yalign", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_scroll_to_mark" gtk_text_view_scroll_to_mark :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextMark ->                         -- mark : TInterface "Gtk" "TextMark"
    CDouble ->                              -- within_margin : TBasicType TDouble
    CInt ->                                 -- use_align : TBasicType TBoolean
    CDouble ->                              -- xalign : TBasicType TDouble
    CDouble ->                              -- yalign : TBasicType TDouble
    IO ()


textViewScrollToMark ::
    (MonadIO m, TextViewK a, TextMarkK b) =>
    a ->                                    -- _obj
    b ->                                    -- mark
    Double ->                               -- within_margin
    Bool ->                                 -- use_align
    Double ->                               -- xalign
    Double ->                               -- yalign
    m ()
textViewScrollToMark _obj mark within_margin use_align xalign yalign = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mark' = unsafeManagedPtrCastPtr mark
    let within_margin' = realToFrac within_margin
    let use_align' = (fromIntegral . fromEnum) use_align
    let xalign' = realToFrac xalign
    let yalign' = realToFrac yalign
    gtk_text_view_scroll_to_mark _obj' mark' within_margin' use_align' xalign' yalign'
    touchManagedPtr _obj
    touchManagedPtr mark
    return ()

-- method TextView::set_accepts_tab
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accepts_tab", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accepts_tab", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_accepts_tab" gtk_text_view_set_accepts_tab :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CInt ->                                 -- accepts_tab : TBasicType TBoolean
    IO ()


textViewSetAcceptsTab ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- accepts_tab
    m ()
textViewSetAcceptsTab _obj accepts_tab = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accepts_tab' = (fromIntegral . fromEnum) accepts_tab
    gtk_text_view_set_accepts_tab _obj' accepts_tab'
    touchManagedPtr _obj
    return ()

-- method TextView::set_border_window_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_border_window_size" gtk_text_view_set_border_window_size :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CUInt ->                                -- type : TInterface "Gtk" "TextWindowType"
    Int32 ->                                -- size : TBasicType TInt32
    IO ()


textViewSetBorderWindowSize ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextWindowType ->                       -- type
    Int32 ->                                -- size
    m ()
textViewSetBorderWindowSize _obj type_ size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    gtk_text_view_set_border_window_size _obj' type_' size
    touchManagedPtr _obj
    return ()

-- method TextView::set_bottom_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bottom_margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bottom_margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_bottom_margin" gtk_text_view_set_bottom_margin :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Int32 ->                                -- bottom_margin : TBasicType TInt32
    IO ()


textViewSetBottomMargin ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- bottom_margin
    m ()
textViewSetBottomMargin _obj bottom_margin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_view_set_bottom_margin _obj' bottom_margin
    touchManagedPtr _obj
    return ()

-- method TextView::set_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_buffer" gtk_text_view_set_buffer :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextBuffer ->                       -- buffer : TInterface "Gtk" "TextBuffer"
    IO ()


textViewSetBuffer ::
    (MonadIO m, TextViewK a, TextBufferK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- buffer
    m ()
textViewSetBuffer _obj buffer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeBuffer <- case buffer of
        Nothing -> return nullPtr
        Just jBuffer -> do
            let jBuffer' = unsafeManagedPtrCastPtr jBuffer
            return jBuffer'
    gtk_text_view_set_buffer _obj' maybeBuffer
    touchManagedPtr _obj
    whenJust buffer touchManagedPtr
    return ()

-- method TextView::set_cursor_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_cursor_visible" gtk_text_view_set_cursor_visible :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


textViewSetCursorVisible ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
textViewSetCursorVisible _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_text_view_set_cursor_visible _obj' setting'
    touchManagedPtr _obj
    return ()

-- method TextView::set_editable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_editable" gtk_text_view_set_editable :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


textViewSetEditable ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
textViewSetEditable _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_text_view_set_editable _obj' setting'
    touchManagedPtr _obj
    return ()

-- method TextView::set_indent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "indent", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "indent", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_indent" gtk_text_view_set_indent :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Int32 ->                                -- indent : TBasicType TInt32
    IO ()


textViewSetIndent ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- indent
    m ()
textViewSetIndent _obj indent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_view_set_indent _obj' indent
    touchManagedPtr _obj
    return ()

-- method TextView::set_input_hints
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hints", argType = TInterface "Gtk" "InputHints", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hints", argType = TInterface "Gtk" "InputHints", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_input_hints" gtk_text_view_set_input_hints :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CUInt ->                                -- hints : TInterface "Gtk" "InputHints"
    IO ()


textViewSetInputHints ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    [InputHints] ->                         -- hints
    m ()
textViewSetInputHints _obj hints = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let hints' = gflagsToWord hints
    gtk_text_view_set_input_hints _obj' hints'
    touchManagedPtr _obj
    return ()

-- method TextView::set_input_purpose
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "purpose", argType = TInterface "Gtk" "InputPurpose", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "purpose", argType = TInterface "Gtk" "InputPurpose", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_input_purpose" gtk_text_view_set_input_purpose :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CUInt ->                                -- purpose : TInterface "Gtk" "InputPurpose"
    IO ()


textViewSetInputPurpose ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    InputPurpose ->                         -- purpose
    m ()
textViewSetInputPurpose _obj purpose = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let purpose' = (fromIntegral . fromEnum) purpose
    gtk_text_view_set_input_purpose _obj' purpose'
    touchManagedPtr _obj
    return ()

-- method TextView::set_justification
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "justification", argType = TInterface "Gtk" "Justification", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "justification", argType = TInterface "Gtk" "Justification", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_justification" gtk_text_view_set_justification :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CUInt ->                                -- justification : TInterface "Gtk" "Justification"
    IO ()


textViewSetJustification ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Justification ->                        -- justification
    m ()
textViewSetJustification _obj justification = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let justification' = (fromIntegral . fromEnum) justification
    gtk_text_view_set_justification _obj' justification'
    touchManagedPtr _obj
    return ()

-- method TextView::set_left_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "left_margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_left_margin" gtk_text_view_set_left_margin :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Int32 ->                                -- left_margin : TBasicType TInt32
    IO ()


textViewSetLeftMargin ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- left_margin
    m ()
textViewSetLeftMargin _obj left_margin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_view_set_left_margin _obj' left_margin
    touchManagedPtr _obj
    return ()

-- method TextView::set_monospace
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "monospace", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "monospace", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_monospace" gtk_text_view_set_monospace :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CInt ->                                 -- monospace : TBasicType TBoolean
    IO ()


textViewSetMonospace ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- monospace
    m ()
textViewSetMonospace _obj monospace = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let monospace' = (fromIntegral . fromEnum) monospace
    gtk_text_view_set_monospace _obj' monospace'
    touchManagedPtr _obj
    return ()

-- method TextView::set_overwrite
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "overwrite", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "overwrite", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_overwrite" gtk_text_view_set_overwrite :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CInt ->                                 -- overwrite : TBasicType TBoolean
    IO ()


textViewSetOverwrite ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- overwrite
    m ()
textViewSetOverwrite _obj overwrite = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let overwrite' = (fromIntegral . fromEnum) overwrite
    gtk_text_view_set_overwrite _obj' overwrite'
    touchManagedPtr _obj
    return ()

-- method TextView::set_pixels_above_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixels_above_lines", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixels_above_lines", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_pixels_above_lines" gtk_text_view_set_pixels_above_lines :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Int32 ->                                -- pixels_above_lines : TBasicType TInt32
    IO ()


textViewSetPixelsAboveLines ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- pixels_above_lines
    m ()
textViewSetPixelsAboveLines _obj pixels_above_lines = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_view_set_pixels_above_lines _obj' pixels_above_lines
    touchManagedPtr _obj
    return ()

-- method TextView::set_pixels_below_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixels_below_lines", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixels_below_lines", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_pixels_below_lines" gtk_text_view_set_pixels_below_lines :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Int32 ->                                -- pixels_below_lines : TBasicType TInt32
    IO ()


textViewSetPixelsBelowLines ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- pixels_below_lines
    m ()
textViewSetPixelsBelowLines _obj pixels_below_lines = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_view_set_pixels_below_lines _obj' pixels_below_lines
    touchManagedPtr _obj
    return ()

-- method TextView::set_pixels_inside_wrap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixels_inside_wrap", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixels_inside_wrap", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_pixels_inside_wrap" gtk_text_view_set_pixels_inside_wrap :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Int32 ->                                -- pixels_inside_wrap : TBasicType TInt32
    IO ()


textViewSetPixelsInsideWrap ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- pixels_inside_wrap
    m ()
textViewSetPixelsInsideWrap _obj pixels_inside_wrap = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_view_set_pixels_inside_wrap _obj' pixels_inside_wrap
    touchManagedPtr _obj
    return ()

-- method TextView::set_right_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "right_margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "right_margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_right_margin" gtk_text_view_set_right_margin :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Int32 ->                                -- right_margin : TBasicType TInt32
    IO ()


textViewSetRightMargin ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- right_margin
    m ()
textViewSetRightMargin _obj right_margin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_view_set_right_margin _obj' right_margin
    touchManagedPtr _obj
    return ()

-- method TextView::set_tabs
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tabs", argType = TInterface "Pango" "TabArray", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tabs", argType = TInterface "Pango" "TabArray", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_tabs" gtk_text_view_set_tabs :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr Pango.TabArray ->                   -- tabs : TInterface "Pango" "TabArray"
    IO ()


textViewSetTabs ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Pango.TabArray ->                       -- tabs
    m ()
textViewSetTabs _obj tabs = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tabs' = unsafeManagedPtrGetPtr tabs
    gtk_text_view_set_tabs _obj' tabs'
    touchManagedPtr _obj
    touchManagedPtr tabs
    return ()

-- method TextView::set_top_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top_margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top_margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_top_margin" gtk_text_view_set_top_margin :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Int32 ->                                -- top_margin : TBasicType TInt32
    IO ()


textViewSetTopMargin ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- top_margin
    m ()
textViewSetTopMargin _obj top_margin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_text_view_set_top_margin _obj' top_margin
    touchManagedPtr _obj
    return ()

-- method TextView::set_wrap_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap_mode", argType = TInterface "Gtk" "WrapMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wrap_mode", argType = TInterface "Gtk" "WrapMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_set_wrap_mode" gtk_text_view_set_wrap_mode :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CUInt ->                                -- wrap_mode : TInterface "Gtk" "WrapMode"
    IO ()


textViewSetWrapMode ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    WrapMode ->                             -- wrap_mode
    m ()
textViewSetWrapMode _obj wrap_mode = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let wrap_mode' = (fromIntegral . fromEnum) wrap_mode
    gtk_text_view_set_wrap_mode _obj' wrap_mode'
    touchManagedPtr _obj
    return ()

-- method TextView::starts_display_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TextIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_starts_display_line" gtk_text_view_starts_display_line :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    Ptr TextIter ->                         -- iter : TInterface "Gtk" "TextIter"
    IO CInt


textViewStartsDisplayLine ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextIter ->                             -- iter
    m Bool
textViewStartsDisplayLine _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_text_view_starts_display_line _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TextView::window_to_buffer_coords
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "win", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer_x", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "buffer_y", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TextView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "win", argType = TInterface "Gtk" "TextWindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_text_view_window_to_buffer_coords" gtk_text_view_window_to_buffer_coords :: 
    Ptr TextView ->                         -- _obj : TInterface "Gtk" "TextView"
    CUInt ->                                -- win : TInterface "Gtk" "TextWindowType"
    Int32 ->                                -- window_x : TBasicType TInt32
    Int32 ->                                -- window_y : TBasicType TInt32
    Ptr Int32 ->                            -- buffer_x : TBasicType TInt32
    Ptr Int32 ->                            -- buffer_y : TBasicType TInt32
    IO ()


textViewWindowToBufferCoords ::
    (MonadIO m, TextViewK a) =>
    a ->                                    -- _obj
    TextWindowType ->                       -- win
    Int32 ->                                -- window_x
    Int32 ->                                -- window_y
    m (Int32,Int32)
textViewWindowToBufferCoords _obj win window_x window_y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let win' = (fromIntegral . fromEnum) win
    buffer_x <- allocMem :: IO (Ptr Int32)
    buffer_y <- allocMem :: IO (Ptr Int32)
    gtk_text_view_window_to_buffer_coords _obj' win' window_x window_y buffer_x buffer_y
    buffer_x' <- peek buffer_x
    buffer_y' <- peek buffer_y
    touchManagedPtr _obj
    freeMem buffer_x
    freeMem buffer_y
    return (buffer_x', buffer_y')

-- signal TextView::backspace
type TextViewBackspaceCallback =
    IO ()

noTextViewBackspaceCallback :: Maybe TextViewBackspaceCallback
noTextViewBackspaceCallback = Nothing

type TextViewBackspaceCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewBackspaceCallback :: TextViewBackspaceCallbackC -> IO (FunPtr TextViewBackspaceCallbackC)

textViewBackspaceClosure :: TextViewBackspaceCallback -> IO Closure
textViewBackspaceClosure cb = newCClosure =<< mkTextViewBackspaceCallback wrapped
    where wrapped = textViewBackspaceCallbackWrapper cb

textViewBackspaceCallbackWrapper ::
    TextViewBackspaceCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textViewBackspaceCallbackWrapper _cb _ _ = do
    _cb 

onTextViewBackspace :: (GObject a, MonadIO m) => a -> TextViewBackspaceCallback -> m SignalHandlerId
onTextViewBackspace obj cb = liftIO $ connectTextViewBackspace obj cb SignalConnectBefore
afterTextViewBackspace :: (GObject a, MonadIO m) => a -> TextViewBackspaceCallback -> m SignalHandlerId
afterTextViewBackspace obj cb = connectTextViewBackspace obj cb SignalConnectAfter

connectTextViewBackspace :: (GObject a, MonadIO m) =>
                            a -> TextViewBackspaceCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewBackspace obj cb after = liftIO $ do
    cb' <- mkTextViewBackspaceCallback (textViewBackspaceCallbackWrapper cb)
    connectSignalFunPtr obj "backspace" cb' after

-- signal TextView::copy-clipboard
type TextViewCopyClipboardCallback =
    IO ()

noTextViewCopyClipboardCallback :: Maybe TextViewCopyClipboardCallback
noTextViewCopyClipboardCallback = Nothing

type TextViewCopyClipboardCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewCopyClipboardCallback :: TextViewCopyClipboardCallbackC -> IO (FunPtr TextViewCopyClipboardCallbackC)

textViewCopyClipboardClosure :: TextViewCopyClipboardCallback -> IO Closure
textViewCopyClipboardClosure cb = newCClosure =<< mkTextViewCopyClipboardCallback wrapped
    where wrapped = textViewCopyClipboardCallbackWrapper cb

textViewCopyClipboardCallbackWrapper ::
    TextViewCopyClipboardCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textViewCopyClipboardCallbackWrapper _cb _ _ = do
    _cb 

onTextViewCopyClipboard :: (GObject a, MonadIO m) => a -> TextViewCopyClipboardCallback -> m SignalHandlerId
onTextViewCopyClipboard obj cb = liftIO $ connectTextViewCopyClipboard obj cb SignalConnectBefore
afterTextViewCopyClipboard :: (GObject a, MonadIO m) => a -> TextViewCopyClipboardCallback -> m SignalHandlerId
afterTextViewCopyClipboard obj cb = connectTextViewCopyClipboard obj cb SignalConnectAfter

connectTextViewCopyClipboard :: (GObject a, MonadIO m) =>
                                a -> TextViewCopyClipboardCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewCopyClipboard obj cb after = liftIO $ do
    cb' <- mkTextViewCopyClipboardCallback (textViewCopyClipboardCallbackWrapper cb)
    connectSignalFunPtr obj "copy-clipboard" cb' after

-- signal TextView::cut-clipboard
type TextViewCutClipboardCallback =
    IO ()

noTextViewCutClipboardCallback :: Maybe TextViewCutClipboardCallback
noTextViewCutClipboardCallback = Nothing

type TextViewCutClipboardCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewCutClipboardCallback :: TextViewCutClipboardCallbackC -> IO (FunPtr TextViewCutClipboardCallbackC)

textViewCutClipboardClosure :: TextViewCutClipboardCallback -> IO Closure
textViewCutClipboardClosure cb = newCClosure =<< mkTextViewCutClipboardCallback wrapped
    where wrapped = textViewCutClipboardCallbackWrapper cb

textViewCutClipboardCallbackWrapper ::
    TextViewCutClipboardCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textViewCutClipboardCallbackWrapper _cb _ _ = do
    _cb 

onTextViewCutClipboard :: (GObject a, MonadIO m) => a -> TextViewCutClipboardCallback -> m SignalHandlerId
onTextViewCutClipboard obj cb = liftIO $ connectTextViewCutClipboard obj cb SignalConnectBefore
afterTextViewCutClipboard :: (GObject a, MonadIO m) => a -> TextViewCutClipboardCallback -> m SignalHandlerId
afterTextViewCutClipboard obj cb = connectTextViewCutClipboard obj cb SignalConnectAfter

connectTextViewCutClipboard :: (GObject a, MonadIO m) =>
                               a -> TextViewCutClipboardCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewCutClipboard obj cb after = liftIO $ do
    cb' <- mkTextViewCutClipboardCallback (textViewCutClipboardCallbackWrapper cb)
    connectSignalFunPtr obj "cut-clipboard" cb' after

-- signal TextView::delete-from-cursor
type TextViewDeleteFromCursorCallback =
    DeleteType ->
    Int32 ->
    IO ()

noTextViewDeleteFromCursorCallback :: Maybe TextViewDeleteFromCursorCallback
noTextViewDeleteFromCursorCallback = Nothing

type TextViewDeleteFromCursorCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewDeleteFromCursorCallback :: TextViewDeleteFromCursorCallbackC -> IO (FunPtr TextViewDeleteFromCursorCallbackC)

textViewDeleteFromCursorClosure :: TextViewDeleteFromCursorCallback -> IO Closure
textViewDeleteFromCursorClosure cb = newCClosure =<< mkTextViewDeleteFromCursorCallback wrapped
    where wrapped = textViewDeleteFromCursorCallbackWrapper cb

textViewDeleteFromCursorCallbackWrapper ::
    TextViewDeleteFromCursorCallback ->
    Ptr () ->
    CUInt ->
    Int32 ->
    Ptr () ->
    IO ()
textViewDeleteFromCursorCallbackWrapper _cb _ type_ count _ = do
    let type_' = (toEnum . fromIntegral) type_
    _cb  type_' count

onTextViewDeleteFromCursor :: (GObject a, MonadIO m) => a -> TextViewDeleteFromCursorCallback -> m SignalHandlerId
onTextViewDeleteFromCursor obj cb = liftIO $ connectTextViewDeleteFromCursor obj cb SignalConnectBefore
afterTextViewDeleteFromCursor :: (GObject a, MonadIO m) => a -> TextViewDeleteFromCursorCallback -> m SignalHandlerId
afterTextViewDeleteFromCursor obj cb = connectTextViewDeleteFromCursor obj cb SignalConnectAfter

connectTextViewDeleteFromCursor :: (GObject a, MonadIO m) =>
                                   a -> TextViewDeleteFromCursorCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewDeleteFromCursor obj cb after = liftIO $ do
    cb' <- mkTextViewDeleteFromCursorCallback (textViewDeleteFromCursorCallbackWrapper cb)
    connectSignalFunPtr obj "delete-from-cursor" cb' after

-- signal TextView::extend-selection
type TextViewExtendSelectionCallback =
    TextExtendSelection ->
    TextIter ->
    TextIter ->
    TextIter ->
    IO Bool

noTextViewExtendSelectionCallback :: Maybe TextViewExtendSelectionCallback
noTextViewExtendSelectionCallback = Nothing

type TextViewExtendSelectionCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr TextIter ->
    Ptr TextIter ->
    Ptr TextIter ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTextViewExtendSelectionCallback :: TextViewExtendSelectionCallbackC -> IO (FunPtr TextViewExtendSelectionCallbackC)

textViewExtendSelectionClosure :: TextViewExtendSelectionCallback -> IO Closure
textViewExtendSelectionClosure cb = newCClosure =<< mkTextViewExtendSelectionCallback wrapped
    where wrapped = textViewExtendSelectionCallbackWrapper cb

textViewExtendSelectionCallbackWrapper ::
    TextViewExtendSelectionCallback ->
    Ptr () ->
    CUInt ->
    Ptr TextIter ->
    Ptr TextIter ->
    Ptr TextIter ->
    Ptr () ->
    IO CInt
textViewExtendSelectionCallbackWrapper _cb _ granularity location start end _ = do
    let granularity' = (toEnum . fromIntegral) granularity
    location' <- (newBoxed TextIter) location
    start' <- (newBoxed TextIter) start
    end' <- (newBoxed TextIter) end
    result <- _cb  granularity' location' start' end'
    let result' = (fromIntegral . fromEnum) result
    return result'

onTextViewExtendSelection :: (GObject a, MonadIO m) => a -> TextViewExtendSelectionCallback -> m SignalHandlerId
onTextViewExtendSelection obj cb = liftIO $ connectTextViewExtendSelection obj cb SignalConnectBefore
afterTextViewExtendSelection :: (GObject a, MonadIO m) => a -> TextViewExtendSelectionCallback -> m SignalHandlerId
afterTextViewExtendSelection obj cb = connectTextViewExtendSelection obj cb SignalConnectAfter

connectTextViewExtendSelection :: (GObject a, MonadIO m) =>
                                  a -> TextViewExtendSelectionCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewExtendSelection obj cb after = liftIO $ do
    cb' <- mkTextViewExtendSelectionCallback (textViewExtendSelectionCallbackWrapper cb)
    connectSignalFunPtr obj "extend-selection" cb' after

-- signal TextView::insert-at-cursor
type TextViewInsertAtCursorCallback =
    T.Text ->
    IO ()

noTextViewInsertAtCursorCallback :: Maybe TextViewInsertAtCursorCallback
noTextViewInsertAtCursorCallback = Nothing

type TextViewInsertAtCursorCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewInsertAtCursorCallback :: TextViewInsertAtCursorCallbackC -> IO (FunPtr TextViewInsertAtCursorCallbackC)

textViewInsertAtCursorClosure :: TextViewInsertAtCursorCallback -> IO Closure
textViewInsertAtCursorClosure cb = newCClosure =<< mkTextViewInsertAtCursorCallback wrapped
    where wrapped = textViewInsertAtCursorCallbackWrapper cb

textViewInsertAtCursorCallbackWrapper ::
    TextViewInsertAtCursorCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
textViewInsertAtCursorCallbackWrapper _cb _ string _ = do
    string' <- cstringToText string
    _cb  string'

onTextViewInsertAtCursor :: (GObject a, MonadIO m) => a -> TextViewInsertAtCursorCallback -> m SignalHandlerId
onTextViewInsertAtCursor obj cb = liftIO $ connectTextViewInsertAtCursor obj cb SignalConnectBefore
afterTextViewInsertAtCursor :: (GObject a, MonadIO m) => a -> TextViewInsertAtCursorCallback -> m SignalHandlerId
afterTextViewInsertAtCursor obj cb = connectTextViewInsertAtCursor obj cb SignalConnectAfter

connectTextViewInsertAtCursor :: (GObject a, MonadIO m) =>
                                 a -> TextViewInsertAtCursorCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewInsertAtCursor obj cb after = liftIO $ do
    cb' <- mkTextViewInsertAtCursorCallback (textViewInsertAtCursorCallbackWrapper cb)
    connectSignalFunPtr obj "insert-at-cursor" cb' after

-- signal TextView::move-cursor
type TextViewMoveCursorCallback =
    MovementStep ->
    Int32 ->
    Bool ->
    IO ()

noTextViewMoveCursorCallback :: Maybe TextViewMoveCursorCallback
noTextViewMoveCursorCallback = Nothing

type TextViewMoveCursorCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Int32 ->
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewMoveCursorCallback :: TextViewMoveCursorCallbackC -> IO (FunPtr TextViewMoveCursorCallbackC)

textViewMoveCursorClosure :: TextViewMoveCursorCallback -> IO Closure
textViewMoveCursorClosure cb = newCClosure =<< mkTextViewMoveCursorCallback wrapped
    where wrapped = textViewMoveCursorCallbackWrapper cb

textViewMoveCursorCallbackWrapper ::
    TextViewMoveCursorCallback ->
    Ptr () ->
    CUInt ->
    Int32 ->
    CInt ->
    Ptr () ->
    IO ()
textViewMoveCursorCallbackWrapper _cb _ step count extend_selection _ = do
    let step' = (toEnum . fromIntegral) step
    let extend_selection' = (/= 0) extend_selection
    _cb  step' count extend_selection'

onTextViewMoveCursor :: (GObject a, MonadIO m) => a -> TextViewMoveCursorCallback -> m SignalHandlerId
onTextViewMoveCursor obj cb = liftIO $ connectTextViewMoveCursor obj cb SignalConnectBefore
afterTextViewMoveCursor :: (GObject a, MonadIO m) => a -> TextViewMoveCursorCallback -> m SignalHandlerId
afterTextViewMoveCursor obj cb = connectTextViewMoveCursor obj cb SignalConnectAfter

connectTextViewMoveCursor :: (GObject a, MonadIO m) =>
                             a -> TextViewMoveCursorCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewMoveCursor obj cb after = liftIO $ do
    cb' <- mkTextViewMoveCursorCallback (textViewMoveCursorCallbackWrapper cb)
    connectSignalFunPtr obj "move-cursor" cb' after

-- signal TextView::move-viewport
type TextViewMoveViewportCallback =
    ScrollStep ->
    Int32 ->
    IO ()

noTextViewMoveViewportCallback :: Maybe TextViewMoveViewportCallback
noTextViewMoveViewportCallback = Nothing

type TextViewMoveViewportCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewMoveViewportCallback :: TextViewMoveViewportCallbackC -> IO (FunPtr TextViewMoveViewportCallbackC)

textViewMoveViewportClosure :: TextViewMoveViewportCallback -> IO Closure
textViewMoveViewportClosure cb = newCClosure =<< mkTextViewMoveViewportCallback wrapped
    where wrapped = textViewMoveViewportCallbackWrapper cb

textViewMoveViewportCallbackWrapper ::
    TextViewMoveViewportCallback ->
    Ptr () ->
    CUInt ->
    Int32 ->
    Ptr () ->
    IO ()
textViewMoveViewportCallbackWrapper _cb _ step count _ = do
    let step' = (toEnum . fromIntegral) step
    _cb  step' count

onTextViewMoveViewport :: (GObject a, MonadIO m) => a -> TextViewMoveViewportCallback -> m SignalHandlerId
onTextViewMoveViewport obj cb = liftIO $ connectTextViewMoveViewport obj cb SignalConnectBefore
afterTextViewMoveViewport :: (GObject a, MonadIO m) => a -> TextViewMoveViewportCallback -> m SignalHandlerId
afterTextViewMoveViewport obj cb = connectTextViewMoveViewport obj cb SignalConnectAfter

connectTextViewMoveViewport :: (GObject a, MonadIO m) =>
                               a -> TextViewMoveViewportCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewMoveViewport obj cb after = liftIO $ do
    cb' <- mkTextViewMoveViewportCallback (textViewMoveViewportCallbackWrapper cb)
    connectSignalFunPtr obj "move-viewport" cb' after

-- signal TextView::paste-clipboard
type TextViewPasteClipboardCallback =
    IO ()

noTextViewPasteClipboardCallback :: Maybe TextViewPasteClipboardCallback
noTextViewPasteClipboardCallback = Nothing

type TextViewPasteClipboardCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewPasteClipboardCallback :: TextViewPasteClipboardCallbackC -> IO (FunPtr TextViewPasteClipboardCallbackC)

textViewPasteClipboardClosure :: TextViewPasteClipboardCallback -> IO Closure
textViewPasteClipboardClosure cb = newCClosure =<< mkTextViewPasteClipboardCallback wrapped
    where wrapped = textViewPasteClipboardCallbackWrapper cb

textViewPasteClipboardCallbackWrapper ::
    TextViewPasteClipboardCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textViewPasteClipboardCallbackWrapper _cb _ _ = do
    _cb 

onTextViewPasteClipboard :: (GObject a, MonadIO m) => a -> TextViewPasteClipboardCallback -> m SignalHandlerId
onTextViewPasteClipboard obj cb = liftIO $ connectTextViewPasteClipboard obj cb SignalConnectBefore
afterTextViewPasteClipboard :: (GObject a, MonadIO m) => a -> TextViewPasteClipboardCallback -> m SignalHandlerId
afterTextViewPasteClipboard obj cb = connectTextViewPasteClipboard obj cb SignalConnectAfter

connectTextViewPasteClipboard :: (GObject a, MonadIO m) =>
                                 a -> TextViewPasteClipboardCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewPasteClipboard obj cb after = liftIO $ do
    cb' <- mkTextViewPasteClipboardCallback (textViewPasteClipboardCallbackWrapper cb)
    connectSignalFunPtr obj "paste-clipboard" cb' after

-- signal TextView::populate-popup
type TextViewPopulatePopupCallback =
    Widget ->
    IO ()

noTextViewPopulatePopupCallback :: Maybe TextViewPopulatePopupCallback
noTextViewPopulatePopupCallback = Nothing

type TextViewPopulatePopupCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewPopulatePopupCallback :: TextViewPopulatePopupCallbackC -> IO (FunPtr TextViewPopulatePopupCallbackC)

textViewPopulatePopupClosure :: TextViewPopulatePopupCallback -> IO Closure
textViewPopulatePopupClosure cb = newCClosure =<< mkTextViewPopulatePopupCallback wrapped
    where wrapped = textViewPopulatePopupCallbackWrapper cb

textViewPopulatePopupCallbackWrapper ::
    TextViewPopulatePopupCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
textViewPopulatePopupCallbackWrapper _cb _ popup _ = do
    popup' <- (newObject Widget) popup
    _cb  popup'

onTextViewPopulatePopup :: (GObject a, MonadIO m) => a -> TextViewPopulatePopupCallback -> m SignalHandlerId
onTextViewPopulatePopup obj cb = liftIO $ connectTextViewPopulatePopup obj cb SignalConnectBefore
afterTextViewPopulatePopup :: (GObject a, MonadIO m) => a -> TextViewPopulatePopupCallback -> m SignalHandlerId
afterTextViewPopulatePopup obj cb = connectTextViewPopulatePopup obj cb SignalConnectAfter

connectTextViewPopulatePopup :: (GObject a, MonadIO m) =>
                                a -> TextViewPopulatePopupCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewPopulatePopup obj cb after = liftIO $ do
    cb' <- mkTextViewPopulatePopupCallback (textViewPopulatePopupCallbackWrapper cb)
    connectSignalFunPtr obj "populate-popup" cb' after

-- signal TextView::preedit-changed
type TextViewPreeditChangedCallback =
    T.Text ->
    IO ()

noTextViewPreeditChangedCallback :: Maybe TextViewPreeditChangedCallback
noTextViewPreeditChangedCallback = Nothing

type TextViewPreeditChangedCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewPreeditChangedCallback :: TextViewPreeditChangedCallbackC -> IO (FunPtr TextViewPreeditChangedCallbackC)

textViewPreeditChangedClosure :: TextViewPreeditChangedCallback -> IO Closure
textViewPreeditChangedClosure cb = newCClosure =<< mkTextViewPreeditChangedCallback wrapped
    where wrapped = textViewPreeditChangedCallbackWrapper cb

textViewPreeditChangedCallbackWrapper ::
    TextViewPreeditChangedCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
textViewPreeditChangedCallbackWrapper _cb _ preedit _ = do
    preedit' <- cstringToText preedit
    _cb  preedit'

onTextViewPreeditChanged :: (GObject a, MonadIO m) => a -> TextViewPreeditChangedCallback -> m SignalHandlerId
onTextViewPreeditChanged obj cb = liftIO $ connectTextViewPreeditChanged obj cb SignalConnectBefore
afterTextViewPreeditChanged :: (GObject a, MonadIO m) => a -> TextViewPreeditChangedCallback -> m SignalHandlerId
afterTextViewPreeditChanged obj cb = connectTextViewPreeditChanged obj cb SignalConnectAfter

connectTextViewPreeditChanged :: (GObject a, MonadIO m) =>
                                 a -> TextViewPreeditChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewPreeditChanged obj cb after = liftIO $ do
    cb' <- mkTextViewPreeditChangedCallback (textViewPreeditChangedCallbackWrapper cb)
    connectSignalFunPtr obj "preedit-changed" cb' after

-- signal TextView::select-all
type TextViewSelectAllCallback =
    Bool ->
    IO ()

noTextViewSelectAllCallback :: Maybe TextViewSelectAllCallback
noTextViewSelectAllCallback = Nothing

type TextViewSelectAllCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewSelectAllCallback :: TextViewSelectAllCallbackC -> IO (FunPtr TextViewSelectAllCallbackC)

textViewSelectAllClosure :: TextViewSelectAllCallback -> IO Closure
textViewSelectAllClosure cb = newCClosure =<< mkTextViewSelectAllCallback wrapped
    where wrapped = textViewSelectAllCallbackWrapper cb

textViewSelectAllCallbackWrapper ::
    TextViewSelectAllCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO ()
textViewSelectAllCallbackWrapper _cb _ select _ = do
    let select' = (/= 0) select
    _cb  select'

onTextViewSelectAll :: (GObject a, MonadIO m) => a -> TextViewSelectAllCallback -> m SignalHandlerId
onTextViewSelectAll obj cb = liftIO $ connectTextViewSelectAll obj cb SignalConnectBefore
afterTextViewSelectAll :: (GObject a, MonadIO m) => a -> TextViewSelectAllCallback -> m SignalHandlerId
afterTextViewSelectAll obj cb = connectTextViewSelectAll obj cb SignalConnectAfter

connectTextViewSelectAll :: (GObject a, MonadIO m) =>
                            a -> TextViewSelectAllCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewSelectAll obj cb after = liftIO $ do
    cb' <- mkTextViewSelectAllCallback (textViewSelectAllCallbackWrapper cb)
    connectSignalFunPtr obj "select-all" cb' after

-- signal TextView::set-anchor
type TextViewSetAnchorCallback =
    IO ()

noTextViewSetAnchorCallback :: Maybe TextViewSetAnchorCallback
noTextViewSetAnchorCallback = Nothing

type TextViewSetAnchorCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewSetAnchorCallback :: TextViewSetAnchorCallbackC -> IO (FunPtr TextViewSetAnchorCallbackC)

textViewSetAnchorClosure :: TextViewSetAnchorCallback -> IO Closure
textViewSetAnchorClosure cb = newCClosure =<< mkTextViewSetAnchorCallback wrapped
    where wrapped = textViewSetAnchorCallbackWrapper cb

textViewSetAnchorCallbackWrapper ::
    TextViewSetAnchorCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textViewSetAnchorCallbackWrapper _cb _ _ = do
    _cb 

onTextViewSetAnchor :: (GObject a, MonadIO m) => a -> TextViewSetAnchorCallback -> m SignalHandlerId
onTextViewSetAnchor obj cb = liftIO $ connectTextViewSetAnchor obj cb SignalConnectBefore
afterTextViewSetAnchor :: (GObject a, MonadIO m) => a -> TextViewSetAnchorCallback -> m SignalHandlerId
afterTextViewSetAnchor obj cb = connectTextViewSetAnchor obj cb SignalConnectAfter

connectTextViewSetAnchor :: (GObject a, MonadIO m) =>
                            a -> TextViewSetAnchorCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewSetAnchor obj cb after = liftIO $ do
    cb' <- mkTextViewSetAnchorCallback (textViewSetAnchorCallbackWrapper cb)
    connectSignalFunPtr obj "set-anchor" cb' after

-- signal TextView::toggle-cursor-visible
type TextViewToggleCursorVisibleCallback =
    IO ()

noTextViewToggleCursorVisibleCallback :: Maybe TextViewToggleCursorVisibleCallback
noTextViewToggleCursorVisibleCallback = Nothing

type TextViewToggleCursorVisibleCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewToggleCursorVisibleCallback :: TextViewToggleCursorVisibleCallbackC -> IO (FunPtr TextViewToggleCursorVisibleCallbackC)

textViewToggleCursorVisibleClosure :: TextViewToggleCursorVisibleCallback -> IO Closure
textViewToggleCursorVisibleClosure cb = newCClosure =<< mkTextViewToggleCursorVisibleCallback wrapped
    where wrapped = textViewToggleCursorVisibleCallbackWrapper cb

textViewToggleCursorVisibleCallbackWrapper ::
    TextViewToggleCursorVisibleCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textViewToggleCursorVisibleCallbackWrapper _cb _ _ = do
    _cb 

onTextViewToggleCursorVisible :: (GObject a, MonadIO m) => a -> TextViewToggleCursorVisibleCallback -> m SignalHandlerId
onTextViewToggleCursorVisible obj cb = liftIO $ connectTextViewToggleCursorVisible obj cb SignalConnectBefore
afterTextViewToggleCursorVisible :: (GObject a, MonadIO m) => a -> TextViewToggleCursorVisibleCallback -> m SignalHandlerId
afterTextViewToggleCursorVisible obj cb = connectTextViewToggleCursorVisible obj cb SignalConnectAfter

connectTextViewToggleCursorVisible :: (GObject a, MonadIO m) =>
                                      a -> TextViewToggleCursorVisibleCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewToggleCursorVisible obj cb after = liftIO $ do
    cb' <- mkTextViewToggleCursorVisibleCallback (textViewToggleCursorVisibleCallbackWrapper cb)
    connectSignalFunPtr obj "toggle-cursor-visible" cb' after

-- signal TextView::toggle-overwrite
type TextViewToggleOverwriteCallback =
    IO ()

noTextViewToggleOverwriteCallback :: Maybe TextViewToggleOverwriteCallback
noTextViewToggleOverwriteCallback = Nothing

type TextViewToggleOverwriteCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextViewToggleOverwriteCallback :: TextViewToggleOverwriteCallbackC -> IO (FunPtr TextViewToggleOverwriteCallbackC)

textViewToggleOverwriteClosure :: TextViewToggleOverwriteCallback -> IO Closure
textViewToggleOverwriteClosure cb = newCClosure =<< mkTextViewToggleOverwriteCallback wrapped
    where wrapped = textViewToggleOverwriteCallbackWrapper cb

textViewToggleOverwriteCallbackWrapper ::
    TextViewToggleOverwriteCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textViewToggleOverwriteCallbackWrapper _cb _ _ = do
    _cb 

onTextViewToggleOverwrite :: (GObject a, MonadIO m) => a -> TextViewToggleOverwriteCallback -> m SignalHandlerId
onTextViewToggleOverwrite obj cb = liftIO $ connectTextViewToggleOverwrite obj cb SignalConnectBefore
afterTextViewToggleOverwrite :: (GObject a, MonadIO m) => a -> TextViewToggleOverwriteCallback -> m SignalHandlerId
afterTextViewToggleOverwrite obj cb = connectTextViewToggleOverwrite obj cb SignalConnectAfter

connectTextViewToggleOverwrite :: (GObject a, MonadIO m) =>
                                  a -> TextViewToggleOverwriteCallback -> SignalConnectMode -> m SignalHandlerId
connectTextViewToggleOverwrite obj cb after = liftIO $ do
    cb' <- mkTextViewToggleOverwriteCallback (textViewToggleOverwriteCallbackWrapper cb)
    connectSignalFunPtr obj "toggle-overwrite" cb' after

-- object TextViewAccessible 
newtype TextViewAccessible = TextViewAccessible (ForeignPtr TextViewAccessible)
noTextViewAccessible :: Maybe TextViewAccessible
noTextViewAccessible = Nothing

foreign import ccall "gtk_text_view_accessible_get_type"
    c_gtk_text_view_accessible_get_type :: IO GType

type instance ParentTypes TextViewAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.EditableText, Atk.StreamableContent, Atk.Text]

instance GObject TextViewAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_text_view_accessible_get_type
    

class GObject o => TextViewAccessibleK o
instance (GObject o, IsDescendantOf TextViewAccessible o) => TextViewAccessibleK o

toTextViewAccessible :: TextViewAccessibleK o => o -> IO TextViewAccessible
toTextViewAccessible = unsafeCastTo TextViewAccessible

-- Enum TextViewLayer

data TextViewLayer = 
      TextViewLayerBelow
    | TextViewLayerAbove
    | AnotherTextViewLayer Int
    deriving (Show, Eq)

instance Enum TextViewLayer where
    fromEnum TextViewLayerBelow = 0
    fromEnum TextViewLayerAbove = 1
    fromEnum (AnotherTextViewLayer k) = k

    toEnum 0 = TextViewLayerBelow
    toEnum 1 = TextViewLayerAbove
    toEnum k = AnotherTextViewLayer k

foreign import ccall "gtk_text_view_layer_get_type" c_gtk_text_view_layer_get_type :: 
    IO GType

instance BoxedEnum TextViewLayer where
    boxedEnumType _ = c_gtk_text_view_layer_get_type

-- Enum TextWindowType

data TextWindowType = 
      TextWindowTypePrivate
    | TextWindowTypeWidget
    | TextWindowTypeText
    | TextWindowTypeLeft
    | TextWindowTypeRight
    | TextWindowTypeTop
    | TextWindowTypeBottom
    | AnotherTextWindowType Int
    deriving (Show, Eq)

instance Enum TextWindowType where
    fromEnum TextWindowTypePrivate = 0
    fromEnum TextWindowTypeWidget = 1
    fromEnum TextWindowTypeText = 2
    fromEnum TextWindowTypeLeft = 3
    fromEnum TextWindowTypeRight = 4
    fromEnum TextWindowTypeTop = 5
    fromEnum TextWindowTypeBottom = 6
    fromEnum (AnotherTextWindowType k) = k

    toEnum 0 = TextWindowTypePrivate
    toEnum 1 = TextWindowTypeWidget
    toEnum 2 = TextWindowTypeText
    toEnum 3 = TextWindowTypeLeft
    toEnum 4 = TextWindowTypeRight
    toEnum 5 = TextWindowTypeTop
    toEnum 6 = TextWindowTypeBottom
    toEnum k = AnotherTextWindowType k

foreign import ccall "gtk_text_window_type_get_type" c_gtk_text_window_type_get_type :: 
    IO GType

instance BoxedEnum TextWindowType where
    boxedEnumType _ = c_gtk_text_window_type_get_type

-- struct ThemeEngine
newtype ThemeEngine = ThemeEngine (ForeignPtr ThemeEngine)
noThemeEngine :: Maybe ThemeEngine
noThemeEngine = Nothing

-- object ThemingEngine 
newtype ThemingEngine = ThemingEngine (ForeignPtr ThemingEngine)
noThemingEngine :: Maybe ThemingEngine
noThemingEngine = Nothing

foreign import ccall "gtk_theming_engine_get_type"
    c_gtk_theming_engine_get_type :: IO GType

type instance ParentTypes ThemingEngine = '[GObject.Object]

instance GObject ThemingEngine where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_theming_engine_get_type
    

class GObject o => ThemingEngineK o
instance (GObject o, IsDescendantOf ThemingEngine o) => ThemingEngineK o

toThemingEngine :: ThemingEngineK o => o -> IO ThemingEngine
toThemingEngine = unsafeCastTo ThemingEngine

-- method ThemingEngine::get_background_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_background_color" gtk_theming_engine_get_background_color :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO ()

{-# DEPRECATED themingEngineGetBackgroundColor ["(Since version 3.14)"]#-}
themingEngineGetBackgroundColor ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Gdk.RGBA)
themingEngineGetBackgroundColor _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    gtk_theming_engine_get_background_color _obj' state' color
    color' <- (wrapBoxed Gdk.RGBA) color
    touchManagedPtr _obj
    return color'

-- method ThemingEngine::get_border
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_border" gtk_theming_engine_get_border :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Border ->                           -- border : TInterface "Gtk" "Border"
    IO ()

{-# DEPRECATED themingEngineGetBorder ["(Since version 3.14)"]#-}
themingEngineGetBorder ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Border)
themingEngineGetBorder _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    border <- callocBoxedBytes 8 :: IO (Ptr Border)
    gtk_theming_engine_get_border _obj' state' border
    border' <- (wrapBoxed Border) border
    touchManagedPtr _obj
    return border'

-- method ThemingEngine::get_border_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_border_color" gtk_theming_engine_get_border_color :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO ()

{-# DEPRECATED themingEngineGetBorderColor ["(Since version 3.14)"]#-}
themingEngineGetBorderColor ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Gdk.RGBA)
themingEngineGetBorderColor _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    gtk_theming_engine_get_border_color _obj' state' color
    color' <- (wrapBoxed Gdk.RGBA) color
    touchManagedPtr _obj
    return color'

-- method ThemingEngine::get_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_color" gtk_theming_engine_get_color :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO ()

{-# DEPRECATED themingEngineGetColor ["(Since version 3.14)"]#-}
themingEngineGetColor ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Gdk.RGBA)
themingEngineGetColor _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    gtk_theming_engine_get_color _obj' state' color
    color' <- (wrapBoxed Gdk.RGBA) color
    touchManagedPtr _obj
    return color'

-- method ThemingEngine::get_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextDirection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_direction" gtk_theming_engine_get_direction :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    IO CUInt

{-# DEPRECATED themingEngineGetDirection ["(Since version 3.8)","Use gtk_theming_engine_get_state() and","  check for #GTK_STATE_FLAG_DIR_LTR and","  #GTK_STATE_FLAG_DIR_RTL instead."]#-}
themingEngineGetDirection ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    m TextDirection
themingEngineGetDirection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_theming_engine_get_direction _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ThemingEngine::get_font
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontDescription"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_font" gtk_theming_engine_get_font :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    IO (Ptr Pango.FontDescription)

{-# DEPRECATED themingEngineGetFont ["(Since version 3.8)","Use gtk_theming_engine_get()"]#-}
themingEngineGetFont ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m Pango.FontDescription
themingEngineGetFont _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    result <- gtk_theming_engine_get_font _obj' state'
    checkUnexpectedReturnNULL "gtk_theming_engine_get_font" result
    result' <- (newBoxed Pango.FontDescription) result
    touchManagedPtr _obj
    return result'

-- method ThemingEngine::get_junction_sides
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "JunctionSides"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_junction_sides" gtk_theming_engine_get_junction_sides :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    IO CUInt

{-# DEPRECATED themingEngineGetJunctionSides ["(Since version 3.14)"]#-}
themingEngineGetJunctionSides ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    m [JunctionSides]
themingEngineGetJunctionSides _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_theming_engine_get_junction_sides _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method ThemingEngine::get_margin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_margin" gtk_theming_engine_get_margin :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Border ->                           -- margin : TInterface "Gtk" "Border"
    IO ()

{-# DEPRECATED themingEngineGetMargin ["(Since version 3.14)"]#-}
themingEngineGetMargin ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Border)
themingEngineGetMargin _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    margin <- callocBoxedBytes 8 :: IO (Ptr Border)
    gtk_theming_engine_get_margin _obj' state' margin
    margin' <- (wrapBoxed Border) margin
    touchManagedPtr _obj
    return margin'

-- method ThemingEngine::get_padding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_padding" gtk_theming_engine_get_padding :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Border ->                           -- padding : TInterface "Gtk" "Border"
    IO ()

{-# DEPRECATED themingEngineGetPadding ["(Since version 3.14)"]#-}
themingEngineGetPadding ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    m (Border)
themingEngineGetPadding _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    padding <- callocBoxedBytes 8 :: IO (Ptr Border)
    gtk_theming_engine_get_padding _obj' state' padding
    padding' <- (wrapBoxed Border) padding
    touchManagedPtr _obj
    return padding'

-- method ThemingEngine::get_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "WidgetPath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_path" gtk_theming_engine_get_path :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    IO (Ptr WidgetPath)

{-# DEPRECATED themingEngineGetPath ["(Since version 3.14)"]#-}
themingEngineGetPath ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    m WidgetPath
themingEngineGetPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_theming_engine_get_path _obj'
    checkUnexpectedReturnNULL "gtk_theming_engine_get_path" result
    result' <- (newBoxed WidgetPath) result
    touchManagedPtr _obj
    return result'

-- method ThemingEngine::get_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_property" gtk_theming_engine_get_property :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CString ->                              -- property : TBasicType TUTF8
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()

{-# DEPRECATED themingEngineGetProperty ["(Since version 3.14)"]#-}
themingEngineGetProperty ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- property
    [StateFlags] ->                         -- state
    m (GValue)
themingEngineGetProperty _obj property state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    property' <- textToCString property
    let state' = gflagsToWord state
    value <- callocBoxedBytes 24 :: IO (Ptr GValue)
    gtk_theming_engine_get_property _obj' property' state' value
    value' <- (wrapBoxed GValue) value
    touchManagedPtr _obj
    freeMem property'
    return value'

-- method ThemingEngine::get_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Screen"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_screen" gtk_theming_engine_get_screen :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    IO (Ptr Gdk.Screen)

{-# DEPRECATED themingEngineGetScreen ["(Since version 3.14)"]#-}
themingEngineGetScreen ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    m Gdk.Screen
themingEngineGetScreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_theming_engine_get_screen _obj'
    checkUnexpectedReturnNULL "gtk_theming_engine_get_screen" result
    result' <- (newObject Gdk.Screen) result
    touchManagedPtr _obj
    return result'

-- method ThemingEngine::get_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StateFlags"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_state" gtk_theming_engine_get_state :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    IO CUInt

{-# DEPRECATED themingEngineGetState ["(Since version 3.14)"]#-}
themingEngineGetState ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    m [StateFlags]
themingEngineGetState _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_theming_engine_get_state _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method ThemingEngine::get_style_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_get_style_property" gtk_theming_engine_get_style_property :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()

{-# DEPRECATED themingEngineGetStyleProperty ["(Since version 3.14)"]#-}
themingEngineGetStyleProperty ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- property_name
    m (GValue)
themingEngineGetStyleProperty _obj property_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    property_name' <- textToCString property_name
    value <- callocBoxedBytes 24 :: IO (Ptr GValue)
    gtk_theming_engine_get_style_property _obj' property_name' value
    value' <- (wrapBoxed GValue) value
    touchManagedPtr _obj
    freeMem property_name'
    return value'

-- method ThemingEngine::has_class
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style_class", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style_class", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_has_class" gtk_theming_engine_has_class :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CString ->                              -- style_class : TBasicType TUTF8
    IO CInt

{-# DEPRECATED themingEngineHasClass ["(Since version 3.14)"]#-}
themingEngineHasClass ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- style_class
    m Bool
themingEngineHasClass _obj style_class = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    style_class' <- textToCString style_class
    result <- gtk_theming_engine_has_class _obj' style_class'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem style_class'
    return result'

-- method ThemingEngine::has_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style_region", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "RegionFlags", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style_region", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_has_region" gtk_theming_engine_has_region :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CString ->                              -- style_region : TBasicType TUTF8
    Ptr CUInt ->                            -- flags : TInterface "Gtk" "RegionFlags"
    IO CInt

{-# DEPRECATED themingEngineHasRegion ["(Since version 3.14)"]#-}
themingEngineHasRegion ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- style_region
    m (Bool,[RegionFlags])
themingEngineHasRegion _obj style_region = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    style_region' <- textToCString style_region
    flags <- allocMem :: IO (Ptr CUInt)
    result <- gtk_theming_engine_has_region _obj' style_region' flags
    let result' = (/= 0) result
    flags' <- peek flags
    let flags'' = wordToGFlags flags'
    touchManagedPtr _obj
    freeMem style_region'
    freeMem flags
    return (result', flags'')

-- method ThemingEngine::lookup_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_lookup_color" gtk_theming_engine_lookup_color :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CString ->                              -- color_name : TBasicType TUTF8
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO CInt

{-# DEPRECATED themingEngineLookupColor ["(Since version 3.14)"]#-}
themingEngineLookupColor ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- color_name
    m (Bool,Gdk.RGBA)
themingEngineLookupColor _obj color_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    color_name' <- textToCString color_name
    color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    result <- gtk_theming_engine_lookup_color _obj' color_name' color
    let result' = (/= 0) result
    color' <- (wrapBoxed Gdk.RGBA) color
    touchManagedPtr _obj
    freeMem color_name'
    return (result', color')

-- method ThemingEngine::state_is_running
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "progress", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_state_is_running" gtk_theming_engine_state_is_running :: 
    Ptr ThemingEngine ->                    -- _obj : TInterface "Gtk" "ThemingEngine"
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    Ptr CDouble ->                          -- progress : TBasicType TDouble
    IO CInt

{-# DEPRECATED themingEngineStateIsRunning ["(Since version 3.6)","Always returns %FALSE"]#-}
themingEngineStateIsRunning ::
    (MonadIO m, ThemingEngineK a) =>
    a ->                                    -- _obj
    StateType ->                            -- state
    m (Bool,Double)
themingEngineStateIsRunning _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = (fromIntegral . fromEnum) state
    progress <- allocMem :: IO (Ptr CDouble)
    result <- gtk_theming_engine_state_is_running _obj' state' progress
    let result' = (/= 0) result
    progress' <- peek progress
    let progress'' = realToFrac progress'
    touchManagedPtr _obj
    freeMem progress
    return (result', progress'')

-- method ThemingEngine::load
-- method type : MemberFunction
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ThemingEngine"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_theming_engine_load" gtk_theming_engine_load :: 
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr ThemingEngine)

{-# DEPRECATED themingEngineLoad ["(Since version 3.14)"]#-}
themingEngineLoad ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m ThemingEngine
themingEngineLoad name = liftIO $ do
    name' <- textToCString name
    result <- gtk_theming_engine_load name'
    checkUnexpectedReturnNULL "gtk_theming_engine_load" result
    result' <- (newObject ThemingEngine) result
    freeMem name'
    return result'

-- callback TickCallback
tickCallbackClosure :: TickCallback -> IO Closure
tickCallbackClosure cb = newCClosure =<< mkTickCallback wrapped
    where wrapped = tickCallbackWrapper Nothing cb

type TickCallbackC =
    Ptr Widget ->
    Ptr Gdk.FrameClock ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkTickCallback :: TickCallbackC -> IO (FunPtr TickCallbackC)

type TickCallback =
    Widget ->
    Gdk.FrameClock ->
    IO Bool

noTickCallback :: Maybe TickCallback
noTickCallback = Nothing

tickCallbackWrapper ::
    Maybe (Ptr (FunPtr (TickCallbackC))) ->
    TickCallback ->
    Ptr Widget ->
    Ptr Gdk.FrameClock ->
    Ptr () ->
    IO CInt
tickCallbackWrapper funptrptr _cb widget frame_clock _ = do
    widget' <- (newObject Widget) widget
    frame_clock' <- (newObject Gdk.FrameClock) frame_clock
    result <- _cb  widget' frame_clock'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- object ToggleAction 
newtype ToggleAction = ToggleAction (ForeignPtr ToggleAction)
noToggleAction :: Maybe ToggleAction
noToggleAction = Nothing

foreign import ccall "gtk_toggle_action_get_type"
    c_gtk_toggle_action_get_type :: IO GType

type instance ParentTypes ToggleAction = '[Action, GObject.Object, Buildable]

instance GObject ToggleAction where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_toggle_action_get_type
    

class GObject o => ToggleActionK o
instance (GObject o, IsDescendantOf ToggleAction o) => ToggleActionK o

toToggleAction :: ToggleActionK o => o -> IO ToggleAction
toToggleAction = unsafeCastTo ToggleAction

-- method ToggleAction::new
-- method type : Constructor
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToggleAction"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_action_new" gtk_toggle_action_new :: 
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- label : TBasicType TUTF8
    CString ->                              -- tooltip : TBasicType TUTF8
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr ToggleAction)

{-# DEPRECATED toggleActionNew ["(Since version 3.10)"]#-}
toggleActionNew ::
    (MonadIO m) =>
    T.Text ->                               -- name
    Maybe (T.Text) ->                       -- label
    Maybe (T.Text) ->                       -- tooltip
    Maybe (T.Text) ->                       -- stock_id
    m ToggleAction
toggleActionNew name label tooltip stock_id = liftIO $ do
    name' <- textToCString name
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    maybeTooltip <- case tooltip of
        Nothing -> return nullPtr
        Just jTooltip -> do
            jTooltip' <- textToCString jTooltip
            return jTooltip'
    maybeStock_id <- case stock_id of
        Nothing -> return nullPtr
        Just jStock_id -> do
            jStock_id' <- textToCString jStock_id
            return jStock_id'
    result <- gtk_toggle_action_new name' maybeLabel maybeTooltip maybeStock_id
    checkUnexpectedReturnNULL "gtk_toggle_action_new" result
    result' <- (wrapObject ToggleAction) result
    freeMem name'
    freeMem maybeLabel
    freeMem maybeTooltip
    freeMem maybeStock_id
    return result'

-- method ToggleAction::get_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_action_get_active" gtk_toggle_action_get_active :: 
    Ptr ToggleAction ->                     -- _obj : TInterface "Gtk" "ToggleAction"
    IO CInt

{-# DEPRECATED toggleActionGetActive ["(Since version 3.10)"]#-}
toggleActionGetActive ::
    (MonadIO m, ToggleActionK a) =>
    a ->                                    -- _obj
    m Bool
toggleActionGetActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toggle_action_get_active _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToggleAction::get_draw_as_radio
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_action_get_draw_as_radio" gtk_toggle_action_get_draw_as_radio :: 
    Ptr ToggleAction ->                     -- _obj : TInterface "Gtk" "ToggleAction"
    IO CInt

{-# DEPRECATED toggleActionGetDrawAsRadio ["(Since version 3.10)"]#-}
toggleActionGetDrawAsRadio ::
    (MonadIO m, ToggleActionK a) =>
    a ->                                    -- _obj
    m Bool
toggleActionGetDrawAsRadio _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toggle_action_get_draw_as_radio _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToggleAction::set_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_action_set_active" gtk_toggle_action_set_active :: 
    Ptr ToggleAction ->                     -- _obj : TInterface "Gtk" "ToggleAction"
    CInt ->                                 -- is_active : TBasicType TBoolean
    IO ()

{-# DEPRECATED toggleActionSetActive ["(Since version 3.10)"]#-}
toggleActionSetActive ::
    (MonadIO m, ToggleActionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- is_active
    m ()
toggleActionSetActive _obj is_active = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let is_active' = (fromIntegral . fromEnum) is_active
    gtk_toggle_action_set_active _obj' is_active'
    touchManagedPtr _obj
    return ()

-- method ToggleAction::set_draw_as_radio
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_as_radio", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_as_radio", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_action_set_draw_as_radio" gtk_toggle_action_set_draw_as_radio :: 
    Ptr ToggleAction ->                     -- _obj : TInterface "Gtk" "ToggleAction"
    CInt ->                                 -- draw_as_radio : TBasicType TBoolean
    IO ()

{-# DEPRECATED toggleActionSetDrawAsRadio ["(Since version 3.10)"]#-}
toggleActionSetDrawAsRadio ::
    (MonadIO m, ToggleActionK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- draw_as_radio
    m ()
toggleActionSetDrawAsRadio _obj draw_as_radio = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let draw_as_radio' = (fromIntegral . fromEnum) draw_as_radio
    gtk_toggle_action_set_draw_as_radio _obj' draw_as_radio'
    touchManagedPtr _obj
    return ()

-- method ToggleAction::toggled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_action_toggled" gtk_toggle_action_toggled :: 
    Ptr ToggleAction ->                     -- _obj : TInterface "Gtk" "ToggleAction"
    IO ()

{-# DEPRECATED toggleActionToggled ["(Since version 3.10)"]#-}
toggleActionToggled ::
    (MonadIO m, ToggleActionK a) =>
    a ->                                    -- _obj
    m ()
toggleActionToggled _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_toggle_action_toggled _obj'
    touchManagedPtr _obj
    return ()

-- signal ToggleAction::toggled
type ToggleActionToggledCallback =
    IO ()

noToggleActionToggledCallback :: Maybe ToggleActionToggledCallback
noToggleActionToggledCallback = Nothing

type ToggleActionToggledCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkToggleActionToggledCallback :: ToggleActionToggledCallbackC -> IO (FunPtr ToggleActionToggledCallbackC)

toggleActionToggledClosure :: ToggleActionToggledCallback -> IO Closure
toggleActionToggledClosure cb = newCClosure =<< mkToggleActionToggledCallback wrapped
    where wrapped = toggleActionToggledCallbackWrapper cb

toggleActionToggledCallbackWrapper ::
    ToggleActionToggledCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
toggleActionToggledCallbackWrapper _cb _ _ = do
    _cb 

onToggleActionToggled :: (GObject a, MonadIO m) => a -> ToggleActionToggledCallback -> m SignalHandlerId
onToggleActionToggled obj cb = liftIO $ connectToggleActionToggled obj cb SignalConnectBefore
afterToggleActionToggled :: (GObject a, MonadIO m) => a -> ToggleActionToggledCallback -> m SignalHandlerId
afterToggleActionToggled obj cb = connectToggleActionToggled obj cb SignalConnectAfter

connectToggleActionToggled :: (GObject a, MonadIO m) =>
                              a -> ToggleActionToggledCallback -> SignalConnectMode -> m SignalHandlerId
connectToggleActionToggled obj cb after = liftIO $ do
    cb' <- mkToggleActionToggledCallback (toggleActionToggledCallbackWrapper cb)
    connectSignalFunPtr obj "toggled" cb' after

-- struct ToggleActionEntry
newtype ToggleActionEntry = ToggleActionEntry (ForeignPtr ToggleActionEntry)
noToggleActionEntry :: Maybe ToggleActionEntry
noToggleActionEntry = Nothing

toggleActionEntryReadName :: ToggleActionEntry -> IO T.Text
toggleActionEntryReadName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

toggleActionEntryReadStockId :: ToggleActionEntry -> IO T.Text
toggleActionEntryReadStockId s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

toggleActionEntryReadLabel :: ToggleActionEntry -> IO T.Text
toggleActionEntryReadLabel s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO CString
    val' <- cstringToText val
    return val'

toggleActionEntryReadAccelerator :: ToggleActionEntry -> IO T.Text
toggleActionEntryReadAccelerator s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO CString
    val' <- cstringToText val
    return val'

toggleActionEntryReadTooltip :: ToggleActionEntry -> IO T.Text
toggleActionEntryReadTooltip s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO CString
    val' <- cstringToText val
    return val'

-- XXX Skipped getter for "ToggleActionEntry:callback" :: Not implemented: "Wrapping foreign callbacks is not supported yet"

toggleActionEntryReadIsActive :: ToggleActionEntry -> IO Bool
toggleActionEntryReadIsActive s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 48) :: IO CInt
    let val' = (/= 0) val
    return val'

-- object ToggleButton 
newtype ToggleButton = ToggleButton (ForeignPtr ToggleButton)
noToggleButton :: Maybe ToggleButton
noToggleButton = Nothing

foreign import ccall "gtk_toggle_button_get_type"
    c_gtk_toggle_button_get_type :: IO GType

type instance ParentTypes ToggleButton = '[Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject ToggleButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_toggle_button_get_type
    

class GObject o => ToggleButtonK o
instance (GObject o, IsDescendantOf ToggleButton o) => ToggleButtonK o

toToggleButton :: ToggleButtonK o => o -> IO ToggleButton
toToggleButton = unsafeCastTo ToggleButton

-- method ToggleButton::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ToggleButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_button_new" gtk_toggle_button_new :: 
    IO (Ptr ToggleButton)


toggleButtonNew ::
    (MonadIO m) =>
    m ToggleButton
toggleButtonNew  = liftIO $ do
    result <- gtk_toggle_button_new
    checkUnexpectedReturnNULL "gtk_toggle_button_new" result
    result' <- (newObject ToggleButton) result
    return result'

-- method ToggleButton::new_with_label
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToggleButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_button_new_with_label" gtk_toggle_button_new_with_label :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr ToggleButton)


toggleButtonNewWithLabel ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m ToggleButton
toggleButtonNewWithLabel label = liftIO $ do
    label' <- textToCString label
    result <- gtk_toggle_button_new_with_label label'
    checkUnexpectedReturnNULL "gtk_toggle_button_new_with_label" result
    result' <- (newObject ToggleButton) result
    freeMem label'
    return result'

-- method ToggleButton::new_with_mnemonic
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToggleButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_button_new_with_mnemonic" gtk_toggle_button_new_with_mnemonic :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr ToggleButton)


toggleButtonNewWithMnemonic ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m ToggleButton
toggleButtonNewWithMnemonic label = liftIO $ do
    label' <- textToCString label
    result <- gtk_toggle_button_new_with_mnemonic label'
    checkUnexpectedReturnNULL "gtk_toggle_button_new_with_mnemonic" result
    result' <- (newObject ToggleButton) result
    freeMem label'
    return result'

-- method ToggleButton::get_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_button_get_active" gtk_toggle_button_get_active :: 
    Ptr ToggleButton ->                     -- _obj : TInterface "Gtk" "ToggleButton"
    IO CInt


toggleButtonGetActive ::
    (MonadIO m, ToggleButtonK a) =>
    a ->                                    -- _obj
    m Bool
toggleButtonGetActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toggle_button_get_active _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToggleButton::get_inconsistent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_button_get_inconsistent" gtk_toggle_button_get_inconsistent :: 
    Ptr ToggleButton ->                     -- _obj : TInterface "Gtk" "ToggleButton"
    IO CInt


toggleButtonGetInconsistent ::
    (MonadIO m, ToggleButtonK a) =>
    a ->                                    -- _obj
    m Bool
toggleButtonGetInconsistent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toggle_button_get_inconsistent _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToggleButton::get_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_button_get_mode" gtk_toggle_button_get_mode :: 
    Ptr ToggleButton ->                     -- _obj : TInterface "Gtk" "ToggleButton"
    IO CInt


toggleButtonGetMode ::
    (MonadIO m, ToggleButtonK a) =>
    a ->                                    -- _obj
    m Bool
toggleButtonGetMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toggle_button_get_mode _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToggleButton::set_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_button_set_active" gtk_toggle_button_set_active :: 
    Ptr ToggleButton ->                     -- _obj : TInterface "Gtk" "ToggleButton"
    CInt ->                                 -- is_active : TBasicType TBoolean
    IO ()


toggleButtonSetActive ::
    (MonadIO m, ToggleButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- is_active
    m ()
toggleButtonSetActive _obj is_active = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let is_active' = (fromIntegral . fromEnum) is_active
    gtk_toggle_button_set_active _obj' is_active'
    touchManagedPtr _obj
    return ()

-- method ToggleButton::set_inconsistent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_button_set_inconsistent" gtk_toggle_button_set_inconsistent :: 
    Ptr ToggleButton ->                     -- _obj : TInterface "Gtk" "ToggleButton"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


toggleButtonSetInconsistent ::
    (MonadIO m, ToggleButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
toggleButtonSetInconsistent _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_toggle_button_set_inconsistent _obj' setting'
    touchManagedPtr _obj
    return ()

-- method ToggleButton::set_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_indicator", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_indicator", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_button_set_mode" gtk_toggle_button_set_mode :: 
    Ptr ToggleButton ->                     -- _obj : TInterface "Gtk" "ToggleButton"
    CInt ->                                 -- draw_indicator : TBasicType TBoolean
    IO ()


toggleButtonSetMode ::
    (MonadIO m, ToggleButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- draw_indicator
    m ()
toggleButtonSetMode _obj draw_indicator = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let draw_indicator' = (fromIntegral . fromEnum) draw_indicator
    gtk_toggle_button_set_mode _obj' draw_indicator'
    touchManagedPtr _obj
    return ()

-- method ToggleButton::toggled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_button_toggled" gtk_toggle_button_toggled :: 
    Ptr ToggleButton ->                     -- _obj : TInterface "Gtk" "ToggleButton"
    IO ()


toggleButtonToggled ::
    (MonadIO m, ToggleButtonK a) =>
    a ->                                    -- _obj
    m ()
toggleButtonToggled _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_toggle_button_toggled _obj'
    touchManagedPtr _obj
    return ()

-- signal ToggleButton::toggled
type ToggleButtonToggledCallback =
    IO ()

noToggleButtonToggledCallback :: Maybe ToggleButtonToggledCallback
noToggleButtonToggledCallback = Nothing

type ToggleButtonToggledCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkToggleButtonToggledCallback :: ToggleButtonToggledCallbackC -> IO (FunPtr ToggleButtonToggledCallbackC)

toggleButtonToggledClosure :: ToggleButtonToggledCallback -> IO Closure
toggleButtonToggledClosure cb = newCClosure =<< mkToggleButtonToggledCallback wrapped
    where wrapped = toggleButtonToggledCallbackWrapper cb

toggleButtonToggledCallbackWrapper ::
    ToggleButtonToggledCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
toggleButtonToggledCallbackWrapper _cb _ _ = do
    _cb 

onToggleButtonToggled :: (GObject a, MonadIO m) => a -> ToggleButtonToggledCallback -> m SignalHandlerId
onToggleButtonToggled obj cb = liftIO $ connectToggleButtonToggled obj cb SignalConnectBefore
afterToggleButtonToggled :: (GObject a, MonadIO m) => a -> ToggleButtonToggledCallback -> m SignalHandlerId
afterToggleButtonToggled obj cb = connectToggleButtonToggled obj cb SignalConnectAfter

connectToggleButtonToggled :: (GObject a, MonadIO m) =>
                              a -> ToggleButtonToggledCallback -> SignalConnectMode -> m SignalHandlerId
connectToggleButtonToggled obj cb after = liftIO $ do
    cb' <- mkToggleButtonToggledCallback (toggleButtonToggledCallbackWrapper cb)
    connectSignalFunPtr obj "toggled" cb' after

-- object ToggleButtonAccessible 
newtype ToggleButtonAccessible = ToggleButtonAccessible (ForeignPtr ToggleButtonAccessible)
noToggleButtonAccessible :: Maybe ToggleButtonAccessible
noToggleButtonAccessible = Nothing

foreign import ccall "gtk_toggle_button_accessible_get_type"
    c_gtk_toggle_button_accessible_get_type :: IO GType

type instance ParentTypes ToggleButtonAccessible = '[ButtonAccessible, ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component, Atk.Image]

instance GObject ToggleButtonAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_toggle_button_accessible_get_type
    

class GObject o => ToggleButtonAccessibleK o
instance (GObject o, IsDescendantOf ToggleButtonAccessible o) => ToggleButtonAccessibleK o

toToggleButtonAccessible :: ToggleButtonAccessibleK o => o -> IO ToggleButtonAccessible
toToggleButtonAccessible = unsafeCastTo ToggleButtonAccessible

-- object ToggleToolButton 
newtype ToggleToolButton = ToggleToolButton (ForeignPtr ToggleToolButton)
noToggleToolButton :: Maybe ToggleToolButton
noToggleToolButton = Nothing

foreign import ccall "gtk_toggle_tool_button_get_type"
    c_gtk_toggle_tool_button_get_type :: IO GType

type instance ParentTypes ToggleToolButton = '[ToolButton, ToolItem, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject ToggleToolButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_toggle_tool_button_get_type
    

class GObject o => ToggleToolButtonK o
instance (GObject o, IsDescendantOf ToggleToolButton o) => ToggleToolButtonK o

toToggleToolButton :: ToggleToolButtonK o => o -> IO ToggleToolButton
toToggleToolButton = unsafeCastTo ToggleToolButton

-- method ToggleToolButton::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ToggleToolButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_tool_button_new" gtk_toggle_tool_button_new :: 
    IO (Ptr ToggleToolButton)


toggleToolButtonNew ::
    (MonadIO m) =>
    m ToggleToolButton
toggleToolButtonNew  = liftIO $ do
    result <- gtk_toggle_tool_button_new
    checkUnexpectedReturnNULL "gtk_toggle_tool_button_new" result
    result' <- (newObject ToggleToolButton) result
    return result'

-- method ToggleToolButton::new_from_stock
-- method type : Constructor
-- Args : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToggleToolButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_tool_button_new_from_stock" gtk_toggle_tool_button_new_from_stock :: 
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr ToggleToolButton)

{-# DEPRECATED toggleToolButtonNewFromStock ["(Since version 3.10)","Use gtk_toggle_tool_button_new() instead."]#-}
toggleToolButtonNewFromStock ::
    (MonadIO m) =>
    T.Text ->                               -- stock_id
    m ToggleToolButton
toggleToolButtonNewFromStock stock_id = liftIO $ do
    stock_id' <- textToCString stock_id
    result <- gtk_toggle_tool_button_new_from_stock stock_id'
    checkUnexpectedReturnNULL "gtk_toggle_tool_button_new_from_stock" result
    result' <- (newObject ToggleToolButton) result
    freeMem stock_id'
    return result'

-- method ToggleToolButton::get_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_tool_button_get_active" gtk_toggle_tool_button_get_active :: 
    Ptr ToggleToolButton ->                 -- _obj : TInterface "Gtk" "ToggleToolButton"
    IO CInt


toggleToolButtonGetActive ::
    (MonadIO m, ToggleToolButtonK a) =>
    a ->                                    -- _obj
    m Bool
toggleToolButtonGetActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toggle_tool_button_get_active _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToggleToolButton::set_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToggleToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toggle_tool_button_set_active" gtk_toggle_tool_button_set_active :: 
    Ptr ToggleToolButton ->                 -- _obj : TInterface "Gtk" "ToggleToolButton"
    CInt ->                                 -- is_active : TBasicType TBoolean
    IO ()


toggleToolButtonSetActive ::
    (MonadIO m, ToggleToolButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- is_active
    m ()
toggleToolButtonSetActive _obj is_active = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let is_active' = (fromIntegral . fromEnum) is_active
    gtk_toggle_tool_button_set_active _obj' is_active'
    touchManagedPtr _obj
    return ()

-- signal ToggleToolButton::toggled
type ToggleToolButtonToggledCallback =
    IO ()

noToggleToolButtonToggledCallback :: Maybe ToggleToolButtonToggledCallback
noToggleToolButtonToggledCallback = Nothing

type ToggleToolButtonToggledCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkToggleToolButtonToggledCallback :: ToggleToolButtonToggledCallbackC -> IO (FunPtr ToggleToolButtonToggledCallbackC)

toggleToolButtonToggledClosure :: ToggleToolButtonToggledCallback -> IO Closure
toggleToolButtonToggledClosure cb = newCClosure =<< mkToggleToolButtonToggledCallback wrapped
    where wrapped = toggleToolButtonToggledCallbackWrapper cb

toggleToolButtonToggledCallbackWrapper ::
    ToggleToolButtonToggledCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
toggleToolButtonToggledCallbackWrapper _cb _ _ = do
    _cb 

onToggleToolButtonToggled :: (GObject a, MonadIO m) => a -> ToggleToolButtonToggledCallback -> m SignalHandlerId
onToggleToolButtonToggled obj cb = liftIO $ connectToggleToolButtonToggled obj cb SignalConnectBefore
afterToggleToolButtonToggled :: (GObject a, MonadIO m) => a -> ToggleToolButtonToggledCallback -> m SignalHandlerId
afterToggleToolButtonToggled obj cb = connectToggleToolButtonToggled obj cb SignalConnectAfter

connectToggleToolButtonToggled :: (GObject a, MonadIO m) =>
                                  a -> ToggleToolButtonToggledCallback -> SignalConnectMode -> m SignalHandlerId
connectToggleToolButtonToggled obj cb after = liftIO $ do
    cb' <- mkToggleToolButtonToggledCallback (toggleToolButtonToggledCallbackWrapper cb)
    connectSignalFunPtr obj "toggled" cb' after

-- object ToolButton 
newtype ToolButton = ToolButton (ForeignPtr ToolButton)
noToolButton :: Maybe ToolButton
noToolButton = Nothing

foreign import ccall "gtk_tool_button_get_type"
    c_gtk_tool_button_get_type :: IO GType

type instance ParentTypes ToolButton = '[ToolItem, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable]

instance GObject ToolButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_tool_button_get_type
    

class GObject o => ToolButtonK o
instance (GObject o, IsDescendantOf ToolButton o) => ToolButtonK o

toToolButton :: ToolButtonK o => o -> IO ToolButton
toToolButton = unsafeCastTo ToolButton

-- method ToolButton::new
-- method type : Constructor
-- Args : [Arg {argName = "icon_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_new" gtk_tool_button_new :: 
    Ptr Widget ->                           -- icon_widget : TInterface "Gtk" "Widget"
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr ToolButton)


toolButtonNew ::
    (MonadIO m, WidgetK a) =>
    Maybe (a) ->                            -- icon_widget
    Maybe (T.Text) ->                       -- label
    m ToolButton
toolButtonNew icon_widget label = liftIO $ do
    maybeIcon_widget <- case icon_widget of
        Nothing -> return nullPtr
        Just jIcon_widget -> do
            let jIcon_widget' = unsafeManagedPtrCastPtr jIcon_widget
            return jIcon_widget'
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    result <- gtk_tool_button_new maybeIcon_widget maybeLabel
    checkUnexpectedReturnNULL "gtk_tool_button_new" result
    result' <- (newObject ToolButton) result
    whenJust icon_widget touchManagedPtr
    freeMem maybeLabel
    return result'

-- method ToolButton::new_from_stock
-- method type : Constructor
-- Args : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_new_from_stock" gtk_tool_button_new_from_stock :: 
    CString ->                              -- stock_id : TBasicType TUTF8
    IO (Ptr ToolButton)

{-# DEPRECATED toolButtonNewFromStock ["(Since version 3.10)","Use gtk_tool_button_new() together with","gtk_image_new_from_icon_name() instead."]#-}
toolButtonNewFromStock ::
    (MonadIO m) =>
    T.Text ->                               -- stock_id
    m ToolButton
toolButtonNewFromStock stock_id = liftIO $ do
    stock_id' <- textToCString stock_id
    result <- gtk_tool_button_new_from_stock stock_id'
    checkUnexpectedReturnNULL "gtk_tool_button_new_from_stock" result
    result' <- (newObject ToolButton) result
    freeMem stock_id'
    return result'

-- method ToolButton::get_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_get_icon_name" gtk_tool_button_get_icon_name :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    IO CString


toolButtonGetIconName ::
    (MonadIO m, ToolButtonK a) =>
    a ->                                    -- _obj
    m T.Text
toolButtonGetIconName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_button_get_icon_name _obj'
    checkUnexpectedReturnNULL "gtk_tool_button_get_icon_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method ToolButton::get_icon_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_get_icon_widget" gtk_tool_button_get_icon_widget :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    IO (Ptr Widget)


toolButtonGetIconWidget ::
    (MonadIO m, ToolButtonK a) =>
    a ->                                    -- _obj
    m Widget
toolButtonGetIconWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_button_get_icon_widget _obj'
    checkUnexpectedReturnNULL "gtk_tool_button_get_icon_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method ToolButton::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_get_label" gtk_tool_button_get_label :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    IO CString


toolButtonGetLabel ::
    (MonadIO m, ToolButtonK a) =>
    a ->                                    -- _obj
    m T.Text
toolButtonGetLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_button_get_label _obj'
    checkUnexpectedReturnNULL "gtk_tool_button_get_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method ToolButton::get_label_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_get_label_widget" gtk_tool_button_get_label_widget :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    IO (Ptr Widget)


toolButtonGetLabelWidget ::
    (MonadIO m, ToolButtonK a) =>
    a ->                                    -- _obj
    m Widget
toolButtonGetLabelWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_button_get_label_widget _obj'
    checkUnexpectedReturnNULL "gtk_tool_button_get_label_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method ToolButton::get_stock_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_get_stock_id" gtk_tool_button_get_stock_id :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    IO CString

{-# DEPRECATED toolButtonGetStockId ["(Since version 3.10)","Use gtk_tool_button_get_icon_name() instead."]#-}
toolButtonGetStockId ::
    (MonadIO m, ToolButtonK a) =>
    a ->                                    -- _obj
    m T.Text
toolButtonGetStockId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_button_get_stock_id _obj'
    checkUnexpectedReturnNULL "gtk_tool_button_get_stock_id" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method ToolButton::get_use_underline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_get_use_underline" gtk_tool_button_get_use_underline :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    IO CInt


toolButtonGetUseUnderline ::
    (MonadIO m, ToolButtonK a) =>
    a ->                                    -- _obj
    m Bool
toolButtonGetUseUnderline _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_button_get_use_underline _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToolButton::set_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_set_icon_name" gtk_tool_button_set_icon_name :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()


toolButtonSetIconName ::
    (MonadIO m, ToolButtonK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- icon_name
    m ()
toolButtonSetIconName _obj icon_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeIcon_name <- case icon_name of
        Nothing -> return nullPtr
        Just jIcon_name -> do
            jIcon_name' <- textToCString jIcon_name
            return jIcon_name'
    gtk_tool_button_set_icon_name _obj' maybeIcon_name
    touchManagedPtr _obj
    freeMem maybeIcon_name
    return ()

-- method ToolButton::set_icon_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_set_icon_widget" gtk_tool_button_set_icon_widget :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    Ptr Widget ->                           -- icon_widget : TInterface "Gtk" "Widget"
    IO ()


toolButtonSetIconWidget ::
    (MonadIO m, ToolButtonK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- icon_widget
    m ()
toolButtonSetIconWidget _obj icon_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeIcon_widget <- case icon_widget of
        Nothing -> return nullPtr
        Just jIcon_widget -> do
            let jIcon_widget' = unsafeManagedPtrCastPtr jIcon_widget
            return jIcon_widget'
    gtk_tool_button_set_icon_widget _obj' maybeIcon_widget
    touchManagedPtr _obj
    whenJust icon_widget touchManagedPtr
    return ()

-- method ToolButton::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_set_label" gtk_tool_button_set_label :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    CString ->                              -- label : TBasicType TUTF8
    IO ()


toolButtonSetLabel ::
    (MonadIO m, ToolButtonK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- label
    m ()
toolButtonSetLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    gtk_tool_button_set_label _obj' maybeLabel
    touchManagedPtr _obj
    freeMem maybeLabel
    return ()

-- method ToolButton::set_label_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_set_label_widget" gtk_tool_button_set_label_widget :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    Ptr Widget ->                           -- label_widget : TInterface "Gtk" "Widget"
    IO ()


toolButtonSetLabelWidget ::
    (MonadIO m, ToolButtonK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- label_widget
    m ()
toolButtonSetLabelWidget _obj label_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLabel_widget <- case label_widget of
        Nothing -> return nullPtr
        Just jLabel_widget -> do
            let jLabel_widget' = unsafeManagedPtrCastPtr jLabel_widget
            return jLabel_widget'
    gtk_tool_button_set_label_widget _obj' maybeLabel_widget
    touchManagedPtr _obj
    whenJust label_widget touchManagedPtr
    return ()

-- method ToolButton::set_stock_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_set_stock_id" gtk_tool_button_set_stock_id :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    CString ->                              -- stock_id : TBasicType TUTF8
    IO ()

{-# DEPRECATED toolButtonSetStockId ["(Since version 3.10)","Use gtk_tool_button_set_icon_name() instead."]#-}
toolButtonSetStockId ::
    (MonadIO m, ToolButtonK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- stock_id
    m ()
toolButtonSetStockId _obj stock_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeStock_id <- case stock_id of
        Nothing -> return nullPtr
        Just jStock_id -> do
            jStock_id' <- textToCString jStock_id
            return jStock_id'
    gtk_tool_button_set_stock_id _obj' maybeStock_id
    touchManagedPtr _obj
    freeMem maybeStock_id
    return ()

-- method ToolButton::set_use_underline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_underline", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_underline", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_button_set_use_underline" gtk_tool_button_set_use_underline :: 
    Ptr ToolButton ->                       -- _obj : TInterface "Gtk" "ToolButton"
    CInt ->                                 -- use_underline : TBasicType TBoolean
    IO ()


toolButtonSetUseUnderline ::
    (MonadIO m, ToolButtonK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_underline
    m ()
toolButtonSetUseUnderline _obj use_underline = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_underline' = (fromIntegral . fromEnum) use_underline
    gtk_tool_button_set_use_underline _obj' use_underline'
    touchManagedPtr _obj
    return ()

-- signal ToolButton::clicked
type ToolButtonClickedCallback =
    IO ()

noToolButtonClickedCallback :: Maybe ToolButtonClickedCallback
noToolButtonClickedCallback = Nothing

type ToolButtonClickedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkToolButtonClickedCallback :: ToolButtonClickedCallbackC -> IO (FunPtr ToolButtonClickedCallbackC)

toolButtonClickedClosure :: ToolButtonClickedCallback -> IO Closure
toolButtonClickedClosure cb = newCClosure =<< mkToolButtonClickedCallback wrapped
    where wrapped = toolButtonClickedCallbackWrapper cb

toolButtonClickedCallbackWrapper ::
    ToolButtonClickedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
toolButtonClickedCallbackWrapper _cb _ _ = do
    _cb 

onToolButtonClicked :: (GObject a, MonadIO m) => a -> ToolButtonClickedCallback -> m SignalHandlerId
onToolButtonClicked obj cb = liftIO $ connectToolButtonClicked obj cb SignalConnectBefore
afterToolButtonClicked :: (GObject a, MonadIO m) => a -> ToolButtonClickedCallback -> m SignalHandlerId
afterToolButtonClicked obj cb = connectToolButtonClicked obj cb SignalConnectAfter

connectToolButtonClicked :: (GObject a, MonadIO m) =>
                            a -> ToolButtonClickedCallback -> SignalConnectMode -> m SignalHandlerId
connectToolButtonClicked obj cb after = liftIO $ do
    cb' <- mkToolButtonClickedCallback (toolButtonClickedCallbackWrapper cb)
    connectSignalFunPtr obj "clicked" cb' after

-- object ToolItem 
newtype ToolItem = ToolItem (ForeignPtr ToolItem)
noToolItem :: Maybe ToolItem
noToolItem = Nothing

foreign import ccall "gtk_tool_item_get_type"
    c_gtk_tool_item_get_type :: IO GType

type instance ParentTypes ToolItem = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Activatable, Buildable]

instance GObject ToolItem where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_tool_item_get_type
    

class GObject o => ToolItemK o
instance (GObject o, IsDescendantOf ToolItem o) => ToolItemK o

toToolItem :: ToolItemK o => o -> IO ToolItem
toToolItem = unsafeCastTo ToolItem

-- method ToolItem::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ToolItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_new" gtk_tool_item_new :: 
    IO (Ptr ToolItem)


toolItemNew ::
    (MonadIO m) =>
    m ToolItem
toolItemNew  = liftIO $ do
    result <- gtk_tool_item_new
    checkUnexpectedReturnNULL "gtk_tool_item_new" result
    result' <- (newObject ToolItem) result
    return result'

-- method ToolItem::get_ellipsize_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "EllipsizeMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_ellipsize_mode" gtk_tool_item_get_ellipsize_mode :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CUInt


toolItemGetEllipsizeMode ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Pango.EllipsizeMode
toolItemGetEllipsizeMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_ellipsize_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_expand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_expand" gtk_tool_item_get_expand :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CInt


toolItemGetExpand ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Bool
toolItemGetExpand _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_expand _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_homogeneous" gtk_tool_item_get_homogeneous :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CInt


toolItemGetHomogeneous ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Bool
toolItemGetHomogeneous _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_homogeneous _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_icon_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_icon_size" gtk_tool_item_get_icon_size :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO Int32


toolItemGetIconSize ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Int32
toolItemGetIconSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_icon_size _obj'
    touchManagedPtr _obj
    return result

-- method ToolItem::get_is_important
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_is_important" gtk_tool_item_get_is_important :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CInt


toolItemGetIsImportant ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Bool
toolItemGetIsImportant _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_is_important _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Orientation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_orientation" gtk_tool_item_get_orientation :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CUInt


toolItemGetOrientation ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Orientation
toolItemGetOrientation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_orientation _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_proxy_menu_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_item_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_item_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_proxy_menu_item" gtk_tool_item_get_proxy_menu_item :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    CString ->                              -- menu_item_id : TBasicType TUTF8
    IO (Ptr Widget)


toolItemGetProxyMenuItem ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- menu_item_id
    m Widget
toolItemGetProxyMenuItem _obj menu_item_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    menu_item_id' <- textToCString menu_item_id
    result <- gtk_tool_item_get_proxy_menu_item _obj' menu_item_id'
    checkUnexpectedReturnNULL "gtk_tool_item_get_proxy_menu_item" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    freeMem menu_item_id'
    return result'

-- method ToolItem::get_relief_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ReliefStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_relief_style" gtk_tool_item_get_relief_style :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CUInt


toolItemGetReliefStyle ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m ReliefStyle
toolItemGetReliefStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_relief_style _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_text_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFloat
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_text_alignment" gtk_tool_item_get_text_alignment :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CFloat


toolItemGetTextAlignment ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Float
toolItemGetTextAlignment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_text_alignment _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_text_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Orientation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_text_orientation" gtk_tool_item_get_text_orientation :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CUInt


toolItemGetTextOrientation ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Orientation
toolItemGetTextOrientation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_text_orientation _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_text_size_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SizeGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_text_size_group" gtk_tool_item_get_text_size_group :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO (Ptr SizeGroup)


toolItemGetTextSizeGroup ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m SizeGroup
toolItemGetTextSizeGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_text_size_group _obj'
    checkUnexpectedReturnNULL "gtk_tool_item_get_text_size_group" result
    result' <- (newObject SizeGroup) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_toolbar_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolbarStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_toolbar_style" gtk_tool_item_get_toolbar_style :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CUInt


toolItemGetToolbarStyle ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m ToolbarStyle
toolItemGetToolbarStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_toolbar_style _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_use_drag_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_use_drag_window" gtk_tool_item_get_use_drag_window :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CInt


toolItemGetUseDragWindow ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Bool
toolItemGetUseDragWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_use_drag_window _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_visible_horizontal
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_visible_horizontal" gtk_tool_item_get_visible_horizontal :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CInt


toolItemGetVisibleHorizontal ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Bool
toolItemGetVisibleHorizontal _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_visible_horizontal _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::get_visible_vertical
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_get_visible_vertical" gtk_tool_item_get_visible_vertical :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO CInt


toolItemGetVisibleVertical ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Bool
toolItemGetVisibleVertical _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_get_visible_vertical _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::rebuild_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_rebuild_menu" gtk_tool_item_rebuild_menu :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO ()


toolItemRebuildMenu ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m ()
toolItemRebuildMenu _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tool_item_rebuild_menu _obj'
    touchManagedPtr _obj
    return ()

-- method ToolItem::retrieve_proxy_menu_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_retrieve_proxy_menu_item" gtk_tool_item_retrieve_proxy_menu_item :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO (Ptr Widget)


toolItemRetrieveProxyMenuItem ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m Widget
toolItemRetrieveProxyMenuItem _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_retrieve_proxy_menu_item _obj'
    checkUnexpectedReturnNULL "gtk_tool_item_retrieve_proxy_menu_item" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method ToolItem::set_expand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_set_expand" gtk_tool_item_set_expand :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()


toolItemSetExpand ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- expand
    m ()
toolItemSetExpand _obj expand = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let expand' = (fromIntegral . fromEnum) expand
    gtk_tool_item_set_expand _obj' expand'
    touchManagedPtr _obj
    return ()

-- method ToolItem::set_homogeneous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_set_homogeneous" gtk_tool_item_set_homogeneous :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    CInt ->                                 -- homogeneous : TBasicType TBoolean
    IO ()


toolItemSetHomogeneous ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- homogeneous
    m ()
toolItemSetHomogeneous _obj homogeneous = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let homogeneous' = (fromIntegral . fromEnum) homogeneous
    gtk_tool_item_set_homogeneous _obj' homogeneous'
    touchManagedPtr _obj
    return ()

-- method ToolItem::set_is_important
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_important", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_important", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_set_is_important" gtk_tool_item_set_is_important :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    CInt ->                                 -- is_important : TBasicType TBoolean
    IO ()


toolItemSetIsImportant ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- is_important
    m ()
toolItemSetIsImportant _obj is_important = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let is_important' = (fromIntegral . fromEnum) is_important
    gtk_tool_item_set_is_important _obj' is_important'
    touchManagedPtr _obj
    return ()

-- method ToolItem::set_proxy_menu_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_item_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_item", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_item_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "menu_item", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_set_proxy_menu_item" gtk_tool_item_set_proxy_menu_item :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    CString ->                              -- menu_item_id : TBasicType TUTF8
    Ptr Widget ->                           -- menu_item : TInterface "Gtk" "Widget"
    IO ()


toolItemSetProxyMenuItem ::
    (MonadIO m, ToolItemK a, WidgetK b) =>
    a ->                                    -- _obj
    T.Text ->                               -- menu_item_id
    b ->                                    -- menu_item
    m ()
toolItemSetProxyMenuItem _obj menu_item_id menu_item = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    menu_item_id' <- textToCString menu_item_id
    let menu_item' = unsafeManagedPtrCastPtr menu_item
    gtk_tool_item_set_proxy_menu_item _obj' menu_item_id' menu_item'
    touchManagedPtr _obj
    touchManagedPtr menu_item
    freeMem menu_item_id'
    return ()

-- method ToolItem::set_tooltip_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_set_tooltip_markup" gtk_tool_item_set_tooltip_markup :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    CString ->                              -- markup : TBasicType TUTF8
    IO ()


toolItemSetTooltipMarkup ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- markup
    m ()
toolItemSetTooltipMarkup _obj markup = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    markup' <- textToCString markup
    gtk_tool_item_set_tooltip_markup _obj' markup'
    touchManagedPtr _obj
    freeMem markup'
    return ()

-- method ToolItem::set_tooltip_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_set_tooltip_text" gtk_tool_item_set_tooltip_text :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


toolItemSetTooltipText ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- text
    m ()
toolItemSetTooltipText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    text' <- textToCString text
    gtk_tool_item_set_tooltip_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- method ToolItem::set_use_drag_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_drag_window", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_drag_window", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_set_use_drag_window" gtk_tool_item_set_use_drag_window :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    CInt ->                                 -- use_drag_window : TBasicType TBoolean
    IO ()


toolItemSetUseDragWindow ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- use_drag_window
    m ()
toolItemSetUseDragWindow _obj use_drag_window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let use_drag_window' = (fromIntegral . fromEnum) use_drag_window
    gtk_tool_item_set_use_drag_window _obj' use_drag_window'
    touchManagedPtr _obj
    return ()

-- method ToolItem::set_visible_horizontal
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_horizontal", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_horizontal", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_set_visible_horizontal" gtk_tool_item_set_visible_horizontal :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    CInt ->                                 -- visible_horizontal : TBasicType TBoolean
    IO ()


toolItemSetVisibleHorizontal ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible_horizontal
    m ()
toolItemSetVisibleHorizontal _obj visible_horizontal = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible_horizontal' = (fromIntegral . fromEnum) visible_horizontal
    gtk_tool_item_set_visible_horizontal _obj' visible_horizontal'
    touchManagedPtr _obj
    return ()

-- method ToolItem::set_visible_vertical
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_vertical", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_vertical", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_set_visible_vertical" gtk_tool_item_set_visible_vertical :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    CInt ->                                 -- visible_vertical : TBasicType TBoolean
    IO ()


toolItemSetVisibleVertical ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible_vertical
    m ()
toolItemSetVisibleVertical _obj visible_vertical = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible_vertical' = (fromIntegral . fromEnum) visible_vertical
    gtk_tool_item_set_visible_vertical _obj' visible_vertical'
    touchManagedPtr _obj
    return ()

-- method ToolItem::toolbar_reconfigured
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_toolbar_reconfigured" gtk_tool_item_toolbar_reconfigured :: 
    Ptr ToolItem ->                         -- _obj : TInterface "Gtk" "ToolItem"
    IO ()


toolItemToolbarReconfigured ::
    (MonadIO m, ToolItemK a) =>
    a ->                                    -- _obj
    m ()
toolItemToolbarReconfigured _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tool_item_toolbar_reconfigured _obj'
    touchManagedPtr _obj
    return ()

-- signal ToolItem::create-menu-proxy
type ToolItemCreateMenuProxyCallback =
    IO Bool

noToolItemCreateMenuProxyCallback :: Maybe ToolItemCreateMenuProxyCallback
noToolItemCreateMenuProxyCallback = Nothing

type ToolItemCreateMenuProxyCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkToolItemCreateMenuProxyCallback :: ToolItemCreateMenuProxyCallbackC -> IO (FunPtr ToolItemCreateMenuProxyCallbackC)

toolItemCreateMenuProxyClosure :: ToolItemCreateMenuProxyCallback -> IO Closure
toolItemCreateMenuProxyClosure cb = newCClosure =<< mkToolItemCreateMenuProxyCallback wrapped
    where wrapped = toolItemCreateMenuProxyCallbackWrapper cb

toolItemCreateMenuProxyCallbackWrapper ::
    ToolItemCreateMenuProxyCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
toolItemCreateMenuProxyCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onToolItemCreateMenuProxy :: (GObject a, MonadIO m) => a -> ToolItemCreateMenuProxyCallback -> m SignalHandlerId
onToolItemCreateMenuProxy obj cb = liftIO $ connectToolItemCreateMenuProxy obj cb SignalConnectBefore
afterToolItemCreateMenuProxy :: (GObject a, MonadIO m) => a -> ToolItemCreateMenuProxyCallback -> m SignalHandlerId
afterToolItemCreateMenuProxy obj cb = connectToolItemCreateMenuProxy obj cb SignalConnectAfter

connectToolItemCreateMenuProxy :: (GObject a, MonadIO m) =>
                                  a -> ToolItemCreateMenuProxyCallback -> SignalConnectMode -> m SignalHandlerId
connectToolItemCreateMenuProxy obj cb after = liftIO $ do
    cb' <- mkToolItemCreateMenuProxyCallback (toolItemCreateMenuProxyCallbackWrapper cb)
    connectSignalFunPtr obj "create-menu-proxy" cb' after

-- signal ToolItem::toolbar-reconfigured
type ToolItemToolbarReconfiguredCallback =
    IO ()

noToolItemToolbarReconfiguredCallback :: Maybe ToolItemToolbarReconfiguredCallback
noToolItemToolbarReconfiguredCallback = Nothing

type ToolItemToolbarReconfiguredCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkToolItemToolbarReconfiguredCallback :: ToolItemToolbarReconfiguredCallbackC -> IO (FunPtr ToolItemToolbarReconfiguredCallbackC)

toolItemToolbarReconfiguredClosure :: ToolItemToolbarReconfiguredCallback -> IO Closure
toolItemToolbarReconfiguredClosure cb = newCClosure =<< mkToolItemToolbarReconfiguredCallback wrapped
    where wrapped = toolItemToolbarReconfiguredCallbackWrapper cb

toolItemToolbarReconfiguredCallbackWrapper ::
    ToolItemToolbarReconfiguredCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
toolItemToolbarReconfiguredCallbackWrapper _cb _ _ = do
    _cb 

onToolItemToolbarReconfigured :: (GObject a, MonadIO m) => a -> ToolItemToolbarReconfiguredCallback -> m SignalHandlerId
onToolItemToolbarReconfigured obj cb = liftIO $ connectToolItemToolbarReconfigured obj cb SignalConnectBefore
afterToolItemToolbarReconfigured :: (GObject a, MonadIO m) => a -> ToolItemToolbarReconfiguredCallback -> m SignalHandlerId
afterToolItemToolbarReconfigured obj cb = connectToolItemToolbarReconfigured obj cb SignalConnectAfter

connectToolItemToolbarReconfigured :: (GObject a, MonadIO m) =>
                                      a -> ToolItemToolbarReconfiguredCallback -> SignalConnectMode -> m SignalHandlerId
connectToolItemToolbarReconfigured obj cb after = liftIO $ do
    cb' <- mkToolItemToolbarReconfiguredCallback (toolItemToolbarReconfiguredCallbackWrapper cb)
    connectSignalFunPtr obj "toolbar-reconfigured" cb' after

-- object ToolItemGroup 
newtype ToolItemGroup = ToolItemGroup (ForeignPtr ToolItemGroup)
noToolItemGroup :: Maybe ToolItemGroup
noToolItemGroup = Nothing

foreign import ccall "gtk_tool_item_group_get_type"
    c_gtk_tool_item_group_get_type :: IO GType

type instance ParentTypes ToolItemGroup = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, ToolShell]

instance GObject ToolItemGroup where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_tool_item_group_get_type
    

class GObject o => ToolItemGroupK o
instance (GObject o, IsDescendantOf ToolItemGroup o) => ToolItemGroupK o

toToolItemGroup :: ToolItemGroupK o => o -> IO ToolItemGroup
toToolItemGroup = unsafeCastTo ToolItemGroup

-- method ToolItemGroup::new
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolItemGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_new" gtk_tool_item_group_new :: 
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr ToolItemGroup)


toolItemGroupNew ::
    (MonadIO m) =>
    T.Text ->                               -- label
    m ToolItemGroup
toolItemGroupNew label = liftIO $ do
    label' <- textToCString label
    result <- gtk_tool_item_group_new label'
    checkUnexpectedReturnNULL "gtk_tool_item_group_new" result
    result' <- (newObject ToolItemGroup) result
    freeMem label'
    return result'

-- method ToolItemGroup::get_collapsed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_get_collapsed" gtk_tool_item_group_get_collapsed :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    IO CInt


toolItemGroupGetCollapsed ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    m Bool
toolItemGroupGetCollapsed _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_group_get_collapsed _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method ToolItemGroup::get_drop_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_get_drop_item" gtk_tool_item_group_get_drop_item :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO (Ptr ToolItem)


toolItemGroupGetDropItem ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m ToolItem
toolItemGroupGetDropItem _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_group_get_drop_item _obj' x y
    checkUnexpectedReturnNULL "gtk_tool_item_group_get_drop_item" result
    result' <- (newObject ToolItem) result
    touchManagedPtr _obj
    return result'

-- method ToolItemGroup::get_ellipsize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "EllipsizeMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_get_ellipsize" gtk_tool_item_group_get_ellipsize :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    IO CUInt


toolItemGroupGetEllipsize ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    m Pango.EllipsizeMode
toolItemGroupGetEllipsize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_group_get_ellipsize _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolItemGroup::get_header_relief
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ReliefStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_get_header_relief" gtk_tool_item_group_get_header_relief :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    IO CUInt


toolItemGroupGetHeaderRelief ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    m ReliefStyle
toolItemGroupGetHeaderRelief _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_group_get_header_relief _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolItemGroup::get_item_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_get_item_position" gtk_tool_item_group_get_item_position :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    Ptr ToolItem ->                         -- item : TInterface "Gtk" "ToolItem"
    IO Int32


toolItemGroupGetItemPosition ::
    (MonadIO m, ToolItemGroupK a, ToolItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- item
    m Int32
toolItemGroupGetItemPosition _obj item = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let item' = unsafeManagedPtrCastPtr item
    result <- gtk_tool_item_group_get_item_position _obj' item'
    touchManagedPtr _obj
    touchManagedPtr item
    return result

-- method ToolItemGroup::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_get_label" gtk_tool_item_group_get_label :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    IO CString


toolItemGroupGetLabel ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    m T.Text
toolItemGroupGetLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_group_get_label _obj'
    checkUnexpectedReturnNULL "gtk_tool_item_group_get_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method ToolItemGroup::get_label_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_get_label_widget" gtk_tool_item_group_get_label_widget :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    IO (Ptr Widget)


toolItemGroupGetLabelWidget ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    m Widget
toolItemGroupGetLabelWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_group_get_label_widget _obj'
    checkUnexpectedReturnNULL "gtk_tool_item_group_get_label_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method ToolItemGroup::get_n_items
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_get_n_items" gtk_tool_item_group_get_n_items :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    IO Word32


toolItemGroupGetNItems ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    m Word32
toolItemGroupGetNItems _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_group_get_n_items _obj'
    touchManagedPtr _obj
    return result

-- method ToolItemGroup::get_nth_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_get_nth_item" gtk_tool_item_group_get_nth_item :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    Word32 ->                               -- index : TBasicType TUInt32
    IO (Ptr ToolItem)


toolItemGroupGetNthItem ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- index
    m ToolItem
toolItemGroupGetNthItem _obj index = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_item_group_get_nth_item _obj' index
    checkUnexpectedReturnNULL "gtk_tool_item_group_get_nth_item" result
    result' <- (newObject ToolItem) result
    touchManagedPtr _obj
    return result'

-- method ToolItemGroup::insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_insert" gtk_tool_item_group_insert :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    Ptr ToolItem ->                         -- item : TInterface "Gtk" "ToolItem"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


toolItemGroupInsert ::
    (MonadIO m, ToolItemGroupK a, ToolItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- item
    Int32 ->                                -- position
    m ()
toolItemGroupInsert _obj item position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let item' = unsafeManagedPtrCastPtr item
    gtk_tool_item_group_insert _obj' item' position
    touchManagedPtr _obj
    touchManagedPtr item
    return ()

-- method ToolItemGroup::set_collapsed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "collapsed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "collapsed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_set_collapsed" gtk_tool_item_group_set_collapsed :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    CInt ->                                 -- collapsed : TBasicType TBoolean
    IO ()


toolItemGroupSetCollapsed ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- collapsed
    m ()
toolItemGroupSetCollapsed _obj collapsed = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let collapsed' = (fromIntegral . fromEnum) collapsed
    gtk_tool_item_group_set_collapsed _obj' collapsed'
    touchManagedPtr _obj
    return ()

-- method ToolItemGroup::set_ellipsize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ellipsize", argType = TInterface "Pango" "EllipsizeMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ellipsize", argType = TInterface "Pango" "EllipsizeMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_set_ellipsize" gtk_tool_item_group_set_ellipsize :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    CUInt ->                                -- ellipsize : TInterface "Pango" "EllipsizeMode"
    IO ()


toolItemGroupSetEllipsize ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    Pango.EllipsizeMode ->                  -- ellipsize
    m ()
toolItemGroupSetEllipsize _obj ellipsize = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let ellipsize' = (fromIntegral . fromEnum) ellipsize
    gtk_tool_item_group_set_ellipsize _obj' ellipsize'
    touchManagedPtr _obj
    return ()

-- method ToolItemGroup::set_header_relief
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "ReliefStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "ReliefStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_set_header_relief" gtk_tool_item_group_set_header_relief :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    CUInt ->                                -- style : TInterface "Gtk" "ReliefStyle"
    IO ()


toolItemGroupSetHeaderRelief ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    ReliefStyle ->                          -- style
    m ()
toolItemGroupSetHeaderRelief _obj style = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let style' = (fromIntegral . fromEnum) style
    gtk_tool_item_group_set_header_relief _obj' style'
    touchManagedPtr _obj
    return ()

-- method ToolItemGroup::set_item_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_set_item_position" gtk_tool_item_group_set_item_position :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    Ptr ToolItem ->                         -- item : TInterface "Gtk" "ToolItem"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


toolItemGroupSetItemPosition ::
    (MonadIO m, ToolItemGroupK a, ToolItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- item
    Int32 ->                                -- position
    m ()
toolItemGroupSetItemPosition _obj item position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let item' = unsafeManagedPtrCastPtr item
    gtk_tool_item_group_set_item_position _obj' item' position
    touchManagedPtr _obj
    touchManagedPtr item
    return ()

-- method ToolItemGroup::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_set_label" gtk_tool_item_group_set_label :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    CString ->                              -- label : TBasicType TUTF8
    IO ()


toolItemGroupSetLabel ::
    (MonadIO m, ToolItemGroupK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- label
    m ()
toolItemGroupSetLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    label' <- textToCString label
    gtk_tool_item_group_set_label _obj' label'
    touchManagedPtr _obj
    freeMem label'
    return ()

-- method ToolItemGroup::set_label_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_item_group_set_label_widget" gtk_tool_item_group_set_label_widget :: 
    Ptr ToolItemGroup ->                    -- _obj : TInterface "Gtk" "ToolItemGroup"
    Ptr Widget ->                           -- label_widget : TInterface "Gtk" "Widget"
    IO ()


toolItemGroupSetLabelWidget ::
    (MonadIO m, ToolItemGroupK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- label_widget
    m ()
toolItemGroupSetLabelWidget _obj label_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let label_widget' = unsafeManagedPtrCastPtr label_widget
    gtk_tool_item_group_set_label_widget _obj' label_widget'
    touchManagedPtr _obj
    touchManagedPtr label_widget
    return ()

-- object ToolPalette 
newtype ToolPalette = ToolPalette (ForeignPtr ToolPalette)
noToolPalette :: Maybe ToolPalette
noToolPalette = Nothing

foreign import ccall "gtk_tool_palette_get_type"
    c_gtk_tool_palette_get_type :: IO GType

type instance ParentTypes ToolPalette = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable, Scrollable]

instance GObject ToolPalette where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_tool_palette_get_type
    

class GObject o => ToolPaletteK o
instance (GObject o, IsDescendantOf ToolPalette o) => ToolPaletteK o

toToolPalette :: ToolPaletteK o => o -> IO ToolPalette
toToolPalette = unsafeCastTo ToolPalette

-- method ToolPalette::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "ToolPalette"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_new" gtk_tool_palette_new :: 
    IO (Ptr ToolPalette)


toolPaletteNew ::
    (MonadIO m) =>
    m ToolPalette
toolPaletteNew  = liftIO $ do
    result <- gtk_tool_palette_new
    checkUnexpectedReturnNULL "gtk_tool_palette_new" result
    result' <- (newObject ToolPalette) result
    return result'

-- method ToolPalette::add_drag_dest
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "DestDefaults", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TInterface "Gtk" "ToolPaletteDragTargets", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "DestDefaults", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TInterface "Gtk" "ToolPaletteDragTargets", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_add_drag_dest" gtk_tool_palette_add_drag_dest :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CUInt ->                                -- flags : TInterface "Gtk" "DestDefaults"
    CUInt ->                                -- targets : TInterface "Gtk" "ToolPaletteDragTargets"
    CUInt ->                                -- actions : TInterface "Gdk" "DragAction"
    IO ()


toolPaletteAddDragDest ::
    (MonadIO m, ToolPaletteK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget
    [DestDefaults] ->                       -- flags
    [ToolPaletteDragTargets] ->             -- targets
    [Gdk.DragAction] ->                     -- actions
    m ()
toolPaletteAddDragDest _obj widget flags targets actions = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    let flags' = gflagsToWord flags
    let targets' = gflagsToWord targets
    let actions' = gflagsToWord actions
    gtk_tool_palette_add_drag_dest _obj' widget' flags' targets' actions'
    touchManagedPtr _obj
    touchManagedPtr widget
    return ()

-- method ToolPalette::get_drag_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_drag_item" gtk_tool_palette_get_drag_item :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    Ptr SelectionData ->                    -- selection : TInterface "Gtk" "SelectionData"
    IO (Ptr Widget)


toolPaletteGetDragItem ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    SelectionData ->                        -- selection
    m Widget
toolPaletteGetDragItem _obj selection = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let selection' = unsafeManagedPtrGetPtr selection
    result <- gtk_tool_palette_get_drag_item _obj' selection'
    checkUnexpectedReturnNULL "gtk_tool_palette_get_drag_item" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    touchManagedPtr selection
    return result'

-- method ToolPalette::get_drop_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolItemGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_drop_group" gtk_tool_palette_get_drop_group :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO (Ptr ToolItemGroup)


toolPaletteGetDropGroup ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m ToolItemGroup
toolPaletteGetDropGroup _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_palette_get_drop_group _obj' x y
    checkUnexpectedReturnNULL "gtk_tool_palette_get_drop_group" result
    result' <- (newObject ToolItemGroup) result
    touchManagedPtr _obj
    return result'

-- method ToolPalette::get_drop_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_drop_item" gtk_tool_palette_get_drop_item :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO (Ptr ToolItem)


toolPaletteGetDropItem ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m ToolItem
toolPaletteGetDropItem _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_palette_get_drop_item _obj' x y
    checkUnexpectedReturnNULL "gtk_tool_palette_get_drop_item" result
    result' <- (newObject ToolItem) result
    touchManagedPtr _obj
    return result'

-- method ToolPalette::get_exclusive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_exclusive" gtk_tool_palette_get_exclusive :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    Ptr ToolItemGroup ->                    -- group : TInterface "Gtk" "ToolItemGroup"
    IO CInt


toolPaletteGetExclusive ::
    (MonadIO m, ToolPaletteK a, ToolItemGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- group
    m Bool
toolPaletteGetExclusive _obj group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let group' = unsafeManagedPtrCastPtr group
    result <- gtk_tool_palette_get_exclusive _obj' group'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr group
    return result'

-- method ToolPalette::get_expand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_expand" gtk_tool_palette_get_expand :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    Ptr ToolItemGroup ->                    -- group : TInterface "Gtk" "ToolItemGroup"
    IO CInt


toolPaletteGetExpand ::
    (MonadIO m, ToolPaletteK a, ToolItemGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- group
    m Bool
toolPaletteGetExpand _obj group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let group' = unsafeManagedPtrCastPtr group
    result <- gtk_tool_palette_get_expand _obj' group'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr group
    return result'

-- method ToolPalette::get_group_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_group_position" gtk_tool_palette_get_group_position :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    Ptr ToolItemGroup ->                    -- group : TInterface "Gtk" "ToolItemGroup"
    IO Int32


toolPaletteGetGroupPosition ::
    (MonadIO m, ToolPaletteK a, ToolItemGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- group
    m Int32
toolPaletteGetGroupPosition _obj group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let group' = unsafeManagedPtrCastPtr group
    result <- gtk_tool_palette_get_group_position _obj' group'
    touchManagedPtr _obj
    touchManagedPtr group
    return result

-- method ToolPalette::get_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_hadjustment" gtk_tool_palette_get_hadjustment :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    IO (Ptr Adjustment)

{-# DEPRECATED toolPaletteGetHadjustment ["(Since version 3.0)","Use gtk_scrollable_get_hadjustment()"]#-}
toolPaletteGetHadjustment ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    m Adjustment
toolPaletteGetHadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_palette_get_hadjustment _obj'
    checkUnexpectedReturnNULL "gtk_tool_palette_get_hadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method ToolPalette::get_icon_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_icon_size" gtk_tool_palette_get_icon_size :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    IO Int32


toolPaletteGetIconSize ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    m Int32
toolPaletteGetIconSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_palette_get_icon_size _obj'
    touchManagedPtr _obj
    return result

-- method ToolPalette::get_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolbarStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_style" gtk_tool_palette_get_style :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    IO CUInt


toolPaletteGetStyle ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    m ToolbarStyle
toolPaletteGetStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_palette_get_style _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolPalette::get_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_vadjustment" gtk_tool_palette_get_vadjustment :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    IO (Ptr Adjustment)

{-# DEPRECATED toolPaletteGetVadjustment ["(Since version 3.0)","Use gtk_scrollable_get_vadjustment()"]#-}
toolPaletteGetVadjustment ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    m Adjustment
toolPaletteGetVadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_palette_get_vadjustment _obj'
    checkUnexpectedReturnNULL "gtk_tool_palette_get_vadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method ToolPalette::set_drag_source
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TInterface "Gtk" "ToolPaletteDragTargets", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TInterface "Gtk" "ToolPaletteDragTargets", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_set_drag_source" gtk_tool_palette_set_drag_source :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    CUInt ->                                -- targets : TInterface "Gtk" "ToolPaletteDragTargets"
    IO ()


toolPaletteSetDragSource ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    [ToolPaletteDragTargets] ->             -- targets
    m ()
toolPaletteSetDragSource _obj targets = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let targets' = gflagsToWord targets
    gtk_tool_palette_set_drag_source _obj' targets'
    touchManagedPtr _obj
    return ()

-- method ToolPalette::set_exclusive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "exclusive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "exclusive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_set_exclusive" gtk_tool_palette_set_exclusive :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    Ptr ToolItemGroup ->                    -- group : TInterface "Gtk" "ToolItemGroup"
    CInt ->                                 -- exclusive : TBasicType TBoolean
    IO ()


toolPaletteSetExclusive ::
    (MonadIO m, ToolPaletteK a, ToolItemGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- group
    Bool ->                                 -- exclusive
    m ()
toolPaletteSetExclusive _obj group exclusive = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let group' = unsafeManagedPtrCastPtr group
    let exclusive' = (fromIntegral . fromEnum) exclusive
    gtk_tool_palette_set_exclusive _obj' group' exclusive'
    touchManagedPtr _obj
    touchManagedPtr group
    return ()

-- method ToolPalette::set_expand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_set_expand" gtk_tool_palette_set_expand :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    Ptr ToolItemGroup ->                    -- group : TInterface "Gtk" "ToolItemGroup"
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()


toolPaletteSetExpand ::
    (MonadIO m, ToolPaletteK a, ToolItemGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- group
    Bool ->                                 -- expand
    m ()
toolPaletteSetExpand _obj group expand = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let group' = unsafeManagedPtrCastPtr group
    let expand' = (fromIntegral . fromEnum) expand
    gtk_tool_palette_set_expand _obj' group' expand'
    touchManagedPtr _obj
    touchManagedPtr group
    return ()

-- method ToolPalette::set_group_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gtk" "ToolItemGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_set_group_position" gtk_tool_palette_set_group_position :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    Ptr ToolItemGroup ->                    -- group : TInterface "Gtk" "ToolItemGroup"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


toolPaletteSetGroupPosition ::
    (MonadIO m, ToolPaletteK a, ToolItemGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- group
    Int32 ->                                -- position
    m ()
toolPaletteSetGroupPosition _obj group position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let group' = unsafeManagedPtrCastPtr group
    gtk_tool_palette_set_group_position _obj' group' position
    touchManagedPtr _obj
    touchManagedPtr group
    return ()

-- method ToolPalette::set_icon_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_set_icon_size" gtk_tool_palette_set_icon_size :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    Int32 ->                                -- icon_size : TBasicType TInt32
    IO ()


toolPaletteSetIconSize ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- icon_size
    m ()
toolPaletteSetIconSize _obj icon_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tool_palette_set_icon_size _obj' icon_size
    touchManagedPtr _obj
    return ()

-- method ToolPalette::set_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "ToolbarStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "ToolbarStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_set_style" gtk_tool_palette_set_style :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    CUInt ->                                -- style : TInterface "Gtk" "ToolbarStyle"
    IO ()


toolPaletteSetStyle ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    ToolbarStyle ->                         -- style
    m ()
toolPaletteSetStyle _obj style = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let style' = (fromIntegral . fromEnum) style
    gtk_tool_palette_set_style _obj' style'
    touchManagedPtr _obj
    return ()

-- method ToolPalette::unset_icon_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_unset_icon_size" gtk_tool_palette_unset_icon_size :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    IO ()


toolPaletteUnsetIconSize ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    m ()
toolPaletteUnsetIconSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tool_palette_unset_icon_size _obj'
    touchManagedPtr _obj
    return ()

-- method ToolPalette::unset_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolPalette", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_unset_style" gtk_tool_palette_unset_style :: 
    Ptr ToolPalette ->                      -- _obj : TInterface "Gtk" "ToolPalette"
    IO ()


toolPaletteUnsetStyle ::
    (MonadIO m, ToolPaletteK a) =>
    a ->                                    -- _obj
    m ()
toolPaletteUnsetStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tool_palette_unset_style _obj'
    touchManagedPtr _obj
    return ()

-- method ToolPalette::get_drag_target_group
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TargetEntry"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_drag_target_group" gtk_tool_palette_get_drag_target_group :: 
    IO (Ptr TargetEntry)


toolPaletteGetDragTargetGroup ::
    (MonadIO m) =>
    m TargetEntry
toolPaletteGetDragTargetGroup  = liftIO $ do
    result <- gtk_tool_palette_get_drag_target_group
    checkUnexpectedReturnNULL "gtk_tool_palette_get_drag_target_group" result
    result' <- (newBoxed TargetEntry) result
    return result'

-- method ToolPalette::get_drag_target_item
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TargetEntry"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_palette_get_drag_target_item" gtk_tool_palette_get_drag_target_item :: 
    IO (Ptr TargetEntry)


toolPaletteGetDragTargetItem ::
    (MonadIO m) =>
    m TargetEntry
toolPaletteGetDragTargetItem  = liftIO $ do
    result <- gtk_tool_palette_get_drag_target_item
    checkUnexpectedReturnNULL "gtk_tool_palette_get_drag_target_item" result
    result' <- (newBoxed TargetEntry) result
    return result'

-- Flags ToolPaletteDragTargets

data ToolPaletteDragTargets = 
      ToolPaletteDragTargetsItems
    | ToolPaletteDragTargetsGroups
    | AnotherToolPaletteDragTargets Int
    deriving (Show, Eq)

instance Enum ToolPaletteDragTargets where
    fromEnum ToolPaletteDragTargetsItems = 1
    fromEnum ToolPaletteDragTargetsGroups = 2
    fromEnum (AnotherToolPaletteDragTargets k) = k

    toEnum 1 = ToolPaletteDragTargetsItems
    toEnum 2 = ToolPaletteDragTargetsGroups
    toEnum k = AnotherToolPaletteDragTargets k

foreign import ccall "gtk_tool_palette_drag_targets_get_type" c_gtk_tool_palette_drag_targets_get_type :: 
    IO GType

instance BoxedEnum ToolPaletteDragTargets where
    boxedEnumType _ = c_gtk_tool_palette_drag_targets_get_type

instance IsGFlag ToolPaletteDragTargets

-- interface ToolShell 

newtype ToolShell = ToolShell (ForeignPtr ToolShell)
noToolShell :: Maybe ToolShell
noToolShell = Nothing

foreign import ccall "gtk_tool_shell_get_type"
    c_gtk_tool_shell_get_type :: IO GType

type instance ParentTypes ToolShell = '[Widget, GObject.Object]

instance GObject ToolShell where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_tool_shell_get_type
    

class GObject o => ToolShellK o
instance (GObject o, IsDescendantOf ToolShell o) => ToolShellK o

toToolShell :: ToolShellK o => o -> IO ToolShell
toToolShell = unsafeCastTo ToolShell

-- method ToolShell::get_ellipsize_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "EllipsizeMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_ellipsize_mode" gtk_tool_shell_get_ellipsize_mode :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CUInt


toolShellGetEllipsizeMode ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m Pango.EllipsizeMode
toolShellGetEllipsizeMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_ellipsize_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_icon_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_icon_size" gtk_tool_shell_get_icon_size :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO Int32


toolShellGetIconSize ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m Int32
toolShellGetIconSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_icon_size _obj'
    touchManagedPtr _obj
    return result

-- method ToolShell::get_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Orientation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_orientation" gtk_tool_shell_get_orientation :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CUInt


toolShellGetOrientation ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m Orientation
toolShellGetOrientation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_orientation _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_relief_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ReliefStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_relief_style" gtk_tool_shell_get_relief_style :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CUInt


toolShellGetReliefStyle ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m ReliefStyle
toolShellGetReliefStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_relief_style _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolbarStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_style" gtk_tool_shell_get_style :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CUInt


toolShellGetStyle ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m ToolbarStyle
toolShellGetStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_style _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_text_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFloat
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_text_alignment" gtk_tool_shell_get_text_alignment :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CFloat


toolShellGetTextAlignment ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m Float
toolShellGetTextAlignment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_text_alignment _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_text_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Orientation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_text_orientation" gtk_tool_shell_get_text_orientation :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CUInt


toolShellGetTextOrientation ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m Orientation
toolShellGetTextOrientation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_text_orientation _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_text_size_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SizeGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_text_size_group" gtk_tool_shell_get_text_size_group :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO (Ptr SizeGroup)


toolShellGetTextSizeGroup ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m SizeGroup
toolShellGetTextSizeGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_text_size_group _obj'
    checkUnexpectedReturnNULL "gtk_tool_shell_get_text_size_group" result
    result' <- (newObject SizeGroup) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::rebuild_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_rebuild_menu" gtk_tool_shell_rebuild_menu :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO ()


toolShellRebuildMenu ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m ()
toolShellRebuildMenu _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tool_shell_rebuild_menu _obj'
    touchManagedPtr _obj
    return ()

-- object Toolbar 
newtype Toolbar = Toolbar (ForeignPtr Toolbar)
noToolbar :: Maybe Toolbar
noToolbar = Nothing

foreign import ccall "gtk_toolbar_get_type"
    c_gtk_toolbar_get_type :: IO GType

type instance ParentTypes Toolbar = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable, ToolShell]

instance GObject Toolbar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_toolbar_get_type
    

class GObject o => ToolbarK o
instance (GObject o, IsDescendantOf Toolbar o) => ToolbarK o

toToolbar :: ToolbarK o => o -> IO Toolbar
toToolbar = unsafeCastTo Toolbar

-- method Toolbar::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Toolbar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_new" gtk_toolbar_new :: 
    IO (Ptr Toolbar)


toolbarNew ::
    (MonadIO m) =>
    m Toolbar
toolbarNew  = liftIO $ do
    result <- gtk_toolbar_new
    checkUnexpectedReturnNULL "gtk_toolbar_new" result
    result' <- (newObject Toolbar) result
    return result'

-- method Toolbar::get_drop_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_get_drop_index" gtk_toolbar_get_drop_index :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO Int32


toolbarGetDropIndex ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m Int32
toolbarGetDropIndex _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toolbar_get_drop_index _obj' x y
    touchManagedPtr _obj
    return result

-- method Toolbar::get_icon_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "IconSize"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_get_icon_size" gtk_toolbar_get_icon_size :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    IO CUInt


toolbarGetIconSize ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    m IconSize
toolbarGetIconSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toolbar_get_icon_size _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Toolbar::get_item_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_get_item_index" gtk_toolbar_get_item_index :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    Ptr ToolItem ->                         -- item : TInterface "Gtk" "ToolItem"
    IO Int32


toolbarGetItemIndex ::
    (MonadIO m, ToolbarK a, ToolItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- item
    m Int32
toolbarGetItemIndex _obj item = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let item' = unsafeManagedPtrCastPtr item
    result <- gtk_toolbar_get_item_index _obj' item'
    touchManagedPtr _obj
    touchManagedPtr item
    return result

-- method Toolbar::get_n_items
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_get_n_items" gtk_toolbar_get_n_items :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    IO Int32


toolbarGetNItems ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    m Int32
toolbarGetNItems _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toolbar_get_n_items _obj'
    touchManagedPtr _obj
    return result

-- method Toolbar::get_nth_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolItem"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_get_nth_item" gtk_toolbar_get_nth_item :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    Int32 ->                                -- n : TBasicType TInt32
    IO (Ptr ToolItem)


toolbarGetNthItem ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- n
    m ToolItem
toolbarGetNthItem _obj n = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toolbar_get_nth_item _obj' n
    checkUnexpectedReturnNULL "gtk_toolbar_get_nth_item" result
    result' <- (newObject ToolItem) result
    touchManagedPtr _obj
    return result'

-- method Toolbar::get_relief_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ReliefStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_get_relief_style" gtk_toolbar_get_relief_style :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    IO CUInt


toolbarGetReliefStyle ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    m ReliefStyle
toolbarGetReliefStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toolbar_get_relief_style _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Toolbar::get_show_arrow
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_get_show_arrow" gtk_toolbar_get_show_arrow :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    IO CInt


toolbarGetShowArrow ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    m Bool
toolbarGetShowArrow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toolbar_get_show_arrow _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Toolbar::get_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolbarStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_get_style" gtk_toolbar_get_style :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    IO CUInt


toolbarGetStyle ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    m ToolbarStyle
toolbarGetStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toolbar_get_style _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Toolbar::insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_insert" gtk_toolbar_insert :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    Ptr ToolItem ->                         -- item : TInterface "Gtk" "ToolItem"
    Int32 ->                                -- pos : TBasicType TInt32
    IO ()


toolbarInsert ::
    (MonadIO m, ToolbarK a, ToolItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- item
    Int32 ->                                -- pos
    m ()
toolbarInsert _obj item pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let item' = unsafeManagedPtrCastPtr item
    gtk_toolbar_insert _obj' item' pos
    touchManagedPtr _obj
    touchManagedPtr item
    return ()

-- method Toolbar::set_drop_highlight_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tool_item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tool_item", argType = TInterface "Gtk" "ToolItem", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_set_drop_highlight_item" gtk_toolbar_set_drop_highlight_item :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    Ptr ToolItem ->                         -- tool_item : TInterface "Gtk" "ToolItem"
    Int32 ->                                -- index_ : TBasicType TInt32
    IO ()


toolbarSetDropHighlightItem ::
    (MonadIO m, ToolbarK a, ToolItemK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- tool_item
    Int32 ->                                -- index_
    m ()
toolbarSetDropHighlightItem _obj tool_item index_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeTool_item <- case tool_item of
        Nothing -> return nullPtr
        Just jTool_item -> do
            let jTool_item' = unsafeManagedPtrCastPtr jTool_item
            return jTool_item'
    gtk_toolbar_set_drop_highlight_item _obj' maybeTool_item index_
    touchManagedPtr _obj
    whenJust tool_item touchManagedPtr
    return ()

-- method Toolbar::set_icon_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_size", argType = TInterface "Gtk" "IconSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_size", argType = TInterface "Gtk" "IconSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_set_icon_size" gtk_toolbar_set_icon_size :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    CUInt ->                                -- icon_size : TInterface "Gtk" "IconSize"
    IO ()


toolbarSetIconSize ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    IconSize ->                             -- icon_size
    m ()
toolbarSetIconSize _obj icon_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon_size' = (fromIntegral . fromEnum) icon_size
    gtk_toolbar_set_icon_size _obj' icon_size'
    touchManagedPtr _obj
    return ()

-- method Toolbar::set_show_arrow
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_arrow", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "show_arrow", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_set_show_arrow" gtk_toolbar_set_show_arrow :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    CInt ->                                 -- show_arrow : TBasicType TBoolean
    IO ()


toolbarSetShowArrow ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- show_arrow
    m ()
toolbarSetShowArrow _obj show_arrow = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let show_arrow' = (fromIntegral . fromEnum) show_arrow
    gtk_toolbar_set_show_arrow _obj' show_arrow'
    touchManagedPtr _obj
    return ()

-- method Toolbar::set_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "ToolbarStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "ToolbarStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_set_style" gtk_toolbar_set_style :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    CUInt ->                                -- style : TInterface "Gtk" "ToolbarStyle"
    IO ()


toolbarSetStyle ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    ToolbarStyle ->                         -- style
    m ()
toolbarSetStyle _obj style = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let style' = (fromIntegral . fromEnum) style
    gtk_toolbar_set_style _obj' style'
    touchManagedPtr _obj
    return ()

-- method Toolbar::unset_icon_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_unset_icon_size" gtk_toolbar_unset_icon_size :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    IO ()


toolbarUnsetIconSize ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    m ()
toolbarUnsetIconSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_toolbar_unset_icon_size _obj'
    touchManagedPtr _obj
    return ()

-- method Toolbar::unset_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Toolbar", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toolbar_unset_style" gtk_toolbar_unset_style :: 
    Ptr Toolbar ->                          -- _obj : TInterface "Gtk" "Toolbar"
    IO ()


toolbarUnsetStyle ::
    (MonadIO m, ToolbarK a) =>
    a ->                                    -- _obj
    m ()
toolbarUnsetStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_toolbar_unset_style _obj'
    touchManagedPtr _obj
    return ()

-- signal Toolbar::focus-home-or-end
type ToolbarFocusHomeOrEndCallback =
    Bool ->
    IO Bool

noToolbarFocusHomeOrEndCallback :: Maybe ToolbarFocusHomeOrEndCallback
noToolbarFocusHomeOrEndCallback = Nothing

type ToolbarFocusHomeOrEndCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkToolbarFocusHomeOrEndCallback :: ToolbarFocusHomeOrEndCallbackC -> IO (FunPtr ToolbarFocusHomeOrEndCallbackC)

toolbarFocusHomeOrEndClosure :: ToolbarFocusHomeOrEndCallback -> IO Closure
toolbarFocusHomeOrEndClosure cb = newCClosure =<< mkToolbarFocusHomeOrEndCallback wrapped
    where wrapped = toolbarFocusHomeOrEndCallbackWrapper cb

toolbarFocusHomeOrEndCallbackWrapper ::
    ToolbarFocusHomeOrEndCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO CInt
toolbarFocusHomeOrEndCallbackWrapper _cb _ focus_home _ = do
    let focus_home' = (/= 0) focus_home
    result <- _cb  focus_home'
    let result' = (fromIntegral . fromEnum) result
    return result'

onToolbarFocusHomeOrEnd :: (GObject a, MonadIO m) => a -> ToolbarFocusHomeOrEndCallback -> m SignalHandlerId
onToolbarFocusHomeOrEnd obj cb = liftIO $ connectToolbarFocusHomeOrEnd obj cb SignalConnectBefore
afterToolbarFocusHomeOrEnd :: (GObject a, MonadIO m) => a -> ToolbarFocusHomeOrEndCallback -> m SignalHandlerId
afterToolbarFocusHomeOrEnd obj cb = connectToolbarFocusHomeOrEnd obj cb SignalConnectAfter

connectToolbarFocusHomeOrEnd :: (GObject a, MonadIO m) =>
                                a -> ToolbarFocusHomeOrEndCallback -> SignalConnectMode -> m SignalHandlerId
connectToolbarFocusHomeOrEnd obj cb after = liftIO $ do
    cb' <- mkToolbarFocusHomeOrEndCallback (toolbarFocusHomeOrEndCallbackWrapper cb)
    connectSignalFunPtr obj "focus-home-or-end" cb' after

-- signal Toolbar::orientation-changed
type ToolbarOrientationChangedCallback =
    Orientation ->
    IO ()

noToolbarOrientationChangedCallback :: Maybe ToolbarOrientationChangedCallback
noToolbarOrientationChangedCallback = Nothing

type ToolbarOrientationChangedCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkToolbarOrientationChangedCallback :: ToolbarOrientationChangedCallbackC -> IO (FunPtr ToolbarOrientationChangedCallbackC)

toolbarOrientationChangedClosure :: ToolbarOrientationChangedCallback -> IO Closure
toolbarOrientationChangedClosure cb = newCClosure =<< mkToolbarOrientationChangedCallback wrapped
    where wrapped = toolbarOrientationChangedCallbackWrapper cb

toolbarOrientationChangedCallbackWrapper ::
    ToolbarOrientationChangedCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
toolbarOrientationChangedCallbackWrapper _cb _ orientation _ = do
    let orientation' = (toEnum . fromIntegral) orientation
    _cb  orientation'

onToolbarOrientationChanged :: (GObject a, MonadIO m) => a -> ToolbarOrientationChangedCallback -> m SignalHandlerId
onToolbarOrientationChanged obj cb = liftIO $ connectToolbarOrientationChanged obj cb SignalConnectBefore
afterToolbarOrientationChanged :: (GObject a, MonadIO m) => a -> ToolbarOrientationChangedCallback -> m SignalHandlerId
afterToolbarOrientationChanged obj cb = connectToolbarOrientationChanged obj cb SignalConnectAfter

connectToolbarOrientationChanged :: (GObject a, MonadIO m) =>
                                    a -> ToolbarOrientationChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectToolbarOrientationChanged obj cb after = liftIO $ do
    cb' <- mkToolbarOrientationChangedCallback (toolbarOrientationChangedCallbackWrapper cb)
    connectSignalFunPtr obj "orientation-changed" cb' after

-- signal Toolbar::popup-context-menu
type ToolbarPopupContextMenuCallback =
    Int32 ->
    Int32 ->
    Int32 ->
    IO Bool

noToolbarPopupContextMenuCallback :: Maybe ToolbarPopupContextMenuCallback
noToolbarPopupContextMenuCallback = Nothing

type ToolbarPopupContextMenuCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Int32 ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkToolbarPopupContextMenuCallback :: ToolbarPopupContextMenuCallbackC -> IO (FunPtr ToolbarPopupContextMenuCallbackC)

toolbarPopupContextMenuClosure :: ToolbarPopupContextMenuCallback -> IO Closure
toolbarPopupContextMenuClosure cb = newCClosure =<< mkToolbarPopupContextMenuCallback wrapped
    where wrapped = toolbarPopupContextMenuCallbackWrapper cb

toolbarPopupContextMenuCallbackWrapper ::
    ToolbarPopupContextMenuCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO CInt
toolbarPopupContextMenuCallbackWrapper _cb _ x y button _ = do
    result <- _cb  x y button
    let result' = (fromIntegral . fromEnum) result
    return result'

onToolbarPopupContextMenu :: (GObject a, MonadIO m) => a -> ToolbarPopupContextMenuCallback -> m SignalHandlerId
onToolbarPopupContextMenu obj cb = liftIO $ connectToolbarPopupContextMenu obj cb SignalConnectBefore
afterToolbarPopupContextMenu :: (GObject a, MonadIO m) => a -> ToolbarPopupContextMenuCallback -> m SignalHandlerId
afterToolbarPopupContextMenu obj cb = connectToolbarPopupContextMenu obj cb SignalConnectAfter

connectToolbarPopupContextMenu :: (GObject a, MonadIO m) =>
                                  a -> ToolbarPopupContextMenuCallback -> SignalConnectMode -> m SignalHandlerId
connectToolbarPopupContextMenu obj cb after = liftIO $ do
    cb' <- mkToolbarPopupContextMenuCallback (toolbarPopupContextMenuCallbackWrapper cb)
    connectSignalFunPtr obj "popup-context-menu" cb' after

-- signal Toolbar::style-changed
type ToolbarStyleChangedCallback =
    ToolbarStyle ->
    IO ()

noToolbarStyleChangedCallback :: Maybe ToolbarStyleChangedCallback
noToolbarStyleChangedCallback = Nothing

type ToolbarStyleChangedCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkToolbarStyleChangedCallback :: ToolbarStyleChangedCallbackC -> IO (FunPtr ToolbarStyleChangedCallbackC)

toolbarStyleChangedClosure :: ToolbarStyleChangedCallback -> IO Closure
toolbarStyleChangedClosure cb = newCClosure =<< mkToolbarStyleChangedCallback wrapped
    where wrapped = toolbarStyleChangedCallbackWrapper cb

toolbarStyleChangedCallbackWrapper ::
    ToolbarStyleChangedCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
toolbarStyleChangedCallbackWrapper _cb _ style _ = do
    let style' = (toEnum . fromIntegral) style
    _cb  style'

onToolbarStyleChanged :: (GObject a, MonadIO m) => a -> ToolbarStyleChangedCallback -> m SignalHandlerId
onToolbarStyleChanged obj cb = liftIO $ connectToolbarStyleChanged obj cb SignalConnectBefore
afterToolbarStyleChanged :: (GObject a, MonadIO m) => a -> ToolbarStyleChangedCallback -> m SignalHandlerId
afterToolbarStyleChanged obj cb = connectToolbarStyleChanged obj cb SignalConnectAfter

connectToolbarStyleChanged :: (GObject a, MonadIO m) =>
                              a -> ToolbarStyleChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectToolbarStyleChanged obj cb after = liftIO $ do
    cb' <- mkToolbarStyleChangedCallback (toolbarStyleChangedCallbackWrapper cb)
    connectSignalFunPtr obj "style-changed" cb' after

-- Enum ToolbarSpaceStyle

data ToolbarSpaceStyle = 
      ToolbarSpaceStyleEmpty
    | ToolbarSpaceStyleLine
    | AnotherToolbarSpaceStyle Int
    deriving (Show, Eq)

instance Enum ToolbarSpaceStyle where
    fromEnum ToolbarSpaceStyleEmpty = 0
    fromEnum ToolbarSpaceStyleLine = 1
    fromEnum (AnotherToolbarSpaceStyle k) = k

    toEnum 0 = ToolbarSpaceStyleEmpty
    toEnum 1 = ToolbarSpaceStyleLine
    toEnum k = AnotherToolbarSpaceStyle k

foreign import ccall "gtk_toolbar_space_style_get_type" c_gtk_toolbar_space_style_get_type :: 
    IO GType

instance BoxedEnum ToolbarSpaceStyle where
    boxedEnumType _ = c_gtk_toolbar_space_style_get_type

-- Enum ToolbarStyle

data ToolbarStyle = 
      ToolbarStyleIcons
    | ToolbarStyleText
    | ToolbarStyleBoth
    | ToolbarStyleBothHoriz
    | AnotherToolbarStyle Int
    deriving (Show, Eq)

instance Enum ToolbarStyle where
    fromEnum ToolbarStyleIcons = 0
    fromEnum ToolbarStyleText = 1
    fromEnum ToolbarStyleBoth = 2
    fromEnum ToolbarStyleBothHoriz = 3
    fromEnum (AnotherToolbarStyle k) = k

    toEnum 0 = ToolbarStyleIcons
    toEnum 1 = ToolbarStyleText
    toEnum 2 = ToolbarStyleBoth
    toEnum 3 = ToolbarStyleBothHoriz
    toEnum k = AnotherToolbarStyle k

foreign import ccall "gtk_toolbar_style_get_type" c_gtk_toolbar_style_get_type :: 
    IO GType

instance BoxedEnum ToolbarStyle where
    boxedEnumType _ = c_gtk_toolbar_style_get_type

-- object Tooltip 
newtype Tooltip = Tooltip (ForeignPtr Tooltip)
noTooltip :: Maybe Tooltip
noTooltip = Nothing

foreign import ccall "gtk_tooltip_get_type"
    c_gtk_tooltip_get_type :: IO GType

type instance ParentTypes Tooltip = '[GObject.Object]

instance GObject Tooltip where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_tooltip_get_type
    

class GObject o => TooltipK o
instance (GObject o, IsDescendantOf Tooltip o) => TooltipK o

toTooltip :: TooltipK o => o -> IO Tooltip
toTooltip = unsafeCastTo Tooltip

-- method Tooltip::set_custom
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "custom_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "custom_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tooltip_set_custom" gtk_tooltip_set_custom :: 
    Ptr Tooltip ->                          -- _obj : TInterface "Gtk" "Tooltip"
    Ptr Widget ->                           -- custom_widget : TInterface "Gtk" "Widget"
    IO ()


tooltipSetCustom ::
    (MonadIO m, TooltipK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- custom_widget
    m ()
tooltipSetCustom _obj custom_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCustom_widget <- case custom_widget of
        Nothing -> return nullPtr
        Just jCustom_widget -> do
            let jCustom_widget' = unsafeManagedPtrCastPtr jCustom_widget
            return jCustom_widget'
    gtk_tooltip_set_custom _obj' maybeCustom_widget
    touchManagedPtr _obj
    whenJust custom_widget touchManagedPtr
    return ()

-- method Tooltip::set_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tooltip_set_icon" gtk_tooltip_set_icon :: 
    Ptr Tooltip ->                          -- _obj : TInterface "Gtk" "Tooltip"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO ()


tooltipSetIcon ::
    (MonadIO m, TooltipK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- pixbuf
    m ()
tooltipSetIcon _obj pixbuf = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePixbuf <- case pixbuf of
        Nothing -> return nullPtr
        Just jPixbuf -> do
            let jPixbuf' = unsafeManagedPtrCastPtr jPixbuf
            return jPixbuf'
    gtk_tooltip_set_icon _obj' maybePixbuf
    touchManagedPtr _obj
    whenJust pixbuf touchManagedPtr
    return ()

-- method Tooltip::set_icon_from_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gicon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gicon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tooltip_set_icon_from_gicon" gtk_tooltip_set_icon_from_gicon :: 
    Ptr Tooltip ->                          -- _obj : TInterface "Gtk" "Tooltip"
    Ptr Gio.Icon ->                         -- gicon : TInterface "Gio" "Icon"
    Int32 ->                                -- size : TBasicType TInt32
    IO ()


tooltipSetIconFromGicon ::
    (MonadIO m, TooltipK a, Gio.IconK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- gicon
    Int32 ->                                -- size
    m ()
tooltipSetIconFromGicon _obj gicon size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeGicon <- case gicon of
        Nothing -> return nullPtr
        Just jGicon -> do
            let jGicon' = unsafeManagedPtrCastPtr jGicon
            return jGicon'
    gtk_tooltip_set_icon_from_gicon _obj' maybeGicon size
    touchManagedPtr _obj
    whenJust gicon touchManagedPtr
    return ()

-- method Tooltip::set_icon_from_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tooltip_set_icon_from_icon_name" gtk_tooltip_set_icon_from_icon_name :: 
    Ptr Tooltip ->                          -- _obj : TInterface "Gtk" "Tooltip"
    CString ->                              -- icon_name : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    IO ()


tooltipSetIconFromIconName ::
    (MonadIO m, TooltipK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- icon_name
    Int32 ->                                -- size
    m ()
tooltipSetIconFromIconName _obj icon_name size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeIcon_name <- case icon_name of
        Nothing -> return nullPtr
        Just jIcon_name -> do
            jIcon_name' <- textToCString jIcon_name
            return jIcon_name'
    gtk_tooltip_set_icon_from_icon_name _obj' maybeIcon_name size
    touchManagedPtr _obj
    freeMem maybeIcon_name
    return ()

-- method Tooltip::set_icon_from_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tooltip_set_icon_from_stock" gtk_tooltip_set_icon_from_stock :: 
    Ptr Tooltip ->                          -- _obj : TInterface "Gtk" "Tooltip"
    CString ->                              -- stock_id : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    IO ()

{-# DEPRECATED tooltipSetIconFromStock ["(Since version 3.10)","Use gtk_tooltip_set_icon_from_icon_name() instead."]#-}
tooltipSetIconFromStock ::
    (MonadIO m, TooltipK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- stock_id
    Int32 ->                                -- size
    m ()
tooltipSetIconFromStock _obj stock_id size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeStock_id <- case stock_id of
        Nothing -> return nullPtr
        Just jStock_id -> do
            jStock_id' <- textToCString jStock_id
            return jStock_id'
    gtk_tooltip_set_icon_from_stock _obj' maybeStock_id size
    touchManagedPtr _obj
    freeMem maybeStock_id
    return ()

-- method Tooltip::set_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tooltip_set_markup" gtk_tooltip_set_markup :: 
    Ptr Tooltip ->                          -- _obj : TInterface "Gtk" "Tooltip"
    CString ->                              -- markup : TBasicType TUTF8
    IO ()


tooltipSetMarkup ::
    (MonadIO m, TooltipK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- markup
    m ()
tooltipSetMarkup _obj markup = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeMarkup <- case markup of
        Nothing -> return nullPtr
        Just jMarkup -> do
            jMarkup' <- textToCString jMarkup
            return jMarkup'
    gtk_tooltip_set_markup _obj' maybeMarkup
    touchManagedPtr _obj
    freeMem maybeMarkup
    return ()

-- method Tooltip::set_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tooltip_set_text" gtk_tooltip_set_text :: 
    Ptr Tooltip ->                          -- _obj : TInterface "Gtk" "Tooltip"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


tooltipSetText ::
    (MonadIO m, TooltipK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- text
    m ()
tooltipSetText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeText <- case text of
        Nothing -> return nullPtr
        Just jText -> do
            jText' <- textToCString jText
            return jText'
    gtk_tooltip_set_text _obj' maybeText
    touchManagedPtr _obj
    freeMem maybeText
    return ()

-- method Tooltip::set_tip_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tooltip_set_tip_area" gtk_tooltip_set_tip_area :: 
    Ptr Tooltip ->                          -- _obj : TInterface "Gtk" "Tooltip"
    Ptr Gdk.Rectangle ->                    -- rect : TInterface "Gdk" "Rectangle"
    IO ()


tooltipSetTipArea ::
    (MonadIO m, TooltipK a) =>
    a ->                                    -- _obj
    Gdk.Rectangle ->                        -- rect
    m ()
tooltipSetTipArea _obj rect = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let rect' = unsafeManagedPtrGetPtr rect
    gtk_tooltip_set_tip_area _obj' rect'
    touchManagedPtr _obj
    touchManagedPtr rect
    return ()

-- method Tooltip::trigger_tooltip_query
-- method type : MemberFunction
-- Args : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tooltip_trigger_tooltip_query" gtk_tooltip_trigger_tooltip_query :: 
    Ptr Gdk.Display ->                      -- display : TInterface "Gdk" "Display"
    IO ()


tooltipTriggerTooltipQuery ::
    (MonadIO m, Gdk.DisplayK a) =>
    a ->                                    -- display
    m ()
tooltipTriggerTooltipQuery display = liftIO $ do
    let display' = unsafeManagedPtrCastPtr display
    gtk_tooltip_trigger_tooltip_query display'
    touchManagedPtr display
    return ()

-- object ToplevelAccessible 
newtype ToplevelAccessible = ToplevelAccessible (ForeignPtr ToplevelAccessible)
noToplevelAccessible :: Maybe ToplevelAccessible
noToplevelAccessible = Nothing

foreign import ccall "gtk_toplevel_accessible_get_type"
    c_gtk_toplevel_accessible_get_type :: IO GType

type instance ParentTypes ToplevelAccessible = '[Atk.Object, GObject.Object]

instance GObject ToplevelAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_toplevel_accessible_get_type
    

class GObject o => ToplevelAccessibleK o
instance (GObject o, IsDescendantOf ToplevelAccessible o) => ToplevelAccessibleK o

toToplevelAccessible :: ToplevelAccessibleK o => o -> IO ToplevelAccessible
toToplevelAccessible = unsafeCastTo ToplevelAccessible

-- method ToplevelAccessible::get_children
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToplevelAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToplevelAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "Window")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_toplevel_accessible_get_children" gtk_toplevel_accessible_get_children :: 
    Ptr ToplevelAccessible ->               -- _obj : TInterface "Gtk" "ToplevelAccessible"
    IO (Ptr (GList (Ptr Window)))


toplevelAccessibleGetChildren ::
    (MonadIO m, ToplevelAccessibleK a) =>
    a ->                                    -- _obj
    m [Window]
toplevelAccessibleGetChildren _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_toplevel_accessible_get_children _obj'
    checkUnexpectedReturnNULL "gtk_toplevel_accessible_get_children" result
    result' <- unpackGList result
    result'' <- mapM (newObject Window) result'
    touchManagedPtr _obj
    return result''

-- callback TranslateFunc
translateFuncClosure :: TranslateFunc -> IO Closure
translateFuncClosure cb = newCClosure =<< mkTranslateFunc wrapped
    where wrapped = translateFuncWrapper Nothing cb

type TranslateFuncC =
    CString ->
    Ptr () ->
    IO CString

foreign import ccall "wrapper"
    mkTranslateFunc :: TranslateFuncC -> IO (FunPtr TranslateFuncC)

type TranslateFunc =
    T.Text ->
    IO T.Text

noTranslateFunc :: Maybe TranslateFunc
noTranslateFunc = Nothing

translateFuncWrapper ::
    Maybe (Ptr (FunPtr (TranslateFuncC))) ->
    TranslateFunc ->
    CString ->
    Ptr () ->
    IO CString
translateFuncWrapper funptrptr _cb path _ = do
    path' <- cstringToText path
    result <- _cb  path'
    maybeReleaseFunPtr funptrptr
    result' <- textToCString result
    return result'

-- callback TreeCellDataFunc
treeCellDataFuncClosure :: TreeCellDataFunc -> IO Closure
treeCellDataFuncClosure cb = newCClosure =<< mkTreeCellDataFunc wrapped
    where wrapped = treeCellDataFuncWrapper Nothing cb

type TreeCellDataFuncC =
    Ptr TreeViewColumn ->
    Ptr CellRenderer ->
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkTreeCellDataFunc :: TreeCellDataFuncC -> IO (FunPtr TreeCellDataFuncC)

type TreeCellDataFunc =
    TreeViewColumn ->
    CellRenderer ->
    TreeModel ->
    TreeIter ->
    IO ()

noTreeCellDataFunc :: Maybe TreeCellDataFunc
noTreeCellDataFunc = Nothing

treeCellDataFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeCellDataFuncC))) ->
    TreeCellDataFunc ->
    Ptr TreeViewColumn ->
    Ptr CellRenderer ->
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->
    IO ()
treeCellDataFuncWrapper funptrptr _cb tree_column cell tree_model iter _ = do
    tree_column' <- (newObject TreeViewColumn) tree_column
    cell' <- (newObject CellRenderer) cell
    tree_model' <- (newObject TreeModel) tree_model
    iter' <- (newBoxed TreeIter) iter
    _cb  tree_column' cell' tree_model' iter'
    maybeReleaseFunPtr funptrptr

-- callback TreeDestroyCountFunc
treeDestroyCountFuncClosure :: TreeDestroyCountFunc -> IO Closure
treeDestroyCountFuncClosure cb = newCClosure =<< mkTreeDestroyCountFunc wrapped
    where wrapped = treeDestroyCountFuncWrapper Nothing cb

type TreeDestroyCountFuncC =
    Ptr TreeView ->
    Ptr TreePath ->
    Int32 ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkTreeDestroyCountFunc :: TreeDestroyCountFuncC -> IO (FunPtr TreeDestroyCountFuncC)

type TreeDestroyCountFunc =
    TreeView ->
    TreePath ->
    Int32 ->
    IO ()

noTreeDestroyCountFunc :: Maybe TreeDestroyCountFunc
noTreeDestroyCountFunc = Nothing

treeDestroyCountFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeDestroyCountFuncC))) ->
    TreeDestroyCountFunc ->
    Ptr TreeView ->
    Ptr TreePath ->
    Int32 ->
    Ptr () ->
    IO ()
treeDestroyCountFuncWrapper funptrptr _cb tree_view path children _ = do
    tree_view' <- (newObject TreeView) tree_view
    path' <- (newBoxed TreePath) path
    _cb  tree_view' path' children
    maybeReleaseFunPtr funptrptr

-- interface TreeDragDest 

newtype TreeDragDest = TreeDragDest (ForeignPtr TreeDragDest)
noTreeDragDest :: Maybe TreeDragDest
noTreeDragDest = Nothing

class ForeignPtrNewtype a => TreeDragDestK a
instance (ForeignPtrNewtype o, IsDescendantOf TreeDragDest o) => TreeDragDestK o
type instance ParentTypes TreeDragDest = '[]

-- method TreeDragDest::drag_data_received
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragDest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragDest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_drag_dest_drag_data_received" gtk_tree_drag_dest_drag_data_received :: 
    Ptr TreeDragDest ->                     -- _obj : TInterface "Gtk" "TreeDragDest"
    Ptr TreePath ->                         -- dest : TInterface "Gtk" "TreePath"
    Ptr SelectionData ->                    -- selection_data : TInterface "Gtk" "SelectionData"
    IO CInt


treeDragDestDragDataReceived ::
    (MonadIO m, TreeDragDestK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- dest
    SelectionData ->                        -- selection_data
    m Bool
treeDragDestDragDataReceived _obj dest selection_data = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let dest' = unsafeManagedPtrGetPtr dest
    let selection_data' = unsafeManagedPtrGetPtr selection_data
    result <- gtk_tree_drag_dest_drag_data_received _obj' dest' selection_data'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr dest
    touchManagedPtr selection_data
    return result'

-- method TreeDragDest::row_drop_possible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragDest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragDest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_drag_dest_row_drop_possible" gtk_tree_drag_dest_row_drop_possible :: 
    Ptr TreeDragDest ->                     -- _obj : TInterface "Gtk" "TreeDragDest"
    Ptr TreePath ->                         -- dest_path : TInterface "Gtk" "TreePath"
    Ptr SelectionData ->                    -- selection_data : TInterface "Gtk" "SelectionData"
    IO CInt


treeDragDestRowDropPossible ::
    (MonadIO m, TreeDragDestK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- dest_path
    SelectionData ->                        -- selection_data
    m Bool
treeDragDestRowDropPossible _obj dest_path selection_data = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let dest_path' = unsafeManagedPtrGetPtr dest_path
    let selection_data' = unsafeManagedPtrGetPtr selection_data
    result <- gtk_tree_drag_dest_row_drop_possible _obj' dest_path' selection_data'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr dest_path
    touchManagedPtr selection_data
    return result'

-- interface TreeDragSource 

newtype TreeDragSource = TreeDragSource (ForeignPtr TreeDragSource)
noTreeDragSource :: Maybe TreeDragSource
noTreeDragSource = Nothing

class ForeignPtrNewtype a => TreeDragSourceK a
instance (ForeignPtrNewtype o, IsDescendantOf TreeDragSource o) => TreeDragSourceK o
type instance ParentTypes TreeDragSource = '[]

-- method TreeDragSource::drag_data_delete
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_drag_source_drag_data_delete" gtk_tree_drag_source_drag_data_delete :: 
    Ptr TreeDragSource ->                   -- _obj : TInterface "Gtk" "TreeDragSource"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO CInt


treeDragSourceDragDataDelete ::
    (MonadIO m, TreeDragSourceK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m Bool
treeDragSourceDragDataDelete _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_tree_drag_source_drag_data_delete _obj' path'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr path
    return result'

-- method TreeDragSource::drag_data_get
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_drag_source_drag_data_get" gtk_tree_drag_source_drag_data_get :: 
    Ptr TreeDragSource ->                   -- _obj : TInterface "Gtk" "TreeDragSource"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr SelectionData ->                    -- selection_data : TInterface "Gtk" "SelectionData"
    IO CInt


treeDragSourceDragDataGet ::
    (MonadIO m, TreeDragSourceK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    SelectionData ->                        -- selection_data
    m Bool
treeDragSourceDragDataGet _obj path selection_data = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    let selection_data' = unsafeManagedPtrGetPtr selection_data
    result <- gtk_tree_drag_source_drag_data_get _obj' path' selection_data'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr path
    touchManagedPtr selection_data
    return result'

-- method TreeDragSource::row_draggable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_drag_source_row_draggable" gtk_tree_drag_source_row_draggable :: 
    Ptr TreeDragSource ->                   -- _obj : TInterface "Gtk" "TreeDragSource"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO CInt


treeDragSourceRowDraggable ::
    (MonadIO m, TreeDragSourceK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m Bool
treeDragSourceRowDraggable _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_tree_drag_source_row_draggable _obj' path'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr path
    return result'

-- struct TreeIter
newtype TreeIter = TreeIter (ForeignPtr TreeIter)
noTreeIter :: Maybe TreeIter
noTreeIter = Nothing

foreign import ccall "gtk_tree_iter_get_type" c_gtk_tree_iter_get_type :: 
    IO GType

instance BoxedObject TreeIter where
    boxedType _ = c_gtk_tree_iter_get_type

treeIterReadStamp :: TreeIter -> IO Int32
treeIterReadStamp s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Int32
    return val

treeIterReadUserData :: TreeIter -> IO (Ptr ())
treeIterReadUserData s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO (Ptr ())
    return val

treeIterReadUserData2 :: TreeIter -> IO (Ptr ())
treeIterReadUserData2 s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO (Ptr ())
    return val

treeIterReadUserData3 :: TreeIter -> IO (Ptr ())
treeIterReadUserData3 s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO (Ptr ())
    return val

-- method TreeIter::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeIter"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_iter_copy" gtk_tree_iter_copy :: 
    Ptr TreeIter ->                         -- _obj : TInterface "Gtk" "TreeIter"
    IO (Ptr TreeIter)


treeIterCopy ::
    (MonadIO m) =>
    TreeIter ->                             -- _obj
    m TreeIter
treeIterCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_tree_iter_copy _obj'
    checkUnexpectedReturnNULL "gtk_tree_iter_copy" result
    result' <- (wrapBoxed TreeIter) result
    touchManagedPtr _obj
    return result'

-- method TreeIter::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_iter_free" gtk_tree_iter_free :: 
    Ptr TreeIter ->                         -- _obj : TInterface "Gtk" "TreeIter"
    IO ()


treeIterFree ::
    (MonadIO m) =>
    TreeIter ->                             -- _obj
    m ()
treeIterFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_tree_iter_free _obj'
    touchManagedPtr _obj
    return ()

-- callback TreeIterCompareFunc
treeIterCompareFuncClosure :: TreeIterCompareFunc -> IO Closure
treeIterCompareFuncClosure cb = newCClosure =<< mkTreeIterCompareFunc wrapped
    where wrapped = treeIterCompareFuncWrapper Nothing cb

type TreeIterCompareFuncC =
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr TreeIter ->
    Ptr () ->
    IO Int32

foreign import ccall "wrapper"
    mkTreeIterCompareFunc :: TreeIterCompareFuncC -> IO (FunPtr TreeIterCompareFuncC)

type TreeIterCompareFunc =
    TreeModel ->
    TreeIter ->
    TreeIter ->
    IO Int32

noTreeIterCompareFunc :: Maybe TreeIterCompareFunc
noTreeIterCompareFunc = Nothing

treeIterCompareFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeIterCompareFuncC))) ->
    TreeIterCompareFunc ->
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr TreeIter ->
    Ptr () ->
    IO Int32
treeIterCompareFuncWrapper funptrptr _cb model a b _ = do
    model' <- (newObject TreeModel) model
    a' <- (newBoxed TreeIter) a
    b' <- (newBoxed TreeIter) b
    result <- _cb  model' a' b'
    maybeReleaseFunPtr funptrptr
    return result

-- interface TreeModel 

newtype TreeModel = TreeModel (ForeignPtr TreeModel)
noTreeModel :: Maybe TreeModel
noTreeModel = Nothing

foreign import ccall "gtk_tree_model_get_type"
    c_gtk_tree_model_get_type :: IO GType

type instance ParentTypes TreeModel = '[GObject.Object]

instance GObject TreeModel where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_tree_model_get_type
    

class GObject o => TreeModelK o
instance (GObject o, IsDescendantOf TreeModel o) => TreeModelK o

toTreeModel :: TreeModelK o => o -> IO TreeModel
toTreeModel = unsafeCastTo TreeModel

-- method TreeModel::filter_new
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "root", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "root", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_new" gtk_tree_model_filter_new :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreePath ->                         -- root : TInterface "Gtk" "TreePath"
    IO (Ptr TreeModel)


treeModelFilterNew ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    Maybe (TreePath) ->                     -- root
    m TreeModel
treeModelFilterNew _obj root = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeRoot <- case root of
        Nothing -> return nullPtr
        Just jRoot -> do
            let jRoot' = unsafeManagedPtrGetPtr jRoot
            return jRoot'
    result <- gtk_tree_model_filter_new _obj' maybeRoot
    checkUnexpectedReturnNULL "gtk_tree_model_filter_new" result
    result' <- (wrapObject TreeModel) result
    touchManagedPtr _obj
    whenJust root touchManagedPtr
    return result'

-- method TreeModel::foreach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeModelForeachFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeModelForeachFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_foreach" gtk_tree_model_foreach :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    FunPtr TreeModelForeachFuncC ->         -- func : TInterface "Gtk" "TreeModelForeachFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


treeModelForeach ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreeModelForeachFunc ->                 -- func
    m ()
treeModelForeach _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkTreeModelForeachFunc (treeModelForeachFuncWrapper Nothing func)
    let user_data = nullPtr
    gtk_tree_model_foreach _obj' func' user_data
    safeFreeFunPtr $ castFunPtrToPtr func'
    touchManagedPtr _obj
    return ()

-- method TreeModel::get_column_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TGType
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_get_column_type" gtk_tree_model_get_column_type :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Int32 ->                                -- index_ : TBasicType TInt32
    IO CGType


treeModelGetColumnType ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- index_
    m GType
treeModelGetColumnType _obj index_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_model_get_column_type _obj' index_
    let result' = GType result
    touchManagedPtr _obj
    return result'

-- method TreeModel::get_flags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModelFlags"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_get_flags" gtk_tree_model_get_flags :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    IO CUInt


treeModelGetFlags ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    m [TreeModelFlags]
treeModelGetFlags _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_model_get_flags _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method TreeModel::get_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_get_iter" gtk_tree_model_get_iter :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO CInt


treeModelGetIter ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m (Bool,TreeIter)
treeModelGetIter _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_tree_model_get_iter _obj' iter path'
    let result' = (/= 0) result
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    touchManagedPtr path
    return (result', iter')

-- method TreeModel::get_iter_first
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_get_iter_first" gtk_tree_model_get_iter_first :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeModelGetIterFirst ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    m (Bool,TreeIter)
treeModelGetIterFirst _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    result <- gtk_tree_model_get_iter_first _obj' iter
    let result' = (/= 0) result
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    return (result', iter')

-- method TreeModel::get_iter_from_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_get_iter_from_string" gtk_tree_model_get_iter_from_string :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    CString ->                              -- path_string : TBasicType TUTF8
    IO CInt


treeModelGetIterFromString ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- path_string
    m (Bool,TreeIter)
treeModelGetIterFromString _obj path_string = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    path_string' <- textToCString path_string
    result <- gtk_tree_model_get_iter_from_string _obj' iter path_string'
    let result' = (/= 0) result
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    freeMem path_string'
    return (result', iter')

-- method TreeModel::get_n_columns
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_get_n_columns" gtk_tree_model_get_n_columns :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    IO Int32


treeModelGetNColumns ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    m Int32
treeModelGetNColumns _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_model_get_n_columns _obj'
    touchManagedPtr _obj
    return result

-- method TreeModel::get_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_get_path" gtk_tree_model_get_path :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO (Ptr TreePath)


treeModelGetPath ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m TreePath
treeModelGetPath _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_tree_model_get_path _obj' iter'
    checkUnexpectedReturnNULL "gtk_tree_model_get_path" result
    result' <- (wrapBoxed TreePath) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TreeModel::get_string_from_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_get_string_from_iter" gtk_tree_model_get_string_from_iter :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CString


treeModelGetStringFromIter ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m T.Text
treeModelGetStringFromIter _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_tree_model_get_string_from_iter _obj' iter'
    checkUnexpectedReturnNULL "gtk_tree_model_get_string_from_iter" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TreeModel::get_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_get_value" gtk_tree_model_get_value :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Int32 ->                                -- column : TBasicType TInt32
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


treeModelGetValue ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    Int32 ->                                -- column
    m (GValue)
treeModelGetValue _obj iter column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    value <- callocBoxedBytes 24 :: IO (Ptr GValue)
    gtk_tree_model_get_value _obj' iter' column value
    value' <- (wrapBoxed GValue) value
    touchManagedPtr _obj
    touchManagedPtr iter
    return value'

-- method TreeModel::iter_children
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_iter_children" gtk_tree_model_iter_children :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- parent : TInterface "Gtk" "TreeIter"
    IO CInt


treeModelIterChildren ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- parent
    m (Bool,TreeIter)
treeModelIterChildren _obj parent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrGetPtr jParent
            return jParent'
    result <- gtk_tree_model_iter_children _obj' iter maybeParent
    let result' = (/= 0) result
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    return (result', iter')

-- method TreeModel::iter_has_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_iter_has_child" gtk_tree_model_iter_has_child :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeModelIterHasChild ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m Bool
treeModelIterHasChild _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_tree_model_iter_has_child _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TreeModel::iter_n_children
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_iter_n_children" gtk_tree_model_iter_n_children :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO Int32


treeModelIterNChildren ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- iter
    m Int32
treeModelIterNChildren _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeIter <- case iter of
        Nothing -> return nullPtr
        Just jIter -> do
            let jIter' = unsafeManagedPtrGetPtr jIter
            return jIter'
    result <- gtk_tree_model_iter_n_children _obj' maybeIter
    touchManagedPtr _obj
    whenJust iter touchManagedPtr
    return result

-- method TreeModel::iter_next
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_iter_next" gtk_tree_model_iter_next :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeModelIterNext ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m Bool
treeModelIterNext _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_tree_model_iter_next _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TreeModel::iter_nth_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_iter_nth_child" gtk_tree_model_iter_nth_child :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- parent : TInterface "Gtk" "TreeIter"
    Int32 ->                                -- n : TBasicType TInt32
    IO CInt


treeModelIterNthChild ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- parent
    Int32 ->                                -- n
    m (Bool,TreeIter)
treeModelIterNthChild _obj parent n = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrGetPtr jParent
            return jParent'
    result <- gtk_tree_model_iter_nth_child _obj' iter maybeParent n
    let result' = (/= 0) result
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    return (result', iter')

-- method TreeModel::iter_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_iter_parent" gtk_tree_model_iter_parent :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- child : TInterface "Gtk" "TreeIter"
    IO CInt


treeModelIterParent ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- child
    m (Bool,TreeIter)
treeModelIterParent _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    let child' = unsafeManagedPtrGetPtr child
    result <- gtk_tree_model_iter_parent _obj' iter child'
    let result' = (/= 0) result
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    touchManagedPtr child
    return (result', iter')

-- method TreeModel::iter_previous
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_iter_previous" gtk_tree_model_iter_previous :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeModelIterPrevious ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m Bool
treeModelIterPrevious _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_tree_model_iter_previous _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TreeModel::ref_node
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_ref_node" gtk_tree_model_ref_node :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO ()


treeModelRefNode ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m ()
treeModelRefNode _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    gtk_tree_model_ref_node _obj' iter'
    touchManagedPtr _obj
    touchManagedPtr iter
    return ()

-- method TreeModel::row_changed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_row_changed" gtk_tree_model_row_changed :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO ()


treeModelRowChanged ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    TreeIter ->                             -- iter
    m ()
treeModelRowChanged _obj path iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    let iter' = unsafeManagedPtrGetPtr iter
    gtk_tree_model_row_changed _obj' path' iter'
    touchManagedPtr _obj
    touchManagedPtr path
    touchManagedPtr iter
    return ()

-- method TreeModel::row_deleted
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_row_deleted" gtk_tree_model_row_deleted :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


treeModelRowDeleted ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m ()
treeModelRowDeleted _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    gtk_tree_model_row_deleted _obj' path'
    touchManagedPtr _obj
    touchManagedPtr path
    return ()

-- method TreeModel::row_has_child_toggled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_row_has_child_toggled" gtk_tree_model_row_has_child_toggled :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO ()


treeModelRowHasChildToggled ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    TreeIter ->                             -- iter
    m ()
treeModelRowHasChildToggled _obj path iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    let iter' = unsafeManagedPtrGetPtr iter
    gtk_tree_model_row_has_child_toggled _obj' path' iter'
    touchManagedPtr _obj
    touchManagedPtr path
    touchManagedPtr iter
    return ()

-- method TreeModel::row_inserted
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_row_inserted" gtk_tree_model_row_inserted :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO ()


treeModelRowInserted ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    TreeIter ->                             -- iter
    m ()
treeModelRowInserted _obj path iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    let iter' = unsafeManagedPtrGetPtr iter
    gtk_tree_model_row_inserted _obj' path' iter'
    touchManagedPtr _obj
    touchManagedPtr path
    touchManagedPtr iter
    return ()

-- method TreeModel::rows_reordered
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_order", argType = TCArray False (-1) 4 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_order", argType = TCArray False (-1) 4 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_rows_reordered_with_length" gtk_tree_model_rows_reordered_with_length :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr Int32 ->                            -- new_order : TCArray False (-1) 4 (TBasicType TInt32)
    Int32 ->                                -- length : TBasicType TInt32
    IO ()


treeModelRowsReordered ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    Maybe (TreeIter) ->                     -- iter
    [Int32] ->                              -- new_order
    m ()
treeModelRowsReordered _obj path iter new_order = liftIO $ do
    let length_ = fromIntegral $ length new_order
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    maybeIter <- case iter of
        Nothing -> return nullPtr
        Just jIter -> do
            let jIter' = unsafeManagedPtrGetPtr jIter
            return jIter'
    new_order' <- packStorableArray new_order
    gtk_tree_model_rows_reordered_with_length _obj' path' maybeIter new_order' length_
    touchManagedPtr _obj
    touchManagedPtr path
    whenJust iter touchManagedPtr
    freeMem new_order'
    return ()

-- method TreeModel::sort_new_with_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_sort_new_with_model" gtk_tree_model_sort_new_with_model :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    IO (Ptr TreeModel)


treeModelSortNewWithModel ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    m TreeModel
treeModelSortNewWithModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_model_sort_new_with_model _obj'
    checkUnexpectedReturnNULL "gtk_tree_model_sort_new_with_model" result
    result' <- (wrapObject TreeModel) result
    touchManagedPtr _obj
    return result'

-- method TreeModel::unref_node
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_unref_node" gtk_tree_model_unref_node :: 
    Ptr TreeModel ->                        -- _obj : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO ()


treeModelUnrefNode ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m ()
treeModelUnrefNode _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    gtk_tree_model_unref_node _obj' iter'
    touchManagedPtr _obj
    touchManagedPtr iter
    return ()

-- signal TreeModel::row-changed
type TreeModelRowChangedCallback =
    TreePath ->
    TreeIter ->
    IO ()

noTreeModelRowChangedCallback :: Maybe TreeModelRowChangedCallback
noTreeModelRowChangedCallback = Nothing

type TreeModelRowChangedCallbackC =
    Ptr () ->                               -- object
    Ptr TreePath ->
    Ptr TreeIter ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeModelRowChangedCallback :: TreeModelRowChangedCallbackC -> IO (FunPtr TreeModelRowChangedCallbackC)

treeModelRowChangedClosure :: TreeModelRowChangedCallback -> IO Closure
treeModelRowChangedClosure cb = newCClosure =<< mkTreeModelRowChangedCallback wrapped
    where wrapped = treeModelRowChangedCallbackWrapper cb

treeModelRowChangedCallbackWrapper ::
    TreeModelRowChangedCallback ->
    Ptr () ->
    Ptr TreePath ->
    Ptr TreeIter ->
    Ptr () ->
    IO ()
treeModelRowChangedCallbackWrapper _cb _ path iter _ = do
    path' <- (newBoxed TreePath) path
    iter' <- (newBoxed TreeIter) iter
    _cb  path' iter'

onTreeModelRowChanged :: (GObject a, MonadIO m) => a -> TreeModelRowChangedCallback -> m SignalHandlerId
onTreeModelRowChanged obj cb = liftIO $ connectTreeModelRowChanged obj cb SignalConnectBefore
afterTreeModelRowChanged :: (GObject a, MonadIO m) => a -> TreeModelRowChangedCallback -> m SignalHandlerId
afterTreeModelRowChanged obj cb = connectTreeModelRowChanged obj cb SignalConnectAfter

connectTreeModelRowChanged :: (GObject a, MonadIO m) =>
                              a -> TreeModelRowChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeModelRowChanged obj cb after = liftIO $ do
    cb' <- mkTreeModelRowChangedCallback (treeModelRowChangedCallbackWrapper cb)
    connectSignalFunPtr obj "row-changed" cb' after

-- signal TreeModel::row-deleted
type TreeModelRowDeletedCallback =
    TreePath ->
    IO ()

noTreeModelRowDeletedCallback :: Maybe TreeModelRowDeletedCallback
noTreeModelRowDeletedCallback = Nothing

type TreeModelRowDeletedCallbackC =
    Ptr () ->                               -- object
    Ptr TreePath ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeModelRowDeletedCallback :: TreeModelRowDeletedCallbackC -> IO (FunPtr TreeModelRowDeletedCallbackC)

treeModelRowDeletedClosure :: TreeModelRowDeletedCallback -> IO Closure
treeModelRowDeletedClosure cb = newCClosure =<< mkTreeModelRowDeletedCallback wrapped
    where wrapped = treeModelRowDeletedCallbackWrapper cb

treeModelRowDeletedCallbackWrapper ::
    TreeModelRowDeletedCallback ->
    Ptr () ->
    Ptr TreePath ->
    Ptr () ->
    IO ()
treeModelRowDeletedCallbackWrapper _cb _ path _ = do
    path' <- (newBoxed TreePath) path
    _cb  path'

onTreeModelRowDeleted :: (GObject a, MonadIO m) => a -> TreeModelRowDeletedCallback -> m SignalHandlerId
onTreeModelRowDeleted obj cb = liftIO $ connectTreeModelRowDeleted obj cb SignalConnectBefore
afterTreeModelRowDeleted :: (GObject a, MonadIO m) => a -> TreeModelRowDeletedCallback -> m SignalHandlerId
afterTreeModelRowDeleted obj cb = connectTreeModelRowDeleted obj cb SignalConnectAfter

connectTreeModelRowDeleted :: (GObject a, MonadIO m) =>
                              a -> TreeModelRowDeletedCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeModelRowDeleted obj cb after = liftIO $ do
    cb' <- mkTreeModelRowDeletedCallback (treeModelRowDeletedCallbackWrapper cb)
    connectSignalFunPtr obj "row-deleted" cb' after

-- signal TreeModel::row-has-child-toggled
type TreeModelRowHasChildToggledCallback =
    TreePath ->
    TreeIter ->
    IO ()

noTreeModelRowHasChildToggledCallback :: Maybe TreeModelRowHasChildToggledCallback
noTreeModelRowHasChildToggledCallback = Nothing

type TreeModelRowHasChildToggledCallbackC =
    Ptr () ->                               -- object
    Ptr TreePath ->
    Ptr TreeIter ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeModelRowHasChildToggledCallback :: TreeModelRowHasChildToggledCallbackC -> IO (FunPtr TreeModelRowHasChildToggledCallbackC)

treeModelRowHasChildToggledClosure :: TreeModelRowHasChildToggledCallback -> IO Closure
treeModelRowHasChildToggledClosure cb = newCClosure =<< mkTreeModelRowHasChildToggledCallback wrapped
    where wrapped = treeModelRowHasChildToggledCallbackWrapper cb

treeModelRowHasChildToggledCallbackWrapper ::
    TreeModelRowHasChildToggledCallback ->
    Ptr () ->
    Ptr TreePath ->
    Ptr TreeIter ->
    Ptr () ->
    IO ()
treeModelRowHasChildToggledCallbackWrapper _cb _ path iter _ = do
    path' <- (newBoxed TreePath) path
    iter' <- (newBoxed TreeIter) iter
    _cb  path' iter'

onTreeModelRowHasChildToggled :: (GObject a, MonadIO m) => a -> TreeModelRowHasChildToggledCallback -> m SignalHandlerId
onTreeModelRowHasChildToggled obj cb = liftIO $ connectTreeModelRowHasChildToggled obj cb SignalConnectBefore
afterTreeModelRowHasChildToggled :: (GObject a, MonadIO m) => a -> TreeModelRowHasChildToggledCallback -> m SignalHandlerId
afterTreeModelRowHasChildToggled obj cb = connectTreeModelRowHasChildToggled obj cb SignalConnectAfter

connectTreeModelRowHasChildToggled :: (GObject a, MonadIO m) =>
                                      a -> TreeModelRowHasChildToggledCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeModelRowHasChildToggled obj cb after = liftIO $ do
    cb' <- mkTreeModelRowHasChildToggledCallback (treeModelRowHasChildToggledCallbackWrapper cb)
    connectSignalFunPtr obj "row-has-child-toggled" cb' after

-- signal TreeModel::row-inserted
type TreeModelRowInsertedCallback =
    TreePath ->
    TreeIter ->
    IO ()

noTreeModelRowInsertedCallback :: Maybe TreeModelRowInsertedCallback
noTreeModelRowInsertedCallback = Nothing

type TreeModelRowInsertedCallbackC =
    Ptr () ->                               -- object
    Ptr TreePath ->
    Ptr TreeIter ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeModelRowInsertedCallback :: TreeModelRowInsertedCallbackC -> IO (FunPtr TreeModelRowInsertedCallbackC)

treeModelRowInsertedClosure :: TreeModelRowInsertedCallback -> IO Closure
treeModelRowInsertedClosure cb = newCClosure =<< mkTreeModelRowInsertedCallback wrapped
    where wrapped = treeModelRowInsertedCallbackWrapper cb

treeModelRowInsertedCallbackWrapper ::
    TreeModelRowInsertedCallback ->
    Ptr () ->
    Ptr TreePath ->
    Ptr TreeIter ->
    Ptr () ->
    IO ()
treeModelRowInsertedCallbackWrapper _cb _ path iter _ = do
    path' <- (newBoxed TreePath) path
    iter' <- (newBoxed TreeIter) iter
    _cb  path' iter'

onTreeModelRowInserted :: (GObject a, MonadIO m) => a -> TreeModelRowInsertedCallback -> m SignalHandlerId
onTreeModelRowInserted obj cb = liftIO $ connectTreeModelRowInserted obj cb SignalConnectBefore
afterTreeModelRowInserted :: (GObject a, MonadIO m) => a -> TreeModelRowInsertedCallback -> m SignalHandlerId
afterTreeModelRowInserted obj cb = connectTreeModelRowInserted obj cb SignalConnectAfter

connectTreeModelRowInserted :: (GObject a, MonadIO m) =>
                               a -> TreeModelRowInsertedCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeModelRowInserted obj cb after = liftIO $ do
    cb' <- mkTreeModelRowInsertedCallback (treeModelRowInsertedCallbackWrapper cb)
    connectSignalFunPtr obj "row-inserted" cb' after

-- object TreeModelFilter 
newtype TreeModelFilter = TreeModelFilter (ForeignPtr TreeModelFilter)
noTreeModelFilter :: Maybe TreeModelFilter
noTreeModelFilter = Nothing

foreign import ccall "gtk_tree_model_filter_get_type"
    c_gtk_tree_model_filter_get_type :: IO GType

type instance ParentTypes TreeModelFilter = '[GObject.Object, TreeDragSource, TreeModel]

instance GObject TreeModelFilter where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_tree_model_filter_get_type
    

class GObject o => TreeModelFilterK o
instance (GObject o, IsDescendantOf TreeModelFilter o) => TreeModelFilterK o

toTreeModelFilter :: TreeModelFilterK o => o -> IO TreeModelFilter
toTreeModelFilter = unsafeCastTo TreeModelFilter

-- method TreeModelFilter::clear_cache
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_clear_cache" gtk_tree_model_filter_clear_cache :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    IO ()


treeModelFilterClearCache ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    m ()
treeModelFilterClearCache _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_model_filter_clear_cache _obj'
    touchManagedPtr _obj
    return ()

-- method TreeModelFilter::convert_child_iter_to_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_convert_child_iter_to_iter" gtk_tree_model_filter_convert_child_iter_to_iter :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    Ptr TreeIter ->                         -- filter_iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- child_iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeModelFilterConvertChildIterToIter ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- child_iter
    m (Bool,TreeIter)
treeModelFilterConvertChildIterToIter _obj child_iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filter_iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    let child_iter' = unsafeManagedPtrGetPtr child_iter
    result <- gtk_tree_model_filter_convert_child_iter_to_iter _obj' filter_iter child_iter'
    let result' = (/= 0) result
    filter_iter' <- (wrapBoxed TreeIter) filter_iter
    touchManagedPtr _obj
    touchManagedPtr child_iter
    return (result', filter_iter')

-- method TreeModelFilter::convert_child_path_to_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_convert_child_path_to_path" gtk_tree_model_filter_convert_child_path_to_path :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    Ptr TreePath ->                         -- child_path : TInterface "Gtk" "TreePath"
    IO (Ptr TreePath)


treeModelFilterConvertChildPathToPath ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- child_path
    m TreePath
treeModelFilterConvertChildPathToPath _obj child_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child_path' = unsafeManagedPtrGetPtr child_path
    result <- gtk_tree_model_filter_convert_child_path_to_path _obj' child_path'
    checkUnexpectedReturnNULL "gtk_tree_model_filter_convert_child_path_to_path" result
    result' <- (wrapBoxed TreePath) result
    touchManagedPtr _obj
    touchManagedPtr child_path
    return result'

-- method TreeModelFilter::convert_iter_to_child_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_convert_iter_to_child_iter" gtk_tree_model_filter_convert_iter_to_child_iter :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    Ptr TreeIter ->                         -- child_iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- filter_iter : TInterface "Gtk" "TreeIter"
    IO ()


treeModelFilterConvertIterToChildIter ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- filter_iter
    m (TreeIter)
treeModelFilterConvertIterToChildIter _obj filter_iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    child_iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    let filter_iter' = unsafeManagedPtrGetPtr filter_iter
    gtk_tree_model_filter_convert_iter_to_child_iter _obj' child_iter filter_iter'
    child_iter' <- (wrapBoxed TreeIter) child_iter
    touchManagedPtr _obj
    touchManagedPtr filter_iter
    return child_iter'

-- method TreeModelFilter::convert_path_to_child_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_convert_path_to_child_path" gtk_tree_model_filter_convert_path_to_child_path :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    Ptr TreePath ->                         -- filter_path : TInterface "Gtk" "TreePath"
    IO (Ptr TreePath)


treeModelFilterConvertPathToChildPath ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- filter_path
    m TreePath
treeModelFilterConvertPathToChildPath _obj filter_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let filter_path' = unsafeManagedPtrGetPtr filter_path
    result <- gtk_tree_model_filter_convert_path_to_child_path _obj' filter_path'
    checkUnexpectedReturnNULL "gtk_tree_model_filter_convert_path_to_child_path" result
    result' <- (wrapBoxed TreePath) result
    touchManagedPtr _obj
    touchManagedPtr filter_path
    return result'

-- method TreeModelFilter::get_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_get_model" gtk_tree_model_filter_get_model :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    IO (Ptr TreeModel)


treeModelFilterGetModel ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    m TreeModel
treeModelFilterGetModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_model_filter_get_model _obj'
    checkUnexpectedReturnNULL "gtk_tree_model_filter_get_model" result
    result' <- (newObject TreeModel) result
    touchManagedPtr _obj
    return result'

-- method TreeModelFilter::refilter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_refilter" gtk_tree_model_filter_refilter :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    IO ()


treeModelFilterRefilter ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    m ()
treeModelFilterRefilter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_model_filter_refilter _obj'
    touchManagedPtr _obj
    return ()

-- method TreeModelFilter::set_visible_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_set_visible_column" gtk_tree_model_filter_set_visible_column :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


treeModelFilterSetVisibleColumn ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m ()
treeModelFilterSetVisibleColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_model_filter_set_visible_column _obj' column
    touchManagedPtr _obj
    return ()

-- method TreeModelFilter::set_visible_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeModelFilterVisibleFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeModelFilterVisibleFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_set_visible_func" gtk_tree_model_filter_set_visible_func :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    FunPtr TreeModelFilterVisibleFuncC ->   -- func : TInterface "Gtk" "TreeModelFilterVisibleFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


treeModelFilterSetVisibleFunc ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    TreeModelFilterVisibleFunc ->           -- func
    m ()
treeModelFilterSetVisibleFunc _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkTreeModelFilterVisibleFunc (treeModelFilterVisibleFuncWrapper Nothing func)
    let data_ = castFunPtrToPtr func'
    let destroy = safeFreeFunPtrPtr
    gtk_tree_model_filter_set_visible_func _obj' func' data_ destroy
    touchManagedPtr _obj
    return ()

-- callback TreeModelFilterModifyFunc
-- XXX Could not generate callback wrapper for TreeModelFilterModifyFunc
-- Error was : Not implemented: "Unexpected transfer type for \"value\""
-- callback TreeModelFilterVisibleFunc
treeModelFilterVisibleFuncClosure :: TreeModelFilterVisibleFunc -> IO Closure
treeModelFilterVisibleFuncClosure cb = newCClosure =<< mkTreeModelFilterVisibleFunc wrapped
    where wrapped = treeModelFilterVisibleFuncWrapper Nothing cb

type TreeModelFilterVisibleFuncC =
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkTreeModelFilterVisibleFunc :: TreeModelFilterVisibleFuncC -> IO (FunPtr TreeModelFilterVisibleFuncC)

type TreeModelFilterVisibleFunc =
    TreeModel ->
    TreeIter ->
    IO Bool

noTreeModelFilterVisibleFunc :: Maybe TreeModelFilterVisibleFunc
noTreeModelFilterVisibleFunc = Nothing

treeModelFilterVisibleFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeModelFilterVisibleFuncC))) ->
    TreeModelFilterVisibleFunc ->
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt
treeModelFilterVisibleFuncWrapper funptrptr _cb model iter _ = do
    model' <- (newObject TreeModel) model
    iter' <- (newBoxed TreeIter) iter
    result <- _cb  model' iter'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- Flags TreeModelFlags

data TreeModelFlags = 
      TreeModelFlagsItersPersist
    | TreeModelFlagsListOnly
    | AnotherTreeModelFlags Int
    deriving (Show, Eq)

instance Enum TreeModelFlags where
    fromEnum TreeModelFlagsItersPersist = 1
    fromEnum TreeModelFlagsListOnly = 2
    fromEnum (AnotherTreeModelFlags k) = k

    toEnum 1 = TreeModelFlagsItersPersist
    toEnum 2 = TreeModelFlagsListOnly
    toEnum k = AnotherTreeModelFlags k

foreign import ccall "gtk_tree_model_flags_get_type" c_gtk_tree_model_flags_get_type :: 
    IO GType

instance BoxedEnum TreeModelFlags where
    boxedEnumType _ = c_gtk_tree_model_flags_get_type

instance IsGFlag TreeModelFlags

-- callback TreeModelForeachFunc
treeModelForeachFuncClosure :: TreeModelForeachFunc -> IO Closure
treeModelForeachFuncClosure cb = newCClosure =<< mkTreeModelForeachFunc wrapped
    where wrapped = treeModelForeachFuncWrapper Nothing cb

type TreeModelForeachFuncC =
    Ptr TreeModel ->
    Ptr TreePath ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkTreeModelForeachFunc :: TreeModelForeachFuncC -> IO (FunPtr TreeModelForeachFuncC)

type TreeModelForeachFunc =
    TreeModel ->
    TreePath ->
    TreeIter ->
    IO Bool

noTreeModelForeachFunc :: Maybe TreeModelForeachFunc
noTreeModelForeachFunc = Nothing

treeModelForeachFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeModelForeachFuncC))) ->
    TreeModelForeachFunc ->
    Ptr TreeModel ->
    Ptr TreePath ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt
treeModelForeachFuncWrapper funptrptr _cb model path iter _ = do
    model' <- (newObject TreeModel) model
    path' <- (newBoxed TreePath) path
    iter' <- (newBoxed TreeIter) iter
    result <- _cb  model' path' iter'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- object TreeModelSort 
newtype TreeModelSort = TreeModelSort (ForeignPtr TreeModelSort)
noTreeModelSort :: Maybe TreeModelSort
noTreeModelSort = Nothing

foreign import ccall "gtk_tree_model_sort_get_type"
    c_gtk_tree_model_sort_get_type :: IO GType

type instance ParentTypes TreeModelSort = '[GObject.Object, TreeDragSource, TreeModel, TreeSortable]

instance GObject TreeModelSort where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_tree_model_sort_get_type
    

class GObject o => TreeModelSortK o
instance (GObject o, IsDescendantOf TreeModelSort o) => TreeModelSortK o

toTreeModelSort :: TreeModelSortK o => o -> IO TreeModelSort
toTreeModelSort = unsafeCastTo TreeModelSort

-- method TreeModelSort::clear_cache
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_sort_clear_cache" gtk_tree_model_sort_clear_cache :: 
    Ptr TreeModelSort ->                    -- _obj : TInterface "Gtk" "TreeModelSort"
    IO ()


treeModelSortClearCache ::
    (MonadIO m, TreeModelSortK a) =>
    a ->                                    -- _obj
    m ()
treeModelSortClearCache _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_model_sort_clear_cache _obj'
    touchManagedPtr _obj
    return ()

-- method TreeModelSort::convert_child_iter_to_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_sort_convert_child_iter_to_iter" gtk_tree_model_sort_convert_child_iter_to_iter :: 
    Ptr TreeModelSort ->                    -- _obj : TInterface "Gtk" "TreeModelSort"
    Ptr TreeIter ->                         -- sort_iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- child_iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeModelSortConvertChildIterToIter ::
    (MonadIO m, TreeModelSortK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- child_iter
    m (Bool,TreeIter)
treeModelSortConvertChildIterToIter _obj child_iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    sort_iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    let child_iter' = unsafeManagedPtrGetPtr child_iter
    result <- gtk_tree_model_sort_convert_child_iter_to_iter _obj' sort_iter child_iter'
    let result' = (/= 0) result
    sort_iter' <- (wrapBoxed TreeIter) sort_iter
    touchManagedPtr _obj
    touchManagedPtr child_iter
    return (result', sort_iter')

-- method TreeModelSort::convert_child_path_to_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_sort_convert_child_path_to_path" gtk_tree_model_sort_convert_child_path_to_path :: 
    Ptr TreeModelSort ->                    -- _obj : TInterface "Gtk" "TreeModelSort"
    Ptr TreePath ->                         -- child_path : TInterface "Gtk" "TreePath"
    IO (Ptr TreePath)


treeModelSortConvertChildPathToPath ::
    (MonadIO m, TreeModelSortK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- child_path
    m TreePath
treeModelSortConvertChildPathToPath _obj child_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child_path' = unsafeManagedPtrGetPtr child_path
    result <- gtk_tree_model_sort_convert_child_path_to_path _obj' child_path'
    checkUnexpectedReturnNULL "gtk_tree_model_sort_convert_child_path_to_path" result
    result' <- (wrapBoxed TreePath) result
    touchManagedPtr _obj
    touchManagedPtr child_path
    return result'

-- method TreeModelSort::convert_iter_to_child_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sorted_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sorted_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_sort_convert_iter_to_child_iter" gtk_tree_model_sort_convert_iter_to_child_iter :: 
    Ptr TreeModelSort ->                    -- _obj : TInterface "Gtk" "TreeModelSort"
    Ptr TreeIter ->                         -- child_iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- sorted_iter : TInterface "Gtk" "TreeIter"
    IO ()


treeModelSortConvertIterToChildIter ::
    (MonadIO m, TreeModelSortK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- sorted_iter
    m (TreeIter)
treeModelSortConvertIterToChildIter _obj sorted_iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    child_iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    let sorted_iter' = unsafeManagedPtrGetPtr sorted_iter
    gtk_tree_model_sort_convert_iter_to_child_iter _obj' child_iter sorted_iter'
    child_iter' <- (wrapBoxed TreeIter) child_iter
    touchManagedPtr _obj
    touchManagedPtr sorted_iter
    return child_iter'

-- method TreeModelSort::convert_path_to_child_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sorted_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sorted_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_sort_convert_path_to_child_path" gtk_tree_model_sort_convert_path_to_child_path :: 
    Ptr TreeModelSort ->                    -- _obj : TInterface "Gtk" "TreeModelSort"
    Ptr TreePath ->                         -- sorted_path : TInterface "Gtk" "TreePath"
    IO (Ptr TreePath)


treeModelSortConvertPathToChildPath ::
    (MonadIO m, TreeModelSortK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- sorted_path
    m TreePath
treeModelSortConvertPathToChildPath _obj sorted_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sorted_path' = unsafeManagedPtrGetPtr sorted_path
    result <- gtk_tree_model_sort_convert_path_to_child_path _obj' sorted_path'
    checkUnexpectedReturnNULL "gtk_tree_model_sort_convert_path_to_child_path" result
    result' <- (wrapBoxed TreePath) result
    touchManagedPtr _obj
    touchManagedPtr sorted_path
    return result'

-- method TreeModelSort::get_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_sort_get_model" gtk_tree_model_sort_get_model :: 
    Ptr TreeModelSort ->                    -- _obj : TInterface "Gtk" "TreeModelSort"
    IO (Ptr TreeModel)


treeModelSortGetModel ::
    (MonadIO m, TreeModelSortK a) =>
    a ->                                    -- _obj
    m TreeModel
treeModelSortGetModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_model_sort_get_model _obj'
    checkUnexpectedReturnNULL "gtk_tree_model_sort_get_model" result
    result' <- (newObject TreeModel) result
    touchManagedPtr _obj
    return result'

-- method TreeModelSort::iter_is_valid
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_sort_iter_is_valid" gtk_tree_model_sort_iter_is_valid :: 
    Ptr TreeModelSort ->                    -- _obj : TInterface "Gtk" "TreeModelSort"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeModelSortIterIsValid ::
    (MonadIO m, TreeModelSortK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m Bool
treeModelSortIterIsValid _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_tree_model_sort_iter_is_valid _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TreeModelSort::reset_default_sort_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelSort", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_sort_reset_default_sort_func" gtk_tree_model_sort_reset_default_sort_func :: 
    Ptr TreeModelSort ->                    -- _obj : TInterface "Gtk" "TreeModelSort"
    IO ()


treeModelSortResetDefaultSortFunc ::
    (MonadIO m, TreeModelSortK a) =>
    a ->                                    -- _obj
    m ()
treeModelSortResetDefaultSortFunc _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_model_sort_reset_default_sort_func _obj'
    touchManagedPtr _obj
    return ()

-- struct TreePath
newtype TreePath = TreePath (ForeignPtr TreePath)
noTreePath :: Maybe TreePath
noTreePath = Nothing

foreign import ccall "gtk_tree_path_get_type" c_gtk_tree_path_get_type :: 
    IO GType

instance BoxedObject TreePath where
    boxedType _ = c_gtk_tree_path_get_type

-- method TreePath::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_new" gtk_tree_path_new :: 
    IO (Ptr TreePath)


treePathNew ::
    (MonadIO m) =>
    m TreePath
treePathNew  = liftIO $ do
    result <- gtk_tree_path_new
    checkUnexpectedReturnNULL "gtk_tree_path_new" result
    result' <- (wrapBoxed TreePath) result
    return result'

-- method TreePath::new_first
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_new_first" gtk_tree_path_new_first :: 
    IO (Ptr TreePath)


treePathNewFirst ::
    (MonadIO m) =>
    m TreePath
treePathNewFirst  = liftIO $ do
    result <- gtk_tree_path_new_first
    checkUnexpectedReturnNULL "gtk_tree_path_new_first" result
    result' <- (wrapBoxed TreePath) result
    return result'

-- method TreePath::new_from_indices
-- method type : Constructor
-- Args : [Arg {argName = "indices", argType = TCArray False (-1) 1 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "indices", argType = TCArray False (-1) 1 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_new_from_indicesv" gtk_tree_path_new_from_indicesv :: 
    Ptr Int32 ->                            -- indices : TCArray False (-1) 1 (TBasicType TInt32)
    Word64 ->                               -- length : TBasicType TUInt64
    IO (Ptr TreePath)


treePathNewFromIndices ::
    (MonadIO m) =>
    [Int32] ->                              -- indices
    m TreePath
treePathNewFromIndices indices = liftIO $ do
    let length_ = fromIntegral $ length indices
    indices' <- packStorableArray indices
    result <- gtk_tree_path_new_from_indicesv indices' length_
    checkUnexpectedReturnNULL "gtk_tree_path_new_from_indicesv" result
    result' <- (wrapBoxed TreePath) result
    freeMem indices'
    return result'

-- method TreePath::new_from_string
-- method type : Constructor
-- Args : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_new_from_string" gtk_tree_path_new_from_string :: 
    CString ->                              -- path : TBasicType TUTF8
    IO (Ptr TreePath)


treePathNewFromString ::
    (MonadIO m) =>
    T.Text ->                               -- path
    m TreePath
treePathNewFromString path = liftIO $ do
    path' <- textToCString path
    result <- gtk_tree_path_new_from_string path'
    checkUnexpectedReturnNULL "gtk_tree_path_new_from_string" result
    result' <- (wrapBoxed TreePath) result
    freeMem path'
    return result'

-- method TreePath::append_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_append_index" gtk_tree_path_append_index :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    Int32 ->                                -- index_ : TBasicType TInt32
    IO ()


treePathAppendIndex ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    Int32 ->                                -- index_
    m ()
treePathAppendIndex _obj index_ = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_tree_path_append_index _obj' index_
    touchManagedPtr _obj
    return ()

-- method TreePath::compare
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "b", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "b", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_compare" gtk_tree_path_compare :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    Ptr TreePath ->                         -- b : TInterface "Gtk" "TreePath"
    IO Int32


treePathCompare ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    TreePath ->                             -- b
    m Int32
treePathCompare _obj b = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let b' = unsafeManagedPtrGetPtr b
    result <- gtk_tree_path_compare _obj' b'
    touchManagedPtr _obj
    touchManagedPtr b
    return result

-- method TreePath::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_copy" gtk_tree_path_copy :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    IO (Ptr TreePath)


treePathCopy ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    m TreePath
treePathCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_tree_path_copy _obj'
    checkUnexpectedReturnNULL "gtk_tree_path_copy" result
    result' <- (wrapBoxed TreePath) result
    touchManagedPtr _obj
    return result'

-- method TreePath::down
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_down" gtk_tree_path_down :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    IO ()


treePathDown ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    m ()
treePathDown _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_tree_path_down _obj'
    touchManagedPtr _obj
    return ()

-- method TreePath::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_free" gtk_tree_path_free :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    IO ()


treePathFree ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    m ()
treePathFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_tree_path_free _obj'
    touchManagedPtr _obj
    return ()

-- method TreePath::get_depth
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_get_depth" gtk_tree_path_get_depth :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    IO Int32


treePathGetDepth ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    m Int32
treePathGetDepth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_tree_path_get_depth _obj'
    touchManagedPtr _obj
    return result

-- method TreePath::get_indices
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "depth", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "depth", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 1 (TBasicType TInt32)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_get_indices_with_depth" gtk_tree_path_get_indices_with_depth :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    Ptr Int32 ->                            -- depth : TBasicType TInt32
    IO (Ptr Int32)


treePathGetIndices ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    m [Int32]
treePathGetIndices _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    depth <- allocMem :: IO (Ptr Int32)
    result <- gtk_tree_path_get_indices_with_depth _obj' depth
    depth' <- peek depth
    checkUnexpectedReturnNULL "gtk_tree_path_get_indices_with_depth" result
    result' <- (unpackStorableArrayWithLength depth') result
    touchManagedPtr _obj
    freeMem depth
    return result'

-- method TreePath::is_ancestor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "descendant", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "descendant", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_is_ancestor" gtk_tree_path_is_ancestor :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    Ptr TreePath ->                         -- descendant : TInterface "Gtk" "TreePath"
    IO CInt


treePathIsAncestor ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    TreePath ->                             -- descendant
    m Bool
treePathIsAncestor _obj descendant = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let descendant' = unsafeManagedPtrGetPtr descendant
    result <- gtk_tree_path_is_ancestor _obj' descendant'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr descendant
    return result'

-- method TreePath::is_descendant
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ancestor", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ancestor", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_is_descendant" gtk_tree_path_is_descendant :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    Ptr TreePath ->                         -- ancestor : TInterface "Gtk" "TreePath"
    IO CInt


treePathIsDescendant ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    TreePath ->                             -- ancestor
    m Bool
treePathIsDescendant _obj ancestor = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let ancestor' = unsafeManagedPtrGetPtr ancestor
    result <- gtk_tree_path_is_descendant _obj' ancestor'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr ancestor
    return result'

-- method TreePath::next
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_next" gtk_tree_path_next :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    IO ()


treePathNext ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    m ()
treePathNext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_tree_path_next _obj'
    touchManagedPtr _obj
    return ()

-- method TreePath::prepend_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_prepend_index" gtk_tree_path_prepend_index :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    Int32 ->                                -- index_ : TBasicType TInt32
    IO ()


treePathPrependIndex ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    Int32 ->                                -- index_
    m ()
treePathPrependIndex _obj index_ = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_tree_path_prepend_index _obj' index_
    touchManagedPtr _obj
    return ()

-- method TreePath::prev
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_prev" gtk_tree_path_prev :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    IO CInt


treePathPrev ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    m Bool
treePathPrev _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_tree_path_prev _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreePath::to_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_to_string" gtk_tree_path_to_string :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    IO CString


treePathToString ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    m T.Text
treePathToString _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_tree_path_to_string _obj'
    checkUnexpectedReturnNULL "gtk_tree_path_to_string" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method TreePath::up
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_path_up" gtk_tree_path_up :: 
    Ptr TreePath ->                         -- _obj : TInterface "Gtk" "TreePath"
    IO CInt


treePathUp ::
    (MonadIO m) =>
    TreePath ->                             -- _obj
    m Bool
treePathUp _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_tree_path_up _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- struct TreeRowReference
newtype TreeRowReference = TreeRowReference (ForeignPtr TreeRowReference)
noTreeRowReference :: Maybe TreeRowReference
noTreeRowReference = Nothing

foreign import ccall "gtk_tree_row_reference_get_type" c_gtk_tree_row_reference_get_type :: 
    IO GType

instance BoxedObject TreeRowReference where
    boxedType _ = c_gtk_tree_row_reference_get_type

-- method TreeRowReference::new
-- method type : Constructor
-- Args : [Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeRowReference"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_row_reference_new" gtk_tree_row_reference_new :: 
    Ptr TreeModel ->                        -- model : TInterface "Gtk" "TreeModel"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO (Ptr TreeRowReference)


treeRowReferenceNew ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- model
    TreePath ->                             -- path
    m TreeRowReference
treeRowReferenceNew model path = liftIO $ do
    let model' = unsafeManagedPtrCastPtr model
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_tree_row_reference_new model' path'
    checkUnexpectedReturnNULL "gtk_tree_row_reference_new" result
    result' <- (wrapBoxed TreeRowReference) result
    touchManagedPtr model
    touchManagedPtr path
    return result'

-- method TreeRowReference::new_proxy
-- method type : Constructor
-- Args : [Arg {argName = "proxy", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "proxy", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeRowReference"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_row_reference_new_proxy" gtk_tree_row_reference_new_proxy :: 
    Ptr GObject.Object ->                   -- proxy : TInterface "GObject" "Object"
    Ptr TreeModel ->                        -- model : TInterface "Gtk" "TreeModel"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO (Ptr TreeRowReference)


treeRowReferenceNewProxy ::
    (MonadIO m, GObject.ObjectK a, TreeModelK b) =>
    a ->                                    -- proxy
    b ->                                    -- model
    TreePath ->                             -- path
    m TreeRowReference
treeRowReferenceNewProxy proxy model path = liftIO $ do
    let proxy' = unsafeManagedPtrCastPtr proxy
    let model' = unsafeManagedPtrCastPtr model
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_tree_row_reference_new_proxy proxy' model' path'
    checkUnexpectedReturnNULL "gtk_tree_row_reference_new_proxy" result
    result' <- (wrapBoxed TreeRowReference) result
    touchManagedPtr proxy
    touchManagedPtr model
    touchManagedPtr path
    return result'

-- method TreeRowReference::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeRowReference", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeRowReference", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeRowReference"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_row_reference_copy" gtk_tree_row_reference_copy :: 
    Ptr TreeRowReference ->                 -- _obj : TInterface "Gtk" "TreeRowReference"
    IO (Ptr TreeRowReference)


treeRowReferenceCopy ::
    (MonadIO m) =>
    TreeRowReference ->                     -- _obj
    m TreeRowReference
treeRowReferenceCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_tree_row_reference_copy _obj'
    checkUnexpectedReturnNULL "gtk_tree_row_reference_copy" result
    result' <- (wrapBoxed TreeRowReference) result
    touchManagedPtr _obj
    return result'

-- method TreeRowReference::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeRowReference", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeRowReference", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_row_reference_free" gtk_tree_row_reference_free :: 
    Ptr TreeRowReference ->                 -- _obj : TInterface "Gtk" "TreeRowReference"
    IO ()


treeRowReferenceFree ::
    (MonadIO m) =>
    TreeRowReference ->                     -- _obj
    m ()
treeRowReferenceFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_tree_row_reference_free _obj'
    touchManagedPtr _obj
    return ()

-- method TreeRowReference::get_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeRowReference", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeRowReference", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_row_reference_get_model" gtk_tree_row_reference_get_model :: 
    Ptr TreeRowReference ->                 -- _obj : TInterface "Gtk" "TreeRowReference"
    IO (Ptr TreeModel)


treeRowReferenceGetModel ::
    (MonadIO m) =>
    TreeRowReference ->                     -- _obj
    m TreeModel
treeRowReferenceGetModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_tree_row_reference_get_model _obj'
    checkUnexpectedReturnNULL "gtk_tree_row_reference_get_model" result
    result' <- (newObject TreeModel) result
    touchManagedPtr _obj
    return result'

-- method TreeRowReference::get_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeRowReference", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeRowReference", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreePath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_row_reference_get_path" gtk_tree_row_reference_get_path :: 
    Ptr TreeRowReference ->                 -- _obj : TInterface "Gtk" "TreeRowReference"
    IO (Ptr TreePath)


treeRowReferenceGetPath ::
    (MonadIO m) =>
    TreeRowReference ->                     -- _obj
    m TreePath
treeRowReferenceGetPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_tree_row_reference_get_path _obj'
    checkUnexpectedReturnNULL "gtk_tree_row_reference_get_path" result
    result' <- (wrapBoxed TreePath) result
    touchManagedPtr _obj
    return result'

-- method TreeRowReference::valid
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeRowReference", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeRowReference", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_row_reference_valid" gtk_tree_row_reference_valid :: 
    Ptr TreeRowReference ->                 -- _obj : TInterface "Gtk" "TreeRowReference"
    IO CInt


treeRowReferenceValid ::
    (MonadIO m) =>
    TreeRowReference ->                     -- _obj
    m Bool
treeRowReferenceValid _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_tree_row_reference_valid _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- object TreeSelection 
newtype TreeSelection = TreeSelection (ForeignPtr TreeSelection)
noTreeSelection :: Maybe TreeSelection
noTreeSelection = Nothing

foreign import ccall "gtk_tree_selection_get_type"
    c_gtk_tree_selection_get_type :: IO GType

type instance ParentTypes TreeSelection = '[GObject.Object]

instance GObject TreeSelection where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_tree_selection_get_type
    

class GObject o => TreeSelectionK o
instance (GObject o, IsDescendantOf TreeSelection o) => TreeSelectionK o

toTreeSelection :: TreeSelectionK o => o -> IO TreeSelection
toTreeSelection = unsafeCastTo TreeSelection

-- method TreeSelection::count_selected_rows
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_count_selected_rows" gtk_tree_selection_count_selected_rows :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    IO Int32


treeSelectionCountSelectedRows ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    m Int32
treeSelectionCountSelectedRows _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_selection_count_selected_rows _obj'
    touchManagedPtr _obj
    return result

-- method TreeSelection::get_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SelectionMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_get_mode" gtk_tree_selection_get_mode :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    IO CUInt


treeSelectionGetMode ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    m SelectionMode
treeSelectionGetMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_selection_get_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method TreeSelection::get_selected
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_get_selected" gtk_tree_selection_get_selected :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    Ptr (Ptr TreeModel) ->                  -- model : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeSelectionGetSelected ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    m (Bool,TreeModel,TreeIter)
treeSelectionGetSelected _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    model <- allocMem :: IO (Ptr (Ptr TreeModel))
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    result <- gtk_tree_selection_get_selected _obj' model iter
    let result' = (/= 0) result
    model' <- peek model
    model'' <- (newObject TreeModel) model'
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    freeMem model
    return (result', model'', iter')

-- method TreeSelection::get_selected_rows
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "TreePath")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_get_selected_rows" gtk_tree_selection_get_selected_rows :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    Ptr (Ptr TreeModel) ->                  -- model : TInterface "Gtk" "TreeModel"
    IO (Ptr (GList (Ptr TreePath)))


treeSelectionGetSelectedRows ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    m ([TreePath],TreeModel)
treeSelectionGetSelectedRows _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    model <- allocMem :: IO (Ptr (Ptr TreeModel))
    result <- gtk_tree_selection_get_selected_rows _obj' model
    checkUnexpectedReturnNULL "gtk_tree_selection_get_selected_rows" result
    result' <- unpackGList result
    result'' <- mapM (wrapBoxed TreePath) result'
    g_list_free result
    model' <- peek model
    model'' <- (newObject TreeModel) model'
    touchManagedPtr _obj
    freeMem model
    return (result'', model'')

-- method TreeSelection::get_tree_view
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_get_tree_view" gtk_tree_selection_get_tree_view :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    IO (Ptr TreeView)


treeSelectionGetTreeView ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    m TreeView
treeSelectionGetTreeView _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_selection_get_tree_view _obj'
    checkUnexpectedReturnNULL "gtk_tree_selection_get_tree_view" result
    result' <- (newObject TreeView) result
    touchManagedPtr _obj
    return result'

-- method TreeSelection::iter_is_selected
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_iter_is_selected" gtk_tree_selection_iter_is_selected :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeSelectionIterIsSelected ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m Bool
treeSelectionIterIsSelected _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_tree_selection_iter_is_selected _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TreeSelection::path_is_selected
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_path_is_selected" gtk_tree_selection_path_is_selected :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO CInt


treeSelectionPathIsSelected ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m Bool
treeSelectionPathIsSelected _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_tree_selection_path_is_selected _obj' path'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr path
    return result'

-- method TreeSelection::select_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_select_all" gtk_tree_selection_select_all :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    IO ()


treeSelectionSelectAll ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    m ()
treeSelectionSelectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_selection_select_all _obj'
    touchManagedPtr _obj
    return ()

-- method TreeSelection::select_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_select_iter" gtk_tree_selection_select_iter :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO ()


treeSelectionSelectIter ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m ()
treeSelectionSelectIter _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    gtk_tree_selection_select_iter _obj' iter'
    touchManagedPtr _obj
    touchManagedPtr iter
    return ()

-- method TreeSelection::select_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_select_path" gtk_tree_selection_select_path :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


treeSelectionSelectPath ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m ()
treeSelectionSelectPath _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    gtk_tree_selection_select_path _obj' path'
    touchManagedPtr _obj
    touchManagedPtr path
    return ()

-- method TreeSelection::select_range
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_select_range" gtk_tree_selection_select_range :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    Ptr TreePath ->                         -- start_path : TInterface "Gtk" "TreePath"
    Ptr TreePath ->                         -- end_path : TInterface "Gtk" "TreePath"
    IO ()


treeSelectionSelectRange ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- start_path
    TreePath ->                             -- end_path
    m ()
treeSelectionSelectRange _obj start_path end_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let start_path' = unsafeManagedPtrGetPtr start_path
    let end_path' = unsafeManagedPtrGetPtr end_path
    gtk_tree_selection_select_range _obj' start_path' end_path'
    touchManagedPtr _obj
    touchManagedPtr start_path
    touchManagedPtr end_path
    return ()

-- method TreeSelection::selected_foreach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeSelectionForeachFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeSelectionForeachFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_selected_foreach" gtk_tree_selection_selected_foreach :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    FunPtr TreeSelectionForeachFuncC ->     -- func : TInterface "Gtk" "TreeSelectionForeachFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    IO ()


treeSelectionSelectedForeach ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    TreeSelectionForeachFunc ->             -- func
    m ()
treeSelectionSelectedForeach _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkTreeSelectionForeachFunc (treeSelectionForeachFuncWrapper Nothing func)
    let data_ = nullPtr
    gtk_tree_selection_selected_foreach _obj' func' data_
    safeFreeFunPtr $ castFunPtrToPtr func'
    touchManagedPtr _obj
    return ()

-- method TreeSelection::set_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "SelectionMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "SelectionMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_set_mode" gtk_tree_selection_set_mode :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    CUInt ->                                -- type : TInterface "Gtk" "SelectionMode"
    IO ()


treeSelectionSetMode ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    SelectionMode ->                        -- type
    m ()
treeSelectionSetMode _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    gtk_tree_selection_set_mode _obj' type_'
    touchManagedPtr _obj
    return ()

-- method TreeSelection::set_select_function
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeSelectionFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeSelectionFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_set_select_function" gtk_tree_selection_set_select_function :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    FunPtr TreeSelectionFuncC ->            -- func : TInterface "Gtk" "TreeSelectionFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


treeSelectionSetSelectFunction ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    TreeSelectionFunc ->                    -- func
    m ()
treeSelectionSetSelectFunction _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkTreeSelectionFunc (treeSelectionFuncWrapper Nothing func)
    let data_ = castFunPtrToPtr func'
    let destroy = safeFreeFunPtrPtr
    gtk_tree_selection_set_select_function _obj' func' data_ destroy
    touchManagedPtr _obj
    return ()

-- method TreeSelection::unselect_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_unselect_all" gtk_tree_selection_unselect_all :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    IO ()


treeSelectionUnselectAll ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    m ()
treeSelectionUnselectAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_selection_unselect_all _obj'
    touchManagedPtr _obj
    return ()

-- method TreeSelection::unselect_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_unselect_iter" gtk_tree_selection_unselect_iter :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO ()


treeSelectionUnselectIter ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m ()
treeSelectionUnselectIter _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    gtk_tree_selection_unselect_iter _obj' iter'
    touchManagedPtr _obj
    touchManagedPtr iter
    return ()

-- method TreeSelection::unselect_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_unselect_path" gtk_tree_selection_unselect_path :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


treeSelectionUnselectPath ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m ()
treeSelectionUnselectPath _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    gtk_tree_selection_unselect_path _obj' path'
    touchManagedPtr _obj
    touchManagedPtr path
    return ()

-- method TreeSelection::unselect_range
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSelection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_selection_unselect_range" gtk_tree_selection_unselect_range :: 
    Ptr TreeSelection ->                    -- _obj : TInterface "Gtk" "TreeSelection"
    Ptr TreePath ->                         -- start_path : TInterface "Gtk" "TreePath"
    Ptr TreePath ->                         -- end_path : TInterface "Gtk" "TreePath"
    IO ()


treeSelectionUnselectRange ::
    (MonadIO m, TreeSelectionK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- start_path
    TreePath ->                             -- end_path
    m ()
treeSelectionUnselectRange _obj start_path end_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let start_path' = unsafeManagedPtrGetPtr start_path
    let end_path' = unsafeManagedPtrGetPtr end_path
    gtk_tree_selection_unselect_range _obj' start_path' end_path'
    touchManagedPtr _obj
    touchManagedPtr start_path
    touchManagedPtr end_path
    return ()

-- signal TreeSelection::changed
type TreeSelectionChangedCallback =
    IO ()

noTreeSelectionChangedCallback :: Maybe TreeSelectionChangedCallback
noTreeSelectionChangedCallback = Nothing

type TreeSelectionChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeSelectionChangedCallback :: TreeSelectionChangedCallbackC -> IO (FunPtr TreeSelectionChangedCallbackC)

treeSelectionChangedClosure :: TreeSelectionChangedCallback -> IO Closure
treeSelectionChangedClosure cb = newCClosure =<< mkTreeSelectionChangedCallback wrapped
    where wrapped = treeSelectionChangedCallbackWrapper cb

treeSelectionChangedCallbackWrapper ::
    TreeSelectionChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
treeSelectionChangedCallbackWrapper _cb _ _ = do
    _cb 

onTreeSelectionChanged :: (GObject a, MonadIO m) => a -> TreeSelectionChangedCallback -> m SignalHandlerId
onTreeSelectionChanged obj cb = liftIO $ connectTreeSelectionChanged obj cb SignalConnectBefore
afterTreeSelectionChanged :: (GObject a, MonadIO m) => a -> TreeSelectionChangedCallback -> m SignalHandlerId
afterTreeSelectionChanged obj cb = connectTreeSelectionChanged obj cb SignalConnectAfter

connectTreeSelectionChanged :: (GObject a, MonadIO m) =>
                               a -> TreeSelectionChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeSelectionChanged obj cb after = liftIO $ do
    cb' <- mkTreeSelectionChangedCallback (treeSelectionChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- callback TreeSelectionForeachFunc
treeSelectionForeachFuncClosure :: TreeSelectionForeachFunc -> IO Closure
treeSelectionForeachFuncClosure cb = newCClosure =<< mkTreeSelectionForeachFunc wrapped
    where wrapped = treeSelectionForeachFuncWrapper Nothing cb

type TreeSelectionForeachFuncC =
    Ptr TreeModel ->
    Ptr TreePath ->
    Ptr TreeIter ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkTreeSelectionForeachFunc :: TreeSelectionForeachFuncC -> IO (FunPtr TreeSelectionForeachFuncC)

type TreeSelectionForeachFunc =
    TreeModel ->
    TreePath ->
    TreeIter ->
    IO ()

noTreeSelectionForeachFunc :: Maybe TreeSelectionForeachFunc
noTreeSelectionForeachFunc = Nothing

treeSelectionForeachFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeSelectionForeachFuncC))) ->
    TreeSelectionForeachFunc ->
    Ptr TreeModel ->
    Ptr TreePath ->
    Ptr TreeIter ->
    Ptr () ->
    IO ()
treeSelectionForeachFuncWrapper funptrptr _cb model path iter _ = do
    model' <- (newObject TreeModel) model
    path' <- (newBoxed TreePath) path
    iter' <- (newBoxed TreeIter) iter
    _cb  model' path' iter'
    maybeReleaseFunPtr funptrptr

-- callback TreeSelectionFunc
treeSelectionFuncClosure :: TreeSelectionFunc -> IO Closure
treeSelectionFuncClosure cb = newCClosure =<< mkTreeSelectionFunc wrapped
    where wrapped = treeSelectionFuncWrapper Nothing cb

type TreeSelectionFuncC =
    Ptr TreeSelection ->
    Ptr TreeModel ->
    Ptr TreePath ->
    CInt ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkTreeSelectionFunc :: TreeSelectionFuncC -> IO (FunPtr TreeSelectionFuncC)

type TreeSelectionFunc =
    TreeSelection ->
    TreeModel ->
    TreePath ->
    Bool ->
    IO Bool

noTreeSelectionFunc :: Maybe TreeSelectionFunc
noTreeSelectionFunc = Nothing

treeSelectionFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeSelectionFuncC))) ->
    TreeSelectionFunc ->
    Ptr TreeSelection ->
    Ptr TreeModel ->
    Ptr TreePath ->
    CInt ->
    Ptr () ->
    IO CInt
treeSelectionFuncWrapper funptrptr _cb selection model path path_currently_selected _ = do
    selection' <- (newObject TreeSelection) selection
    model' <- (newObject TreeModel) model
    path' <- (newBoxed TreePath) path
    let path_currently_selected' = (/= 0) path_currently_selected
    result <- _cb  selection' model' path' path_currently_selected'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- interface TreeSortable 

newtype TreeSortable = TreeSortable (ForeignPtr TreeSortable)
noTreeSortable :: Maybe TreeSortable
noTreeSortable = Nothing

foreign import ccall "gtk_tree_sortable_get_type"
    c_gtk_tree_sortable_get_type :: IO GType

type instance ParentTypes TreeSortable = '[TreeModel, GObject.Object]

instance GObject TreeSortable where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_tree_sortable_get_type
    

class GObject o => TreeSortableK o
instance (GObject o, IsDescendantOf TreeSortable o) => TreeSortableK o

toTreeSortable :: TreeSortableK o => o -> IO TreeSortable
toTreeSortable = unsafeCastTo TreeSortable

-- method TreeSortable::get_sort_column_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_column_id", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "order", argType = TInterface "Gtk" "SortType", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_sortable_get_sort_column_id" gtk_tree_sortable_get_sort_column_id :: 
    Ptr TreeSortable ->                     -- _obj : TInterface "Gtk" "TreeSortable"
    Ptr Int32 ->                            -- sort_column_id : TBasicType TInt32
    Ptr CUInt ->                            -- order : TInterface "Gtk" "SortType"
    IO CInt


treeSortableGetSortColumnId ::
    (MonadIO m, TreeSortableK a) =>
    a ->                                    -- _obj
    m (Bool,Int32,SortType)
treeSortableGetSortColumnId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    sort_column_id <- allocMem :: IO (Ptr Int32)
    order <- allocMem :: IO (Ptr CUInt)
    result <- gtk_tree_sortable_get_sort_column_id _obj' sort_column_id order
    let result' = (/= 0) result
    sort_column_id' <- peek sort_column_id
    order' <- peek order
    let order'' = (toEnum . fromIntegral) order'
    touchManagedPtr _obj
    freeMem sort_column_id
    freeMem order
    return (result', sort_column_id', order'')

-- method TreeSortable::has_default_sort_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_sortable_has_default_sort_func" gtk_tree_sortable_has_default_sort_func :: 
    Ptr TreeSortable ->                     -- _obj : TInterface "Gtk" "TreeSortable"
    IO CInt


treeSortableHasDefaultSortFunc ::
    (MonadIO m, TreeSortableK a) =>
    a ->                                    -- _obj
    m Bool
treeSortableHasDefaultSortFunc _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_sortable_has_default_sort_func _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeSortable::set_default_sort_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_func", argType = TInterface "Gtk" "TreeIterCompareFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_func", argType = TInterface "Gtk" "TreeIterCompareFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_sortable_set_default_sort_func" gtk_tree_sortable_set_default_sort_func :: 
    Ptr TreeSortable ->                     -- _obj : TInterface "Gtk" "TreeSortable"
    FunPtr TreeIterCompareFuncC ->          -- sort_func : TInterface "Gtk" "TreeIterCompareFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


treeSortableSetDefaultSortFunc ::
    (MonadIO m, TreeSortableK a) =>
    a ->                                    -- _obj
    TreeIterCompareFunc ->                  -- sort_func
    m ()
treeSortableSetDefaultSortFunc _obj sort_func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    sort_func' <- mkTreeIterCompareFunc (treeIterCompareFuncWrapper Nothing sort_func)
    let user_data = castFunPtrToPtr sort_func'
    let destroy = safeFreeFunPtrPtr
    gtk_tree_sortable_set_default_sort_func _obj' sort_func' user_data destroy
    touchManagedPtr _obj
    return ()

-- method TreeSortable::set_sort_column_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_column_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "order", argType = TInterface "Gtk" "SortType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_column_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "order", argType = TInterface "Gtk" "SortType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_sortable_set_sort_column_id" gtk_tree_sortable_set_sort_column_id :: 
    Ptr TreeSortable ->                     -- _obj : TInterface "Gtk" "TreeSortable"
    Int32 ->                                -- sort_column_id : TBasicType TInt32
    CUInt ->                                -- order : TInterface "Gtk" "SortType"
    IO ()


treeSortableSetSortColumnId ::
    (MonadIO m, TreeSortableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- sort_column_id
    SortType ->                             -- order
    m ()
treeSortableSetSortColumnId _obj sort_column_id order = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let order' = (fromIntegral . fromEnum) order
    gtk_tree_sortable_set_sort_column_id _obj' sort_column_id order'
    touchManagedPtr _obj
    return ()

-- method TreeSortable::set_sort_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_column_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_func", argType = TInterface "Gtk" "TreeIterCompareFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_column_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_func", argType = TInterface "Gtk" "TreeIterCompareFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_sortable_set_sort_func" gtk_tree_sortable_set_sort_func :: 
    Ptr TreeSortable ->                     -- _obj : TInterface "Gtk" "TreeSortable"
    Int32 ->                                -- sort_column_id : TBasicType TInt32
    FunPtr TreeIterCompareFuncC ->          -- sort_func : TInterface "Gtk" "TreeIterCompareFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


treeSortableSetSortFunc ::
    (MonadIO m, TreeSortableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- sort_column_id
    TreeIterCompareFunc ->                  -- sort_func
    m ()
treeSortableSetSortFunc _obj sort_column_id sort_func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    sort_func' <- mkTreeIterCompareFunc (treeIterCompareFuncWrapper Nothing sort_func)
    let user_data = castFunPtrToPtr sort_func'
    let destroy = safeFreeFunPtrPtr
    gtk_tree_sortable_set_sort_func _obj' sort_column_id sort_func' user_data destroy
    touchManagedPtr _obj
    return ()

-- method TreeSortable::sort_column_changed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeSortable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_sortable_sort_column_changed" gtk_tree_sortable_sort_column_changed :: 
    Ptr TreeSortable ->                     -- _obj : TInterface "Gtk" "TreeSortable"
    IO ()


treeSortableSortColumnChanged ::
    (MonadIO m, TreeSortableK a) =>
    a ->                                    -- _obj
    m ()
treeSortableSortColumnChanged _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_sortable_sort_column_changed _obj'
    touchManagedPtr _obj
    return ()

-- signal TreeSortable::sort-column-changed
type TreeSortableSortColumnChangedCallback =
    IO ()

noTreeSortableSortColumnChangedCallback :: Maybe TreeSortableSortColumnChangedCallback
noTreeSortableSortColumnChangedCallback = Nothing

type TreeSortableSortColumnChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeSortableSortColumnChangedCallback :: TreeSortableSortColumnChangedCallbackC -> IO (FunPtr TreeSortableSortColumnChangedCallbackC)

treeSortableSortColumnChangedClosure :: TreeSortableSortColumnChangedCallback -> IO Closure
treeSortableSortColumnChangedClosure cb = newCClosure =<< mkTreeSortableSortColumnChangedCallback wrapped
    where wrapped = treeSortableSortColumnChangedCallbackWrapper cb

treeSortableSortColumnChangedCallbackWrapper ::
    TreeSortableSortColumnChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
treeSortableSortColumnChangedCallbackWrapper _cb _ _ = do
    _cb 

onTreeSortableSortColumnChanged :: (GObject a, MonadIO m) => a -> TreeSortableSortColumnChangedCallback -> m SignalHandlerId
onTreeSortableSortColumnChanged obj cb = liftIO $ connectTreeSortableSortColumnChanged obj cb SignalConnectBefore
afterTreeSortableSortColumnChanged :: (GObject a, MonadIO m) => a -> TreeSortableSortColumnChangedCallback -> m SignalHandlerId
afterTreeSortableSortColumnChanged obj cb = connectTreeSortableSortColumnChanged obj cb SignalConnectAfter

connectTreeSortableSortColumnChanged :: (GObject a, MonadIO m) =>
                                        a -> TreeSortableSortColumnChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeSortableSortColumnChanged obj cb after = liftIO $ do
    cb' <- mkTreeSortableSortColumnChangedCallback (treeSortableSortColumnChangedCallbackWrapper cb)
    connectSignalFunPtr obj "sort-column-changed" cb' after

-- object TreeStore 
newtype TreeStore = TreeStore (ForeignPtr TreeStore)
noTreeStore :: Maybe TreeStore
noTreeStore = Nothing

foreign import ccall "gtk_tree_store_get_type"
    c_gtk_tree_store_get_type :: IO GType

type instance ParentTypes TreeStore = '[GObject.Object, Buildable, TreeDragDest, TreeDragSource, TreeModel, TreeSortable]

instance GObject TreeStore where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_tree_store_get_type
    

class GObject o => TreeStoreK o
instance (GObject o, IsDescendantOf TreeStore o) => TreeStoreK o

toTreeStore :: TreeStoreK o => o -> IO TreeStore
toTreeStore = unsafeCastTo TreeStore

-- method TreeStore::new
-- method type : Constructor
-- Args : [Arg {argName = "n_columns", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TCArray False (-1) 0 (TBasicType TGType), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_columns", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "types", argType = TCArray False (-1) 0 (TBasicType TGType), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeStore"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_newv" gtk_tree_store_newv :: 
    Int32 ->                                -- n_columns : TBasicType TInt32
    Ptr CGType ->                           -- types : TCArray False (-1) 0 (TBasicType TGType)
    IO (Ptr TreeStore)


treeStoreNew ::
    (MonadIO m) =>
    [GType] ->                              -- types
    m TreeStore
treeStoreNew types = liftIO $ do
    let n_columns = fromIntegral $ length types
    types' <- (packMapStorableArray gtypeToCGType) types
    result <- gtk_tree_store_newv n_columns types'
    checkUnexpectedReturnNULL "gtk_tree_store_newv" result
    result' <- (wrapObject TreeStore) result
    freeMem types'
    return result'

-- method TreeStore::append
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_append" gtk_tree_store_append :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- parent : TInterface "Gtk" "TreeIter"
    IO ()


treeStoreAppend ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- parent
    m (TreeIter)
treeStoreAppend _obj parent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrGetPtr jParent
            return jParent'
    gtk_tree_store_append _obj' iter maybeParent
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    return iter'

-- method TreeStore::clear
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_clear" gtk_tree_store_clear :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    IO ()


treeStoreClear ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    m ()
treeStoreClear _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_store_clear _obj'
    touchManagedPtr _obj
    return ()

-- method TreeStore::insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_insert" gtk_tree_store_insert :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- parent : TInterface "Gtk" "TreeIter"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


treeStoreInsert ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- parent
    Int32 ->                                -- position
    m (TreeIter)
treeStoreInsert _obj parent position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrGetPtr jParent
            return jParent'
    gtk_tree_store_insert _obj' iter maybeParent position
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    return iter'

-- method TreeStore::insert_after
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_insert_after" gtk_tree_store_insert_after :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- parent : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- sibling : TInterface "Gtk" "TreeIter"
    IO ()


treeStoreInsertAfter ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- parent
    Maybe (TreeIter) ->                     -- sibling
    m (TreeIter)
treeStoreInsertAfter _obj parent sibling = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrGetPtr jParent
            return jParent'
    maybeSibling <- case sibling of
        Nothing -> return nullPtr
        Just jSibling -> do
            let jSibling' = unsafeManagedPtrGetPtr jSibling
            return jSibling'
    gtk_tree_store_insert_after _obj' iter maybeParent maybeSibling
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    whenJust sibling touchManagedPtr
    return iter'

-- method TreeStore::insert_before
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_insert_before" gtk_tree_store_insert_before :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- parent : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- sibling : TInterface "Gtk" "TreeIter"
    IO ()


treeStoreInsertBefore ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- parent
    Maybe (TreeIter) ->                     -- sibling
    m (TreeIter)
treeStoreInsertBefore _obj parent sibling = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrGetPtr jParent
            return jParent'
    maybeSibling <- case sibling of
        Nothing -> return nullPtr
        Just jSibling -> do
            let jSibling' = unsafeManagedPtrGetPtr jSibling
            return jSibling'
    gtk_tree_store_insert_before _obj' iter maybeParent maybeSibling
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    whenJust sibling touchManagedPtr
    return iter'

-- method TreeStore::insert_with_values
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TCArray False (-1) 6 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "values", argType = TCArray False (-1) 6 (TInterface "GObject" "Value"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TCArray False (-1) 6 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "values", argType = TCArray False (-1) 6 (TInterface "GObject" "Value"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_insert_with_valuesv" gtk_tree_store_insert_with_valuesv :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- parent : TInterface "Gtk" "TreeIter"
    Int32 ->                                -- position : TBasicType TInt32
    Ptr Int32 ->                            -- columns : TCArray False (-1) 6 (TBasicType TInt32)
    Ptr GValue ->                           -- values : TCArray False (-1) 6 (TInterface "GObject" "Value")
    Int32 ->                                -- n_values : TBasicType TInt32
    IO ()


treeStoreInsertWithValues ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- parent
    Int32 ->                                -- position
    [Int32] ->                              -- columns
    [GValue] ->                             -- values
    m (TreeIter)
treeStoreInsertWithValues _obj parent position columns values = liftIO $ do
    let n_values = fromIntegral $ length values
    let columns_expected_length_ = fromIntegral $ length columns
    when (columns_expected_length_ /= n_values) $
        error "Gtk.treeStoreInsertWithValues : length of 'columns' does not agree with that of 'values'."
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrGetPtr jParent
            return jParent'
    columns' <- packStorableArray columns
    let values' = map unsafeManagedPtrGetPtr values
    values'' <- packBlockArray 24 values'
    gtk_tree_store_insert_with_valuesv _obj' iter maybeParent position columns' values'' n_values
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    mapM_ touchManagedPtr values
    freeMem columns'
    freeMem values''
    return iter'

-- method TreeStore::is_ancestor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "descendant", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "descendant", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_is_ancestor" gtk_tree_store_is_ancestor :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- descendant : TInterface "Gtk" "TreeIter"
    IO CInt


treeStoreIsAncestor ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    TreeIter ->                             -- descendant
    m Bool
treeStoreIsAncestor _obj iter descendant = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    let descendant' = unsafeManagedPtrGetPtr descendant
    result <- gtk_tree_store_is_ancestor _obj' iter' descendant'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    touchManagedPtr descendant
    return result'

-- method TreeStore::iter_depth
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_iter_depth" gtk_tree_store_iter_depth :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO Int32


treeStoreIterDepth ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m Int32
treeStoreIterDepth _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_tree_store_iter_depth _obj' iter'
    touchManagedPtr _obj
    touchManagedPtr iter
    return result

-- method TreeStore::iter_is_valid
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_iter_is_valid" gtk_tree_store_iter_is_valid :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeStoreIterIsValid ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m Bool
treeStoreIterIsValid _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_tree_store_iter_is_valid _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TreeStore::move_after
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_move_after" gtk_tree_store_move_after :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- position : TInterface "Gtk" "TreeIter"
    IO ()


treeStoreMoveAfter ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    Maybe (TreeIter) ->                     -- position
    m ()
treeStoreMoveAfter _obj iter position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    maybePosition <- case position of
        Nothing -> return nullPtr
        Just jPosition -> do
            let jPosition' = unsafeManagedPtrGetPtr jPosition
            return jPosition'
    gtk_tree_store_move_after _obj' iter' maybePosition
    touchManagedPtr _obj
    touchManagedPtr iter
    whenJust position touchManagedPtr
    return ()

-- method TreeStore::move_before
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_move_before" gtk_tree_store_move_before :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- position : TInterface "Gtk" "TreeIter"
    IO ()


treeStoreMoveBefore ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    Maybe (TreeIter) ->                     -- position
    m ()
treeStoreMoveBefore _obj iter position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    maybePosition <- case position of
        Nothing -> return nullPtr
        Just jPosition -> do
            let jPosition' = unsafeManagedPtrGetPtr jPosition
            return jPosition'
    gtk_tree_store_move_before _obj' iter' maybePosition
    touchManagedPtr _obj
    touchManagedPtr iter
    whenJust position touchManagedPtr
    return ()

-- method TreeStore::prepend
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_prepend" gtk_tree_store_prepend :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- parent : TInterface "Gtk" "TreeIter"
    IO ()


treeStorePrepend ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    Maybe (TreeIter) ->                     -- parent
    m (TreeIter)
treeStorePrepend _obj parent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrGetPtr jParent
            return jParent'
    gtk_tree_store_prepend _obj' iter maybeParent
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    return iter'

-- method TreeStore::remove
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_remove" gtk_tree_store_remove :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeStoreRemove ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    m Bool
treeStoreRemove _obj iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    result <- gtk_tree_store_remove _obj' iter'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr iter
    return result'

-- method TreeStore::set_column_types
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_columns", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TCArray False (-1) 1 (TBasicType TGType), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_columns", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TCArray False (-1) 1 (TBasicType TGType), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_set_column_types" gtk_tree_store_set_column_types :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Int32 ->                                -- n_columns : TBasicType TInt32
    Ptr CGType ->                           -- types : TCArray False (-1) 1 (TBasicType TGType)
    IO ()


treeStoreSetColumnTypes ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    [GType] ->                              -- types
    m ()
treeStoreSetColumnTypes _obj types = liftIO $ do
    let n_columns = fromIntegral $ length types
    let _obj' = unsafeManagedPtrCastPtr _obj
    types' <- (packMapStorableArray gtypeToCGType) types
    gtk_tree_store_set_column_types _obj' n_columns types'
    touchManagedPtr _obj
    freeMem types'
    return ()

-- method TreeStore::set_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_set_value" gtk_tree_store_set_value :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Int32 ->                                -- column : TBasicType TInt32
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


treeStoreSetValue ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    Int32 ->                                -- column
    GValue ->                               -- value
    m ()
treeStoreSetValue _obj iter column value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    let value' = unsafeManagedPtrGetPtr value
    gtk_tree_store_set_value _obj' iter' column value'
    touchManagedPtr _obj
    touchManagedPtr iter
    touchManagedPtr value
    return ()

-- method TreeStore::set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TCArray False (-1) 4 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "values", argType = TCArray False (-1) 4 (TInterface "GObject" "Value"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_values", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "columns", argType = TCArray False (-1) 4 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "values", argType = TCArray False (-1) 4 (TInterface "GObject" "Value"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_set_valuesv" gtk_tree_store_set_valuesv :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    Ptr Int32 ->                            -- columns : TCArray False (-1) 4 (TBasicType TInt32)
    Ptr GValue ->                           -- values : TCArray False (-1) 4 (TInterface "GObject" "Value")
    Int32 ->                                -- n_values : TBasicType TInt32
    IO ()


treeStoreSet ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- iter
    [Int32] ->                              -- columns
    [GValue] ->                             -- values
    m ()
treeStoreSet _obj iter columns values = liftIO $ do
    let n_values = fromIntegral $ length values
    let columns_expected_length_ = fromIntegral $ length columns
    when (columns_expected_length_ /= n_values) $
        error "Gtk.treeStoreSet : length of 'columns' does not agree with that of 'values'."
    let _obj' = unsafeManagedPtrCastPtr _obj
    let iter' = unsafeManagedPtrGetPtr iter
    columns' <- packStorableArray columns
    let values' = map unsafeManagedPtrGetPtr values
    values'' <- packBlockArray 24 values'
    gtk_tree_store_set_valuesv _obj' iter' columns' values'' n_values
    touchManagedPtr _obj
    touchManagedPtr iter
    mapM_ touchManagedPtr values
    freeMem columns'
    freeMem values''
    return ()

-- method TreeStore::swap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "a", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "b", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeStore", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "a", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "b", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_store_swap" gtk_tree_store_swap :: 
    Ptr TreeStore ->                        -- _obj : TInterface "Gtk" "TreeStore"
    Ptr TreeIter ->                         -- a : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- b : TInterface "Gtk" "TreeIter"
    IO ()


treeStoreSwap ::
    (MonadIO m, TreeStoreK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- a
    TreeIter ->                             -- b
    m ()
treeStoreSwap _obj a b = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let a' = unsafeManagedPtrGetPtr a
    let b' = unsafeManagedPtrGetPtr b
    gtk_tree_store_swap _obj' a' b'
    touchManagedPtr _obj
    touchManagedPtr a
    touchManagedPtr b
    return ()

-- object TreeView 
newtype TreeView = TreeView (ForeignPtr TreeView)
noTreeView :: Maybe TreeView
noTreeView = Nothing

foreign import ccall "gtk_tree_view_get_type"
    c_gtk_tree_view_get_type :: IO GType

type instance ParentTypes TreeView = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Scrollable]

instance GObject TreeView where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_tree_view_get_type
    

class GObject o => TreeViewK o
instance (GObject o, IsDescendantOf TreeView o) => TreeViewK o

toTreeView :: TreeViewK o => o -> IO TreeView
toTreeView = unsafeCastTo TreeView

-- method TreeView::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TreeView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_new" gtk_tree_view_new :: 
    IO (Ptr TreeView)


treeViewNew ::
    (MonadIO m) =>
    m TreeView
treeViewNew  = liftIO $ do
    result <- gtk_tree_view_new
    checkUnexpectedReturnNULL "gtk_tree_view_new" result
    result' <- (newObject TreeView) result
    return result'

-- method TreeView::new_with_model
-- method type : Constructor
-- Args : [Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeView"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_new_with_model" gtk_tree_view_new_with_model :: 
    Ptr TreeModel ->                        -- model : TInterface "Gtk" "TreeModel"
    IO (Ptr TreeView)


treeViewNewWithModel ::
    (MonadIO m, TreeModelK a) =>
    a ->                                    -- model
    m TreeView
treeViewNewWithModel model = liftIO $ do
    let model' = unsafeManagedPtrCastPtr model
    result <- gtk_tree_view_new_with_model model'
    checkUnexpectedReturnNULL "gtk_tree_view_new_with_model" result
    result' <- (newObject TreeView) result
    touchManagedPtr model
    return result'

-- method TreeView::append_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_append_column" gtk_tree_view_append_column :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreeViewColumn ->                   -- column : TInterface "Gtk" "TreeViewColumn"
    IO Int32


treeViewAppendColumn ::
    (MonadIO m, TreeViewK a, TreeViewColumnK b) =>
    a ->                                    -- _obj
    b ->                                    -- column
    m Int32
treeViewAppendColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let column' = unsafeManagedPtrCastPtr column
    result <- gtk_tree_view_append_column _obj' column'
    touchManagedPtr _obj
    touchManagedPtr column
    return result

-- method TreeView::collapse_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_collapse_all" gtk_tree_view_collapse_all :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO ()


treeViewCollapseAll ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m ()
treeViewCollapseAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_collapse_all _obj'
    touchManagedPtr _obj
    return ()

-- method TreeView::collapse_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_collapse_row" gtk_tree_view_collapse_row :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO CInt


treeViewCollapseRow ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m Bool
treeViewCollapseRow _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_tree_view_collapse_row _obj' path'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr path
    return result'

-- method TreeView::columns_autosize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_columns_autosize" gtk_tree_view_columns_autosize :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO ()


treeViewColumnsAutosize ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m ()
treeViewColumnsAutosize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_columns_autosize _obj'
    touchManagedPtr _obj
    return ()

-- method TreeView::convert_bin_window_to_tree_coords
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "by", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tx", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "ty", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "by", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_convert_bin_window_to_tree_coords" gtk_tree_view_convert_bin_window_to_tree_coords :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- bx : TBasicType TInt32
    Int32 ->                                -- by : TBasicType TInt32
    Ptr Int32 ->                            -- tx : TBasicType TInt32
    Ptr Int32 ->                            -- ty : TBasicType TInt32
    IO ()


treeViewConvertBinWindowToTreeCoords ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- bx
    Int32 ->                                -- by
    m (Int32,Int32)
treeViewConvertBinWindowToTreeCoords _obj bx by = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    tx <- allocMem :: IO (Ptr Int32)
    ty <- allocMem :: IO (Ptr Int32)
    gtk_tree_view_convert_bin_window_to_tree_coords _obj' bx by tx ty
    tx' <- peek tx
    ty' <- peek ty
    touchManagedPtr _obj
    freeMem tx
    freeMem ty
    return (tx', ty')

-- method TreeView::convert_bin_window_to_widget_coords
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "by", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wx", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "wy", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "by", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_convert_bin_window_to_widget_coords" gtk_tree_view_convert_bin_window_to_widget_coords :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- bx : TBasicType TInt32
    Int32 ->                                -- by : TBasicType TInt32
    Ptr Int32 ->                            -- wx : TBasicType TInt32
    Ptr Int32 ->                            -- wy : TBasicType TInt32
    IO ()


treeViewConvertBinWindowToWidgetCoords ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- bx
    Int32 ->                                -- by
    m (Int32,Int32)
treeViewConvertBinWindowToWidgetCoords _obj bx by = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    wx <- allocMem :: IO (Ptr Int32)
    wy <- allocMem :: IO (Ptr Int32)
    gtk_tree_view_convert_bin_window_to_widget_coords _obj' bx by wx wy
    wx' <- peek wx
    wy' <- peek wy
    touchManagedPtr _obj
    freeMem wx
    freeMem wy
    return (wx', wy')

-- method TreeView::convert_tree_to_bin_window_coords
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ty", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bx", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "by", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ty", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_convert_tree_to_bin_window_coords" gtk_tree_view_convert_tree_to_bin_window_coords :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- tx : TBasicType TInt32
    Int32 ->                                -- ty : TBasicType TInt32
    Ptr Int32 ->                            -- bx : TBasicType TInt32
    Ptr Int32 ->                            -- by : TBasicType TInt32
    IO ()


treeViewConvertTreeToBinWindowCoords ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- tx
    Int32 ->                                -- ty
    m (Int32,Int32)
treeViewConvertTreeToBinWindowCoords _obj tx ty = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    bx <- allocMem :: IO (Ptr Int32)
    by <- allocMem :: IO (Ptr Int32)
    gtk_tree_view_convert_tree_to_bin_window_coords _obj' tx ty bx by
    bx' <- peek bx
    by' <- peek by
    touchManagedPtr _obj
    freeMem bx
    freeMem by
    return (bx', by')

-- method TreeView::convert_tree_to_widget_coords
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ty", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wx", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "wy", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ty", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_convert_tree_to_widget_coords" gtk_tree_view_convert_tree_to_widget_coords :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- tx : TBasicType TInt32
    Int32 ->                                -- ty : TBasicType TInt32
    Ptr Int32 ->                            -- wx : TBasicType TInt32
    Ptr Int32 ->                            -- wy : TBasicType TInt32
    IO ()


treeViewConvertTreeToWidgetCoords ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- tx
    Int32 ->                                -- ty
    m (Int32,Int32)
treeViewConvertTreeToWidgetCoords _obj tx ty = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    wx <- allocMem :: IO (Ptr Int32)
    wy <- allocMem :: IO (Ptr Int32)
    gtk_tree_view_convert_tree_to_widget_coords _obj' tx ty wx wy
    wx' <- peek wx
    wy' <- peek wy
    touchManagedPtr _obj
    freeMem wx
    freeMem wy
    return (wx', wy')

-- method TreeView::convert_widget_to_bin_window_coords
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wy", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bx", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "by", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wy", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_convert_widget_to_bin_window_coords" gtk_tree_view_convert_widget_to_bin_window_coords :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- wx : TBasicType TInt32
    Int32 ->                                -- wy : TBasicType TInt32
    Ptr Int32 ->                            -- bx : TBasicType TInt32
    Ptr Int32 ->                            -- by : TBasicType TInt32
    IO ()


treeViewConvertWidgetToBinWindowCoords ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- wx
    Int32 ->                                -- wy
    m (Int32,Int32)
treeViewConvertWidgetToBinWindowCoords _obj wx wy = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    bx <- allocMem :: IO (Ptr Int32)
    by <- allocMem :: IO (Ptr Int32)
    gtk_tree_view_convert_widget_to_bin_window_coords _obj' wx wy bx by
    bx' <- peek bx
    by' <- peek by
    touchManagedPtr _obj
    freeMem bx
    freeMem by
    return (bx', by')

-- method TreeView::convert_widget_to_tree_coords
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wy", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tx", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "ty", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wx", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wy", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_convert_widget_to_tree_coords" gtk_tree_view_convert_widget_to_tree_coords :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- wx : TBasicType TInt32
    Int32 ->                                -- wy : TBasicType TInt32
    Ptr Int32 ->                            -- tx : TBasicType TInt32
    Ptr Int32 ->                            -- ty : TBasicType TInt32
    IO ()


treeViewConvertWidgetToTreeCoords ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- wx
    Int32 ->                                -- wy
    m (Int32,Int32)
treeViewConvertWidgetToTreeCoords _obj wx wy = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    tx <- allocMem :: IO (Ptr Int32)
    ty <- allocMem :: IO (Ptr Int32)
    gtk_tree_view_convert_widget_to_tree_coords _obj' wx wy tx ty
    tx' <- peek tx
    ty' <- peek ty
    touchManagedPtr _obj
    freeMem tx
    freeMem ty
    return (tx', ty')

-- method TreeView::create_row_drag_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Surface"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_create_row_drag_icon" gtk_tree_view_create_row_drag_icon :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO (Ptr Cairo.Surface)


treeViewCreateRowDragIcon ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m Cairo.Surface
treeViewCreateRowDragIcon _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_tree_view_create_row_drag_icon _obj' path'
    checkUnexpectedReturnNULL "gtk_tree_view_create_row_drag_icon" result
    result' <- (wrapBoxed Cairo.Surface) result
    touchManagedPtr _obj
    touchManagedPtr path
    return result'

-- method TreeView::enable_model_drag_dest
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_enable_model_drag_dest" gtk_tree_view_enable_model_drag_dest :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TargetEntry ->                      -- targets : TCArray False (-1) 2 (TInterface "Gtk" "TargetEntry")
    Int32 ->                                -- n_targets : TBasicType TInt32
    CUInt ->                                -- actions : TInterface "Gdk" "DragAction"
    IO ()


treeViewEnableModelDragDest ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    [TargetEntry] ->                        -- targets
    [Gdk.DragAction] ->                     -- actions
    m ()
treeViewEnableModelDragDest _obj targets actions = liftIO $ do
    let n_targets = fromIntegral $ length targets
    let _obj' = unsafeManagedPtrCastPtr _obj
    let targets' = map unsafeManagedPtrGetPtr targets
    targets'' <- packBlockArray 16 targets'
    let actions' = gflagsToWord actions
    gtk_tree_view_enable_model_drag_dest _obj' targets'' n_targets actions'
    touchManagedPtr _obj
    mapM_ touchManagedPtr targets
    freeMem targets''
    return ()

-- method TreeView::enable_model_drag_source
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_button_mask", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_button_mask", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_enable_model_drag_source" gtk_tree_view_enable_model_drag_source :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CUInt ->                                -- start_button_mask : TInterface "Gdk" "ModifierType"
    Ptr TargetEntry ->                      -- targets : TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry")
    Int32 ->                                -- n_targets : TBasicType TInt32
    CUInt ->                                -- actions : TInterface "Gdk" "DragAction"
    IO ()


treeViewEnableModelDragSource ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    [Gdk.ModifierType] ->                   -- start_button_mask
    [TargetEntry] ->                        -- targets
    [Gdk.DragAction] ->                     -- actions
    m ()
treeViewEnableModelDragSource _obj start_button_mask targets actions = liftIO $ do
    let n_targets = fromIntegral $ length targets
    let _obj' = unsafeManagedPtrCastPtr _obj
    let start_button_mask' = gflagsToWord start_button_mask
    let targets' = map unsafeManagedPtrGetPtr targets
    targets'' <- packBlockArray 16 targets'
    let actions' = gflagsToWord actions
    gtk_tree_view_enable_model_drag_source _obj' start_button_mask' targets'' n_targets actions'
    touchManagedPtr _obj
    mapM_ touchManagedPtr targets
    freeMem targets''
    return ()

-- method TreeView::expand_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_expand_all" gtk_tree_view_expand_all :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO ()


treeViewExpandAll ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m ()
treeViewExpandAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_expand_all _obj'
    touchManagedPtr _obj
    return ()

-- method TreeView::expand_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "open_all", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "open_all", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_expand_row" gtk_tree_view_expand_row :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    CInt ->                                 -- open_all : TBasicType TBoolean
    IO CInt


treeViewExpandRow ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    Bool ->                                 -- open_all
    m Bool
treeViewExpandRow _obj path open_all = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    let open_all' = (fromIntegral . fromEnum) open_all
    result <- gtk_tree_view_expand_row _obj' path' open_all'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr path
    return result'

-- method TreeView::expand_to_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_expand_to_path" gtk_tree_view_expand_to_path :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


treeViewExpandToPath ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m ()
treeViewExpandToPath _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    gtk_tree_view_expand_to_path _obj' path'
    touchManagedPtr _obj
    touchManagedPtr path
    return ()

-- method TreeView::get_activate_on_single_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_activate_on_single_click" gtk_tree_view_get_activate_on_single_click :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewGetActivateOnSingleClick ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetActivateOnSingleClick _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_activate_on_single_click _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_background_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_background_area" gtk_tree_view_get_background_area :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr TreeViewColumn ->                   -- column : TInterface "Gtk" "TreeViewColumn"
    Ptr Gdk.Rectangle ->                    -- rect : TInterface "Gdk" "Rectangle"
    IO ()


treeViewGetBackgroundArea ::
    (MonadIO m, TreeViewK a, TreeViewColumnK b) =>
    a ->                                    -- _obj
    Maybe (TreePath) ->                     -- path
    Maybe (b) ->                            -- column
    m (Gdk.Rectangle)
treeViewGetBackgroundArea _obj path column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePath <- case path of
        Nothing -> return nullPtr
        Just jPath -> do
            let jPath' = unsafeManagedPtrGetPtr jPath
            return jPath'
    maybeColumn <- case column of
        Nothing -> return nullPtr
        Just jColumn -> do
            let jColumn' = unsafeManagedPtrCastPtr jColumn
            return jColumn'
    rect <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_tree_view_get_background_area _obj' maybePath maybeColumn rect
    rect' <- (wrapBoxed Gdk.Rectangle) rect
    touchManagedPtr _obj
    whenJust path touchManagedPtr
    whenJust column touchManagedPtr
    return rect'

-- method TreeView::get_bin_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_bin_window" gtk_tree_view_get_bin_window :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO (Ptr Gdk.Window)


treeViewGetBinWindow ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Gdk.Window
treeViewGetBinWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_bin_window _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_get_bin_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_cell_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_cell_area" gtk_tree_view_get_cell_area :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr TreeViewColumn ->                   -- column : TInterface "Gtk" "TreeViewColumn"
    Ptr Gdk.Rectangle ->                    -- rect : TInterface "Gdk" "Rectangle"
    IO ()


treeViewGetCellArea ::
    (MonadIO m, TreeViewK a, TreeViewColumnK b) =>
    a ->                                    -- _obj
    Maybe (TreePath) ->                     -- path
    Maybe (b) ->                            -- column
    m (Gdk.Rectangle)
treeViewGetCellArea _obj path column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePath <- case path of
        Nothing -> return nullPtr
        Just jPath -> do
            let jPath' = unsafeManagedPtrGetPtr jPath
            return jPath'
    maybeColumn <- case column of
        Nothing -> return nullPtr
        Just jColumn -> do
            let jColumn' = unsafeManagedPtrCastPtr jColumn
            return jColumn'
    rect <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_tree_view_get_cell_area _obj' maybePath maybeColumn rect
    rect' <- (wrapBoxed Gdk.Rectangle) rect
    touchManagedPtr _obj
    whenJust path touchManagedPtr
    whenJust column touchManagedPtr
    return rect'

-- method TreeView::get_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeViewColumn"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_column" gtk_tree_view_get_column :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- n : TBasicType TInt32
    IO (Ptr TreeViewColumn)


treeViewGetColumn ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- n
    m TreeViewColumn
treeViewGetColumn _obj n = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_column _obj' n
    checkUnexpectedReturnNULL "gtk_tree_view_get_column" result
    result' <- (newObject TreeViewColumn) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_columns
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "TreeViewColumn")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_columns" gtk_tree_view_get_columns :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO (Ptr (GList (Ptr TreeViewColumn)))


treeViewGetColumns ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m [TreeViewColumn]
treeViewGetColumns _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_columns _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_get_columns" result
    result' <- unpackGList result
    result'' <- mapM (newObject TreeViewColumn) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method TreeView::get_cursor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "focus_column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionOut, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_cursor" gtk_tree_view_get_cursor :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    Ptr (Ptr TreeViewColumn) ->             -- focus_column : TInterface "Gtk" "TreeViewColumn"
    IO ()


treeViewGetCursor ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m ((Maybe TreePath),(Maybe TreeViewColumn))
treeViewGetCursor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    focus_column <- allocMem :: IO (Ptr (Ptr TreeViewColumn))
    gtk_tree_view_get_cursor _obj' path focus_column
    path' <- peek path
    maybePath' <- convertIfNonNull path' $ \path'' -> do
        path''' <- (wrapBoxed TreePath) path''
        return path'''
    focus_column' <- peek focus_column
    maybeFocus_column' <- convertIfNonNull focus_column' $ \focus_column'' -> do
        focus_column''' <- (newObject TreeViewColumn) focus_column''
        return focus_column'''
    touchManagedPtr _obj
    freeMem path
    freeMem focus_column
    return (maybePath', maybeFocus_column')

-- method TreeView::get_dest_row_at_pos
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "drag_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "drag_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "pos", argType = TInterface "Gtk" "TreeViewDropPosition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "drag_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "drag_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_dest_row_at_pos" gtk_tree_view_get_dest_row_at_pos :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- drag_x : TBasicType TInt32
    Int32 ->                                -- drag_y : TBasicType TInt32
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    Ptr CUInt ->                            -- pos : TInterface "Gtk" "TreeViewDropPosition"
    IO CInt


treeViewGetDestRowAtPos ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- drag_x
    Int32 ->                                -- drag_y
    m (Bool,(Maybe TreePath),TreeViewDropPosition)
treeViewGetDestRowAtPos _obj drag_x drag_y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    pos <- allocMem :: IO (Ptr CUInt)
    result <- gtk_tree_view_get_dest_row_at_pos _obj' drag_x drag_y path pos
    let result' = (/= 0) result
    path' <- peek path
    maybePath' <- convertIfNonNull path' $ \path'' -> do
        path''' <- (wrapBoxed TreePath) path''
        return path'''
    pos' <- peek pos
    let pos'' = (toEnum . fromIntegral) pos'
    touchManagedPtr _obj
    freeMem path
    freeMem pos
    return (result', maybePath', pos'')

-- method TreeView::get_drag_dest_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "pos", argType = TInterface "Gtk" "TreeViewDropPosition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_drag_dest_row" gtk_tree_view_get_drag_dest_row :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    Ptr CUInt ->                            -- pos : TInterface "Gtk" "TreeViewDropPosition"
    IO ()


treeViewGetDragDestRow ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m ((Maybe TreePath),TreeViewDropPosition)
treeViewGetDragDestRow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    pos <- allocMem :: IO (Ptr CUInt)
    gtk_tree_view_get_drag_dest_row _obj' path pos
    path' <- peek path
    maybePath' <- convertIfNonNull path' $ \path'' -> do
        path''' <- (wrapBoxed TreePath) path''
        return path'''
    pos' <- peek pos
    let pos'' = (toEnum . fromIntegral) pos'
    touchManagedPtr _obj
    freeMem path
    freeMem pos
    return (maybePath', pos'')

-- method TreeView::get_enable_search
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_enable_search" gtk_tree_view_get_enable_search :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewGetEnableSearch ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetEnableSearch _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_enable_search _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_enable_tree_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_enable_tree_lines" gtk_tree_view_get_enable_tree_lines :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewGetEnableTreeLines ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetEnableTreeLines _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_enable_tree_lines _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_expander_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeViewColumn"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_expander_column" gtk_tree_view_get_expander_column :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO (Ptr TreeViewColumn)


treeViewGetExpanderColumn ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m TreeViewColumn
treeViewGetExpanderColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_expander_column _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_get_expander_column" result
    result' <- (newObject TreeViewColumn) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_fixed_height_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_fixed_height_mode" gtk_tree_view_get_fixed_height_mode :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewGetFixedHeightMode ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetFixedHeightMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_fixed_height_mode _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_grid_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeViewGridLines"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_grid_lines" gtk_tree_view_get_grid_lines :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CUInt


treeViewGetGridLines ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m TreeViewGridLines
treeViewGetGridLines _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_grid_lines _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_hadjustment" gtk_tree_view_get_hadjustment :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO (Ptr Adjustment)

{-# DEPRECATED treeViewGetHadjustment ["(Since version 3.0)","Use gtk_scrollable_get_hadjustment()"]#-}
treeViewGetHadjustment ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Adjustment
treeViewGetHadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_hadjustment _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_get_hadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_headers_clickable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_headers_clickable" gtk_tree_view_get_headers_clickable :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewGetHeadersClickable ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetHeadersClickable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_headers_clickable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_headers_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_headers_visible" gtk_tree_view_get_headers_visible :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewGetHeadersVisible ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetHeadersVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_headers_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_hover_expand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_hover_expand" gtk_tree_view_get_hover_expand :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewGetHoverExpand ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetHoverExpand _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_hover_expand _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_hover_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_hover_selection" gtk_tree_view_get_hover_selection :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewGetHoverSelection ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetHoverSelection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_hover_selection _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_level_indentation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_level_indentation" gtk_tree_view_get_level_indentation :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO Int32


treeViewGetLevelIndentation ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Int32
treeViewGetLevelIndentation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_level_indentation _obj'
    touchManagedPtr _obj
    return result

-- method TreeView::get_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_model" gtk_tree_view_get_model :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO (Ptr TreeModel)


treeViewGetModel ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m TreeModel
treeViewGetModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_model _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_get_model" result
    result' <- (newObject TreeModel) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_n_columns
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_n_columns" gtk_tree_view_get_n_columns :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO Word32


treeViewGetNColumns ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Word32
treeViewGetNColumns _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_n_columns _obj'
    touchManagedPtr _obj
    return result

-- method TreeView::get_path_at_pos
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionOut, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_x", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "cell_y", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_path_at_pos" gtk_tree_view_get_path_at_pos :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    Ptr (Ptr TreeViewColumn) ->             -- column : TInterface "Gtk" "TreeViewColumn"
    Ptr Int32 ->                            -- cell_x : TBasicType TInt32
    Ptr Int32 ->                            -- cell_y : TBasicType TInt32
    IO CInt


treeViewGetPathAtPos ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m (Bool,(Maybe TreePath),(Maybe TreeViewColumn),Int32,Int32)
treeViewGetPathAtPos _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    column <- allocMem :: IO (Ptr (Ptr TreeViewColumn))
    cell_x <- allocMem :: IO (Ptr Int32)
    cell_y <- allocMem :: IO (Ptr Int32)
    result <- gtk_tree_view_get_path_at_pos _obj' x y path column cell_x cell_y
    let result' = (/= 0) result
    path' <- peek path
    maybePath' <- convertIfNonNull path' $ \path'' -> do
        path''' <- (wrapBoxed TreePath) path''
        return path'''
    column' <- peek column
    maybeColumn' <- convertIfNonNull column' $ \column'' -> do
        column''' <- (newObject TreeViewColumn) column''
        return column'''
    cell_x' <- peek cell_x
    cell_y' <- peek cell_y
    touchManagedPtr _obj
    freeMem path
    freeMem column
    freeMem cell_x
    freeMem cell_y
    return (result', maybePath', maybeColumn', cell_x', cell_y')

-- method TreeView::get_reorderable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_reorderable" gtk_tree_view_get_reorderable :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewGetReorderable ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetReorderable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_reorderable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_rubber_banding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_rubber_banding" gtk_tree_view_get_rubber_banding :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewGetRubberBanding ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetRubberBanding _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_rubber_banding _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_rules_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_rules_hint" gtk_tree_view_get_rules_hint :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt

{-# DEPRECATED treeViewGetRulesHint ["(Since version 3.14)"]#-}
treeViewGetRulesHint ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetRulesHint _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_rules_hint _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_search_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_search_column" gtk_tree_view_get_search_column :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO Int32


treeViewGetSearchColumn ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Int32
treeViewGetSearchColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_search_column _obj'
    touchManagedPtr _obj
    return result

-- method TreeView::get_search_entry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Entry"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_search_entry" gtk_tree_view_get_search_entry :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO (Ptr Entry)


treeViewGetSearchEntry ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Entry
treeViewGetSearchEntry _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_search_entry _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_get_search_entry" result
    result' <- (newObject Entry) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeSelection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_selection" gtk_tree_view_get_selection :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO (Ptr TreeSelection)


treeViewGetSelection ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m TreeSelection
treeViewGetSelection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_selection _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_get_selection" result
    result' <- (newObject TreeSelection) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_show_expanders
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_show_expanders" gtk_tree_view_get_show_expanders :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewGetShowExpanders ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewGetShowExpanders _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_show_expanders _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_tooltip_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_tooltip_column" gtk_tree_view_get_tooltip_column :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO Int32


treeViewGetTooltipColumn ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Int32
treeViewGetTooltipColumn _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_tooltip_column _obj'
    touchManagedPtr _obj
    return result

-- method TreeView::get_tooltip_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "keyboard_tip", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionOut, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "keyboard_tip", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_tooltip_context" gtk_tree_view_get_tooltip_context :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    CInt ->                                 -- keyboard_tip : TBasicType TBoolean
    Ptr (Ptr TreeModel) ->                  -- model : TInterface "Gtk" "TreeModel"
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeViewGetTooltipContext ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    Bool ->                                 -- keyboard_tip
    m (Bool,Int32,Int32,(Maybe TreeModel),TreePath,TreeIter)
treeViewGetTooltipContext _obj x y keyboard_tip = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    x' <- allocMem :: IO (Ptr Int32)
    poke x' x
    y' <- allocMem :: IO (Ptr Int32)
    poke y' y
    let keyboard_tip' = (fromIntegral . fromEnum) keyboard_tip
    model <- allocMem :: IO (Ptr (Ptr TreeModel))
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    result <- gtk_tree_view_get_tooltip_context _obj' x' y' keyboard_tip' model path iter
    let result' = (/= 0) result
    x'' <- peek x'
    y'' <- peek y'
    model' <- peek model
    maybeModel' <- convertIfNonNull model' $ \model'' -> do
        model''' <- (newObject TreeModel) model''
        return model'''
    path' <- peek path
    path'' <- (wrapBoxed TreePath) path'
    iter' <- (wrapBoxed TreeIter) iter
    touchManagedPtr _obj
    freeMem x'
    freeMem y'
    freeMem model
    freeMem path
    return (result', x'', y'', maybeModel', path'', iter')

-- method TreeView::get_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_vadjustment" gtk_tree_view_get_vadjustment :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO (Ptr Adjustment)

{-# DEPRECATED treeViewGetVadjustment ["(Since version 3.0)","Use gtk_scrollable_get_vadjustment()"]#-}
treeViewGetVadjustment ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Adjustment
treeViewGetVadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_get_vadjustment _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_get_vadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method TreeView::get_visible_range
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "end_path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_visible_range" gtk_tree_view_get_visible_range :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr (Ptr TreePath) ->                   -- start_path : TInterface "Gtk" "TreePath"
    Ptr (Ptr TreePath) ->                   -- end_path : TInterface "Gtk" "TreePath"
    IO CInt


treeViewGetVisibleRange ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m (Bool,TreePath,TreePath)
treeViewGetVisibleRange _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    start_path <- allocMem :: IO (Ptr (Ptr TreePath))
    end_path <- allocMem :: IO (Ptr (Ptr TreePath))
    result <- gtk_tree_view_get_visible_range _obj' start_path end_path
    let result' = (/= 0) result
    start_path' <- peek start_path
    start_path'' <- (wrapBoxed TreePath) start_path'
    end_path' <- peek end_path
    end_path'' <- (wrapBoxed TreePath) end_path'
    touchManagedPtr _obj
    freeMem start_path
    freeMem end_path
    return (result', start_path'', end_path'')

-- method TreeView::get_visible_rect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible_rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_get_visible_rect" gtk_tree_view_get_visible_rect :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr Gdk.Rectangle ->                    -- visible_rect : TInterface "Gdk" "Rectangle"
    IO ()


treeViewGetVisibleRect ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m (Gdk.Rectangle)
treeViewGetVisibleRect _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    visible_rect <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_tree_view_get_visible_rect _obj' visible_rect
    visible_rect' <- (wrapBoxed Gdk.Rectangle) visible_rect
    touchManagedPtr _obj
    return visible_rect'

-- method TreeView::insert_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_insert_column" gtk_tree_view_insert_column :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreeViewColumn ->                   -- column : TInterface "Gtk" "TreeViewColumn"
    Int32 ->                                -- position : TBasicType TInt32
    IO Int32


treeViewInsertColumn ::
    (MonadIO m, TreeViewK a, TreeViewColumnK b) =>
    a ->                                    -- _obj
    b ->                                    -- column
    Int32 ->                                -- position
    m Int32
treeViewInsertColumn _obj column position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let column' = unsafeManagedPtrCastPtr column
    result <- gtk_tree_view_insert_column _obj' column' position
    touchManagedPtr _obj
    touchManagedPtr column
    return result

-- method TreeView::insert_column_with_data_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeCellDataFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 5, argDestroy = 6, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dnotify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeCellDataFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 5, argDestroy = 6, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_insert_column_with_data_func" gtk_tree_view_insert_column_with_data_func :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- position : TBasicType TInt32
    CString ->                              -- title : TBasicType TUTF8
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    FunPtr TreeCellDataFuncC ->             -- func : TInterface "Gtk" "TreeCellDataFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- dnotify : TInterface "GLib" "DestroyNotify"
    IO Int32


treeViewInsertColumnWithDataFunc ::
    (MonadIO m, TreeViewK a, CellRendererK b) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    T.Text ->                               -- title
    b ->                                    -- cell
    TreeCellDataFunc ->                     -- func
    m Int32
treeViewInsertColumnWithDataFunc _obj position title cell func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    title' <- textToCString title
    let cell' = unsafeManagedPtrCastPtr cell
    func' <- mkTreeCellDataFunc (treeCellDataFuncWrapper Nothing func)
    let data_ = castFunPtrToPtr func'
    let dnotify = safeFreeFunPtrPtr
    result <- gtk_tree_view_insert_column_with_data_func _obj' position title' cell' func' data_ dnotify
    touchManagedPtr _obj
    touchManagedPtr cell
    freeMem title'
    return result

-- method TreeView::is_blank_at_pos
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "cell_x", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "cell_y", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_is_blank_at_pos" gtk_tree_view_is_blank_at_pos :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    Ptr (Ptr TreeViewColumn) ->             -- column : TInterface "Gtk" "TreeViewColumn"
    Ptr Int32 ->                            -- cell_x : TBasicType TInt32
    Ptr Int32 ->                            -- cell_y : TBasicType TInt32
    IO CInt


treeViewIsBlankAtPos ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m (Bool,TreePath,TreeViewColumn,Int32,Int32)
treeViewIsBlankAtPos _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    column <- allocMem :: IO (Ptr (Ptr TreeViewColumn))
    cell_x <- allocMem :: IO (Ptr Int32)
    cell_y <- allocMem :: IO (Ptr Int32)
    result <- gtk_tree_view_is_blank_at_pos _obj' x y path column cell_x cell_y
    let result' = (/= 0) result
    path' <- peek path
    path'' <- (wrapBoxed TreePath) path'
    column' <- peek column
    column'' <- (wrapObject TreeViewColumn) column'
    cell_x' <- peek cell_x
    cell_y' <- peek cell_y
    touchManagedPtr _obj
    freeMem path
    freeMem column
    freeMem cell_x
    freeMem cell_y
    return (result', path'', column'', cell_x', cell_y')

-- method TreeView::is_rubber_banding_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_is_rubber_banding_active" gtk_tree_view_is_rubber_banding_active :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO CInt


treeViewIsRubberBandingActive ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m Bool
treeViewIsRubberBandingActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_is_rubber_banding_active _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeView::map_expanded_rows
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeViewMappingFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeViewMappingFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_map_expanded_rows" gtk_tree_view_map_expanded_rows :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    FunPtr TreeViewMappingFuncC ->          -- func : TInterface "Gtk" "TreeViewMappingFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    IO ()


treeViewMapExpandedRows ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    TreeViewMappingFunc ->                  -- func
    m ()
treeViewMapExpandedRows _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkTreeViewMappingFunc (treeViewMappingFuncWrapper Nothing func)
    let data_ = nullPtr
    gtk_tree_view_map_expanded_rows _obj' func' data_
    safeFreeFunPtr $ castFunPtrToPtr func'
    touchManagedPtr _obj
    return ()

-- method TreeView::move_column_after
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "base_column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "base_column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_move_column_after" gtk_tree_view_move_column_after :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreeViewColumn ->                   -- column : TInterface "Gtk" "TreeViewColumn"
    Ptr TreeViewColumn ->                   -- base_column : TInterface "Gtk" "TreeViewColumn"
    IO ()


treeViewMoveColumnAfter ::
    (MonadIO m, TreeViewK a, TreeViewColumnK b, TreeViewColumnK c) =>
    a ->                                    -- _obj
    b ->                                    -- column
    Maybe (c) ->                            -- base_column
    m ()
treeViewMoveColumnAfter _obj column base_column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let column' = unsafeManagedPtrCastPtr column
    maybeBase_column <- case base_column of
        Nothing -> return nullPtr
        Just jBase_column -> do
            let jBase_column' = unsafeManagedPtrCastPtr jBase_column
            return jBase_column'
    gtk_tree_view_move_column_after _obj' column' maybeBase_column
    touchManagedPtr _obj
    touchManagedPtr column
    whenJust base_column touchManagedPtr
    return ()

-- method TreeView::remove_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_remove_column" gtk_tree_view_remove_column :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreeViewColumn ->                   -- column : TInterface "Gtk" "TreeViewColumn"
    IO Int32


treeViewRemoveColumn ::
    (MonadIO m, TreeViewK a, TreeViewColumnK b) =>
    a ->                                    -- _obj
    b ->                                    -- column
    m Int32
treeViewRemoveColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let column' = unsafeManagedPtrCastPtr column
    result <- gtk_tree_view_remove_column _obj' column'
    touchManagedPtr _obj
    touchManagedPtr column
    return result

-- method TreeView::row_activated
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_row_activated" gtk_tree_view_row_activated :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr TreeViewColumn ->                   -- column : TInterface "Gtk" "TreeViewColumn"
    IO ()


treeViewRowActivated ::
    (MonadIO m, TreeViewK a, TreeViewColumnK b) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    b ->                                    -- column
    m ()
treeViewRowActivated _obj path column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    let column' = unsafeManagedPtrCastPtr column
    gtk_tree_view_row_activated _obj' path' column'
    touchManagedPtr _obj
    touchManagedPtr path
    touchManagedPtr column
    return ()

-- method TreeView::row_expanded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_row_expanded" gtk_tree_view_row_expanded :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO CInt


treeViewRowExpanded ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    m Bool
treeViewRowExpanded _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_tree_view_row_expanded _obj' path'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr path
    return result'

-- method TreeView::scroll_to_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row_align", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "col_align", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row_align", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "col_align", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_scroll_to_cell" gtk_tree_view_scroll_to_cell :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr TreeViewColumn ->                   -- column : TInterface "Gtk" "TreeViewColumn"
    CInt ->                                 -- use_align : TBasicType TBoolean
    CFloat ->                               -- row_align : TBasicType TFloat
    CFloat ->                               -- col_align : TBasicType TFloat
    IO ()


treeViewScrollToCell ::
    (MonadIO m, TreeViewK a, TreeViewColumnK b) =>
    a ->                                    -- _obj
    Maybe (TreePath) ->                     -- path
    Maybe (b) ->                            -- column
    Bool ->                                 -- use_align
    Float ->                                -- row_align
    Float ->                                -- col_align
    m ()
treeViewScrollToCell _obj path column use_align row_align col_align = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePath <- case path of
        Nothing -> return nullPtr
        Just jPath -> do
            let jPath' = unsafeManagedPtrGetPtr jPath
            return jPath'
    maybeColumn <- case column of
        Nothing -> return nullPtr
        Just jColumn -> do
            let jColumn' = unsafeManagedPtrCastPtr jColumn
            return jColumn'
    let use_align' = (fromIntegral . fromEnum) use_align
    let row_align' = realToFrac row_align
    let col_align' = realToFrac col_align
    gtk_tree_view_scroll_to_cell _obj' maybePath maybeColumn use_align' row_align' col_align'
    touchManagedPtr _obj
    whenJust path touchManagedPtr
    whenJust column touchManagedPtr
    return ()

-- method TreeView::scroll_to_point
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tree_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tree_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tree_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tree_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_scroll_to_point" gtk_tree_view_scroll_to_point :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- tree_x : TBasicType TInt32
    Int32 ->                                -- tree_y : TBasicType TInt32
    IO ()


treeViewScrollToPoint ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- tree_x
    Int32 ->                                -- tree_y
    m ()
treeViewScrollToPoint _obj tree_x tree_y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_scroll_to_point _obj' tree_x tree_y
    touchManagedPtr _obj
    return ()

-- method TreeView::set_activate_on_single_click
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "single", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "single", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_activate_on_single_click" gtk_tree_view_set_activate_on_single_click :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- single : TBasicType TBoolean
    IO ()


treeViewSetActivateOnSingleClick ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- single
    m ()
treeViewSetActivateOnSingleClick _obj single = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let single' = (fromIntegral . fromEnum) single
    gtk_tree_view_set_activate_on_single_click _obj' single'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_column_drag_function
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeViewColumnDropFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeViewColumnDropFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_column_drag_function" gtk_tree_view_set_column_drag_function :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    FunPtr TreeViewColumnDropFuncC ->       -- func : TInterface "Gtk" "TreeViewColumnDropFunc"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


treeViewSetColumnDragFunction ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Maybe (TreeViewColumnDropFunc) ->       -- func
    m ()
treeViewSetColumnDragFunction _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFunc <- case func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jFunc -> do
            jFunc' <- mkTreeViewColumnDropFunc (treeViewColumnDropFuncWrapper Nothing jFunc)
            return jFunc'
    let user_data = castFunPtrToPtr maybeFunc
    let destroy = safeFreeFunPtrPtr
    gtk_tree_view_set_column_drag_function _obj' maybeFunc user_data destroy
    touchManagedPtr _obj
    return ()

-- method TreeView::set_cursor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_editing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_editing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_cursor" gtk_tree_view_set_cursor :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr TreeViewColumn ->                   -- focus_column : TInterface "Gtk" "TreeViewColumn"
    CInt ->                                 -- start_editing : TBasicType TBoolean
    IO ()


treeViewSetCursor ::
    (MonadIO m, TreeViewK a, TreeViewColumnK b) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    Maybe (b) ->                            -- focus_column
    Bool ->                                 -- start_editing
    m ()
treeViewSetCursor _obj path focus_column start_editing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    maybeFocus_column <- case focus_column of
        Nothing -> return nullPtr
        Just jFocus_column -> do
            let jFocus_column' = unsafeManagedPtrCastPtr jFocus_column
            return jFocus_column'
    let start_editing' = (fromIntegral . fromEnum) start_editing
    gtk_tree_view_set_cursor _obj' path' maybeFocus_column start_editing'
    touchManagedPtr _obj
    touchManagedPtr path
    whenJust focus_column touchManagedPtr
    return ()

-- method TreeView::set_cursor_on_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_editing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus_cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_editing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_cursor_on_cell" gtk_tree_view_set_cursor_on_cell :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr TreeViewColumn ->                   -- focus_column : TInterface "Gtk" "TreeViewColumn"
    Ptr CellRenderer ->                     -- focus_cell : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- start_editing : TBasicType TBoolean
    IO ()


treeViewSetCursorOnCell ::
    (MonadIO m, TreeViewK a, TreeViewColumnK b, CellRendererK c) =>
    a ->                                    -- _obj
    TreePath ->                             -- path
    Maybe (b) ->                            -- focus_column
    Maybe (c) ->                            -- focus_cell
    Bool ->                                 -- start_editing
    m ()
treeViewSetCursorOnCell _obj path focus_column focus_cell start_editing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let path' = unsafeManagedPtrGetPtr path
    maybeFocus_column <- case focus_column of
        Nothing -> return nullPtr
        Just jFocus_column -> do
            let jFocus_column' = unsafeManagedPtrCastPtr jFocus_column
            return jFocus_column'
    maybeFocus_cell <- case focus_cell of
        Nothing -> return nullPtr
        Just jFocus_cell -> do
            let jFocus_cell' = unsafeManagedPtrCastPtr jFocus_cell
            return jFocus_cell'
    let start_editing' = (fromIntegral . fromEnum) start_editing
    gtk_tree_view_set_cursor_on_cell _obj' path' maybeFocus_column maybeFocus_cell start_editing'
    touchManagedPtr _obj
    touchManagedPtr path
    whenJust focus_column touchManagedPtr
    whenJust focus_cell touchManagedPtr
    return ()

-- method TreeView::set_destroy_count_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeDestroyCountFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeDestroyCountFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_destroy_count_func" gtk_tree_view_set_destroy_count_func :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    FunPtr TreeDestroyCountFuncC ->         -- func : TInterface "Gtk" "TreeDestroyCountFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()

{-# DEPRECATED treeViewSetDestroyCountFunc ["(Since version 3.4)","Accessibility does not need the function anymore."]#-}
treeViewSetDestroyCountFunc ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Maybe (TreeDestroyCountFunc) ->         -- func
    m ()
treeViewSetDestroyCountFunc _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFunc <- case func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jFunc -> do
            jFunc' <- mkTreeDestroyCountFunc (treeDestroyCountFuncWrapper Nothing jFunc)
            return jFunc'
    let data_ = castFunPtrToPtr maybeFunc
    let destroy = safeFreeFunPtrPtr
    gtk_tree_view_set_destroy_count_func _obj' maybeFunc data_ destroy
    touchManagedPtr _obj
    return ()

-- method TreeView::set_drag_dest_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TInterface "Gtk" "TreeViewDropPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TInterface "Gtk" "TreeViewDropPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_drag_dest_row" gtk_tree_view_set_drag_dest_row :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    CUInt ->                                -- pos : TInterface "Gtk" "TreeViewDropPosition"
    IO ()


treeViewSetDragDestRow ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Maybe (TreePath) ->                     -- path
    TreeViewDropPosition ->                 -- pos
    m ()
treeViewSetDragDestRow _obj path pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePath <- case path of
        Nothing -> return nullPtr
        Just jPath -> do
            let jPath' = unsafeManagedPtrGetPtr jPath
            return jPath'
    let pos' = (fromIntegral . fromEnum) pos
    gtk_tree_view_set_drag_dest_row _obj' maybePath pos'
    touchManagedPtr _obj
    whenJust path touchManagedPtr
    return ()

-- method TreeView::set_enable_search
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enable_search", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enable_search", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_enable_search" gtk_tree_view_set_enable_search :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- enable_search : TBasicType TBoolean
    IO ()


treeViewSetEnableSearch ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enable_search
    m ()
treeViewSetEnableSearch _obj enable_search = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enable_search' = (fromIntegral . fromEnum) enable_search
    gtk_tree_view_set_enable_search _obj' enable_search'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_enable_tree_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_enable_tree_lines" gtk_tree_view_set_enable_tree_lines :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


treeViewSetEnableTreeLines ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
treeViewSetEnableTreeLines _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    gtk_tree_view_set_enable_tree_lines _obj' enabled'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_expander_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_expander_column" gtk_tree_view_set_expander_column :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreeViewColumn ->                   -- column : TInterface "Gtk" "TreeViewColumn"
    IO ()


treeViewSetExpanderColumn ::
    (MonadIO m, TreeViewK a, TreeViewColumnK b) =>
    a ->                                    -- _obj
    b ->                                    -- column
    m ()
treeViewSetExpanderColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let column' = unsafeManagedPtrCastPtr column
    gtk_tree_view_set_expander_column _obj' column'
    touchManagedPtr _obj
    touchManagedPtr column
    return ()

-- method TreeView::set_fixed_height_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_fixed_height_mode" gtk_tree_view_set_fixed_height_mode :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- enable : TBasicType TBoolean
    IO ()


treeViewSetFixedHeightMode ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enable
    m ()
treeViewSetFixedHeightMode _obj enable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enable' = (fromIntegral . fromEnum) enable
    gtk_tree_view_set_fixed_height_mode _obj' enable'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_grid_lines
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "grid_lines", argType = TInterface "Gtk" "TreeViewGridLines", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "grid_lines", argType = TInterface "Gtk" "TreeViewGridLines", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_grid_lines" gtk_tree_view_set_grid_lines :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CUInt ->                                -- grid_lines : TInterface "Gtk" "TreeViewGridLines"
    IO ()


treeViewSetGridLines ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    TreeViewGridLines ->                    -- grid_lines
    m ()
treeViewSetGridLines _obj grid_lines = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let grid_lines' = (fromIntegral . fromEnum) grid_lines
    gtk_tree_view_set_grid_lines _obj' grid_lines'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_hadjustment" gtk_tree_view_set_hadjustment :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()

{-# DEPRECATED treeViewSetHadjustment ["(Since version 3.0)","Use gtk_scrollable_set_hadjustment()"]#-}
treeViewSetHadjustment ::
    (MonadIO m, TreeViewK a, AdjustmentK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- adjustment
    m ()
treeViewSetHadjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    gtk_tree_view_set_hadjustment _obj' maybeAdjustment
    touchManagedPtr _obj
    whenJust adjustment touchManagedPtr
    return ()

-- method TreeView::set_headers_clickable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_headers_clickable" gtk_tree_view_set_headers_clickable :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


treeViewSetHeadersClickable ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
treeViewSetHeadersClickable _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_tree_view_set_headers_clickable _obj' setting'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_headers_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "headers_visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "headers_visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_headers_visible" gtk_tree_view_set_headers_visible :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- headers_visible : TBasicType TBoolean
    IO ()


treeViewSetHeadersVisible ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- headers_visible
    m ()
treeViewSetHeadersVisible _obj headers_visible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let headers_visible' = (fromIntegral . fromEnum) headers_visible
    gtk_tree_view_set_headers_visible _obj' headers_visible'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_hover_expand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_hover_expand" gtk_tree_view_set_hover_expand :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()


treeViewSetHoverExpand ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- expand
    m ()
treeViewSetHoverExpand _obj expand = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let expand' = (fromIntegral . fromEnum) expand
    gtk_tree_view_set_hover_expand _obj' expand'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_hover_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hover", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hover", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_hover_selection" gtk_tree_view_set_hover_selection :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- hover : TBasicType TBoolean
    IO ()


treeViewSetHoverSelection ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- hover
    m ()
treeViewSetHoverSelection _obj hover = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let hover' = (fromIntegral . fromEnum) hover
    gtk_tree_view_set_hover_selection _obj' hover'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_level_indentation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "indentation", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "indentation", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_level_indentation" gtk_tree_view_set_level_indentation :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- indentation : TBasicType TInt32
    IO ()


treeViewSetLevelIndentation ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- indentation
    m ()
treeViewSetLevelIndentation _obj indentation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_set_level_indentation _obj' indentation
    touchManagedPtr _obj
    return ()

-- method TreeView::set_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_model" gtk_tree_view_set_model :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr TreeModel ->                        -- model : TInterface "Gtk" "TreeModel"
    IO ()


treeViewSetModel ::
    (MonadIO m, TreeViewK a, TreeModelK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- model
    m ()
treeViewSetModel _obj model = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeModel <- case model of
        Nothing -> return nullPtr
        Just jModel -> do
            let jModel' = unsafeManagedPtrCastPtr jModel
            return jModel'
    gtk_tree_view_set_model _obj' maybeModel
    touchManagedPtr _obj
    whenJust model touchManagedPtr
    return ()

-- method TreeView::set_reorderable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reorderable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reorderable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_reorderable" gtk_tree_view_set_reorderable :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- reorderable : TBasicType TBoolean
    IO ()


treeViewSetReorderable ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- reorderable
    m ()
treeViewSetReorderable _obj reorderable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let reorderable' = (fromIntegral . fromEnum) reorderable
    gtk_tree_view_set_reorderable _obj' reorderable'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_row_separator_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeViewRowSeparatorFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeViewRowSeparatorFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_row_separator_func" gtk_tree_view_set_row_separator_func :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    FunPtr TreeViewRowSeparatorFuncC ->     -- func : TInterface "Gtk" "TreeViewRowSeparatorFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


treeViewSetRowSeparatorFunc ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Maybe (TreeViewRowSeparatorFunc) ->     -- func
    m ()
treeViewSetRowSeparatorFunc _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFunc <- case func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jFunc -> do
            jFunc' <- mkTreeViewRowSeparatorFunc (treeViewRowSeparatorFuncWrapper Nothing jFunc)
            return jFunc'
    let data_ = castFunPtrToPtr maybeFunc
    let destroy = safeFreeFunPtrPtr
    gtk_tree_view_set_row_separator_func _obj' maybeFunc data_ destroy
    touchManagedPtr _obj
    return ()

-- method TreeView::set_rubber_banding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_rubber_banding" gtk_tree_view_set_rubber_banding :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- enable : TBasicType TBoolean
    IO ()


treeViewSetRubberBanding ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enable
    m ()
treeViewSetRubberBanding _obj enable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enable' = (fromIntegral . fromEnum) enable
    gtk_tree_view_set_rubber_banding _obj' enable'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_rules_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_rules_hint" gtk_tree_view_set_rules_hint :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()

{-# DEPRECATED treeViewSetRulesHint ["(Since version 3.14)"]#-}
treeViewSetRulesHint ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
treeViewSetRulesHint _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_tree_view_set_rules_hint _obj' setting'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_search_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_search_column" gtk_tree_view_set_search_column :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


treeViewSetSearchColumn ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m ()
treeViewSetSearchColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_set_search_column _obj' column
    touchManagedPtr _obj
    return ()

-- method TreeView::set_search_entry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "entry", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "entry", argType = TInterface "Gtk" "Entry", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_search_entry" gtk_tree_view_set_search_entry :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr Entry ->                            -- entry : TInterface "Gtk" "Entry"
    IO ()


treeViewSetSearchEntry ::
    (MonadIO m, TreeViewK a, EntryK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- entry
    m ()
treeViewSetSearchEntry _obj entry = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeEntry <- case entry of
        Nothing -> return nullPtr
        Just jEntry -> do
            let jEntry' = unsafeManagedPtrCastPtr jEntry
            return jEntry'
    gtk_tree_view_set_search_entry _obj' maybeEntry
    touchManagedPtr _obj
    whenJust entry touchManagedPtr
    return ()

-- method TreeView::set_search_equal_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "search_equal_func", argType = TInterface "Gtk" "TreeViewSearchEqualFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "search_user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "search_destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "search_equal_func", argType = TInterface "Gtk" "TreeViewSearchEqualFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_search_equal_func" gtk_tree_view_set_search_equal_func :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    FunPtr TreeViewSearchEqualFuncC ->      -- search_equal_func : TInterface "Gtk" "TreeViewSearchEqualFunc"
    Ptr () ->                               -- search_user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- search_destroy : TInterface "GLib" "DestroyNotify"
    IO ()


treeViewSetSearchEqualFunc ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    TreeViewSearchEqualFunc ->              -- search_equal_func
    m ()
treeViewSetSearchEqualFunc _obj search_equal_func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    search_equal_func' <- mkTreeViewSearchEqualFunc (treeViewSearchEqualFuncWrapper Nothing search_equal_func)
    let search_user_data = castFunPtrToPtr search_equal_func'
    let search_destroy = safeFreeFunPtrPtr
    gtk_tree_view_set_search_equal_func _obj' search_equal_func' search_user_data search_destroy
    touchManagedPtr _obj
    return ()

-- method TreeView::set_search_position_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeViewSearchPositionFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeViewSearchPositionFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_search_position_func" gtk_tree_view_set_search_position_func :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    FunPtr TreeViewSearchPositionFuncC ->   -- func : TInterface "Gtk" "TreeViewSearchPositionFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


treeViewSetSearchPositionFunc ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Maybe (TreeViewSearchPositionFunc) ->   -- func
    m ()
treeViewSetSearchPositionFunc _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFunc <- case func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jFunc -> do
            jFunc' <- mkTreeViewSearchPositionFunc (treeViewSearchPositionFuncWrapper Nothing jFunc)
            return jFunc'
    let data_ = castFunPtrToPtr maybeFunc
    let destroy = safeFreeFunPtrPtr
    gtk_tree_view_set_search_position_func _obj' maybeFunc data_ destroy
    touchManagedPtr _obj
    return ()

-- method TreeView::set_show_expanders
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_show_expanders" gtk_tree_view_set_show_expanders :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


treeViewSetShowExpanders ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
treeViewSetShowExpanders _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    gtk_tree_view_set_show_expanders _obj' enabled'
    touchManagedPtr _obj
    return ()

-- method TreeView::set_tooltip_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_tooltip_cell" gtk_tree_view_set_tooltip_cell :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr Tooltip ->                          -- tooltip : TInterface "Gtk" "Tooltip"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    Ptr TreeViewColumn ->                   -- column : TInterface "Gtk" "TreeViewColumn"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    IO ()


treeViewSetTooltipCell ::
    (MonadIO m, TreeViewK a, TooltipK b, TreeViewColumnK c, CellRendererK d) =>
    a ->                                    -- _obj
    b ->                                    -- tooltip
    Maybe (TreePath) ->                     -- path
    Maybe (c) ->                            -- column
    Maybe (d) ->                            -- cell
    m ()
treeViewSetTooltipCell _obj tooltip path column cell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tooltip' = unsafeManagedPtrCastPtr tooltip
    maybePath <- case path of
        Nothing -> return nullPtr
        Just jPath -> do
            let jPath' = unsafeManagedPtrGetPtr jPath
            return jPath'
    maybeColumn <- case column of
        Nothing -> return nullPtr
        Just jColumn -> do
            let jColumn' = unsafeManagedPtrCastPtr jColumn
            return jColumn'
    maybeCell <- case cell of
        Nothing -> return nullPtr
        Just jCell -> do
            let jCell' = unsafeManagedPtrCastPtr jCell
            return jCell'
    gtk_tree_view_set_tooltip_cell _obj' tooltip' maybePath maybeColumn maybeCell
    touchManagedPtr _obj
    touchManagedPtr tooltip
    whenJust path touchManagedPtr
    whenJust column touchManagedPtr
    whenJust cell touchManagedPtr
    return ()

-- method TreeView::set_tooltip_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_tooltip_column" gtk_tree_view_set_tooltip_column :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


treeViewSetTooltipColumn ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m ()
treeViewSetTooltipColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_set_tooltip_column _obj' column
    touchManagedPtr _obj
    return ()

-- method TreeView::set_tooltip_row
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tooltip", argType = TInterface "Gtk" "Tooltip", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_tooltip_row" gtk_tree_view_set_tooltip_row :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr Tooltip ->                          -- tooltip : TInterface "Gtk" "Tooltip"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


treeViewSetTooltipRow ::
    (MonadIO m, TreeViewK a, TooltipK b) =>
    a ->                                    -- _obj
    b ->                                    -- tooltip
    TreePath ->                             -- path
    m ()
treeViewSetTooltipRow _obj tooltip path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tooltip' = unsafeManagedPtrCastPtr tooltip
    let path' = unsafeManagedPtrGetPtr path
    gtk_tree_view_set_tooltip_row _obj' tooltip' path'
    touchManagedPtr _obj
    touchManagedPtr tooltip
    touchManagedPtr path
    return ()

-- method TreeView::set_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_set_vadjustment" gtk_tree_view_set_vadjustment :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()

{-# DEPRECATED treeViewSetVadjustment ["(Since version 3.0)","Use gtk_scrollable_set_vadjustment()"]#-}
treeViewSetVadjustment ::
    (MonadIO m, TreeViewK a, AdjustmentK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- adjustment
    m ()
treeViewSetVadjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    gtk_tree_view_set_vadjustment _obj' maybeAdjustment
    touchManagedPtr _obj
    whenJust adjustment touchManagedPtr
    return ()

-- method TreeView::unset_rows_drag_dest
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_unset_rows_drag_dest" gtk_tree_view_unset_rows_drag_dest :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO ()


treeViewUnsetRowsDragDest ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m ()
treeViewUnsetRowsDragDest _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_unset_rows_drag_dest _obj'
    touchManagedPtr _obj
    return ()

-- method TreeView::unset_rows_drag_source
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_unset_rows_drag_source" gtk_tree_view_unset_rows_drag_source :: 
    Ptr TreeView ->                         -- _obj : TInterface "Gtk" "TreeView"
    IO ()


treeViewUnsetRowsDragSource ::
    (MonadIO m, TreeViewK a) =>
    a ->                                    -- _obj
    m ()
treeViewUnsetRowsDragSource _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_unset_rows_drag_source _obj'
    touchManagedPtr _obj
    return ()

-- signal TreeView::columns-changed
type TreeViewColumnsChangedCallback =
    IO ()

noTreeViewColumnsChangedCallback :: Maybe TreeViewColumnsChangedCallback
noTreeViewColumnsChangedCallback = Nothing

type TreeViewColumnsChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeViewColumnsChangedCallback :: TreeViewColumnsChangedCallbackC -> IO (FunPtr TreeViewColumnsChangedCallbackC)

treeViewColumnsChangedClosure :: TreeViewColumnsChangedCallback -> IO Closure
treeViewColumnsChangedClosure cb = newCClosure =<< mkTreeViewColumnsChangedCallback wrapped
    where wrapped = treeViewColumnsChangedCallbackWrapper cb

treeViewColumnsChangedCallbackWrapper ::
    TreeViewColumnsChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
treeViewColumnsChangedCallbackWrapper _cb _ _ = do
    _cb 

onTreeViewColumnsChanged :: (GObject a, MonadIO m) => a -> TreeViewColumnsChangedCallback -> m SignalHandlerId
onTreeViewColumnsChanged obj cb = liftIO $ connectTreeViewColumnsChanged obj cb SignalConnectBefore
afterTreeViewColumnsChanged :: (GObject a, MonadIO m) => a -> TreeViewColumnsChangedCallback -> m SignalHandlerId
afterTreeViewColumnsChanged obj cb = connectTreeViewColumnsChanged obj cb SignalConnectAfter

connectTreeViewColumnsChanged :: (GObject a, MonadIO m) =>
                                 a -> TreeViewColumnsChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewColumnsChanged obj cb after = liftIO $ do
    cb' <- mkTreeViewColumnsChangedCallback (treeViewColumnsChangedCallbackWrapper cb)
    connectSignalFunPtr obj "columns-changed" cb' after

-- signal TreeView::cursor-changed
type TreeViewCursorChangedCallback =
    IO ()

noTreeViewCursorChangedCallback :: Maybe TreeViewCursorChangedCallback
noTreeViewCursorChangedCallback = Nothing

type TreeViewCursorChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeViewCursorChangedCallback :: TreeViewCursorChangedCallbackC -> IO (FunPtr TreeViewCursorChangedCallbackC)

treeViewCursorChangedClosure :: TreeViewCursorChangedCallback -> IO Closure
treeViewCursorChangedClosure cb = newCClosure =<< mkTreeViewCursorChangedCallback wrapped
    where wrapped = treeViewCursorChangedCallbackWrapper cb

treeViewCursorChangedCallbackWrapper ::
    TreeViewCursorChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
treeViewCursorChangedCallbackWrapper _cb _ _ = do
    _cb 

onTreeViewCursorChanged :: (GObject a, MonadIO m) => a -> TreeViewCursorChangedCallback -> m SignalHandlerId
onTreeViewCursorChanged obj cb = liftIO $ connectTreeViewCursorChanged obj cb SignalConnectBefore
afterTreeViewCursorChanged :: (GObject a, MonadIO m) => a -> TreeViewCursorChangedCallback -> m SignalHandlerId
afterTreeViewCursorChanged obj cb = connectTreeViewCursorChanged obj cb SignalConnectAfter

connectTreeViewCursorChanged :: (GObject a, MonadIO m) =>
                                a -> TreeViewCursorChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewCursorChanged obj cb after = liftIO $ do
    cb' <- mkTreeViewCursorChangedCallback (treeViewCursorChangedCallbackWrapper cb)
    connectSignalFunPtr obj "cursor-changed" cb' after

-- signal TreeView::expand-collapse-cursor-row
type TreeViewExpandCollapseCursorRowCallback =
    Bool ->
    Bool ->
    Bool ->
    IO Bool

noTreeViewExpandCollapseCursorRowCallback :: Maybe TreeViewExpandCollapseCursorRowCallback
noTreeViewExpandCollapseCursorRowCallback = Nothing

type TreeViewExpandCollapseCursorRowCallbackC =
    Ptr () ->                               -- object
    CInt ->
    CInt ->
    CInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewExpandCollapseCursorRowCallback :: TreeViewExpandCollapseCursorRowCallbackC -> IO (FunPtr TreeViewExpandCollapseCursorRowCallbackC)

treeViewExpandCollapseCursorRowClosure :: TreeViewExpandCollapseCursorRowCallback -> IO Closure
treeViewExpandCollapseCursorRowClosure cb = newCClosure =<< mkTreeViewExpandCollapseCursorRowCallback wrapped
    where wrapped = treeViewExpandCollapseCursorRowCallbackWrapper cb

treeViewExpandCollapseCursorRowCallbackWrapper ::
    TreeViewExpandCollapseCursorRowCallback ->
    Ptr () ->
    CInt ->
    CInt ->
    CInt ->
    Ptr () ->
    IO CInt
treeViewExpandCollapseCursorRowCallbackWrapper _cb _ object p0 p1 _ = do
    let object' = (/= 0) object
    let p0' = (/= 0) p0
    let p1' = (/= 0) p1
    result <- _cb  object' p0' p1'
    let result' = (fromIntegral . fromEnum) result
    return result'

onTreeViewExpandCollapseCursorRow :: (GObject a, MonadIO m) => a -> TreeViewExpandCollapseCursorRowCallback -> m SignalHandlerId
onTreeViewExpandCollapseCursorRow obj cb = liftIO $ connectTreeViewExpandCollapseCursorRow obj cb SignalConnectBefore
afterTreeViewExpandCollapseCursorRow :: (GObject a, MonadIO m) => a -> TreeViewExpandCollapseCursorRowCallback -> m SignalHandlerId
afterTreeViewExpandCollapseCursorRow obj cb = connectTreeViewExpandCollapseCursorRow obj cb SignalConnectAfter

connectTreeViewExpandCollapseCursorRow :: (GObject a, MonadIO m) =>
                                          a -> TreeViewExpandCollapseCursorRowCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewExpandCollapseCursorRow obj cb after = liftIO $ do
    cb' <- mkTreeViewExpandCollapseCursorRowCallback (treeViewExpandCollapseCursorRowCallbackWrapper cb)
    connectSignalFunPtr obj "expand-collapse-cursor-row" cb' after

-- signal TreeView::move-cursor
type TreeViewMoveCursorCallback =
    MovementStep ->
    Int32 ->
    IO Bool

noTreeViewMoveCursorCallback :: Maybe TreeViewMoveCursorCallback
noTreeViewMoveCursorCallback = Nothing

type TreeViewMoveCursorCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewMoveCursorCallback :: TreeViewMoveCursorCallbackC -> IO (FunPtr TreeViewMoveCursorCallbackC)

treeViewMoveCursorClosure :: TreeViewMoveCursorCallback -> IO Closure
treeViewMoveCursorClosure cb = newCClosure =<< mkTreeViewMoveCursorCallback wrapped
    where wrapped = treeViewMoveCursorCallbackWrapper cb

treeViewMoveCursorCallbackWrapper ::
    TreeViewMoveCursorCallback ->
    Ptr () ->
    CUInt ->
    Int32 ->
    Ptr () ->
    IO CInt
treeViewMoveCursorCallbackWrapper _cb _ step direction _ = do
    let step' = (toEnum . fromIntegral) step
    result <- _cb  step' direction
    let result' = (fromIntegral . fromEnum) result
    return result'

onTreeViewMoveCursor :: (GObject a, MonadIO m) => a -> TreeViewMoveCursorCallback -> m SignalHandlerId
onTreeViewMoveCursor obj cb = liftIO $ connectTreeViewMoveCursor obj cb SignalConnectBefore
afterTreeViewMoveCursor :: (GObject a, MonadIO m) => a -> TreeViewMoveCursorCallback -> m SignalHandlerId
afterTreeViewMoveCursor obj cb = connectTreeViewMoveCursor obj cb SignalConnectAfter

connectTreeViewMoveCursor :: (GObject a, MonadIO m) =>
                             a -> TreeViewMoveCursorCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewMoveCursor obj cb after = liftIO $ do
    cb' <- mkTreeViewMoveCursorCallback (treeViewMoveCursorCallbackWrapper cb)
    connectSignalFunPtr obj "move-cursor" cb' after

-- signal TreeView::row-activated
type TreeViewRowActivatedCallback =
    TreePath ->
    TreeViewColumn ->
    IO ()

noTreeViewRowActivatedCallback :: Maybe TreeViewRowActivatedCallback
noTreeViewRowActivatedCallback = Nothing

type TreeViewRowActivatedCallbackC =
    Ptr () ->                               -- object
    Ptr TreePath ->
    Ptr TreeViewColumn ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeViewRowActivatedCallback :: TreeViewRowActivatedCallbackC -> IO (FunPtr TreeViewRowActivatedCallbackC)

treeViewRowActivatedClosure :: TreeViewRowActivatedCallback -> IO Closure
treeViewRowActivatedClosure cb = newCClosure =<< mkTreeViewRowActivatedCallback wrapped
    where wrapped = treeViewRowActivatedCallbackWrapper cb

treeViewRowActivatedCallbackWrapper ::
    TreeViewRowActivatedCallback ->
    Ptr () ->
    Ptr TreePath ->
    Ptr TreeViewColumn ->
    Ptr () ->
    IO ()
treeViewRowActivatedCallbackWrapper _cb _ path column _ = do
    path' <- (newBoxed TreePath) path
    column' <- (newObject TreeViewColumn) column
    _cb  path' column'

onTreeViewRowActivated :: (GObject a, MonadIO m) => a -> TreeViewRowActivatedCallback -> m SignalHandlerId
onTreeViewRowActivated obj cb = liftIO $ connectTreeViewRowActivated obj cb SignalConnectBefore
afterTreeViewRowActivated :: (GObject a, MonadIO m) => a -> TreeViewRowActivatedCallback -> m SignalHandlerId
afterTreeViewRowActivated obj cb = connectTreeViewRowActivated obj cb SignalConnectAfter

connectTreeViewRowActivated :: (GObject a, MonadIO m) =>
                               a -> TreeViewRowActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewRowActivated obj cb after = liftIO $ do
    cb' <- mkTreeViewRowActivatedCallback (treeViewRowActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "row-activated" cb' after

-- signal TreeView::row-collapsed
type TreeViewRowCollapsedCallback =
    TreeIter ->
    TreePath ->
    IO ()

noTreeViewRowCollapsedCallback :: Maybe TreeViewRowCollapsedCallback
noTreeViewRowCollapsedCallback = Nothing

type TreeViewRowCollapsedCallbackC =
    Ptr () ->                               -- object
    Ptr TreeIter ->
    Ptr TreePath ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeViewRowCollapsedCallback :: TreeViewRowCollapsedCallbackC -> IO (FunPtr TreeViewRowCollapsedCallbackC)

treeViewRowCollapsedClosure :: TreeViewRowCollapsedCallback -> IO Closure
treeViewRowCollapsedClosure cb = newCClosure =<< mkTreeViewRowCollapsedCallback wrapped
    where wrapped = treeViewRowCollapsedCallbackWrapper cb

treeViewRowCollapsedCallbackWrapper ::
    TreeViewRowCollapsedCallback ->
    Ptr () ->
    Ptr TreeIter ->
    Ptr TreePath ->
    Ptr () ->
    IO ()
treeViewRowCollapsedCallbackWrapper _cb _ iter path _ = do
    iter' <- (newBoxed TreeIter) iter
    path' <- (newBoxed TreePath) path
    _cb  iter' path'

onTreeViewRowCollapsed :: (GObject a, MonadIO m) => a -> TreeViewRowCollapsedCallback -> m SignalHandlerId
onTreeViewRowCollapsed obj cb = liftIO $ connectTreeViewRowCollapsed obj cb SignalConnectBefore
afterTreeViewRowCollapsed :: (GObject a, MonadIO m) => a -> TreeViewRowCollapsedCallback -> m SignalHandlerId
afterTreeViewRowCollapsed obj cb = connectTreeViewRowCollapsed obj cb SignalConnectAfter

connectTreeViewRowCollapsed :: (GObject a, MonadIO m) =>
                               a -> TreeViewRowCollapsedCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewRowCollapsed obj cb after = liftIO $ do
    cb' <- mkTreeViewRowCollapsedCallback (treeViewRowCollapsedCallbackWrapper cb)
    connectSignalFunPtr obj "row-collapsed" cb' after

-- signal TreeView::row-expanded
type TreeViewRowExpandedCallback =
    TreeIter ->
    TreePath ->
    IO ()

noTreeViewRowExpandedCallback :: Maybe TreeViewRowExpandedCallback
noTreeViewRowExpandedCallback = Nothing

type TreeViewRowExpandedCallbackC =
    Ptr () ->                               -- object
    Ptr TreeIter ->
    Ptr TreePath ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeViewRowExpandedCallback :: TreeViewRowExpandedCallbackC -> IO (FunPtr TreeViewRowExpandedCallbackC)

treeViewRowExpandedClosure :: TreeViewRowExpandedCallback -> IO Closure
treeViewRowExpandedClosure cb = newCClosure =<< mkTreeViewRowExpandedCallback wrapped
    where wrapped = treeViewRowExpandedCallbackWrapper cb

treeViewRowExpandedCallbackWrapper ::
    TreeViewRowExpandedCallback ->
    Ptr () ->
    Ptr TreeIter ->
    Ptr TreePath ->
    Ptr () ->
    IO ()
treeViewRowExpandedCallbackWrapper _cb _ iter path _ = do
    iter' <- (newBoxed TreeIter) iter
    path' <- (newBoxed TreePath) path
    _cb  iter' path'

onTreeViewRowExpanded :: (GObject a, MonadIO m) => a -> TreeViewRowExpandedCallback -> m SignalHandlerId
onTreeViewRowExpanded obj cb = liftIO $ connectTreeViewRowExpanded obj cb SignalConnectBefore
afterTreeViewRowExpanded :: (GObject a, MonadIO m) => a -> TreeViewRowExpandedCallback -> m SignalHandlerId
afterTreeViewRowExpanded obj cb = connectTreeViewRowExpanded obj cb SignalConnectAfter

connectTreeViewRowExpanded :: (GObject a, MonadIO m) =>
                              a -> TreeViewRowExpandedCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewRowExpanded obj cb after = liftIO $ do
    cb' <- mkTreeViewRowExpandedCallback (treeViewRowExpandedCallbackWrapper cb)
    connectSignalFunPtr obj "row-expanded" cb' after

-- signal TreeView::select-all
type TreeViewSelectAllCallback =
    IO Bool

noTreeViewSelectAllCallback :: Maybe TreeViewSelectAllCallback
noTreeViewSelectAllCallback = Nothing

type TreeViewSelectAllCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewSelectAllCallback :: TreeViewSelectAllCallbackC -> IO (FunPtr TreeViewSelectAllCallbackC)

treeViewSelectAllClosure :: TreeViewSelectAllCallback -> IO Closure
treeViewSelectAllClosure cb = newCClosure =<< mkTreeViewSelectAllCallback wrapped
    where wrapped = treeViewSelectAllCallbackWrapper cb

treeViewSelectAllCallbackWrapper ::
    TreeViewSelectAllCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
treeViewSelectAllCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onTreeViewSelectAll :: (GObject a, MonadIO m) => a -> TreeViewSelectAllCallback -> m SignalHandlerId
onTreeViewSelectAll obj cb = liftIO $ connectTreeViewSelectAll obj cb SignalConnectBefore
afterTreeViewSelectAll :: (GObject a, MonadIO m) => a -> TreeViewSelectAllCallback -> m SignalHandlerId
afterTreeViewSelectAll obj cb = connectTreeViewSelectAll obj cb SignalConnectAfter

connectTreeViewSelectAll :: (GObject a, MonadIO m) =>
                            a -> TreeViewSelectAllCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewSelectAll obj cb after = liftIO $ do
    cb' <- mkTreeViewSelectAllCallback (treeViewSelectAllCallbackWrapper cb)
    connectSignalFunPtr obj "select-all" cb' after

-- signal TreeView::select-cursor-parent
type TreeViewSelectCursorParentCallback =
    IO Bool

noTreeViewSelectCursorParentCallback :: Maybe TreeViewSelectCursorParentCallback
noTreeViewSelectCursorParentCallback = Nothing

type TreeViewSelectCursorParentCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewSelectCursorParentCallback :: TreeViewSelectCursorParentCallbackC -> IO (FunPtr TreeViewSelectCursorParentCallbackC)

treeViewSelectCursorParentClosure :: TreeViewSelectCursorParentCallback -> IO Closure
treeViewSelectCursorParentClosure cb = newCClosure =<< mkTreeViewSelectCursorParentCallback wrapped
    where wrapped = treeViewSelectCursorParentCallbackWrapper cb

treeViewSelectCursorParentCallbackWrapper ::
    TreeViewSelectCursorParentCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
treeViewSelectCursorParentCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onTreeViewSelectCursorParent :: (GObject a, MonadIO m) => a -> TreeViewSelectCursorParentCallback -> m SignalHandlerId
onTreeViewSelectCursorParent obj cb = liftIO $ connectTreeViewSelectCursorParent obj cb SignalConnectBefore
afterTreeViewSelectCursorParent :: (GObject a, MonadIO m) => a -> TreeViewSelectCursorParentCallback -> m SignalHandlerId
afterTreeViewSelectCursorParent obj cb = connectTreeViewSelectCursorParent obj cb SignalConnectAfter

connectTreeViewSelectCursorParent :: (GObject a, MonadIO m) =>
                                     a -> TreeViewSelectCursorParentCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewSelectCursorParent obj cb after = liftIO $ do
    cb' <- mkTreeViewSelectCursorParentCallback (treeViewSelectCursorParentCallbackWrapper cb)
    connectSignalFunPtr obj "select-cursor-parent" cb' after

-- signal TreeView::select-cursor-row
type TreeViewSelectCursorRowCallback =
    Bool ->
    IO Bool

noTreeViewSelectCursorRowCallback :: Maybe TreeViewSelectCursorRowCallback
noTreeViewSelectCursorRowCallback = Nothing

type TreeViewSelectCursorRowCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewSelectCursorRowCallback :: TreeViewSelectCursorRowCallbackC -> IO (FunPtr TreeViewSelectCursorRowCallbackC)

treeViewSelectCursorRowClosure :: TreeViewSelectCursorRowCallback -> IO Closure
treeViewSelectCursorRowClosure cb = newCClosure =<< mkTreeViewSelectCursorRowCallback wrapped
    where wrapped = treeViewSelectCursorRowCallbackWrapper cb

treeViewSelectCursorRowCallbackWrapper ::
    TreeViewSelectCursorRowCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO CInt
treeViewSelectCursorRowCallbackWrapper _cb _ object _ = do
    let object' = (/= 0) object
    result <- _cb  object'
    let result' = (fromIntegral . fromEnum) result
    return result'

onTreeViewSelectCursorRow :: (GObject a, MonadIO m) => a -> TreeViewSelectCursorRowCallback -> m SignalHandlerId
onTreeViewSelectCursorRow obj cb = liftIO $ connectTreeViewSelectCursorRow obj cb SignalConnectBefore
afterTreeViewSelectCursorRow :: (GObject a, MonadIO m) => a -> TreeViewSelectCursorRowCallback -> m SignalHandlerId
afterTreeViewSelectCursorRow obj cb = connectTreeViewSelectCursorRow obj cb SignalConnectAfter

connectTreeViewSelectCursorRow :: (GObject a, MonadIO m) =>
                                  a -> TreeViewSelectCursorRowCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewSelectCursorRow obj cb after = liftIO $ do
    cb' <- mkTreeViewSelectCursorRowCallback (treeViewSelectCursorRowCallbackWrapper cb)
    connectSignalFunPtr obj "select-cursor-row" cb' after

-- signal TreeView::start-interactive-search
type TreeViewStartInteractiveSearchCallback =
    IO Bool

noTreeViewStartInteractiveSearchCallback :: Maybe TreeViewStartInteractiveSearchCallback
noTreeViewStartInteractiveSearchCallback = Nothing

type TreeViewStartInteractiveSearchCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewStartInteractiveSearchCallback :: TreeViewStartInteractiveSearchCallbackC -> IO (FunPtr TreeViewStartInteractiveSearchCallbackC)

treeViewStartInteractiveSearchClosure :: TreeViewStartInteractiveSearchCallback -> IO Closure
treeViewStartInteractiveSearchClosure cb = newCClosure =<< mkTreeViewStartInteractiveSearchCallback wrapped
    where wrapped = treeViewStartInteractiveSearchCallbackWrapper cb

treeViewStartInteractiveSearchCallbackWrapper ::
    TreeViewStartInteractiveSearchCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
treeViewStartInteractiveSearchCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onTreeViewStartInteractiveSearch :: (GObject a, MonadIO m) => a -> TreeViewStartInteractiveSearchCallback -> m SignalHandlerId
onTreeViewStartInteractiveSearch obj cb = liftIO $ connectTreeViewStartInteractiveSearch obj cb SignalConnectBefore
afterTreeViewStartInteractiveSearch :: (GObject a, MonadIO m) => a -> TreeViewStartInteractiveSearchCallback -> m SignalHandlerId
afterTreeViewStartInteractiveSearch obj cb = connectTreeViewStartInteractiveSearch obj cb SignalConnectAfter

connectTreeViewStartInteractiveSearch :: (GObject a, MonadIO m) =>
                                         a -> TreeViewStartInteractiveSearchCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewStartInteractiveSearch obj cb after = liftIO $ do
    cb' <- mkTreeViewStartInteractiveSearchCallback (treeViewStartInteractiveSearchCallbackWrapper cb)
    connectSignalFunPtr obj "start-interactive-search" cb' after

-- signal TreeView::test-collapse-row
type TreeViewTestCollapseRowCallback =
    TreeIter ->
    TreePath ->
    IO Bool

noTreeViewTestCollapseRowCallback :: Maybe TreeViewTestCollapseRowCallback
noTreeViewTestCollapseRowCallback = Nothing

type TreeViewTestCollapseRowCallbackC =
    Ptr () ->                               -- object
    Ptr TreeIter ->
    Ptr TreePath ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewTestCollapseRowCallback :: TreeViewTestCollapseRowCallbackC -> IO (FunPtr TreeViewTestCollapseRowCallbackC)

treeViewTestCollapseRowClosure :: TreeViewTestCollapseRowCallback -> IO Closure
treeViewTestCollapseRowClosure cb = newCClosure =<< mkTreeViewTestCollapseRowCallback wrapped
    where wrapped = treeViewTestCollapseRowCallbackWrapper cb

treeViewTestCollapseRowCallbackWrapper ::
    TreeViewTestCollapseRowCallback ->
    Ptr () ->
    Ptr TreeIter ->
    Ptr TreePath ->
    Ptr () ->
    IO CInt
treeViewTestCollapseRowCallbackWrapper _cb _ iter path _ = do
    iter' <- (newBoxed TreeIter) iter
    path' <- (newBoxed TreePath) path
    result <- _cb  iter' path'
    let result' = (fromIntegral . fromEnum) result
    return result'

onTreeViewTestCollapseRow :: (GObject a, MonadIO m) => a -> TreeViewTestCollapseRowCallback -> m SignalHandlerId
onTreeViewTestCollapseRow obj cb = liftIO $ connectTreeViewTestCollapseRow obj cb SignalConnectBefore
afterTreeViewTestCollapseRow :: (GObject a, MonadIO m) => a -> TreeViewTestCollapseRowCallback -> m SignalHandlerId
afterTreeViewTestCollapseRow obj cb = connectTreeViewTestCollapseRow obj cb SignalConnectAfter

connectTreeViewTestCollapseRow :: (GObject a, MonadIO m) =>
                                  a -> TreeViewTestCollapseRowCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewTestCollapseRow obj cb after = liftIO $ do
    cb' <- mkTreeViewTestCollapseRowCallback (treeViewTestCollapseRowCallbackWrapper cb)
    connectSignalFunPtr obj "test-collapse-row" cb' after

-- signal TreeView::test-expand-row
type TreeViewTestExpandRowCallback =
    TreeIter ->
    TreePath ->
    IO Bool

noTreeViewTestExpandRowCallback :: Maybe TreeViewTestExpandRowCallback
noTreeViewTestExpandRowCallback = Nothing

type TreeViewTestExpandRowCallbackC =
    Ptr () ->                               -- object
    Ptr TreeIter ->
    Ptr TreePath ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewTestExpandRowCallback :: TreeViewTestExpandRowCallbackC -> IO (FunPtr TreeViewTestExpandRowCallbackC)

treeViewTestExpandRowClosure :: TreeViewTestExpandRowCallback -> IO Closure
treeViewTestExpandRowClosure cb = newCClosure =<< mkTreeViewTestExpandRowCallback wrapped
    where wrapped = treeViewTestExpandRowCallbackWrapper cb

treeViewTestExpandRowCallbackWrapper ::
    TreeViewTestExpandRowCallback ->
    Ptr () ->
    Ptr TreeIter ->
    Ptr TreePath ->
    Ptr () ->
    IO CInt
treeViewTestExpandRowCallbackWrapper _cb _ iter path _ = do
    iter' <- (newBoxed TreeIter) iter
    path' <- (newBoxed TreePath) path
    result <- _cb  iter' path'
    let result' = (fromIntegral . fromEnum) result
    return result'

onTreeViewTestExpandRow :: (GObject a, MonadIO m) => a -> TreeViewTestExpandRowCallback -> m SignalHandlerId
onTreeViewTestExpandRow obj cb = liftIO $ connectTreeViewTestExpandRow obj cb SignalConnectBefore
afterTreeViewTestExpandRow :: (GObject a, MonadIO m) => a -> TreeViewTestExpandRowCallback -> m SignalHandlerId
afterTreeViewTestExpandRow obj cb = connectTreeViewTestExpandRow obj cb SignalConnectAfter

connectTreeViewTestExpandRow :: (GObject a, MonadIO m) =>
                                a -> TreeViewTestExpandRowCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewTestExpandRow obj cb after = liftIO $ do
    cb' <- mkTreeViewTestExpandRowCallback (treeViewTestExpandRowCallbackWrapper cb)
    connectSignalFunPtr obj "test-expand-row" cb' after

-- signal TreeView::toggle-cursor-row
type TreeViewToggleCursorRowCallback =
    IO Bool

noTreeViewToggleCursorRowCallback :: Maybe TreeViewToggleCursorRowCallback
noTreeViewToggleCursorRowCallback = Nothing

type TreeViewToggleCursorRowCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewToggleCursorRowCallback :: TreeViewToggleCursorRowCallbackC -> IO (FunPtr TreeViewToggleCursorRowCallbackC)

treeViewToggleCursorRowClosure :: TreeViewToggleCursorRowCallback -> IO Closure
treeViewToggleCursorRowClosure cb = newCClosure =<< mkTreeViewToggleCursorRowCallback wrapped
    where wrapped = treeViewToggleCursorRowCallbackWrapper cb

treeViewToggleCursorRowCallbackWrapper ::
    TreeViewToggleCursorRowCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
treeViewToggleCursorRowCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onTreeViewToggleCursorRow :: (GObject a, MonadIO m) => a -> TreeViewToggleCursorRowCallback -> m SignalHandlerId
onTreeViewToggleCursorRow obj cb = liftIO $ connectTreeViewToggleCursorRow obj cb SignalConnectBefore
afterTreeViewToggleCursorRow :: (GObject a, MonadIO m) => a -> TreeViewToggleCursorRowCallback -> m SignalHandlerId
afterTreeViewToggleCursorRow obj cb = connectTreeViewToggleCursorRow obj cb SignalConnectAfter

connectTreeViewToggleCursorRow :: (GObject a, MonadIO m) =>
                                  a -> TreeViewToggleCursorRowCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewToggleCursorRow obj cb after = liftIO $ do
    cb' <- mkTreeViewToggleCursorRowCallback (treeViewToggleCursorRowCallbackWrapper cb)
    connectSignalFunPtr obj "toggle-cursor-row" cb' after

-- signal TreeView::unselect-all
type TreeViewUnselectAllCallback =
    IO Bool

noTreeViewUnselectAllCallback :: Maybe TreeViewUnselectAllCallback
noTreeViewUnselectAllCallback = Nothing

type TreeViewUnselectAllCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewUnselectAllCallback :: TreeViewUnselectAllCallbackC -> IO (FunPtr TreeViewUnselectAllCallbackC)

treeViewUnselectAllClosure :: TreeViewUnselectAllCallback -> IO Closure
treeViewUnselectAllClosure cb = newCClosure =<< mkTreeViewUnselectAllCallback wrapped
    where wrapped = treeViewUnselectAllCallbackWrapper cb

treeViewUnselectAllCallbackWrapper ::
    TreeViewUnselectAllCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
treeViewUnselectAllCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onTreeViewUnselectAll :: (GObject a, MonadIO m) => a -> TreeViewUnselectAllCallback -> m SignalHandlerId
onTreeViewUnselectAll obj cb = liftIO $ connectTreeViewUnselectAll obj cb SignalConnectBefore
afterTreeViewUnselectAll :: (GObject a, MonadIO m) => a -> TreeViewUnselectAllCallback -> m SignalHandlerId
afterTreeViewUnselectAll obj cb = connectTreeViewUnselectAll obj cb SignalConnectAfter

connectTreeViewUnselectAll :: (GObject a, MonadIO m) =>
                              a -> TreeViewUnselectAllCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewUnselectAll obj cb after = liftIO $ do
    cb' <- mkTreeViewUnselectAllCallback (treeViewUnselectAllCallbackWrapper cb)
    connectSignalFunPtr obj "unselect-all" cb' after

-- object TreeViewAccessible 
newtype TreeViewAccessible = TreeViewAccessible (ForeignPtr TreeViewAccessible)
noTreeViewAccessible :: Maybe TreeViewAccessible
noTreeViewAccessible = Nothing

foreign import ccall "gtk_tree_view_accessible_get_type"
    c_gtk_tree_view_accessible_get_type :: IO GType

type instance ParentTypes TreeViewAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Selection, Atk.Table, CellAccessibleParent]

instance GObject TreeViewAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_tree_view_accessible_get_type
    

class GObject o => TreeViewAccessibleK o
instance (GObject o, IsDescendantOf TreeViewAccessible o) => TreeViewAccessibleK o

toTreeViewAccessible :: TreeViewAccessibleK o => o -> IO TreeViewAccessible
toTreeViewAccessible = unsafeCastTo TreeViewAccessible

-- object TreeViewColumn 
newtype TreeViewColumn = TreeViewColumn (ForeignPtr TreeViewColumn)
noTreeViewColumn :: Maybe TreeViewColumn
noTreeViewColumn = Nothing

foreign import ccall "gtk_tree_view_column_get_type"
    c_gtk_tree_view_column_get_type :: IO GType

type instance ParentTypes TreeViewColumn = '[GObject.Object, Buildable, CellLayout]

instance GObject TreeViewColumn where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_tree_view_column_get_type
    

class GObject o => TreeViewColumnK o
instance (GObject o, IsDescendantOf TreeViewColumn o) => TreeViewColumnK o

toTreeViewColumn :: TreeViewColumnK o => o -> IO TreeViewColumn
toTreeViewColumn = unsafeCastTo TreeViewColumn

-- method TreeViewColumn::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TreeViewColumn"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_new" gtk_tree_view_column_new :: 
    IO (Ptr TreeViewColumn)


treeViewColumnNew ::
    (MonadIO m) =>
    m TreeViewColumn
treeViewColumnNew  = liftIO $ do
    result <- gtk_tree_view_column_new
    checkUnexpectedReturnNULL "gtk_tree_view_column_new" result
    result' <- (newObject TreeViewColumn) result
    return result'

-- method TreeViewColumn::new_with_area
-- method type : Constructor
-- Args : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "area", argType = TInterface "Gtk" "CellArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeViewColumn"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_new_with_area" gtk_tree_view_column_new_with_area :: 
    Ptr CellArea ->                         -- area : TInterface "Gtk" "CellArea"
    IO (Ptr TreeViewColumn)


treeViewColumnNewWithArea ::
    (MonadIO m, CellAreaK a) =>
    a ->                                    -- area
    m TreeViewColumn
treeViewColumnNewWithArea area = liftIO $ do
    let area' = unsafeManagedPtrCastPtr area
    result <- gtk_tree_view_column_new_with_area area'
    checkUnexpectedReturnNULL "gtk_tree_view_column_new_with_area" result
    result' <- (newObject TreeViewColumn) result
    touchManagedPtr area
    return result'

-- method TreeViewColumn::add_attribute
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_add_attribute" gtk_tree_view_column_add_attribute :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Ptr CellRenderer ->                     -- cell_renderer : TInterface "Gtk" "CellRenderer"
    CString ->                              -- attribute : TBasicType TUTF8
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


treeViewColumnAddAttribute ::
    (MonadIO m, TreeViewColumnK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell_renderer
    T.Text ->                               -- attribute
    Int32 ->                                -- column
    m ()
treeViewColumnAddAttribute _obj cell_renderer attribute column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell_renderer' = unsafeManagedPtrCastPtr cell_renderer
    attribute' <- textToCString attribute
    gtk_tree_view_column_add_attribute _obj' cell_renderer' attribute' column
    touchManagedPtr _obj
    touchManagedPtr cell_renderer
    freeMem attribute'
    return ()

-- method TreeViewColumn::cell_get_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_cell_get_position" gtk_tree_view_column_cell_get_position :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Ptr CellRenderer ->                     -- cell_renderer : TInterface "Gtk" "CellRenderer"
    Ptr Int32 ->                            -- x_offset : TBasicType TInt32
    Ptr Int32 ->                            -- width : TBasicType TInt32
    IO CInt


treeViewColumnCellGetPosition ::
    (MonadIO m, TreeViewColumnK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell_renderer
    m (Bool,Int32,Int32)
treeViewColumnCellGetPosition _obj cell_renderer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell_renderer' = unsafeManagedPtrCastPtr cell_renderer
    x_offset <- allocMem :: IO (Ptr Int32)
    width <- allocMem :: IO (Ptr Int32)
    result <- gtk_tree_view_column_cell_get_position _obj' cell_renderer' x_offset width
    let result' = (/= 0) result
    x_offset' <- peek x_offset
    width' <- peek width
    touchManagedPtr _obj
    touchManagedPtr cell_renderer
    freeMem x_offset
    freeMem width
    return (result', x_offset', width')

-- method TreeViewColumn::cell_get_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_cell_get_size" gtk_tree_view_column_cell_get_size :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Ptr Gdk.Rectangle ->                    -- cell_area : TInterface "Gdk" "Rectangle"
    Ptr Int32 ->                            -- x_offset : TBasicType TInt32
    Ptr Int32 ->                            -- y_offset : TBasicType TInt32
    Ptr Int32 ->                            -- width : TBasicType TInt32
    Ptr Int32 ->                            -- height : TBasicType TInt32
    IO ()


treeViewColumnCellGetSize ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Maybe (Gdk.Rectangle) ->                -- cell_area
    m (Int32,Int32,Int32,Int32)
treeViewColumnCellGetSize _obj cell_area = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCell_area <- case cell_area of
        Nothing -> return nullPtr
        Just jCell_area -> do
            let jCell_area' = unsafeManagedPtrGetPtr jCell_area
            return jCell_area'
    x_offset <- allocMem :: IO (Ptr Int32)
    y_offset <- allocMem :: IO (Ptr Int32)
    width <- allocMem :: IO (Ptr Int32)
    height <- allocMem :: IO (Ptr Int32)
    gtk_tree_view_column_cell_get_size _obj' maybeCell_area x_offset y_offset width height
    x_offset' <- peek x_offset
    y_offset' <- peek y_offset
    width' <- peek width
    height' <- peek height
    touchManagedPtr _obj
    whenJust cell_area touchManagedPtr
    freeMem x_offset
    freeMem y_offset
    freeMem width
    freeMem height
    return (x_offset', y_offset', width', height')

-- method TreeViewColumn::cell_is_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_cell_is_visible" gtk_tree_view_column_cell_is_visible :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO CInt


treeViewColumnCellIsVisible ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Bool
treeViewColumnCellIsVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_cell_is_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::cell_set_cell_data
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tree_model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_expander", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_expanded", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tree_model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_expander", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_expanded", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_cell_set_cell_data" gtk_tree_view_column_cell_set_cell_data :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Ptr TreeModel ->                        -- tree_model : TInterface "Gtk" "TreeModel"
    Ptr TreeIter ->                         -- iter : TInterface "Gtk" "TreeIter"
    CInt ->                                 -- is_expander : TBasicType TBoolean
    CInt ->                                 -- is_expanded : TBasicType TBoolean
    IO ()


treeViewColumnCellSetCellData ::
    (MonadIO m, TreeViewColumnK a, TreeModelK b) =>
    a ->                                    -- _obj
    b ->                                    -- tree_model
    TreeIter ->                             -- iter
    Bool ->                                 -- is_expander
    Bool ->                                 -- is_expanded
    m ()
treeViewColumnCellSetCellData _obj tree_model iter is_expander is_expanded = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let tree_model' = unsafeManagedPtrCastPtr tree_model
    let iter' = unsafeManagedPtrGetPtr iter
    let is_expander' = (fromIntegral . fromEnum) is_expander
    let is_expanded' = (fromIntegral . fromEnum) is_expanded
    gtk_tree_view_column_cell_set_cell_data _obj' tree_model' iter' is_expander' is_expanded'
    touchManagedPtr _obj
    touchManagedPtr tree_model
    touchManagedPtr iter
    return ()

-- method TreeViewColumn::clear
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_clear" gtk_tree_view_column_clear :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO ()


treeViewColumnClear ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m ()
treeViewColumnClear _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_column_clear _obj'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::clear_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_clear_attributes" gtk_tree_view_column_clear_attributes :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Ptr CellRenderer ->                     -- cell_renderer : TInterface "Gtk" "CellRenderer"
    IO ()


treeViewColumnClearAttributes ::
    (MonadIO m, TreeViewColumnK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell_renderer
    m ()
treeViewColumnClearAttributes _obj cell_renderer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell_renderer' = unsafeManagedPtrCastPtr cell_renderer
    gtk_tree_view_column_clear_attributes _obj' cell_renderer'
    touchManagedPtr _obj
    touchManagedPtr cell_renderer
    return ()

-- method TreeViewColumn::clicked
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_clicked" gtk_tree_view_column_clicked :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO ()


treeViewColumnClicked ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m ()
treeViewColumnClicked _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_column_clicked _obj'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::focus_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_focus_cell" gtk_tree_view_column_focus_cell :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    IO ()


treeViewColumnFocusCell ::
    (MonadIO m, TreeViewColumnK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    m ()
treeViewColumnFocusCell _obj cell = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    gtk_tree_view_column_focus_cell _obj' cell'
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- method TreeViewColumn::get_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFloat
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_alignment" gtk_tree_view_column_get_alignment :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO CFloat


treeViewColumnGetAlignment ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Float
treeViewColumnGetAlignment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_alignment _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_button
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_button" gtk_tree_view_column_get_button :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO (Ptr Widget)


treeViewColumnGetButton ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Widget
treeViewColumnGetButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_button _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_column_get_button" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_clickable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_clickable" gtk_tree_view_column_get_clickable :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO CInt


treeViewColumnGetClickable ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Bool
treeViewColumnGetClickable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_clickable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_expand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_expand" gtk_tree_view_column_get_expand :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO CInt


treeViewColumnGetExpand ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Bool
treeViewColumnGetExpand _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_expand _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_fixed_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_fixed_width" gtk_tree_view_column_get_fixed_width :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO Int32


treeViewColumnGetFixedWidth ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Int32
treeViewColumnGetFixedWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_fixed_width _obj'
    touchManagedPtr _obj
    return result

-- method TreeViewColumn::get_max_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_max_width" gtk_tree_view_column_get_max_width :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO Int32


treeViewColumnGetMaxWidth ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Int32
treeViewColumnGetMaxWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_max_width _obj'
    touchManagedPtr _obj
    return result

-- method TreeViewColumn::get_min_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_min_width" gtk_tree_view_column_get_min_width :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO Int32


treeViewColumnGetMinWidth ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Int32
treeViewColumnGetMinWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_min_width _obj'
    touchManagedPtr _obj
    return result

-- method TreeViewColumn::get_reorderable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_reorderable" gtk_tree_view_column_get_reorderable :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO CInt


treeViewColumnGetReorderable ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Bool
treeViewColumnGetReorderable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_reorderable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_resizable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_resizable" gtk_tree_view_column_get_resizable :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO CInt


treeViewColumnGetResizable ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Bool
treeViewColumnGetResizable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_resizable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_sizing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeViewColumnSizing"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_sizing" gtk_tree_view_column_get_sizing :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO CUInt


treeViewColumnGetSizing ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m TreeViewColumnSizing
treeViewColumnGetSizing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_sizing _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_sort_column_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_sort_column_id" gtk_tree_view_column_get_sort_column_id :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO Int32


treeViewColumnGetSortColumnId ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Int32
treeViewColumnGetSortColumnId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_sort_column_id _obj'
    touchManagedPtr _obj
    return result

-- method TreeViewColumn::get_sort_indicator
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_sort_indicator" gtk_tree_view_column_get_sort_indicator :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO CInt


treeViewColumnGetSortIndicator ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Bool
treeViewColumnGetSortIndicator _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_sort_indicator _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_sort_order
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SortType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_sort_order" gtk_tree_view_column_get_sort_order :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO CUInt


treeViewColumnGetSortOrder ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m SortType
treeViewColumnGetSortOrder _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_sort_order _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_spacing" gtk_tree_view_column_get_spacing :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO Int32


treeViewColumnGetSpacing ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Int32
treeViewColumnGetSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_spacing _obj'
    touchManagedPtr _obj
    return result

-- method TreeViewColumn::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_title" gtk_tree_view_column_get_title :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO CString


treeViewColumnGetTitle ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m T.Text
treeViewColumnGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_title _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_column_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_tree_view
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_tree_view" gtk_tree_view_column_get_tree_view :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO (Ptr Widget)


treeViewColumnGetTreeView ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Widget
treeViewColumnGetTreeView _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_tree_view _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_column_get_tree_view" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_visible" gtk_tree_view_column_get_visible :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO CInt


treeViewColumnGetVisible ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Bool
treeViewColumnGetVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_widget" gtk_tree_view_column_get_widget :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO (Ptr Widget)


treeViewColumnGetWidget ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Widget
treeViewColumnGetWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_widget _obj'
    checkUnexpectedReturnNULL "gtk_tree_view_column_get_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method TreeViewColumn::get_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_width" gtk_tree_view_column_get_width :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO Int32


treeViewColumnGetWidth ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Int32
treeViewColumnGetWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_width _obj'
    touchManagedPtr _obj
    return result

-- method TreeViewColumn::get_x_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_get_x_offset" gtk_tree_view_column_get_x_offset :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO Int32


treeViewColumnGetXOffset ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m Int32
treeViewColumnGetXOffset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_view_column_get_x_offset _obj'
    touchManagedPtr _obj
    return result

-- method TreeViewColumn::pack_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_pack_end" gtk_tree_view_column_pack_end :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()


treeViewColumnPackEnd ::
    (MonadIO m, TreeViewColumnK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    Bool ->                                 -- expand
    m ()
treeViewColumnPackEnd _obj cell expand = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    let expand' = (fromIntegral . fromEnum) expand
    gtk_tree_view_column_pack_end _obj' cell' expand'
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- method TreeViewColumn::pack_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_pack_start" gtk_tree_view_column_pack_start :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Ptr CellRenderer ->                     -- cell : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()


treeViewColumnPackStart ::
    (MonadIO m, TreeViewColumnK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell
    Bool ->                                 -- expand
    m ()
treeViewColumnPackStart _obj cell expand = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell' = unsafeManagedPtrCastPtr cell
    let expand' = (fromIntegral . fromEnum) expand
    gtk_tree_view_column_pack_start _obj' cell' expand'
    touchManagedPtr _obj
    touchManagedPtr cell
    return ()

-- method TreeViewColumn::queue_resize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_queue_resize" gtk_tree_view_column_queue_resize :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    IO ()


treeViewColumnQueueResize ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    m ()
treeViewColumnQueueResize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_column_queue_resize _obj'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xalign", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_alignment" gtk_tree_view_column_set_alignment :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    CFloat ->                               -- xalign : TBasicType TFloat
    IO ()


treeViewColumnSetAlignment ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Float ->                                -- xalign
    m ()
treeViewColumnSetAlignment _obj xalign = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let xalign' = realToFrac xalign
    gtk_tree_view_column_set_alignment _obj' xalign'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_cell_data_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeCellDataFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing},Arg {argName = "func_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cell_renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeCellDataFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_cell_data_func" gtk_tree_view_column_set_cell_data_func :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Ptr CellRenderer ->                     -- cell_renderer : TInterface "Gtk" "CellRenderer"
    FunPtr TreeCellDataFuncC ->             -- func : TInterface "Gtk" "TreeCellDataFunc"
    Ptr () ->                               -- func_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


treeViewColumnSetCellDataFunc ::
    (MonadIO m, TreeViewColumnK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- cell_renderer
    Maybe (TreeCellDataFunc) ->             -- func
    m ()
treeViewColumnSetCellDataFunc _obj cell_renderer func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cell_renderer' = unsafeManagedPtrCastPtr cell_renderer
    maybeFunc <- case func of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jFunc -> do
            jFunc' <- mkTreeCellDataFunc (treeCellDataFuncWrapper Nothing jFunc)
            return jFunc'
    let func_data = castFunPtrToPtr maybeFunc
    let destroy = safeFreeFunPtrPtr
    gtk_tree_view_column_set_cell_data_func _obj' cell_renderer' maybeFunc func_data destroy
    touchManagedPtr _obj
    touchManagedPtr cell_renderer
    return ()

-- method TreeViewColumn::set_clickable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clickable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clickable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_clickable" gtk_tree_view_column_set_clickable :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    CInt ->                                 -- clickable : TBasicType TBoolean
    IO ()


treeViewColumnSetClickable ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- clickable
    m ()
treeViewColumnSetClickable _obj clickable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let clickable' = (fromIntegral . fromEnum) clickable
    gtk_tree_view_column_set_clickable _obj' clickable'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_expand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_expand" gtk_tree_view_column_set_expand :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()


treeViewColumnSetExpand ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- expand
    m ()
treeViewColumnSetExpand _obj expand = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let expand' = (fromIntegral . fromEnum) expand
    gtk_tree_view_column_set_expand _obj' expand'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_fixed_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_fixed_width" gtk_tree_view_column_set_fixed_width :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Int32 ->                                -- fixed_width : TBasicType TInt32
    IO ()


treeViewColumnSetFixedWidth ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- fixed_width
    m ()
treeViewColumnSetFixedWidth _obj fixed_width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_column_set_fixed_width _obj' fixed_width
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_max_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_max_width" gtk_tree_view_column_set_max_width :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Int32 ->                                -- max_width : TBasicType TInt32
    IO ()


treeViewColumnSetMaxWidth ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- max_width
    m ()
treeViewColumnSetMaxWidth _obj max_width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_column_set_max_width _obj' max_width
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_min_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "min_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_min_width" gtk_tree_view_column_set_min_width :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Int32 ->                                -- min_width : TBasicType TInt32
    IO ()


treeViewColumnSetMinWidth ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- min_width
    m ()
treeViewColumnSetMinWidth _obj min_width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_column_set_min_width _obj' min_width
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_reorderable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reorderable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "reorderable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_reorderable" gtk_tree_view_column_set_reorderable :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    CInt ->                                 -- reorderable : TBasicType TBoolean
    IO ()


treeViewColumnSetReorderable ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- reorderable
    m ()
treeViewColumnSetReorderable _obj reorderable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let reorderable' = (fromIntegral . fromEnum) reorderable
    gtk_tree_view_column_set_reorderable _obj' reorderable'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_resizable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resizable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resizable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_resizable" gtk_tree_view_column_set_resizable :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    CInt ->                                 -- resizable : TBasicType TBoolean
    IO ()


treeViewColumnSetResizable ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- resizable
    m ()
treeViewColumnSetResizable _obj resizable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let resizable' = (fromIntegral . fromEnum) resizable
    gtk_tree_view_column_set_resizable _obj' resizable'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_sizing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "TreeViewColumnSizing", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "TreeViewColumnSizing", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_sizing" gtk_tree_view_column_set_sizing :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    CUInt ->                                -- type : TInterface "Gtk" "TreeViewColumnSizing"
    IO ()


treeViewColumnSetSizing ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    TreeViewColumnSizing ->                 -- type
    m ()
treeViewColumnSetSizing _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    gtk_tree_view_column_set_sizing _obj' type_'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_sort_column_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_column_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sort_column_id", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_sort_column_id" gtk_tree_view_column_set_sort_column_id :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Int32 ->                                -- sort_column_id : TBasicType TInt32
    IO ()


treeViewColumnSetSortColumnId ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- sort_column_id
    m ()
treeViewColumnSetSortColumnId _obj sort_column_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_column_set_sort_column_id _obj' sort_column_id
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_sort_indicator
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_sort_indicator" gtk_tree_view_column_set_sort_indicator :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


treeViewColumnSetSortIndicator ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
treeViewColumnSetSortIndicator _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_tree_view_column_set_sort_indicator _obj' setting'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_sort_order
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "order", argType = TInterface "Gtk" "SortType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "order", argType = TInterface "Gtk" "SortType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_sort_order" gtk_tree_view_column_set_sort_order :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    CUInt ->                                -- order : TInterface "Gtk" "SortType"
    IO ()


treeViewColumnSetSortOrder ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    SortType ->                             -- order
    m ()
treeViewColumnSetSortOrder _obj order = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let order' = (fromIntegral . fromEnum) order
    gtk_tree_view_column_set_sort_order _obj' order'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_spacing
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_spacing" gtk_tree_view_column_set_spacing :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Int32 ->                                -- spacing : TBasicType TInt32
    IO ()


treeViewColumnSetSpacing ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- spacing
    m ()
treeViewColumnSetSpacing _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_view_column_set_spacing _obj' spacing
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_title" gtk_tree_view_column_set_title :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    CString ->                              -- title : TBasicType TUTF8
    IO ()


treeViewColumnSetTitle ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- title
    m ()
treeViewColumnSetTitle _obj title = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    title' <- textToCString title
    gtk_tree_view_column_set_title _obj' title'
    touchManagedPtr _obj
    freeMem title'
    return ()

-- method TreeViewColumn::set_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_visible" gtk_tree_view_column_set_visible :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    CInt ->                                 -- visible : TBasicType TBoolean
    IO ()


treeViewColumnSetVisible ::
    (MonadIO m, TreeViewColumnK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible
    m ()
treeViewColumnSetVisible _obj visible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible' = (fromIntegral . fromEnum) visible
    gtk_tree_view_column_set_visible _obj' visible'
    touchManagedPtr _obj
    return ()

-- method TreeViewColumn::set_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeViewColumn", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_view_column_set_widget" gtk_tree_view_column_set_widget :: 
    Ptr TreeViewColumn ->                   -- _obj : TInterface "Gtk" "TreeViewColumn"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


treeViewColumnSetWidget ::
    (MonadIO m, TreeViewColumnK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- widget
    m ()
treeViewColumnSetWidget _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    gtk_tree_view_column_set_widget _obj' maybeWidget
    touchManagedPtr _obj
    whenJust widget touchManagedPtr
    return ()

-- signal TreeViewColumn::clicked
type TreeViewColumnClickedCallback =
    IO ()

noTreeViewColumnClickedCallback :: Maybe TreeViewColumnClickedCallback
noTreeViewColumnClickedCallback = Nothing

type TreeViewColumnClickedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTreeViewColumnClickedCallback :: TreeViewColumnClickedCallbackC -> IO (FunPtr TreeViewColumnClickedCallbackC)

treeViewColumnClickedClosure :: TreeViewColumnClickedCallback -> IO Closure
treeViewColumnClickedClosure cb = newCClosure =<< mkTreeViewColumnClickedCallback wrapped
    where wrapped = treeViewColumnClickedCallbackWrapper cb

treeViewColumnClickedCallbackWrapper ::
    TreeViewColumnClickedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
treeViewColumnClickedCallbackWrapper _cb _ _ = do
    _cb 

onTreeViewColumnClicked :: (GObject a, MonadIO m) => a -> TreeViewColumnClickedCallback -> m SignalHandlerId
onTreeViewColumnClicked obj cb = liftIO $ connectTreeViewColumnClicked obj cb SignalConnectBefore
afterTreeViewColumnClicked :: (GObject a, MonadIO m) => a -> TreeViewColumnClickedCallback -> m SignalHandlerId
afterTreeViewColumnClicked obj cb = connectTreeViewColumnClicked obj cb SignalConnectAfter

connectTreeViewColumnClicked :: (GObject a, MonadIO m) =>
                                a -> TreeViewColumnClickedCallback -> SignalConnectMode -> m SignalHandlerId
connectTreeViewColumnClicked obj cb after = liftIO $ do
    cb' <- mkTreeViewColumnClickedCallback (treeViewColumnClickedCallbackWrapper cb)
    connectSignalFunPtr obj "clicked" cb' after

-- callback TreeViewColumnDropFunc
treeViewColumnDropFuncClosure :: TreeViewColumnDropFunc -> IO Closure
treeViewColumnDropFuncClosure cb = newCClosure =<< mkTreeViewColumnDropFunc wrapped
    where wrapped = treeViewColumnDropFuncWrapper Nothing cb

type TreeViewColumnDropFuncC =
    Ptr TreeView ->
    Ptr TreeViewColumn ->
    Ptr TreeViewColumn ->
    Ptr TreeViewColumn ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewColumnDropFunc :: TreeViewColumnDropFuncC -> IO (FunPtr TreeViewColumnDropFuncC)

type TreeViewColumnDropFunc =
    TreeView ->
    TreeViewColumn ->
    TreeViewColumn ->
    TreeViewColumn ->
    IO Bool

noTreeViewColumnDropFunc :: Maybe TreeViewColumnDropFunc
noTreeViewColumnDropFunc = Nothing

treeViewColumnDropFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeViewColumnDropFuncC))) ->
    TreeViewColumnDropFunc ->
    Ptr TreeView ->
    Ptr TreeViewColumn ->
    Ptr TreeViewColumn ->
    Ptr TreeViewColumn ->
    Ptr () ->
    IO CInt
treeViewColumnDropFuncWrapper funptrptr _cb tree_view column prev_column next_column _ = do
    tree_view' <- (newObject TreeView) tree_view
    column' <- (newObject TreeViewColumn) column
    prev_column' <- (newObject TreeViewColumn) prev_column
    next_column' <- (newObject TreeViewColumn) next_column
    result <- _cb  tree_view' column' prev_column' next_column'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- Enum TreeViewColumnSizing

data TreeViewColumnSizing = 
      TreeViewColumnSizingGrowOnly
    | TreeViewColumnSizingAutosize
    | TreeViewColumnSizingFixed
    | AnotherTreeViewColumnSizing Int
    deriving (Show, Eq)

instance Enum TreeViewColumnSizing where
    fromEnum TreeViewColumnSizingGrowOnly = 0
    fromEnum TreeViewColumnSizingAutosize = 1
    fromEnum TreeViewColumnSizingFixed = 2
    fromEnum (AnotherTreeViewColumnSizing k) = k

    toEnum 0 = TreeViewColumnSizingGrowOnly
    toEnum 1 = TreeViewColumnSizingAutosize
    toEnum 2 = TreeViewColumnSizingFixed
    toEnum k = AnotherTreeViewColumnSizing k

foreign import ccall "gtk_tree_view_column_sizing_get_type" c_gtk_tree_view_column_sizing_get_type :: 
    IO GType

instance BoxedEnum TreeViewColumnSizing where
    boxedEnumType _ = c_gtk_tree_view_column_sizing_get_type

-- Enum TreeViewDropPosition

data TreeViewDropPosition = 
      TreeViewDropPositionBefore
    | TreeViewDropPositionAfter
    | TreeViewDropPositionIntoOrBefore
    | TreeViewDropPositionIntoOrAfter
    | AnotherTreeViewDropPosition Int
    deriving (Show, Eq)

instance Enum TreeViewDropPosition where
    fromEnum TreeViewDropPositionBefore = 0
    fromEnum TreeViewDropPositionAfter = 1
    fromEnum TreeViewDropPositionIntoOrBefore = 2
    fromEnum TreeViewDropPositionIntoOrAfter = 3
    fromEnum (AnotherTreeViewDropPosition k) = k

    toEnum 0 = TreeViewDropPositionBefore
    toEnum 1 = TreeViewDropPositionAfter
    toEnum 2 = TreeViewDropPositionIntoOrBefore
    toEnum 3 = TreeViewDropPositionIntoOrAfter
    toEnum k = AnotherTreeViewDropPosition k

foreign import ccall "gtk_tree_view_drop_position_get_type" c_gtk_tree_view_drop_position_get_type :: 
    IO GType

instance BoxedEnum TreeViewDropPosition where
    boxedEnumType _ = c_gtk_tree_view_drop_position_get_type

-- Enum TreeViewGridLines

data TreeViewGridLines = 
      TreeViewGridLinesNone
    | TreeViewGridLinesHorizontal
    | TreeViewGridLinesVertical
    | TreeViewGridLinesBoth
    | AnotherTreeViewGridLines Int
    deriving (Show, Eq)

instance Enum TreeViewGridLines where
    fromEnum TreeViewGridLinesNone = 0
    fromEnum TreeViewGridLinesHorizontal = 1
    fromEnum TreeViewGridLinesVertical = 2
    fromEnum TreeViewGridLinesBoth = 3
    fromEnum (AnotherTreeViewGridLines k) = k

    toEnum 0 = TreeViewGridLinesNone
    toEnum 1 = TreeViewGridLinesHorizontal
    toEnum 2 = TreeViewGridLinesVertical
    toEnum 3 = TreeViewGridLinesBoth
    toEnum k = AnotherTreeViewGridLines k

foreign import ccall "gtk_tree_view_grid_lines_get_type" c_gtk_tree_view_grid_lines_get_type :: 
    IO GType

instance BoxedEnum TreeViewGridLines where
    boxedEnumType _ = c_gtk_tree_view_grid_lines_get_type

-- callback TreeViewMappingFunc
treeViewMappingFuncClosure :: TreeViewMappingFunc -> IO Closure
treeViewMappingFuncClosure cb = newCClosure =<< mkTreeViewMappingFunc wrapped
    where wrapped = treeViewMappingFuncWrapper Nothing cb

type TreeViewMappingFuncC =
    Ptr TreeView ->
    Ptr TreePath ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkTreeViewMappingFunc :: TreeViewMappingFuncC -> IO (FunPtr TreeViewMappingFuncC)

type TreeViewMappingFunc =
    TreeView ->
    TreePath ->
    IO ()

noTreeViewMappingFunc :: Maybe TreeViewMappingFunc
noTreeViewMappingFunc = Nothing

treeViewMappingFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeViewMappingFuncC))) ->
    TreeViewMappingFunc ->
    Ptr TreeView ->
    Ptr TreePath ->
    Ptr () ->
    IO ()
treeViewMappingFuncWrapper funptrptr _cb tree_view path _ = do
    tree_view' <- (newObject TreeView) tree_view
    path' <- (newBoxed TreePath) path
    _cb  tree_view' path'
    maybeReleaseFunPtr funptrptr

-- callback TreeViewRowSeparatorFunc
treeViewRowSeparatorFuncClosure :: TreeViewRowSeparatorFunc -> IO Closure
treeViewRowSeparatorFuncClosure cb = newCClosure =<< mkTreeViewRowSeparatorFunc wrapped
    where wrapped = treeViewRowSeparatorFuncWrapper Nothing cb

type TreeViewRowSeparatorFuncC =
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewRowSeparatorFunc :: TreeViewRowSeparatorFuncC -> IO (FunPtr TreeViewRowSeparatorFuncC)

type TreeViewRowSeparatorFunc =
    TreeModel ->
    TreeIter ->
    IO Bool

noTreeViewRowSeparatorFunc :: Maybe TreeViewRowSeparatorFunc
noTreeViewRowSeparatorFunc = Nothing

treeViewRowSeparatorFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeViewRowSeparatorFuncC))) ->
    TreeViewRowSeparatorFunc ->
    Ptr TreeModel ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt
treeViewRowSeparatorFuncWrapper funptrptr _cb model iter _ = do
    model' <- (newObject TreeModel) model
    iter' <- (newBoxed TreeIter) iter
    result <- _cb  model' iter'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- callback TreeViewSearchEqualFunc
treeViewSearchEqualFuncClosure :: TreeViewSearchEqualFunc -> IO Closure
treeViewSearchEqualFuncClosure cb = newCClosure =<< mkTreeViewSearchEqualFunc wrapped
    where wrapped = treeViewSearchEqualFuncWrapper Nothing cb

type TreeViewSearchEqualFuncC =
    Ptr TreeModel ->
    Int32 ->
    CString ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkTreeViewSearchEqualFunc :: TreeViewSearchEqualFuncC -> IO (FunPtr TreeViewSearchEqualFuncC)

type TreeViewSearchEqualFunc =
    TreeModel ->
    Int32 ->
    T.Text ->
    TreeIter ->
    IO Bool

noTreeViewSearchEqualFunc :: Maybe TreeViewSearchEqualFunc
noTreeViewSearchEqualFunc = Nothing

treeViewSearchEqualFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeViewSearchEqualFuncC))) ->
    TreeViewSearchEqualFunc ->
    Ptr TreeModel ->
    Int32 ->
    CString ->
    Ptr TreeIter ->
    Ptr () ->
    IO CInt
treeViewSearchEqualFuncWrapper funptrptr _cb model column key iter _ = do
    model' <- (newObject TreeModel) model
    key' <- cstringToText key
    iter' <- (newBoxed TreeIter) iter
    result <- _cb  model' column key' iter'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- callback TreeViewSearchPositionFunc
treeViewSearchPositionFuncClosure :: TreeViewSearchPositionFunc -> IO Closure
treeViewSearchPositionFuncClosure cb = newCClosure =<< mkTreeViewSearchPositionFunc wrapped
    where wrapped = treeViewSearchPositionFuncWrapper Nothing cb

type TreeViewSearchPositionFuncC =
    Ptr TreeView ->
    Ptr Widget ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkTreeViewSearchPositionFunc :: TreeViewSearchPositionFuncC -> IO (FunPtr TreeViewSearchPositionFuncC)

type TreeViewSearchPositionFunc =
    TreeView ->
    Widget ->
    IO ()

noTreeViewSearchPositionFunc :: Maybe TreeViewSearchPositionFunc
noTreeViewSearchPositionFunc = Nothing

treeViewSearchPositionFuncWrapper ::
    Maybe (Ptr (FunPtr (TreeViewSearchPositionFuncC))) ->
    TreeViewSearchPositionFunc ->
    Ptr TreeView ->
    Ptr Widget ->
    Ptr () ->
    IO ()
treeViewSearchPositionFuncWrapper funptrptr _cb tree_view search_dialog _ = do
    tree_view' <- (newObject TreeView) tree_view
    search_dialog' <- (newObject Widget) search_dialog
    _cb  tree_view' search_dialog'
    maybeReleaseFunPtr funptrptr

-- object UIManager 
newtype UIManager = UIManager (ForeignPtr UIManager)
noUIManager :: Maybe UIManager
noUIManager = Nothing

foreign import ccall "gtk_ui_manager_get_type"
    c_gtk_ui_manager_get_type :: IO GType

type instance ParentTypes UIManager = '[GObject.Object, Buildable]

instance GObject UIManager where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_ui_manager_get_type
    

class GObject o => UIManagerK o
instance (GObject o, IsDescendantOf UIManager o) => UIManagerK o

toUIManager :: UIManagerK o => o -> IO UIManager
toUIManager = unsafeCastTo UIManager

-- method UIManager::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "UIManager"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_new" gtk_ui_manager_new :: 
    IO (Ptr UIManager)

{-# DEPRECATED uIManagerNew ["(Since version 3.10)"]#-}
uIManagerNew ::
    (MonadIO m) =>
    m UIManager
uIManagerNew  = liftIO $ do
    result <- gtk_ui_manager_new
    checkUnexpectedReturnNULL "gtk_ui_manager_new" result
    result' <- (wrapObject UIManager) result
    return result'

-- method UIManager::add_ui
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "merge_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "UIManagerItemType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "merge_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "UIManagerItemType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "top", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_add_ui" gtk_ui_manager_add_ui :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    Word32 ->                               -- merge_id : TBasicType TUInt32
    CString ->                              -- path : TBasicType TUTF8
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- action : TBasicType TUTF8
    CUInt ->                                -- type : TInterface "Gtk" "UIManagerItemType"
    CInt ->                                 -- top : TBasicType TBoolean
    IO ()

{-# DEPRECATED uIManagerAddUi ["(Since version 3.10)"]#-}
uIManagerAddUi ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- merge_id
    T.Text ->                               -- path
    T.Text ->                               -- name
    Maybe (T.Text) ->                       -- action
    [UIManagerItemType] ->                  -- type
    Bool ->                                 -- top
    m ()
uIManagerAddUi _obj merge_id path name action type_ top = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path' <- textToCString path
    name' <- textToCString name
    maybeAction <- case action of
        Nothing -> return nullPtr
        Just jAction -> do
            jAction' <- textToCString jAction
            return jAction'
    let type_' = gflagsToWord type_
    let top' = (fromIntegral . fromEnum) top
    gtk_ui_manager_add_ui _obj' merge_id path' name' maybeAction type_' top'
    touchManagedPtr _obj
    freeMem path'
    freeMem name'
    freeMem maybeAction
    return ()

-- method UIManager::add_ui_from_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : True
-- Skip return : False

foreign import ccall "gtk_ui_manager_add_ui_from_file" gtk_ui_manager_add_ui_from_file :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    CString ->                              -- filename : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO Word32

{-# DEPRECATED uIManagerAddUiFromFile ["(Since version 3.10)"]#-}
uIManagerAddUiFromFile ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- filename
    m Word32
uIManagerAddUiFromFile _obj filename = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filename' <- stringToCString filename
    onException (do
        result <- propagateGError $ gtk_ui_manager_add_ui_from_file _obj' filename'
        touchManagedPtr _obj
        freeMem filename'
        return result
     ) (do
        freeMem filename'
     )

-- method UIManager::add_ui_from_resource
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : True
-- Skip return : False

foreign import ccall "gtk_ui_manager_add_ui_from_resource" gtk_ui_manager_add_ui_from_resource :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    CString ->                              -- resource_path : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO Word32

{-# DEPRECATED uIManagerAddUiFromResource ["(Since version 3.10)"]#-}
uIManagerAddUiFromResource ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- resource_path
    m Word32
uIManagerAddUiFromResource _obj resource_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    resource_path' <- textToCString resource_path
    onException (do
        result <- propagateGError $ gtk_ui_manager_add_ui_from_resource _obj' resource_path'
        touchManagedPtr _obj
        freeMem resource_path'
        return result
     ) (do
        freeMem resource_path'
     )

-- method UIManager::add_ui_from_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : True
-- Skip return : False

foreign import ccall "gtk_ui_manager_add_ui_from_string" gtk_ui_manager_add_ui_from_string :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    CString ->                              -- buffer : TBasicType TUTF8
    Int64 ->                                -- length : TBasicType TInt64
    Ptr (Ptr GError) ->                     -- error
    IO Word32

{-# DEPRECATED uIManagerAddUiFromString ["(Since version 3.10)"]#-}
uIManagerAddUiFromString ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- buffer
    Int64 ->                                -- length
    m Word32
uIManagerAddUiFromString _obj buffer length_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    buffer' <- textToCString buffer
    onException (do
        result <- propagateGError $ gtk_ui_manager_add_ui_from_string _obj' buffer' length_
        touchManagedPtr _obj
        freeMem buffer'
        return result
     ) (do
        freeMem buffer'
     )

-- method UIManager::ensure_update
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_ensure_update" gtk_ui_manager_ensure_update :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    IO ()

{-# DEPRECATED uIManagerEnsureUpdate ["(Since version 3.10)"]#-}
uIManagerEnsureUpdate ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    m ()
uIManagerEnsureUpdate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_ui_manager_ensure_update _obj'
    touchManagedPtr _obj
    return ()

-- method UIManager::get_accel_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "AccelGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_get_accel_group" gtk_ui_manager_get_accel_group :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    IO (Ptr AccelGroup)

{-# DEPRECATED uIManagerGetAccelGroup ["(Since version 3.10)"]#-}
uIManagerGetAccelGroup ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    m AccelGroup
uIManagerGetAccelGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_ui_manager_get_accel_group _obj'
    checkUnexpectedReturnNULL "gtk_ui_manager_get_accel_group" result
    result' <- (newObject AccelGroup) result
    touchManagedPtr _obj
    return result'

-- method UIManager::get_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Action"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_get_action" gtk_ui_manager_get_action :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    CString ->                              -- path : TBasicType TUTF8
    IO (Ptr Action)

{-# DEPRECATED uIManagerGetAction ["(Since version 3.10)"]#-}
uIManagerGetAction ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- path
    m Action
uIManagerGetAction _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path' <- textToCString path
    result <- gtk_ui_manager_get_action _obj' path'
    checkUnexpectedReturnNULL "gtk_ui_manager_get_action" result
    result' <- (newObject Action) result
    touchManagedPtr _obj
    freeMem path'
    return result'

-- method UIManager::get_action_groups
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "ActionGroup")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_get_action_groups" gtk_ui_manager_get_action_groups :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    IO (Ptr (GList (Ptr ActionGroup)))

{-# DEPRECATED uIManagerGetActionGroups ["(Since version 3.10)"]#-}
uIManagerGetActionGroups ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    m [ActionGroup]
uIManagerGetActionGroups _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_ui_manager_get_action_groups _obj'
    checkUnexpectedReturnNULL "gtk_ui_manager_get_action_groups" result
    result' <- unpackGList result
    result'' <- mapM (newObject ActionGroup) result'
    touchManagedPtr _obj
    return result''

-- method UIManager::get_add_tearoffs
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_get_add_tearoffs" gtk_ui_manager_get_add_tearoffs :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    IO CInt

{-# DEPRECATED uIManagerGetAddTearoffs ["(Since version 3.4)","Tearoff menus are deprecated and should not","    be used in newly written code."]#-}
uIManagerGetAddTearoffs ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    m Bool
uIManagerGetAddTearoffs _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_ui_manager_get_add_tearoffs _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method UIManager::get_toplevels
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TInterface "Gtk" "UIManagerItemType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TInterface "Gtk" "UIManagerItemType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "Widget")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_get_toplevels" gtk_ui_manager_get_toplevels :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    CUInt ->                                -- types : TInterface "Gtk" "UIManagerItemType"
    IO (Ptr (GSList (Ptr Widget)))

{-# DEPRECATED uIManagerGetToplevels ["(Since version 3.10)"]#-}
uIManagerGetToplevels ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    [UIManagerItemType] ->                  -- types
    m [Widget]
uIManagerGetToplevels _obj types = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let types' = gflagsToWord types
    result <- gtk_ui_manager_get_toplevels _obj' types'
    checkUnexpectedReturnNULL "gtk_ui_manager_get_toplevels" result
    result' <- unpackGSList result
    result'' <- mapM (newObject Widget) result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method UIManager::get_ui
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_get_ui" gtk_ui_manager_get_ui :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    IO CString

{-# DEPRECATED uIManagerGetUi ["(Since version 3.10)"]#-}
uIManagerGetUi ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    m T.Text
uIManagerGetUi _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_ui_manager_get_ui _obj'
    checkUnexpectedReturnNULL "gtk_ui_manager_get_ui" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method UIManager::get_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_get_widget" gtk_ui_manager_get_widget :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    CString ->                              -- path : TBasicType TUTF8
    IO (Ptr Widget)

{-# DEPRECATED uIManagerGetWidget ["(Since version 3.10)"]#-}
uIManagerGetWidget ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- path
    m Widget
uIManagerGetWidget _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path' <- textToCString path
    result <- gtk_ui_manager_get_widget _obj' path'
    checkUnexpectedReturnNULL "gtk_ui_manager_get_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    freeMem path'
    return result'

-- method UIManager::insert_action_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_group", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_group", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_insert_action_group" gtk_ui_manager_insert_action_group :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    Ptr ActionGroup ->                      -- action_group : TInterface "Gtk" "ActionGroup"
    Int32 ->                                -- pos : TBasicType TInt32
    IO ()

{-# DEPRECATED uIManagerInsertActionGroup ["(Since version 3.10)"]#-}
uIManagerInsertActionGroup ::
    (MonadIO m, UIManagerK a, ActionGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- action_group
    Int32 ->                                -- pos
    m ()
uIManagerInsertActionGroup _obj action_group pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action_group' = unsafeManagedPtrCastPtr action_group
    gtk_ui_manager_insert_action_group _obj' action_group' pos
    touchManagedPtr _obj
    touchManagedPtr action_group
    return ()

-- method UIManager::new_merge_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_new_merge_id" gtk_ui_manager_new_merge_id :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    IO Word32

{-# DEPRECATED uIManagerNewMergeId ["(Since version 3.10)"]#-}
uIManagerNewMergeId ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    m Word32
uIManagerNewMergeId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_ui_manager_new_merge_id _obj'
    touchManagedPtr _obj
    return result

-- method UIManager::remove_action_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_group", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_group", argType = TInterface "Gtk" "ActionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_remove_action_group" gtk_ui_manager_remove_action_group :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    Ptr ActionGroup ->                      -- action_group : TInterface "Gtk" "ActionGroup"
    IO ()

{-# DEPRECATED uIManagerRemoveActionGroup ["(Since version 3.10)"]#-}
uIManagerRemoveActionGroup ::
    (MonadIO m, UIManagerK a, ActionGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- action_group
    m ()
uIManagerRemoveActionGroup _obj action_group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let action_group' = unsafeManagedPtrCastPtr action_group
    gtk_ui_manager_remove_action_group _obj' action_group'
    touchManagedPtr _obj
    touchManagedPtr action_group
    return ()

-- method UIManager::remove_ui
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "merge_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "merge_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_remove_ui" gtk_ui_manager_remove_ui :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    Word32 ->                               -- merge_id : TBasicType TUInt32
    IO ()

{-# DEPRECATED uIManagerRemoveUi ["(Since version 3.10)"]#-}
uIManagerRemoveUi ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- merge_id
    m ()
uIManagerRemoveUi _obj merge_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_ui_manager_remove_ui _obj' merge_id
    touchManagedPtr _obj
    return ()

-- method UIManager::set_add_tearoffs
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "add_tearoffs", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "UIManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "add_tearoffs", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_ui_manager_set_add_tearoffs" gtk_ui_manager_set_add_tearoffs :: 
    Ptr UIManager ->                        -- _obj : TInterface "Gtk" "UIManager"
    CInt ->                                 -- add_tearoffs : TBasicType TBoolean
    IO ()

{-# DEPRECATED uIManagerSetAddTearoffs ["(Since version 3.4)","Tearoff menus are deprecated and should not","    be used in newly written code."]#-}
uIManagerSetAddTearoffs ::
    (MonadIO m, UIManagerK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- add_tearoffs
    m ()
uIManagerSetAddTearoffs _obj add_tearoffs = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let add_tearoffs' = (fromIntegral . fromEnum) add_tearoffs
    gtk_ui_manager_set_add_tearoffs _obj' add_tearoffs'
    touchManagedPtr _obj
    return ()

-- signal UIManager::actions-changed
type UIManagerActionsChangedCallback =
    IO ()

noUIManagerActionsChangedCallback :: Maybe UIManagerActionsChangedCallback
noUIManagerActionsChangedCallback = Nothing

type UIManagerActionsChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkUIManagerActionsChangedCallback :: UIManagerActionsChangedCallbackC -> IO (FunPtr UIManagerActionsChangedCallbackC)

uIManagerActionsChangedClosure :: UIManagerActionsChangedCallback -> IO Closure
uIManagerActionsChangedClosure cb = newCClosure =<< mkUIManagerActionsChangedCallback wrapped
    where wrapped = uIManagerActionsChangedCallbackWrapper cb

uIManagerActionsChangedCallbackWrapper ::
    UIManagerActionsChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
uIManagerActionsChangedCallbackWrapper _cb _ _ = do
    _cb 

onUIManagerActionsChanged :: (GObject a, MonadIO m) => a -> UIManagerActionsChangedCallback -> m SignalHandlerId
onUIManagerActionsChanged obj cb = liftIO $ connectUIManagerActionsChanged obj cb SignalConnectBefore
afterUIManagerActionsChanged :: (GObject a, MonadIO m) => a -> UIManagerActionsChangedCallback -> m SignalHandlerId
afterUIManagerActionsChanged obj cb = connectUIManagerActionsChanged obj cb SignalConnectAfter

connectUIManagerActionsChanged :: (GObject a, MonadIO m) =>
                                  a -> UIManagerActionsChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectUIManagerActionsChanged obj cb after = liftIO $ do
    cb' <- mkUIManagerActionsChangedCallback (uIManagerActionsChangedCallbackWrapper cb)
    connectSignalFunPtr obj "actions-changed" cb' after

-- signal UIManager::add-widget
type UIManagerAddWidgetCallback =
    Widget ->
    IO ()

noUIManagerAddWidgetCallback :: Maybe UIManagerAddWidgetCallback
noUIManagerAddWidgetCallback = Nothing

type UIManagerAddWidgetCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkUIManagerAddWidgetCallback :: UIManagerAddWidgetCallbackC -> IO (FunPtr UIManagerAddWidgetCallbackC)

uIManagerAddWidgetClosure :: UIManagerAddWidgetCallback -> IO Closure
uIManagerAddWidgetClosure cb = newCClosure =<< mkUIManagerAddWidgetCallback wrapped
    where wrapped = uIManagerAddWidgetCallbackWrapper cb

uIManagerAddWidgetCallbackWrapper ::
    UIManagerAddWidgetCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
uIManagerAddWidgetCallbackWrapper _cb _ widget _ = do
    widget' <- (newObject Widget) widget
    _cb  widget'

onUIManagerAddWidget :: (GObject a, MonadIO m) => a -> UIManagerAddWidgetCallback -> m SignalHandlerId
onUIManagerAddWidget obj cb = liftIO $ connectUIManagerAddWidget obj cb SignalConnectBefore
afterUIManagerAddWidget :: (GObject a, MonadIO m) => a -> UIManagerAddWidgetCallback -> m SignalHandlerId
afterUIManagerAddWidget obj cb = connectUIManagerAddWidget obj cb SignalConnectAfter

connectUIManagerAddWidget :: (GObject a, MonadIO m) =>
                             a -> UIManagerAddWidgetCallback -> SignalConnectMode -> m SignalHandlerId
connectUIManagerAddWidget obj cb after = liftIO $ do
    cb' <- mkUIManagerAddWidgetCallback (uIManagerAddWidgetCallbackWrapper cb)
    connectSignalFunPtr obj "add-widget" cb' after

-- signal UIManager::connect-proxy
type UIManagerConnectProxyCallback =
    Action ->
    Widget ->
    IO ()

noUIManagerConnectProxyCallback :: Maybe UIManagerConnectProxyCallback
noUIManagerConnectProxyCallback = Nothing

type UIManagerConnectProxyCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkUIManagerConnectProxyCallback :: UIManagerConnectProxyCallbackC -> IO (FunPtr UIManagerConnectProxyCallbackC)

uIManagerConnectProxyClosure :: UIManagerConnectProxyCallback -> IO Closure
uIManagerConnectProxyClosure cb = newCClosure =<< mkUIManagerConnectProxyCallback wrapped
    where wrapped = uIManagerConnectProxyCallbackWrapper cb

uIManagerConnectProxyCallbackWrapper ::
    UIManagerConnectProxyCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->
    IO ()
uIManagerConnectProxyCallbackWrapper _cb _ action proxy _ = do
    action' <- (newObject Action) action
    proxy' <- (newObject Widget) proxy
    _cb  action' proxy'

onUIManagerConnectProxy :: (GObject a, MonadIO m) => a -> UIManagerConnectProxyCallback -> m SignalHandlerId
onUIManagerConnectProxy obj cb = liftIO $ connectUIManagerConnectProxy obj cb SignalConnectBefore
afterUIManagerConnectProxy :: (GObject a, MonadIO m) => a -> UIManagerConnectProxyCallback -> m SignalHandlerId
afterUIManagerConnectProxy obj cb = connectUIManagerConnectProxy obj cb SignalConnectAfter

connectUIManagerConnectProxy :: (GObject a, MonadIO m) =>
                                a -> UIManagerConnectProxyCallback -> SignalConnectMode -> m SignalHandlerId
connectUIManagerConnectProxy obj cb after = liftIO $ do
    cb' <- mkUIManagerConnectProxyCallback (uIManagerConnectProxyCallbackWrapper cb)
    connectSignalFunPtr obj "connect-proxy" cb' after

-- signal UIManager::disconnect-proxy
type UIManagerDisconnectProxyCallback =
    Action ->
    Widget ->
    IO ()

noUIManagerDisconnectProxyCallback :: Maybe UIManagerDisconnectProxyCallback
noUIManagerDisconnectProxyCallback = Nothing

type UIManagerDisconnectProxyCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkUIManagerDisconnectProxyCallback :: UIManagerDisconnectProxyCallbackC -> IO (FunPtr UIManagerDisconnectProxyCallbackC)

uIManagerDisconnectProxyClosure :: UIManagerDisconnectProxyCallback -> IO Closure
uIManagerDisconnectProxyClosure cb = newCClosure =<< mkUIManagerDisconnectProxyCallback wrapped
    where wrapped = uIManagerDisconnectProxyCallbackWrapper cb

uIManagerDisconnectProxyCallbackWrapper ::
    UIManagerDisconnectProxyCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr Widget ->
    Ptr () ->
    IO ()
uIManagerDisconnectProxyCallbackWrapper _cb _ action proxy _ = do
    action' <- (newObject Action) action
    proxy' <- (newObject Widget) proxy
    _cb  action' proxy'

onUIManagerDisconnectProxy :: (GObject a, MonadIO m) => a -> UIManagerDisconnectProxyCallback -> m SignalHandlerId
onUIManagerDisconnectProxy obj cb = liftIO $ connectUIManagerDisconnectProxy obj cb SignalConnectBefore
afterUIManagerDisconnectProxy :: (GObject a, MonadIO m) => a -> UIManagerDisconnectProxyCallback -> m SignalHandlerId
afterUIManagerDisconnectProxy obj cb = connectUIManagerDisconnectProxy obj cb SignalConnectAfter

connectUIManagerDisconnectProxy :: (GObject a, MonadIO m) =>
                                   a -> UIManagerDisconnectProxyCallback -> SignalConnectMode -> m SignalHandlerId
connectUIManagerDisconnectProxy obj cb after = liftIO $ do
    cb' <- mkUIManagerDisconnectProxyCallback (uIManagerDisconnectProxyCallbackWrapper cb)
    connectSignalFunPtr obj "disconnect-proxy" cb' after

-- signal UIManager::post-activate
type UIManagerPostActivateCallback =
    Action ->
    IO ()

noUIManagerPostActivateCallback :: Maybe UIManagerPostActivateCallback
noUIManagerPostActivateCallback = Nothing

type UIManagerPostActivateCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkUIManagerPostActivateCallback :: UIManagerPostActivateCallbackC -> IO (FunPtr UIManagerPostActivateCallbackC)

uIManagerPostActivateClosure :: UIManagerPostActivateCallback -> IO Closure
uIManagerPostActivateClosure cb = newCClosure =<< mkUIManagerPostActivateCallback wrapped
    where wrapped = uIManagerPostActivateCallbackWrapper cb

uIManagerPostActivateCallbackWrapper ::
    UIManagerPostActivateCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr () ->
    IO ()
uIManagerPostActivateCallbackWrapper _cb _ action _ = do
    action' <- (newObject Action) action
    _cb  action'

onUIManagerPostActivate :: (GObject a, MonadIO m) => a -> UIManagerPostActivateCallback -> m SignalHandlerId
onUIManagerPostActivate obj cb = liftIO $ connectUIManagerPostActivate obj cb SignalConnectBefore
afterUIManagerPostActivate :: (GObject a, MonadIO m) => a -> UIManagerPostActivateCallback -> m SignalHandlerId
afterUIManagerPostActivate obj cb = connectUIManagerPostActivate obj cb SignalConnectAfter

connectUIManagerPostActivate :: (GObject a, MonadIO m) =>
                                a -> UIManagerPostActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectUIManagerPostActivate obj cb after = liftIO $ do
    cb' <- mkUIManagerPostActivateCallback (uIManagerPostActivateCallbackWrapper cb)
    connectSignalFunPtr obj "post-activate" cb' after

-- signal UIManager::pre-activate
type UIManagerPreActivateCallback =
    Action ->
    IO ()

noUIManagerPreActivateCallback :: Maybe UIManagerPreActivateCallback
noUIManagerPreActivateCallback = Nothing

type UIManagerPreActivateCallbackC =
    Ptr () ->                               -- object
    Ptr Action ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkUIManagerPreActivateCallback :: UIManagerPreActivateCallbackC -> IO (FunPtr UIManagerPreActivateCallbackC)

uIManagerPreActivateClosure :: UIManagerPreActivateCallback -> IO Closure
uIManagerPreActivateClosure cb = newCClosure =<< mkUIManagerPreActivateCallback wrapped
    where wrapped = uIManagerPreActivateCallbackWrapper cb

uIManagerPreActivateCallbackWrapper ::
    UIManagerPreActivateCallback ->
    Ptr () ->
    Ptr Action ->
    Ptr () ->
    IO ()
uIManagerPreActivateCallbackWrapper _cb _ action _ = do
    action' <- (newObject Action) action
    _cb  action'

onUIManagerPreActivate :: (GObject a, MonadIO m) => a -> UIManagerPreActivateCallback -> m SignalHandlerId
onUIManagerPreActivate obj cb = liftIO $ connectUIManagerPreActivate obj cb SignalConnectBefore
afterUIManagerPreActivate :: (GObject a, MonadIO m) => a -> UIManagerPreActivateCallback -> m SignalHandlerId
afterUIManagerPreActivate obj cb = connectUIManagerPreActivate obj cb SignalConnectAfter

connectUIManagerPreActivate :: (GObject a, MonadIO m) =>
                               a -> UIManagerPreActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectUIManagerPreActivate obj cb after = liftIO $ do
    cb' <- mkUIManagerPreActivateCallback (uIManagerPreActivateCallbackWrapper cb)
    connectSignalFunPtr obj "pre-activate" cb' after

-- Flags UIManagerItemType
{-# DEPRECATED UIManagerItemType ["(Since version 3.10)"]#-}
data UIManagerItemType = 
      UIManagerItemTypeAuto
    | UIManagerItemTypeMenubar
    | UIManagerItemTypeMenu
    | UIManagerItemTypeToolbar
    | UIManagerItemTypePlaceholder
    | UIManagerItemTypePopup
    | UIManagerItemTypeMenuitem
    | UIManagerItemTypeToolitem
    | UIManagerItemTypeSeparator
    | UIManagerItemTypeAccelerator
    | UIManagerItemTypePopupWithAccels
    | AnotherUIManagerItemType Int
    deriving (Show, Eq)

instance Enum UIManagerItemType where
    fromEnum UIManagerItemTypeAuto = 0
    fromEnum UIManagerItemTypeMenubar = 1
    fromEnum UIManagerItemTypeMenu = 2
    fromEnum UIManagerItemTypeToolbar = 4
    fromEnum UIManagerItemTypePlaceholder = 8
    fromEnum UIManagerItemTypePopup = 16
    fromEnum UIManagerItemTypeMenuitem = 32
    fromEnum UIManagerItemTypeToolitem = 64
    fromEnum UIManagerItemTypeSeparator = 128
    fromEnum UIManagerItemTypeAccelerator = 256
    fromEnum UIManagerItemTypePopupWithAccels = 512
    fromEnum (AnotherUIManagerItemType k) = k

    toEnum 0 = UIManagerItemTypeAuto
    toEnum 1 = UIManagerItemTypeMenubar
    toEnum 2 = UIManagerItemTypeMenu
    toEnum 4 = UIManagerItemTypeToolbar
    toEnum 8 = UIManagerItemTypePlaceholder
    toEnum 16 = UIManagerItemTypePopup
    toEnum 32 = UIManagerItemTypeMenuitem
    toEnum 64 = UIManagerItemTypeToolitem
    toEnum 128 = UIManagerItemTypeSeparator
    toEnum 256 = UIManagerItemTypeAccelerator
    toEnum 512 = UIManagerItemTypePopupWithAccels
    toEnum k = AnotherUIManagerItemType k

foreign import ccall "gtk_ui_manager_item_type_get_type" c_gtk_ui_manager_item_type_get_type :: 
    IO GType

instance BoxedEnum UIManagerItemType where
    boxedEnumType _ = c_gtk_ui_manager_item_type_get_type

instance IsGFlag UIManagerItemType

-- Enum Unit

data Unit = 
      UnitNone
    | UnitPoints
    | UnitInch
    | UnitMm
    | AnotherUnit Int
    deriving (Show, Eq)

instance Enum Unit where
    fromEnum UnitNone = 0
    fromEnum UnitPoints = 1
    fromEnum UnitInch = 2
    fromEnum UnitMm = 3
    fromEnum (AnotherUnit k) = k

    toEnum 0 = UnitNone
    toEnum 1 = UnitPoints
    toEnum 2 = UnitInch
    toEnum 3 = UnitMm
    toEnum k = AnotherUnit k

foreign import ccall "gtk_unit_get_type" c_gtk_unit_get_type :: 
    IO GType

instance BoxedEnum Unit where
    boxedEnumType _ = c_gtk_unit_get_type

-- object VBox 
newtype VBox = VBox (ForeignPtr VBox)
noVBox :: Maybe VBox
noVBox = Nothing

foreign import ccall "gtk_vbox_get_type"
    c_gtk_vbox_get_type :: IO GType

type instance ParentTypes VBox = '[Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject VBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_vbox_get_type
    

class GObject o => VBoxK o
instance (GObject o, IsDescendantOf VBox o) => VBoxK o

toVBox :: VBoxK o => o -> IO VBox
toVBox = unsafeCastTo VBox

-- method VBox::new
-- method type : Constructor
-- Args : [Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "homogeneous", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "spacing", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "VBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_vbox_new" gtk_vbox_new :: 
    CInt ->                                 -- homogeneous : TBasicType TBoolean
    Int32 ->                                -- spacing : TBasicType TInt32
    IO (Ptr VBox)

{-# DEPRECATED vBoxNew ["(Since version 3.2)","You can use gtk_box_new() with %GTK_ORIENTATION_VERTICAL instead,","  which is a quick and easy change. But the recommendation is to switch to","  #GtkGrid, since #GtkBox is going to go away eventually.","  See [Migrating from other containers to GtkGrid][gtk-migrating-GtkGrid]."]#-}
vBoxNew ::
    (MonadIO m) =>
    Bool ->                                 -- homogeneous
    Int32 ->                                -- spacing
    m VBox
vBoxNew homogeneous spacing = liftIO $ do
    let homogeneous' = (fromIntegral . fromEnum) homogeneous
    result <- gtk_vbox_new homogeneous' spacing
    checkUnexpectedReturnNULL "gtk_vbox_new" result
    result' <- (newObject VBox) result
    return result'

-- object VButtonBox 
newtype VButtonBox = VButtonBox (ForeignPtr VButtonBox)
noVButtonBox :: Maybe VButtonBox
noVButtonBox = Nothing

foreign import ccall "gtk_vbutton_box_get_type"
    c_gtk_vbutton_box_get_type :: IO GType

type instance ParentTypes VButtonBox = '[ButtonBox, Box, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject VButtonBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_vbutton_box_get_type
    

class GObject o => VButtonBoxK o
instance (GObject o, IsDescendantOf VButtonBox o) => VButtonBoxK o

toVButtonBox :: VButtonBoxK o => o -> IO VButtonBox
toVButtonBox = unsafeCastTo VButtonBox

-- method VButtonBox::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "VButtonBox"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_vbutton_box_new" gtk_vbutton_box_new :: 
    IO (Ptr VButtonBox)

{-# DEPRECATED vButtonBoxNew ["(Since version 3.2)","Use gtk_button_box_new() with %GTK_ORIENTATION_VERTICAL instead"]#-}
vButtonBoxNew ::
    (MonadIO m) =>
    m VButtonBox
vButtonBoxNew  = liftIO $ do
    result <- gtk_vbutton_box_new
    checkUnexpectedReturnNULL "gtk_vbutton_box_new" result
    result' <- (newObject VButtonBox) result
    return result'

-- object VPaned 
newtype VPaned = VPaned (ForeignPtr VPaned)
noVPaned :: Maybe VPaned
noVPaned = Nothing

foreign import ccall "gtk_vpaned_get_type"
    c_gtk_vpaned_get_type :: IO GType

type instance ParentTypes VPaned = '[Paned, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject VPaned where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_vpaned_get_type
    

class GObject o => VPanedK o
instance (GObject o, IsDescendantOf VPaned o) => VPanedK o

toVPaned :: VPanedK o => o -> IO VPaned
toVPaned = unsafeCastTo VPaned

-- method VPaned::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "VPaned"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_vpaned_new" gtk_vpaned_new :: 
    IO (Ptr VPaned)

{-# DEPRECATED vPanedNew ["(Since version 3.2)","Use gtk_paned_new() with %GTK_ORIENTATION_VERTICAL instead"]#-}
vPanedNew ::
    (MonadIO m) =>
    m VPaned
vPanedNew  = liftIO $ do
    result <- gtk_vpaned_new
    checkUnexpectedReturnNULL "gtk_vpaned_new" result
    result' <- (newObject VPaned) result
    return result'

-- object VScale 
newtype VScale = VScale (ForeignPtr VScale)
noVScale :: Maybe VScale
noVScale = Nothing

foreign import ccall "gtk_vscale_get_type"
    c_gtk_vscale_get_type :: IO GType

type instance ParentTypes VScale = '[Scale, Range, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject VScale where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_vscale_get_type
    

class GObject o => VScaleK o
instance (GObject o, IsDescendantOf VScale o) => VScaleK o

toVScale :: VScaleK o => o -> IO VScale
toVScale = unsafeCastTo VScale

-- method VScale::new
-- method type : Constructor
-- Args : [Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "VScale"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_vscale_new" gtk_vscale_new :: 
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO (Ptr VScale)

{-# DEPRECATED vScaleNew ["(Since version 3.2)","Use gtk_scale_new() with %GTK_ORIENTATION_VERTICAL instead"]#-}
vScaleNew ::
    (MonadIO m, AdjustmentK a) =>
    a ->                                    -- adjustment
    m VScale
vScaleNew adjustment = liftIO $ do
    let adjustment' = unsafeManagedPtrCastPtr adjustment
    result <- gtk_vscale_new adjustment'
    checkUnexpectedReturnNULL "gtk_vscale_new" result
    result' <- (newObject VScale) result
    touchManagedPtr adjustment
    return result'

-- method VScale::new_with_range
-- method type : Constructor
-- Args : [Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "min", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "VScale"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_vscale_new_with_range" gtk_vscale_new_with_range :: 
    CDouble ->                              -- min : TBasicType TDouble
    CDouble ->                              -- max : TBasicType TDouble
    CDouble ->                              -- step : TBasicType TDouble
    IO (Ptr VScale)

{-# DEPRECATED vScaleNewWithRange ["(Since version 3.2)","Use gtk_scale_new_with_range() with %GTK_ORIENTATION_VERTICAL instead"]#-}
vScaleNewWithRange ::
    (MonadIO m) =>
    Double ->                               -- min
    Double ->                               -- max
    Double ->                               -- step
    m VScale
vScaleNewWithRange min max step = liftIO $ do
    let min' = realToFrac min
    let max' = realToFrac max
    let step' = realToFrac step
    result <- gtk_vscale_new_with_range min' max' step'
    checkUnexpectedReturnNULL "gtk_vscale_new_with_range" result
    result' <- (newObject VScale) result
    return result'

-- object VScrollbar 
newtype VScrollbar = VScrollbar (ForeignPtr VScrollbar)
noVScrollbar :: Maybe VScrollbar
noVScrollbar = Nothing

foreign import ccall "gtk_vscrollbar_get_type"
    c_gtk_vscrollbar_get_type :: IO GType

type instance ParentTypes VScrollbar = '[Scrollbar, Range, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject VScrollbar where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_vscrollbar_get_type
    

class GObject o => VScrollbarK o
instance (GObject o, IsDescendantOf VScrollbar o) => VScrollbarK o

toVScrollbar :: VScrollbarK o => o -> IO VScrollbar
toVScrollbar = unsafeCastTo VScrollbar

-- method VScrollbar::new
-- method type : Constructor
-- Args : [Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "VScrollbar"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_vscrollbar_new" gtk_vscrollbar_new :: 
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO (Ptr VScrollbar)

{-# DEPRECATED vScrollbarNew ["(Since version 3.2)","Use gtk_scrollbar_new() with %GTK_ORIENTATION_VERTICAL instead"]#-}
vScrollbarNew ::
    (MonadIO m, AdjustmentK a) =>
    Maybe (a) ->                            -- adjustment
    m VScrollbar
vScrollbarNew adjustment = liftIO $ do
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    result <- gtk_vscrollbar_new maybeAdjustment
    checkUnexpectedReturnNULL "gtk_vscrollbar_new" result
    result' <- (newObject VScrollbar) result
    whenJust adjustment touchManagedPtr
    return result'

-- object VSeparator 
newtype VSeparator = VSeparator (ForeignPtr VSeparator)
noVSeparator :: Maybe VSeparator
noVSeparator = Nothing

foreign import ccall "gtk_vseparator_get_type"
    c_gtk_vseparator_get_type :: IO GType

type instance ParentTypes VSeparator = '[Separator, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Orientable]

instance GObject VSeparator where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_vseparator_get_type
    

class GObject o => VSeparatorK o
instance (GObject o, IsDescendantOf VSeparator o) => VSeparatorK o

toVSeparator :: VSeparatorK o => o -> IO VSeparator
toVSeparator = unsafeCastTo VSeparator

-- method VSeparator::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "VSeparator"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_vseparator_new" gtk_vseparator_new :: 
    IO (Ptr VSeparator)

{-# DEPRECATED vSeparatorNew ["(Since version 3.2)","Use gtk_separator_new() with %GTK_ORIENTATION_VERTICAL instead"]#-}
vSeparatorNew ::
    (MonadIO m) =>
    m VSeparator
vSeparatorNew  = liftIO $ do
    result <- gtk_vseparator_new
    checkUnexpectedReturnNULL "gtk_vseparator_new" result
    result' <- (newObject VSeparator) result
    return result'

-- object Viewport 
newtype Viewport = Viewport (ForeignPtr Viewport)
noViewport :: Maybe Viewport
noViewport = Nothing

foreign import ccall "gtk_viewport_get_type"
    c_gtk_viewport_get_type :: IO GType

type instance ParentTypes Viewport = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Scrollable]

instance GObject Viewport where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_viewport_get_type
    

class GObject o => ViewportK o
instance (GObject o, IsDescendantOf Viewport o) => ViewportK o

toViewport :: ViewportK o => o -> IO Viewport
toViewport = unsafeCastTo Viewport

-- method Viewport::new
-- method type : Constructor
-- Args : [Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Viewport"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_viewport_new" gtk_viewport_new :: 
    Ptr Adjustment ->                       -- hadjustment : TInterface "Gtk" "Adjustment"
    Ptr Adjustment ->                       -- vadjustment : TInterface "Gtk" "Adjustment"
    IO (Ptr Viewport)


viewportNew ::
    (MonadIO m, AdjustmentK a, AdjustmentK b) =>
    Maybe (a) ->                            -- hadjustment
    Maybe (b) ->                            -- vadjustment
    m Viewport
viewportNew hadjustment vadjustment = liftIO $ do
    maybeHadjustment <- case hadjustment of
        Nothing -> return nullPtr
        Just jHadjustment -> do
            let jHadjustment' = unsafeManagedPtrCastPtr jHadjustment
            return jHadjustment'
    maybeVadjustment <- case vadjustment of
        Nothing -> return nullPtr
        Just jVadjustment -> do
            let jVadjustment' = unsafeManagedPtrCastPtr jVadjustment
            return jVadjustment'
    result <- gtk_viewport_new maybeHadjustment maybeVadjustment
    checkUnexpectedReturnNULL "gtk_viewport_new" result
    result' <- (newObject Viewport) result
    whenJust hadjustment touchManagedPtr
    whenJust vadjustment touchManagedPtr
    return result'

-- method Viewport::get_bin_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_viewport_get_bin_window" gtk_viewport_get_bin_window :: 
    Ptr Viewport ->                         -- _obj : TInterface "Gtk" "Viewport"
    IO (Ptr Gdk.Window)


viewportGetBinWindow ::
    (MonadIO m, ViewportK a) =>
    a ->                                    -- _obj
    m Gdk.Window
viewportGetBinWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_viewport_get_bin_window _obj'
    checkUnexpectedReturnNULL "gtk_viewport_get_bin_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- method Viewport::get_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_viewport_get_hadjustment" gtk_viewport_get_hadjustment :: 
    Ptr Viewport ->                         -- _obj : TInterface "Gtk" "Viewport"
    IO (Ptr Adjustment)

{-# DEPRECATED viewportGetHadjustment ["(Since version 3.0)","Use gtk_scrollable_get_hadjustment()"]#-}
viewportGetHadjustment ::
    (MonadIO m, ViewportK a) =>
    a ->                                    -- _obj
    m Adjustment
viewportGetHadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_viewport_get_hadjustment _obj'
    checkUnexpectedReturnNULL "gtk_viewport_get_hadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method Viewport::get_shadow_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ShadowType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_viewport_get_shadow_type" gtk_viewport_get_shadow_type :: 
    Ptr Viewport ->                         -- _obj : TInterface "Gtk" "Viewport"
    IO CUInt


viewportGetShadowType ::
    (MonadIO m, ViewportK a) =>
    a ->                                    -- _obj
    m ShadowType
viewportGetShadowType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_viewport_get_shadow_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Viewport::get_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Adjustment"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_viewport_get_vadjustment" gtk_viewport_get_vadjustment :: 
    Ptr Viewport ->                         -- _obj : TInterface "Gtk" "Viewport"
    IO (Ptr Adjustment)

{-# DEPRECATED viewportGetVadjustment ["(Since version 3.0)","Use gtk_scrollable_get_vadjustment()"]#-}
viewportGetVadjustment ::
    (MonadIO m, ViewportK a) =>
    a ->                                    -- _obj
    m Adjustment
viewportGetVadjustment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_viewport_get_vadjustment _obj'
    checkUnexpectedReturnNULL "gtk_viewport_get_vadjustment" result
    result' <- (newObject Adjustment) result
    touchManagedPtr _obj
    return result'

-- method Viewport::get_view_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_viewport_get_view_window" gtk_viewport_get_view_window :: 
    Ptr Viewport ->                         -- _obj : TInterface "Gtk" "Viewport"
    IO (Ptr Gdk.Window)


viewportGetViewWindow ::
    (MonadIO m, ViewportK a) =>
    a ->                                    -- _obj
    m Gdk.Window
viewportGetViewWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_viewport_get_view_window _obj'
    checkUnexpectedReturnNULL "gtk_viewport_get_view_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- method Viewport::set_hadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_viewport_set_hadjustment" gtk_viewport_set_hadjustment :: 
    Ptr Viewport ->                         -- _obj : TInterface "Gtk" "Viewport"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()

{-# DEPRECATED viewportSetHadjustment ["(Since version 3.0)","Use gtk_scrollable_set_hadjustment()"]#-}
viewportSetHadjustment ::
    (MonadIO m, ViewportK a, AdjustmentK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- adjustment
    m ()
viewportSetHadjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    gtk_viewport_set_hadjustment _obj' maybeAdjustment
    touchManagedPtr _obj
    whenJust adjustment touchManagedPtr
    return ()

-- method Viewport::set_shadow_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_viewport_set_shadow_type" gtk_viewport_set_shadow_type :: 
    Ptr Viewport ->                         -- _obj : TInterface "Gtk" "Viewport"
    CUInt ->                                -- type : TInterface "Gtk" "ShadowType"
    IO ()


viewportSetShadowType ::
    (MonadIO m, ViewportK a) =>
    a ->                                    -- _obj
    ShadowType ->                           -- type
    m ()
viewportSetShadowType _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    gtk_viewport_set_shadow_type _obj' type_'
    touchManagedPtr _obj
    return ()

-- method Viewport::set_vadjustment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Viewport", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_viewport_set_vadjustment" gtk_viewport_set_vadjustment :: 
    Ptr Viewport ->                         -- _obj : TInterface "Gtk" "Viewport"
    Ptr Adjustment ->                       -- adjustment : TInterface "Gtk" "Adjustment"
    IO ()

{-# DEPRECATED viewportSetVadjustment ["(Since version 3.0)","Use gtk_scrollable_set_vadjustment()"]#-}
viewportSetVadjustment ::
    (MonadIO m, ViewportK a, AdjustmentK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- adjustment
    m ()
viewportSetVadjustment _obj adjustment = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAdjustment <- case adjustment of
        Nothing -> return nullPtr
        Just jAdjustment -> do
            let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment
            return jAdjustment'
    gtk_viewport_set_vadjustment _obj' maybeAdjustment
    touchManagedPtr _obj
    whenJust adjustment touchManagedPtr
    return ()

-- object VolumeButton 
newtype VolumeButton = VolumeButton (ForeignPtr VolumeButton)
noVolumeButton :: Maybe VolumeButton
noVolumeButton = Nothing

foreign import ccall "gtk_volume_button_get_type"
    c_gtk_volume_button_get_type :: IO GType

type instance ParentTypes VolumeButton = '[ScaleButton, Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable, Orientable]

instance GObject VolumeButton where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_volume_button_get_type
    

class GObject o => VolumeButtonK o
instance (GObject o, IsDescendantOf VolumeButton o) => VolumeButtonK o

toVolumeButton :: VolumeButtonK o => o -> IO VolumeButton
toVolumeButton = unsafeCastTo VolumeButton

-- method VolumeButton::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "VolumeButton"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_volume_button_new" gtk_volume_button_new :: 
    IO (Ptr VolumeButton)


volumeButtonNew ::
    (MonadIO m) =>
    m VolumeButton
volumeButtonNew  = liftIO $ do
    result <- gtk_volume_button_new
    checkUnexpectedReturnNULL "gtk_volume_button_new" result
    result' <- (newObject VolumeButton) result
    return result'

-- object Widget 
newtype Widget = Widget (ForeignPtr Widget)
noWidget :: Maybe Widget
noWidget = Nothing

foreign import ccall "gtk_widget_get_type"
    c_gtk_widget_get_type :: IO GType

type instance ParentTypes Widget = '[GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Widget where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_widget_get_type
    

class GObject o => WidgetK o
instance (GObject o, IsDescendantOf Widget o) => WidgetK o

toWidget :: WidgetK o => o -> IO Widget
toWidget = unsafeCastTo Widget

-- method Widget::activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_activate" gtk_widget_activate :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetActivate ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetActivate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_activate _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::add_accelerator
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_signal", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_flags", argType = TInterface "Gtk" "AccelFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_signal", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_flags", argType = TInterface "Gtk" "AccelFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_add_accelerator" gtk_widget_add_accelerator :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- accel_signal : TBasicType TUTF8
    Ptr AccelGroup ->                       -- accel_group : TInterface "Gtk" "AccelGroup"
    Word32 ->                               -- accel_key : TBasicType TUInt32
    CUInt ->                                -- accel_mods : TInterface "Gdk" "ModifierType"
    CUInt ->                                -- accel_flags : TInterface "Gtk" "AccelFlags"
    IO ()


widgetAddAccelerator ::
    (MonadIO m, WidgetK a, AccelGroupK b) =>
    a ->                                    -- _obj
    T.Text ->                               -- accel_signal
    b ->                                    -- accel_group
    Word32 ->                               -- accel_key
    [Gdk.ModifierType] ->                   -- accel_mods
    [AccelFlags] ->                         -- accel_flags
    m ()
widgetAddAccelerator _obj accel_signal accel_group accel_key accel_mods accel_flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    accel_signal' <- textToCString accel_signal
    let accel_group' = unsafeManagedPtrCastPtr accel_group
    let accel_mods' = gflagsToWord accel_mods
    let accel_flags' = gflagsToWord accel_flags
    gtk_widget_add_accelerator _obj' accel_signal' accel_group' accel_key accel_mods' accel_flags'
    touchManagedPtr _obj
    touchManagedPtr accel_group
    freeMem accel_signal'
    return ()

-- method Widget::add_device_events
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "events", argType = TInterface "Gdk" "EventMask", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "events", argType = TInterface "Gdk" "EventMask", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_add_device_events" gtk_widget_add_device_events :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Device ->                       -- device : TInterface "Gdk" "Device"
    CUInt ->                                -- events : TInterface "Gdk" "EventMask"
    IO ()


widgetAddDeviceEvents ::
    (MonadIO m, WidgetK a, Gdk.DeviceK b) =>
    a ->                                    -- _obj
    b ->                                    -- device
    [Gdk.EventMask] ->                      -- events
    m ()
widgetAddDeviceEvents _obj device events = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let device' = unsafeManagedPtrCastPtr device
    let events' = gflagsToWord events
    gtk_widget_add_device_events _obj' device' events'
    touchManagedPtr _obj
    touchManagedPtr device
    return ()

-- method Widget::add_events
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "events", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "events", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_add_events" gtk_widget_add_events :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- events : TBasicType TInt32
    IO ()


widgetAddEvents ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- events
    m ()
widgetAddEvents _obj events = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_add_events _obj' events
    touchManagedPtr _obj
    return ()

-- method Widget::add_mnemonic_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_add_mnemonic_label" gtk_widget_add_mnemonic_label :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- label : TInterface "Gtk" "Widget"
    IO ()


widgetAddMnemonicLabel ::
    (MonadIO m, WidgetK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- label
    m ()
widgetAddMnemonicLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let label' = unsafeManagedPtrCastPtr label
    gtk_widget_add_mnemonic_label _obj' label'
    touchManagedPtr _obj
    touchManagedPtr label
    return ()

-- method Widget::add_tick_callback
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "TickCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gtk" "TickCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_add_tick_callback" gtk_widget_add_tick_callback :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    FunPtr TickCallbackC ->                 -- callback : TInterface "Gtk" "TickCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- notify : TInterface "GLib" "DestroyNotify"
    IO Word32


widgetAddTickCallback ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    TickCallback ->                         -- callback
    m Word32
widgetAddTickCallback _obj callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    callback' <- mkTickCallback (tickCallbackWrapper Nothing callback)
    let user_data = castFunPtrToPtr callback'
    let notify = safeFreeFunPtrPtr
    result <- gtk_widget_add_tick_callback _obj' callback' user_data notify
    touchManagedPtr _obj
    return result

-- method Widget::can_activate_accel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "signal_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "signal_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_can_activate_accel" gtk_widget_can_activate_accel :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Word32 ->                               -- signal_id : TBasicType TUInt32
    IO CInt


widgetCanActivateAccel ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- signal_id
    m Bool
widgetCanActivateAccel _obj signal_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_can_activate_accel _obj' signal_id
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::child_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "DirectionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "DirectionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_child_focus" gtk_widget_child_focus :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- direction : TInterface "Gtk" "DirectionType"
    IO CInt


widgetChildFocus ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    DirectionType ->                        -- direction
    m Bool
widgetChildFocus _obj direction = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let direction' = (fromIntegral . fromEnum) direction
    result <- gtk_widget_child_focus _obj' direction'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::child_notify
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_child_notify" gtk_widget_child_notify :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- child_property : TBasicType TUTF8
    IO ()


widgetChildNotify ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- child_property
    m ()
widgetChildNotify _obj child_property = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    child_property' <- textToCString child_property
    gtk_widget_child_notify _obj' child_property'
    touchManagedPtr _obj
    freeMem child_property'
    return ()

-- method Widget::class_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path_length", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "path_reversed", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_class_path" gtk_widget_class_path :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Word32 ->                           -- path_length : TBasicType TUInt32
    Ptr CString ->                          -- path : TBasicType TUTF8
    Ptr CString ->                          -- path_reversed : TBasicType TUTF8
    IO ()

{-# DEPRECATED widgetClassPath ["(Since version 3.0)","Use gtk_widget_get_path() instead"]#-}
widgetClassPath ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Word32,T.Text,T.Text)
widgetClassPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path_length <- allocMem :: IO (Ptr Word32)
    path <- allocMem :: IO (Ptr CString)
    path_reversed <- allocMem :: IO (Ptr CString)
    gtk_widget_class_path _obj' path_length path path_reversed
    path_length' <- peek path_length
    path' <- peek path
    path'' <- cstringToText path'
    freeMem path'
    path_reversed' <- peek path_reversed
    path_reversed'' <- cstringToText path_reversed'
    freeMem path_reversed'
    touchManagedPtr _obj
    freeMem path_length
    freeMem path
    freeMem path_reversed
    return (path_length', path'', path_reversed'')

-- method Widget::compute_expand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_compute_expand" gtk_widget_compute_expand :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    IO CInt


widgetComputeExpand ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Orientation ->                          -- orientation
    m Bool
widgetComputeExpand _obj orientation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let orientation' = (fromIntegral . fromEnum) orientation
    result <- gtk_widget_compute_expand _obj' orientation'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::create_pango_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Context"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_create_pango_context" gtk_widget_create_pango_context :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Pango.Context)


widgetCreatePangoContext ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Pango.Context
widgetCreatePangoContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_create_pango_context _obj'
    checkUnexpectedReturnNULL "gtk_widget_create_pango_context" result
    result' <- (wrapObject Pango.Context) result
    touchManagedPtr _obj
    return result'

-- method Widget::create_pango_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Layout"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_create_pango_layout" gtk_widget_create_pango_layout :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- text : TBasicType TUTF8
    IO (Ptr Pango.Layout)


widgetCreatePangoLayout ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- text
    m Pango.Layout
widgetCreatePangoLayout _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeText <- case text of
        Nothing -> return nullPtr
        Just jText -> do
            jText' <- textToCString jText
            return jText'
    result <- gtk_widget_create_pango_layout _obj' maybeText
    checkUnexpectedReturnNULL "gtk_widget_create_pango_layout" result
    result' <- (wrapObject Pango.Layout) result
    touchManagedPtr _obj
    freeMem maybeText
    return result'

-- method Widget::destroy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_destroy" gtk_widget_destroy :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetDestroy ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetDestroy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_destroy _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::destroyed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_pointer", argType = TInterface "Gtk" "Widget", direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_pointer", argType = TInterface "Gtk" "Widget", direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_destroyed" gtk_widget_destroyed :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr (Ptr Widget) ->                     -- widget_pointer : TInterface "Gtk" "Widget"
    IO ()


widgetDestroyed ::
    (MonadIO m, WidgetK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- widget_pointer
    m (Widget)
widgetDestroyed _obj widget_pointer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget_pointer' = unsafeManagedPtrCastPtr widget_pointer
    widget_pointer'' <- allocMem :: IO (Ptr (Ptr Widget))
    poke widget_pointer'' widget_pointer'
    gtk_widget_destroyed _obj' widget_pointer''
    widget_pointer''' <- peek widget_pointer''
    widget_pointer'''' <- (newObject Widget) widget_pointer'''
    touchManagedPtr _obj
    touchManagedPtr widget_pointer
    freeMem widget_pointer''
    return widget_pointer''''

-- method Widget::device_is_shadowed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_device_is_shadowed" gtk_widget_device_is_shadowed :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Device ->                       -- device : TInterface "Gdk" "Device"
    IO CInt


widgetDeviceIsShadowed ::
    (MonadIO m, WidgetK a, Gdk.DeviceK b) =>
    a ->                                    -- _obj
    b ->                                    -- device
    m Bool
widgetDeviceIsShadowed _obj device = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let device' = unsafeManagedPtrCastPtr device
    result <- gtk_widget_device_is_shadowed _obj' device'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr device
    return result'

-- method Widget::drag_begin
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "DragContext"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_begin" gtk_drag_begin :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr TargetList ->                       -- targets : TInterface "Gtk" "TargetList"
    CUInt ->                                -- actions : TInterface "Gdk" "DragAction"
    Int32 ->                                -- button : TBasicType TInt32
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    IO (Ptr Gdk.DragContext)

{-# DEPRECATED widgetDragBegin ["(Since version 3.10)","Use gtk_drag_begin_with_coordinates() instead"]#-}
widgetDragBegin ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    TargetList ->                           -- targets
    [Gdk.DragAction] ->                     -- actions
    Int32 ->                                -- button
    Maybe (Gdk.Event) ->                    -- event
    m Gdk.DragContext
widgetDragBegin _obj targets actions button event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let targets' = unsafeManagedPtrGetPtr targets
    let actions' = gflagsToWord actions
    maybeEvent <- case event of
        Nothing -> return nullPtr
        Just jEvent -> do
            let jEvent' = unsafeManagedPtrGetPtr jEvent
            return jEvent'
    result <- gtk_drag_begin _obj' targets' actions' button maybeEvent
    checkUnexpectedReturnNULL "gtk_drag_begin" result
    result' <- (newObject Gdk.DragContext) result
    touchManagedPtr _obj
    touchManagedPtr targets
    whenJust event touchManagedPtr
    return result'

-- method Widget::drag_begin_with_coordinates
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "DragContext"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_begin_with_coordinates" gtk_drag_begin_with_coordinates :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr TargetList ->                       -- targets : TInterface "Gtk" "TargetList"
    CUInt ->                                -- actions : TInterface "Gdk" "DragAction"
    Int32 ->                                -- button : TBasicType TInt32
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO (Ptr Gdk.DragContext)


widgetDragBeginWithCoordinates ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    TargetList ->                           -- targets
    [Gdk.DragAction] ->                     -- actions
    Int32 ->                                -- button
    Maybe (Gdk.Event) ->                    -- event
    Int32 ->                                -- x
    Int32 ->                                -- y
    m Gdk.DragContext
widgetDragBeginWithCoordinates _obj targets actions button event x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let targets' = unsafeManagedPtrGetPtr targets
    let actions' = gflagsToWord actions
    maybeEvent <- case event of
        Nothing -> return nullPtr
        Just jEvent -> do
            let jEvent' = unsafeManagedPtrGetPtr jEvent
            return jEvent'
    result <- gtk_drag_begin_with_coordinates _obj' targets' actions' button maybeEvent x y
    checkUnexpectedReturnNULL "gtk_drag_begin_with_coordinates" result
    result' <- (newObject Gdk.DragContext) result
    touchManagedPtr _obj
    touchManagedPtr targets
    whenJust event touchManagedPtr
    return result'

-- method Widget::drag_check_threshold
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "current_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "current_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "current_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "current_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_check_threshold" gtk_drag_check_threshold :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- start_x : TBasicType TInt32
    Int32 ->                                -- start_y : TBasicType TInt32
    Int32 ->                                -- current_x : TBasicType TInt32
    Int32 ->                                -- current_y : TBasicType TInt32
    IO CInt


widgetDragCheckThreshold ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- start_x
    Int32 ->                                -- start_y
    Int32 ->                                -- current_x
    Int32 ->                                -- current_y
    m Bool
widgetDragCheckThreshold _obj start_x start_y current_x current_y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_drag_check_threshold _obj' start_x start_y current_x current_y
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::drag_dest_add_image_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_add_image_targets" gtk_drag_dest_add_image_targets :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetDragDestAddImageTargets ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetDragDestAddImageTargets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_drag_dest_add_image_targets _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::drag_dest_add_text_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_add_text_targets" gtk_drag_dest_add_text_targets :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetDragDestAddTextTargets ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetDragDestAddTextTargets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_drag_dest_add_text_targets _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::drag_dest_add_uri_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_add_uri_targets" gtk_drag_dest_add_uri_targets :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetDragDestAddUriTargets ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetDragDestAddUriTargets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_drag_dest_add_uri_targets _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::drag_dest_find_target
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_list", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_list", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Atom"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_find_target" gtk_drag_dest_find_target :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    Ptr TargetList ->                       -- target_list : TInterface "Gtk" "TargetList"
    IO (Ptr Gdk.Atom)


widgetDragDestFindTarget ::
    (MonadIO m, WidgetK a, Gdk.DragContextK b) =>
    a ->                                    -- _obj
    b ->                                    -- context
    Maybe (TargetList) ->                   -- target_list
    m Gdk.Atom
widgetDragDestFindTarget _obj context target_list = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    maybeTarget_list <- case target_list of
        Nothing -> return nullPtr
        Just jTarget_list -> do
            let jTarget_list' = unsafeManagedPtrGetPtr jTarget_list
            return jTarget_list'
    result <- gtk_drag_dest_find_target _obj' context' maybeTarget_list
    checkUnexpectedReturnNULL "gtk_drag_dest_find_target" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> Gdk.Atom <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    touchManagedPtr context
    whenJust target_list touchManagedPtr
    return result'

-- method Widget::drag_dest_get_target_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TargetList"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_get_target_list" gtk_drag_dest_get_target_list :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr TargetList)


widgetDragDestGetTargetList ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m TargetList
widgetDragDestGetTargetList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_drag_dest_get_target_list _obj'
    checkUnexpectedReturnNULL "gtk_drag_dest_get_target_list" result
    result' <- (newBoxed TargetList) result
    touchManagedPtr _obj
    return result'

-- method Widget::drag_dest_get_track_motion
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_get_track_motion" gtk_drag_dest_get_track_motion :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetDragDestGetTrackMotion ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetDragDestGetTrackMotion _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_drag_dest_get_track_motion _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::drag_dest_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "DestDefaults", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "DestDefaults", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_set" gtk_drag_dest_set :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- flags : TInterface "Gtk" "DestDefaults"
    Ptr TargetEntry ->                      -- targets : TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry")
    Int32 ->                                -- n_targets : TBasicType TInt32
    CUInt ->                                -- actions : TInterface "Gdk" "DragAction"
    IO ()


widgetDragDestSet ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    [DestDefaults] ->                       -- flags
    Maybe ([TargetEntry]) ->                -- targets
    [Gdk.DragAction] ->                     -- actions
    m ()
widgetDragDestSet _obj flags targets actions = liftIO $ do
    let n_targets = case targets of
            Nothing -> 0
            Just jTargets -> fromIntegral $ length jTargets
    let _obj' = unsafeManagedPtrCastPtr _obj
    let flags' = gflagsToWord flags
    maybeTargets <- case targets of
        Nothing -> return nullPtr
        Just jTargets -> do
            let jTargets' = map unsafeManagedPtrGetPtr jTargets
            jTargets'' <- packBlockArray 16 jTargets'
            return jTargets''
    let actions' = gflagsToWord actions
    gtk_drag_dest_set _obj' flags' maybeTargets n_targets actions'
    touchManagedPtr _obj
    whenJust targets (mapM_ touchManagedPtr)
    freeMem maybeTargets
    return ()

-- method Widget::drag_dest_set_proxy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "proxy_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "protocol", argType = TInterface "Gdk" "DragProtocol", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_coordinates", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "proxy_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "protocol", argType = TInterface "Gdk" "DragProtocol", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_coordinates", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_set_proxy" gtk_drag_dest_set_proxy :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Window ->                       -- proxy_window : TInterface "Gdk" "Window"
    CUInt ->                                -- protocol : TInterface "Gdk" "DragProtocol"
    CInt ->                                 -- use_coordinates : TBasicType TBoolean
    IO ()


widgetDragDestSetProxy ::
    (MonadIO m, WidgetK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- proxy_window
    Gdk.DragProtocol ->                     -- protocol
    Bool ->                                 -- use_coordinates
    m ()
widgetDragDestSetProxy _obj proxy_window protocol use_coordinates = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let proxy_window' = unsafeManagedPtrCastPtr proxy_window
    let protocol' = (fromIntegral . fromEnum) protocol
    let use_coordinates' = (fromIntegral . fromEnum) use_coordinates
    gtk_drag_dest_set_proxy _obj' proxy_window' protocol' use_coordinates'
    touchManagedPtr _obj
    touchManagedPtr proxy_window
    return ()

-- method Widget::drag_dest_set_target_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_list", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_list", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_set_target_list" gtk_drag_dest_set_target_list :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr TargetList ->                       -- target_list : TInterface "Gtk" "TargetList"
    IO ()


widgetDragDestSetTargetList ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (TargetList) ->                   -- target_list
    m ()
widgetDragDestSetTargetList _obj target_list = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeTarget_list <- case target_list of
        Nothing -> return nullPtr
        Just jTarget_list -> do
            let jTarget_list' = unsafeManagedPtrGetPtr jTarget_list
            return jTarget_list'
    gtk_drag_dest_set_target_list _obj' maybeTarget_list
    touchManagedPtr _obj
    whenJust target_list touchManagedPtr
    return ()

-- method Widget::drag_dest_set_track_motion
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "track_motion", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "track_motion", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_set_track_motion" gtk_drag_dest_set_track_motion :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- track_motion : TBasicType TBoolean
    IO ()


widgetDragDestSetTrackMotion ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- track_motion
    m ()
widgetDragDestSetTrackMotion _obj track_motion = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let track_motion' = (fromIntegral . fromEnum) track_motion
    gtk_drag_dest_set_track_motion _obj' track_motion'
    touchManagedPtr _obj
    return ()

-- method Widget::drag_dest_unset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_unset" gtk_drag_dest_unset :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetDragDestUnset ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetDragDestUnset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_drag_dest_unset _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::drag_get_data
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "time_", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "time_", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_get_data" gtk_drag_get_data :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    Ptr Gdk.Atom ->                         -- target : TInterface "Gdk" "Atom"
    Word32 ->                               -- time_ : TBasicType TUInt32
    IO ()


widgetDragGetData ::
    (MonadIO m, WidgetK a, Gdk.DragContextK b) =>
    a ->                                    -- _obj
    b ->                                    -- context
    Gdk.Atom ->                             -- target
    Word32 ->                               -- time_
    m ()
widgetDragGetData _obj context target time_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let context' = unsafeManagedPtrCastPtr context
    let target' = unsafeManagedPtrGetPtr target
    gtk_drag_get_data _obj' context' target' time_
    touchManagedPtr _obj
    touchManagedPtr context
    touchManagedPtr target
    return ()

-- method Widget::drag_highlight
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_highlight" gtk_drag_highlight :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetDragHighlight ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetDragHighlight _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_drag_highlight _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::drag_source_add_image_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_add_image_targets" gtk_drag_source_add_image_targets :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetDragSourceAddImageTargets ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetDragSourceAddImageTargets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_drag_source_add_image_targets _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::drag_source_add_text_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_add_text_targets" gtk_drag_source_add_text_targets :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetDragSourceAddTextTargets ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetDragSourceAddTextTargets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_drag_source_add_text_targets _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::drag_source_add_uri_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_add_uri_targets" gtk_drag_source_add_uri_targets :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetDragSourceAddUriTargets ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetDragSourceAddUriTargets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_drag_source_add_uri_targets _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::drag_source_get_target_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TargetList"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_get_target_list" gtk_drag_source_get_target_list :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr TargetList)


widgetDragSourceGetTargetList ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m TargetList
widgetDragSourceGetTargetList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_drag_source_get_target_list _obj'
    checkUnexpectedReturnNULL "gtk_drag_source_get_target_list" result
    result' <- (newBoxed TargetList) result
    touchManagedPtr _obj
    return result'

-- method Widget::drag_source_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_button_mask", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_button_mask", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "actions", argType = TInterface "Gdk" "DragAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_set" gtk_drag_source_set :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- start_button_mask : TInterface "Gdk" "ModifierType"
    Ptr TargetEntry ->                      -- targets : TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry")
    Int32 ->                                -- n_targets : TBasicType TInt32
    CUInt ->                                -- actions : TInterface "Gdk" "DragAction"
    IO ()


widgetDragSourceSet ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    [Gdk.ModifierType] ->                   -- start_button_mask
    Maybe ([TargetEntry]) ->                -- targets
    [Gdk.DragAction] ->                     -- actions
    m ()
widgetDragSourceSet _obj start_button_mask targets actions = liftIO $ do
    let n_targets = case targets of
            Nothing -> 0
            Just jTargets -> fromIntegral $ length jTargets
    let _obj' = unsafeManagedPtrCastPtr _obj
    let start_button_mask' = gflagsToWord start_button_mask
    maybeTargets <- case targets of
        Nothing -> return nullPtr
        Just jTargets -> do
            let jTargets' = map unsafeManagedPtrGetPtr jTargets
            jTargets'' <- packBlockArray 16 jTargets'
            return jTargets''
    let actions' = gflagsToWord actions
    gtk_drag_source_set _obj' start_button_mask' maybeTargets n_targets actions'
    touchManagedPtr _obj
    whenJust targets (mapM_ touchManagedPtr)
    freeMem maybeTargets
    return ()

-- method Widget::drag_source_set_icon_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_set_icon_gicon" gtk_drag_source_set_icon_gicon :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    IO ()


widgetDragSourceSetIconGicon ::
    (MonadIO m, WidgetK a, Gio.IconK b) =>
    a ->                                    -- _obj
    b ->                                    -- icon
    m ()
widgetDragSourceSetIconGicon _obj icon = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let icon' = unsafeManagedPtrCastPtr icon
    gtk_drag_source_set_icon_gicon _obj' icon'
    touchManagedPtr _obj
    touchManagedPtr icon
    return ()

-- method Widget::drag_source_set_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_set_icon_name" gtk_drag_source_set_icon_name :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()


widgetDragSourceSetIconName ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- icon_name
    m ()
widgetDragSourceSetIconName _obj icon_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    icon_name' <- textToCString icon_name
    gtk_drag_source_set_icon_name _obj' icon_name'
    touchManagedPtr _obj
    freeMem icon_name'
    return ()

-- method Widget::drag_source_set_icon_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_set_icon_pixbuf" gtk_drag_source_set_icon_pixbuf :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    IO ()


widgetDragSourceSetIconPixbuf ::
    (MonadIO m, WidgetK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- _obj
    b ->                                    -- pixbuf
    m ()
widgetDragSourceSetIconPixbuf _obj pixbuf = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    gtk_drag_source_set_icon_pixbuf _obj' pixbuf'
    touchManagedPtr _obj
    touchManagedPtr pixbuf
    return ()

-- method Widget::drag_source_set_icon_stock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_set_icon_stock" gtk_drag_source_set_icon_stock :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- stock_id : TBasicType TUTF8
    IO ()

{-# DEPRECATED widgetDragSourceSetIconStock ["(Since version 3.10)","Use gtk_drag_source_set_icon_name() instead."]#-}
widgetDragSourceSetIconStock ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- stock_id
    m ()
widgetDragSourceSetIconStock _obj stock_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    stock_id' <- textToCString stock_id
    gtk_drag_source_set_icon_stock _obj' stock_id'
    touchManagedPtr _obj
    freeMem stock_id'
    return ()

-- method Widget::drag_source_set_target_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_list", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_list", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_set_target_list" gtk_drag_source_set_target_list :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr TargetList ->                       -- target_list : TInterface "Gtk" "TargetList"
    IO ()


widgetDragSourceSetTargetList ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (TargetList) ->                   -- target_list
    m ()
widgetDragSourceSetTargetList _obj target_list = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeTarget_list <- case target_list of
        Nothing -> return nullPtr
        Just jTarget_list -> do
            let jTarget_list' = unsafeManagedPtrGetPtr jTarget_list
            return jTarget_list'
    gtk_drag_source_set_target_list _obj' maybeTarget_list
    touchManagedPtr _obj
    whenJust target_list touchManagedPtr
    return ()

-- method Widget::drag_source_unset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_unset" gtk_drag_source_unset :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetDragSourceUnset ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetDragSourceUnset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_drag_source_unset _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::drag_unhighlight
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_unhighlight" gtk_drag_unhighlight :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetDragUnhighlight ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetDragUnhighlight _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_drag_unhighlight _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::draw
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_draw" gtk_widget_draw :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    IO ()


widgetDraw ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Cairo.Context ->                        -- cr
    m ()
widgetDraw _obj cr = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cr' = unsafeManagedPtrGetPtr cr
    gtk_widget_draw _obj' cr'
    touchManagedPtr _obj
    touchManagedPtr cr
    return ()

-- method Widget::ensure_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_ensure_style" gtk_widget_ensure_style :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()

{-# DEPRECATED widgetEnsureStyle ["(Since version 3.0)","Use #GtkStyleContext instead"]#-}
widgetEnsureStyle ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetEnsureStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_ensure_style _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::error_bell
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_error_bell" gtk_widget_error_bell :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetErrorBell ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetErrorBell _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_error_bell _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::event
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_event" gtk_widget_event :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    IO CInt


widgetEvent ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Gdk.Event ->                            -- event
    m Bool
widgetEvent _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_widget_event _obj' event'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event
    return result'

-- method Widget::freeze_child_notify
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_freeze_child_notify" gtk_widget_freeze_child_notify :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetFreezeChildNotify ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetFreezeChildNotify _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_freeze_child_notify _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::get_accessible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_accessible" gtk_widget_get_accessible :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Atk.Object)


widgetGetAccessible ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Atk.Object
widgetGetAccessible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_accessible _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_accessible" result
    result' <- (newObject Atk.Object) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_action_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "prefix", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "prefix", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "ActionGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_action_group" gtk_widget_get_action_group :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- prefix : TBasicType TUTF8
    IO (Ptr Gio.ActionGroup)


widgetGetActionGroup ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- prefix
    m Gio.ActionGroup
widgetGetActionGroup _obj prefix = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    prefix' <- textToCString prefix
    result <- gtk_widget_get_action_group _obj' prefix'
    checkUnexpectedReturnNULL "gtk_widget_get_action_group" result
    result' <- (newObject Gio.ActionGroup) result
    touchManagedPtr _obj
    freeMem prefix'
    return result'

-- method Widget::get_allocated_baseline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_allocated_baseline" gtk_widget_get_allocated_baseline :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO Int32


widgetGetAllocatedBaseline ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Int32
widgetGetAllocatedBaseline _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_allocated_baseline _obj'
    touchManagedPtr _obj
    return result

-- method Widget::get_allocated_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_allocated_height" gtk_widget_get_allocated_height :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO Int32


widgetGetAllocatedHeight ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Int32
widgetGetAllocatedHeight _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_allocated_height _obj'
    touchManagedPtr _obj
    return result

-- method Widget::get_allocated_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_allocated_width" gtk_widget_get_allocated_width :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO Int32


widgetGetAllocatedWidth ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Int32
widgetGetAllocatedWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_allocated_width _obj'
    touchManagedPtr _obj
    return result

-- method Widget::get_allocation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allocation", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_allocation" gtk_widget_get_allocation :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- allocation : TInterface "Gdk" "Rectangle"
    IO ()


widgetGetAllocation ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Gdk.Rectangle)
widgetGetAllocation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    allocation <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_widget_get_allocation _obj' allocation
    allocation' <- (wrapBoxed Gdk.Rectangle) allocation
    touchManagedPtr _obj
    return allocation'

-- method Widget::get_ancestor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_ancestor" gtk_widget_get_ancestor :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CGType ->                               -- widget_type : TBasicType TGType
    IO (Ptr Widget)


widgetGetAncestor ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    GType ->                                -- widget_type
    m Widget
widgetGetAncestor _obj widget_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget_type' = gtypeToCGType widget_type
    result <- gtk_widget_get_ancestor _obj' widget_type'
    checkUnexpectedReturnNULL "gtk_widget_get_ancestor" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_app_paintable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_app_paintable" gtk_widget_get_app_paintable :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetAppPaintable ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetAppPaintable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_app_paintable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_can_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_can_default" gtk_widget_get_can_default :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetCanDefault ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetCanDefault _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_can_default _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_can_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_can_focus" gtk_widget_get_can_focus :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetCanFocus ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetCanFocus _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_can_focus _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_child_requisition
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "requisition", argType = TInterface "Gtk" "Requisition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_child_requisition" gtk_widget_get_child_requisition :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Requisition ->                      -- requisition : TInterface "Gtk" "Requisition"
    IO ()

{-# DEPRECATED widgetGetChildRequisition ["(Since version 3.0)","Use gtk_widget_get_preferred_size() instead."]#-}
widgetGetChildRequisition ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Requisition)
widgetGetChildRequisition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    requisition <- callocBoxedBytes 8 :: IO (Ptr Requisition)
    gtk_widget_get_child_requisition _obj' requisition
    requisition' <- (wrapBoxed Requisition) requisition
    touchManagedPtr _obj
    return requisition'

-- method Widget::get_child_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_child_visible" gtk_widget_get_child_visible :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetChildVisible ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetChildVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_child_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_clip
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clip", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_clip" gtk_widget_get_clip :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- clip : TInterface "Gdk" "Rectangle"
    IO ()


widgetGetClip ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Gdk.Rectangle)
widgetGetClip _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    clip <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    gtk_widget_get_clip _obj' clip
    clip' <- (wrapBoxed Gdk.Rectangle) clip
    touchManagedPtr _obj
    return clip'

-- method Widget::get_clipboard
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Clipboard"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_clipboard" gtk_widget_get_clipboard :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Atom ->                         -- selection : TInterface "Gdk" "Atom"
    IO (Ptr Clipboard)


widgetGetClipboard ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Gdk.Atom ->                             -- selection
    m Clipboard
widgetGetClipboard _obj selection = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let selection' = unsafeManagedPtrGetPtr selection
    result <- gtk_widget_get_clipboard _obj' selection'
    checkUnexpectedReturnNULL "gtk_widget_get_clipboard" result
    result' <- (newObject Clipboard) result
    touchManagedPtr _obj
    touchManagedPtr selection
    return result'

-- method Widget::get_composite_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_composite_name" gtk_widget_get_composite_name :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CString

{-# DEPRECATED widgetGetCompositeName ["(Since version 3.10)","Use gtk_widget_class_set_template(), or don\8217t use this API at all."]#-}
widgetGetCompositeName ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m T.Text
widgetGetCompositeName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_composite_name _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_composite_name" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Widget::get_device_enabled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_device_enabled" gtk_widget_get_device_enabled :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Device ->                       -- device : TInterface "Gdk" "Device"
    IO CInt


widgetGetDeviceEnabled ::
    (MonadIO m, WidgetK a, Gdk.DeviceK b) =>
    a ->                                    -- _obj
    b ->                                    -- device
    m Bool
widgetGetDeviceEnabled _obj device = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let device' = unsafeManagedPtrCastPtr device
    result <- gtk_widget_get_device_enabled _obj' device'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr device
    return result'

-- method Widget::get_device_events
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "EventMask"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_device_events" gtk_widget_get_device_events :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Device ->                       -- device : TInterface "Gdk" "Device"
    IO CUInt


widgetGetDeviceEvents ::
    (MonadIO m, WidgetK a, Gdk.DeviceK b) =>
    a ->                                    -- _obj
    b ->                                    -- device
    m [Gdk.EventMask]
widgetGetDeviceEvents _obj device = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let device' = unsafeManagedPtrCastPtr device
    result <- gtk_widget_get_device_events _obj' device'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    touchManagedPtr device
    return result'

-- method Widget::get_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TextDirection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_direction" gtk_widget_get_direction :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CUInt


widgetGetDirection ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m TextDirection
widgetGetDirection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_direction _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_display
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Display"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_display" gtk_widget_get_display :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Gdk.Display)


widgetGetDisplay ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Gdk.Display
widgetGetDisplay _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_display _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_display" result
    result' <- (newObject Gdk.Display) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_double_buffered
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_double_buffered" gtk_widget_get_double_buffered :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetDoubleBuffered ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetDoubleBuffered _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_double_buffered _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_events
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_events" gtk_widget_get_events :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO Int32


widgetGetEvents ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Int32
widgetGetEvents _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_events _obj'
    touchManagedPtr _obj
    return result

-- method Widget::get_font_map
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "FontMap"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_font_map" gtk_widget_get_font_map :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Pango.FontMap)


widgetGetFontMap ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Pango.FontMap
widgetGetFontMap _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_font_map _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_font_map" result
    result' <- (newObject Pango.FontMap) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_font_options
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "FontOptions"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_font_options" gtk_widget_get_font_options :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Cairo.FontOptions)


widgetGetFontOptions ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Cairo.FontOptions
widgetGetFontOptions _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_font_options _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_font_options" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> Cairo.FontOptions <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_frame_clock
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "FrameClock"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_frame_clock" gtk_widget_get_frame_clock :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Gdk.FrameClock)


widgetGetFrameClock ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Gdk.FrameClock
widgetGetFrameClock _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_frame_clock _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_frame_clock" result
    result' <- (newObject Gdk.FrameClock) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_halign
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Align"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_halign" gtk_widget_get_halign :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CUInt


widgetGetHalign ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Align
widgetGetHalign _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_halign _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_has_tooltip
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_has_tooltip" gtk_widget_get_has_tooltip :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetHasTooltip ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetHasTooltip _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_has_tooltip _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_has_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_has_window" gtk_widget_get_has_window :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetHasWindow ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetHasWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_has_window _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_hexpand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_hexpand" gtk_widget_get_hexpand :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetHexpand ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetHexpand _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_hexpand _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_hexpand_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_hexpand_set" gtk_widget_get_hexpand_set :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetHexpandSet ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetHexpandSet _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_hexpand_set _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_mapped
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_mapped" gtk_widget_get_mapped :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetMapped ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetMapped _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_mapped _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_margin_bottom
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_margin_bottom" gtk_widget_get_margin_bottom :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO Int32


widgetGetMarginBottom ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Int32
widgetGetMarginBottom _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_margin_bottom _obj'
    touchManagedPtr _obj
    return result

-- method Widget::get_margin_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_margin_end" gtk_widget_get_margin_end :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO Int32


widgetGetMarginEnd ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Int32
widgetGetMarginEnd _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_margin_end _obj'
    touchManagedPtr _obj
    return result

-- method Widget::get_margin_left
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_margin_left" gtk_widget_get_margin_left :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO Int32

{-# DEPRECATED widgetGetMarginLeft ["(Since version 3.12)","Use gtk_widget_get_margin_start() instead."]#-}
widgetGetMarginLeft ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Int32
widgetGetMarginLeft _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_margin_left _obj'
    touchManagedPtr _obj
    return result

-- method Widget::get_margin_right
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_margin_right" gtk_widget_get_margin_right :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO Int32

{-# DEPRECATED widgetGetMarginRight ["(Since version 3.12)","Use gtk_widget_get_margin_end() instead."]#-}
widgetGetMarginRight ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Int32
widgetGetMarginRight _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_margin_right _obj'
    touchManagedPtr _obj
    return result

-- method Widget::get_margin_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_margin_start" gtk_widget_get_margin_start :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO Int32


widgetGetMarginStart ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Int32
widgetGetMarginStart _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_margin_start _obj'
    touchManagedPtr _obj
    return result

-- method Widget::get_margin_top
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_margin_top" gtk_widget_get_margin_top :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO Int32


widgetGetMarginTop ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Int32
widgetGetMarginTop _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_margin_top _obj'
    touchManagedPtr _obj
    return result

-- method Widget::get_modifier_mask
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "intent", argType = TInterface "Gdk" "ModifierIntent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "intent", argType = TInterface "Gdk" "ModifierIntent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "ModifierType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_modifier_mask" gtk_widget_get_modifier_mask :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- intent : TInterface "Gdk" "ModifierIntent"
    IO CUInt


widgetGetModifierMask ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Gdk.ModifierIntent ->                   -- intent
    m [Gdk.ModifierType]
widgetGetModifierMask _obj intent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let intent' = (fromIntegral . fromEnum) intent
    result <- gtk_widget_get_modifier_mask _obj' intent'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method Widget::get_modifier_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RcStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_modifier_style" gtk_widget_get_modifier_style :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr RcStyle)

{-# DEPRECATED widgetGetModifierStyle ["(Since version 3.0)","Use #GtkStyleContext with a custom #GtkStyleProvider instead"]#-}
widgetGetModifierStyle ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m RcStyle
widgetGetModifierStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_modifier_style _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_modifier_style" result
    result' <- (newObject RcStyle) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_name" gtk_widget_get_name :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CString


widgetGetName ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m T.Text
widgetGetName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_name _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Widget::get_no_show_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_no_show_all" gtk_widget_get_no_show_all :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetNoShowAll ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetNoShowAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_no_show_all _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_opacity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_opacity" gtk_widget_get_opacity :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CDouble


widgetGetOpacity ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Double
widgetGetOpacity _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_opacity _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Widget::get_pango_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Context"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_pango_context" gtk_widget_get_pango_context :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Pango.Context)


widgetGetPangoContext ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Pango.Context
widgetGetPangoContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_pango_context _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_pango_context" result
    result' <- (newObject Pango.Context) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_parent" gtk_widget_get_parent :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Widget)


widgetGetParent ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Widget
widgetGetParent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_parent _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_parent" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_parent_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_parent_window" gtk_widget_get_parent_window :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Gdk.Window)


widgetGetParentWindow ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Gdk.Window
widgetGetParentWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_parent_window _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_parent_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "WidgetPath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_path" gtk_widget_get_path :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr WidgetPath)


widgetGetPath ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m WidgetPath
widgetGetPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_path _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_path" result
    result' <- (newBoxed WidgetPath) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_pointer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_pointer" gtk_widget_get_pointer :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Int32 ->                            -- x : TBasicType TInt32
    Ptr Int32 ->                            -- y : TBasicType TInt32
    IO ()

{-# DEPRECATED widgetGetPointer ["(Since version 3.4)","Use gdk_window_get_device_position() instead."]#-}
widgetGetPointer ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
widgetGetPointer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    x <- allocMem :: IO (Ptr Int32)
    y <- allocMem :: IO (Ptr Int32)
    gtk_widget_get_pointer _obj' x y
    x' <- peek x
    y' <- peek y
    touchManagedPtr _obj
    freeMem x
    freeMem y
    return (x', y')

-- method Widget::get_preferred_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_preferred_height" gtk_widget_get_preferred_height :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt32
    Ptr Int32 ->                            -- natural_height : TBasicType TInt32
    IO ()


widgetGetPreferredHeight ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
widgetGetPreferredHeight _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    minimum_height <- allocMem :: IO (Ptr Int32)
    natural_height <- allocMem :: IO (Ptr Int32)
    gtk_widget_get_preferred_height _obj' minimum_height natural_height
    minimum_height' <- peek minimum_height
    natural_height' <- peek natural_height
    touchManagedPtr _obj
    freeMem minimum_height
    freeMem natural_height
    return (minimum_height', natural_height')

-- method Widget::get_preferred_height_and_baseline_for_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "minimum_baseline", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_baseline", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_preferred_height_and_baseline_for_width" gtk_widget_get_preferred_height_and_baseline_for_width :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- width : TBasicType TInt32
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt32
    Ptr Int32 ->                            -- natural_height : TBasicType TInt32
    Ptr Int32 ->                            -- minimum_baseline : TBasicType TInt32
    Ptr Int32 ->                            -- natural_baseline : TBasicType TInt32
    IO ()


widgetGetPreferredHeightAndBaselineForWidth ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    m (Int32,Int32,Int32,Int32)
widgetGetPreferredHeightAndBaselineForWidth _obj width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    minimum_height <- allocMem :: IO (Ptr Int32)
    natural_height <- allocMem :: IO (Ptr Int32)
    minimum_baseline <- allocMem :: IO (Ptr Int32)
    natural_baseline <- allocMem :: IO (Ptr Int32)
    gtk_widget_get_preferred_height_and_baseline_for_width _obj' width minimum_height natural_height minimum_baseline natural_baseline
    minimum_height' <- peek minimum_height
    natural_height' <- peek natural_height
    minimum_baseline' <- peek minimum_baseline
    natural_baseline' <- peek natural_baseline
    touchManagedPtr _obj
    freeMem minimum_height
    freeMem natural_height
    freeMem minimum_baseline
    freeMem natural_baseline
    return (minimum_height', natural_height', minimum_baseline', natural_baseline')

-- method Widget::get_preferred_height_for_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_preferred_height_for_width" gtk_widget_get_preferred_height_for_width :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- width : TBasicType TInt32
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt32
    Ptr Int32 ->                            -- natural_height : TBasicType TInt32
    IO ()


widgetGetPreferredHeightForWidth ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    m (Int32,Int32)
widgetGetPreferredHeightForWidth _obj width = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    minimum_height <- allocMem :: IO (Ptr Int32)
    natural_height <- allocMem :: IO (Ptr Int32)
    gtk_widget_get_preferred_height_for_width _obj' width minimum_height natural_height
    minimum_height' <- peek minimum_height
    natural_height' <- peek natural_height
    touchManagedPtr _obj
    freeMem minimum_height
    freeMem natural_height
    return (minimum_height', natural_height')

-- method Widget::get_preferred_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_size", argType = TInterface "Gtk" "Requisition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "natural_size", argType = TInterface "Gtk" "Requisition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_preferred_size" gtk_widget_get_preferred_size :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Requisition ->                      -- minimum_size : TInterface "Gtk" "Requisition"
    Ptr Requisition ->                      -- natural_size : TInterface "Gtk" "Requisition"
    IO ()


widgetGetPreferredSize ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Requisition,Requisition)
widgetGetPreferredSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    minimum_size <- callocBoxedBytes 8 :: IO (Ptr Requisition)
    natural_size <- callocBoxedBytes 8 :: IO (Ptr Requisition)
    gtk_widget_get_preferred_size _obj' minimum_size natural_size
    minimum_size' <- (wrapBoxed Requisition) minimum_size
    natural_size' <- (wrapBoxed Requisition) natural_size
    touchManagedPtr _obj
    return (minimum_size', natural_size')

-- method Widget::get_preferred_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_preferred_width" gtk_widget_get_preferred_width :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Int32 ->                            -- minimum_width : TBasicType TInt32
    Ptr Int32 ->                            -- natural_width : TBasicType TInt32
    IO ()


widgetGetPreferredWidth ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
widgetGetPreferredWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    minimum_width <- allocMem :: IO (Ptr Int32)
    natural_width <- allocMem :: IO (Ptr Int32)
    gtk_widget_get_preferred_width _obj' minimum_width natural_width
    minimum_width' <- peek minimum_width
    natural_width' <- peek natural_width
    touchManagedPtr _obj
    freeMem minimum_width
    freeMem natural_width
    return (minimum_width', natural_width')

-- method Widget::get_preferred_width_for_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minimum_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "natural_width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_preferred_width_for_height" gtk_widget_get_preferred_width_for_height :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- height : TBasicType TInt32
    Ptr Int32 ->                            -- minimum_width : TBasicType TInt32
    Ptr Int32 ->                            -- natural_width : TBasicType TInt32
    IO ()


widgetGetPreferredWidthForHeight ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- height
    m (Int32,Int32)
widgetGetPreferredWidthForHeight _obj height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    minimum_width <- allocMem :: IO (Ptr Int32)
    natural_width <- allocMem :: IO (Ptr Int32)
    gtk_widget_get_preferred_width_for_height _obj' height minimum_width natural_width
    minimum_width' <- peek minimum_width
    natural_width' <- peek natural_width
    touchManagedPtr _obj
    freeMem minimum_width
    freeMem natural_width
    return (minimum_width', natural_width')

-- method Widget::get_realized
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_realized" gtk_widget_get_realized :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetRealized ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetRealized _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_realized _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_receives_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_receives_default" gtk_widget_get_receives_default :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetReceivesDefault ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetReceivesDefault _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_receives_default _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_request_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SizeRequestMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_request_mode" gtk_widget_get_request_mode :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CUInt


widgetGetRequestMode ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m SizeRequestMode
widgetGetRequestMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_request_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_requisition
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "requisition", argType = TInterface "Gtk" "Requisition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_requisition" gtk_widget_get_requisition :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Requisition ->                      -- requisition : TInterface "Gtk" "Requisition"
    IO ()

{-# DEPRECATED widgetGetRequisition ["(Since version 3.0)","The #GtkRequisition cache on the widget was","removed, If you need to cache sizes across requests and allocations,","add an explicit cache to the widget in question instead."]#-}
widgetGetRequisition ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Requisition)
widgetGetRequisition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    requisition <- callocBoxedBytes 8 :: IO (Ptr Requisition)
    gtk_widget_get_requisition _obj' requisition
    requisition' <- (wrapBoxed Requisition) requisition
    touchManagedPtr _obj
    return requisition'

-- method Widget::get_root_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_root_window" gtk_widget_get_root_window :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Gdk.Window)

{-# DEPRECATED widgetGetRootWindow ["(Since version 3.12)","Use gdk_screen_get_root_window() instead"]#-}
widgetGetRootWindow ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Gdk.Window
widgetGetRootWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_root_window _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_root_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_scale_factor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_scale_factor" gtk_widget_get_scale_factor :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO Int32


widgetGetScaleFactor ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Int32
widgetGetScaleFactor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_scale_factor _obj'
    touchManagedPtr _obj
    return result

-- method Widget::get_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Screen"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_screen" gtk_widget_get_screen :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Gdk.Screen)


widgetGetScreen ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Gdk.Screen
widgetGetScreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_screen _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_screen" result
    result' <- (newObject Gdk.Screen) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_sensitive" gtk_widget_get_sensitive :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetSensitive ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetSensitive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_sensitive _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_settings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Settings"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_settings" gtk_widget_get_settings :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Settings)


widgetGetSettings ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Settings
widgetGetSettings _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_settings _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_settings" result
    result' <- (newObject Settings) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_size_request
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_size_request" gtk_widget_get_size_request :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Int32 ->                            -- width : TBasicType TInt32
    Ptr Int32 ->                            -- height : TBasicType TInt32
    IO ()


widgetGetSizeRequest ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
widgetGetSizeRequest _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    width <- allocMem :: IO (Ptr Int32)
    height <- allocMem :: IO (Ptr Int32)
    gtk_widget_get_size_request _obj' width height
    width' <- peek width
    height' <- peek height
    touchManagedPtr _obj
    freeMem width
    freeMem height
    return (width', height')

-- method Widget::get_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StateType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_state" gtk_widget_get_state :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CUInt

{-# DEPRECATED widgetGetState ["(Since version 3.0)","Use gtk_widget_get_state_flags() instead."]#-}
widgetGetState ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m StateType
widgetGetState _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_state _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_state_flags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StateFlags"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_state_flags" gtk_widget_get_state_flags :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CUInt


widgetGetStateFlags ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m [StateFlags]
widgetGetStateFlags _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_state_flags _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method Widget::get_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Style"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_style" gtk_widget_get_style :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Style)

{-# DEPRECATED widgetGetStyle ["(Since version 3.0)","Use #GtkStyleContext instead"]#-}
widgetGetStyle ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Style
widgetGetStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_style _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_style" result
    result' <- (newObject Style) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_style_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StyleContext"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_style_context" gtk_widget_get_style_context :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr StyleContext)


widgetGetStyleContext ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m StyleContext
widgetGetStyleContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_style_context _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_style_context" result
    result' <- (newObject StyleContext) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_support_multidevice
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_support_multidevice" gtk_widget_get_support_multidevice :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetSupportMultidevice ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetSupportMultidevice _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_support_multidevice _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_template_child
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GObject" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_template_child" gtk_widget_get_template_child :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CGType ->                               -- widget_type : TBasicType TGType
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GObject.Object)


widgetGetTemplateChild ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    GType ->                                -- widget_type
    T.Text ->                               -- name
    m GObject.Object
widgetGetTemplateChild _obj widget_type name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let widget_type' = gtypeToCGType widget_type
    name' <- textToCString name
    result <- gtk_widget_get_template_child _obj' widget_type' name'
    checkUnexpectedReturnNULL "gtk_widget_get_template_child" result
    result' <- (newObject GObject.Object) result
    touchManagedPtr _obj
    freeMem name'
    return result'

-- method Widget::get_tooltip_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_tooltip_markup" gtk_widget_get_tooltip_markup :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CString


widgetGetTooltipMarkup ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m T.Text
widgetGetTooltipMarkup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_tooltip_markup _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_tooltip_markup" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Widget::get_tooltip_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_tooltip_text" gtk_widget_get_tooltip_text :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CString


widgetGetTooltipText ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m T.Text
widgetGetTooltipText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_tooltip_text _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_tooltip_text" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Widget::get_tooltip_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_tooltip_window" gtk_widget_get_tooltip_window :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Window)


widgetGetTooltipWindow ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Window
widgetGetTooltipWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_tooltip_window _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_tooltip_window" result
    result' <- (newObject Window) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_toplevel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_toplevel" gtk_widget_get_toplevel :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Widget)


widgetGetToplevel ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Widget
widgetGetToplevel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_toplevel _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_toplevel" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_valign
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Align"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_valign" gtk_widget_get_valign :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CUInt


widgetGetValign ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Align
widgetGetValign _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_valign _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_valign_with_baseline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Align"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_valign_with_baseline" gtk_widget_get_valign_with_baseline :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CUInt


widgetGetValignWithBaseline ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Align
widgetGetValignWithBaseline _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_valign_with_baseline _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_vexpand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_vexpand" gtk_widget_get_vexpand :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetVexpand ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetVexpand _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_vexpand _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_vexpand_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_vexpand_set" gtk_widget_get_vexpand_set :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetVexpandSet ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetVexpandSet _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_vexpand_set _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_visible" gtk_widget_get_visible :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetGetVisible ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetGetVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_visual
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Visual"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_visual" gtk_widget_get_visual :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Gdk.Visual)


widgetGetVisual ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Gdk.Visual
widgetGetVisual _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_visual _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_visual" result
    result' <- (newObject Gdk.Visual) result
    touchManagedPtr _obj
    return result'

-- method Widget::get_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_window" gtk_widget_get_window :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr Gdk.Window)


widgetGetWindow ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Gdk.Window
widgetGetWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_get_window _obj'
    checkUnexpectedReturnNULL "gtk_widget_get_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'

-- method Widget::grab_add
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grab_add" gtk_grab_add :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetGrabAdd ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetGrabAdd _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_grab_add _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::grab_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_grab_default" gtk_widget_grab_default :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetGrabDefault ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetGrabDefault _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_grab_default _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::grab_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_grab_focus" gtk_widget_grab_focus :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetGrabFocus ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetGrabFocus _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_grab_focus _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::grab_remove
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grab_remove" gtk_grab_remove :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetGrabRemove ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetGrabRemove _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_grab_remove _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::has_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_has_default" gtk_widget_has_default :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetHasDefault ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetHasDefault _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_has_default _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::has_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_has_focus" gtk_widget_has_focus :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetHasFocus ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetHasFocus _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_has_focus _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::has_grab
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_has_grab" gtk_widget_has_grab :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetHasGrab ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetHasGrab _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_has_grab _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::has_rc_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_has_rc_style" gtk_widget_has_rc_style :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt

{-# DEPRECATED widgetHasRcStyle ["(Since version 3.0)","Use #GtkStyleContext instead"]#-}
widgetHasRcStyle ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetHasRcStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_has_rc_style _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::has_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_has_screen" gtk_widget_has_screen :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetHasScreen ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetHasScreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_has_screen _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::has_visible_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_has_visible_focus" gtk_widget_has_visible_focus :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetHasVisibleFocus ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetHasVisibleFocus _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_has_visible_focus _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::hide
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_hide" gtk_widget_hide :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetHide ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetHide _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_hide _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::hide_on_delete
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_hide_on_delete" gtk_widget_hide_on_delete :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetHideOnDelete ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetHideOnDelete _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_hide_on_delete _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::in_destruction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_in_destruction" gtk_widget_in_destruction :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetInDestruction ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetInDestruction _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_in_destruction _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::init_template
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_init_template" gtk_widget_init_template :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetInitTemplate ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetInitTemplate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_init_template _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::input_shape_combine_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region", argType = TInterface "cairo" "Region", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region", argType = TInterface "cairo" "Region", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_input_shape_combine_region" gtk_widget_input_shape_combine_region :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Cairo.Region ->                     -- region : TInterface "cairo" "Region"
    IO ()


widgetInputShapeCombineRegion ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (Cairo.Region) ->                 -- region
    m ()
widgetInputShapeCombineRegion _obj region = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeRegion <- case region of
        Nothing -> return nullPtr
        Just jRegion -> do
            let jRegion' = unsafeManagedPtrGetPtr jRegion
            return jRegion'
    gtk_widget_input_shape_combine_region _obj' maybeRegion
    touchManagedPtr _obj
    whenJust region touchManagedPtr
    return ()

-- method Widget::insert_action_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gio" "ActionGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group", argType = TInterface "Gio" "ActionGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_insert_action_group" gtk_widget_insert_action_group :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- name : TBasicType TUTF8
    Ptr Gio.ActionGroup ->                  -- group : TInterface "Gio" "ActionGroup"
    IO ()


widgetInsertActionGroup ::
    (MonadIO m, WidgetK a, Gio.ActionGroupK b) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    Maybe (b) ->                            -- group
    m ()
widgetInsertActionGroup _obj name group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    maybeGroup <- case group of
        Nothing -> return nullPtr
        Just jGroup -> do
            let jGroup' = unsafeManagedPtrCastPtr jGroup
            return jGroup'
    gtk_widget_insert_action_group _obj' name' maybeGroup
    touchManagedPtr _obj
    whenJust group touchManagedPtr
    freeMem name'
    return ()

-- method Widget::intersect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "intersection", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "area", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "intersection", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_intersect" gtk_widget_intersect :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- area : TInterface "Gdk" "Rectangle"
    Ptr Gdk.Rectangle ->                    -- intersection : TInterface "Gdk" "Rectangle"
    IO CInt


widgetIntersect ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Gdk.Rectangle ->                        -- area
    Maybe (Gdk.Rectangle) ->                -- intersection
    m Bool
widgetIntersect _obj area intersection = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let area' = unsafeManagedPtrGetPtr area
    maybeIntersection <- case intersection of
        Nothing -> return nullPtr
        Just jIntersection -> do
            let jIntersection' = unsafeManagedPtrGetPtr jIntersection
            return jIntersection'
    result <- gtk_widget_intersect _obj' area' maybeIntersection
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr area
    whenJust intersection touchManagedPtr
    return result'

-- method Widget::is_ancestor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ancestor", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ancestor", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_ancestor" gtk_widget_is_ancestor :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- ancestor : TInterface "Gtk" "Widget"
    IO CInt


widgetIsAncestor ::
    (MonadIO m, WidgetK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- ancestor
    m Bool
widgetIsAncestor _obj ancestor = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let ancestor' = unsafeManagedPtrCastPtr ancestor
    result <- gtk_widget_is_ancestor _obj' ancestor'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr ancestor
    return result'

-- method Widget::is_composited
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_composited" gtk_widget_is_composited :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetIsComposited ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetIsComposited _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_is_composited _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::is_drawable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_drawable" gtk_widget_is_drawable :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetIsDrawable ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetIsDrawable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_is_drawable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::is_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_focus" gtk_widget_is_focus :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetIsFocus ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetIsFocus _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_is_focus _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::is_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_sensitive" gtk_widget_is_sensitive :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetIsSensitive ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetIsSensitive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_is_sensitive _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::is_toplevel
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_toplevel" gtk_widget_is_toplevel :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetIsToplevel ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetIsToplevel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_is_toplevel _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::is_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_visible" gtk_widget_is_visible :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO CInt


widgetIsVisible ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m Bool
widgetIsVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_is_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::keynav_failed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "DirectionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "DirectionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_keynav_failed" gtk_widget_keynav_failed :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- direction : TInterface "Gtk" "DirectionType"
    IO CInt


widgetKeynavFailed ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    DirectionType ->                        -- direction
    m Bool
widgetKeynavFailed _obj direction = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let direction' = (fromIntegral . fromEnum) direction
    result <- gtk_widget_keynav_failed _obj' direction'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::list_accel_closures
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "GObject" "Closure")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_list_accel_closures" gtk_widget_list_accel_closures :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr (GList (Ptr Closure)))


widgetListAccelClosures ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m [Closure]
widgetListAccelClosures _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_list_accel_closures _obj'
    checkUnexpectedReturnNULL "gtk_widget_list_accel_closures" result
    result' <- unpackGList result
    result'' <- mapM (newBoxed Closure) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method Widget::list_action_prefixes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_list_action_prefixes" gtk_widget_list_action_prefixes :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr CString)


widgetListActionPrefixes ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m [T.Text]
widgetListActionPrefixes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_list_action_prefixes _obj'
    checkUnexpectedReturnNULL "gtk_widget_list_action_prefixes" result
    result' <- unpackZeroTerminatedUTF8CArray result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Widget::list_mnemonic_labels
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "Widget")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_list_mnemonic_labels" gtk_widget_list_mnemonic_labels :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO (Ptr (GList (Ptr Widget)))


widgetListMnemonicLabels ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m [Widget]
widgetListMnemonicLabels _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_widget_list_mnemonic_labels _obj'
    checkUnexpectedReturnNULL "gtk_widget_list_mnemonic_labels" result
    result' <- unpackGList result
    result'' <- mapM (newObject Widget) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method Widget::map
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_map" gtk_widget_map :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetMap ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetMap _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_map _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::mnemonic_activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_cycling", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_cycling", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_mnemonic_activate" gtk_widget_mnemonic_activate :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- group_cycling : TBasicType TBoolean
    IO CInt


widgetMnemonicActivate ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- group_cycling
    m Bool
widgetMnemonicActivate _obj group_cycling = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let group_cycling' = (fromIntegral . fromEnum) group_cycling
    result <- gtk_widget_mnemonic_activate _obj' group_cycling'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Widget::modify_base
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_modify_base" gtk_widget_modify_base :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED widgetModifyBase ["(Since version 3.0)","Use gtk_widget_override_background_color() instead"]#-}
widgetModifyBase ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    StateType ->                            -- state
    Maybe (Gdk.Color) ->                    -- color
    m ()
widgetModifyBase _obj state color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = (fromIntegral . fromEnum) state
    maybeColor <- case color of
        Nothing -> return nullPtr
        Just jColor -> do
            let jColor' = unsafeManagedPtrGetPtr jColor
            return jColor'
    gtk_widget_modify_base _obj' state' maybeColor
    touchManagedPtr _obj
    whenJust color touchManagedPtr
    return ()

-- method Widget::modify_bg
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_modify_bg" gtk_widget_modify_bg :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED widgetModifyBg ["(Since version 3.0)","Use gtk_widget_override_background_color() instead"]#-}
widgetModifyBg ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    StateType ->                            -- state
    Maybe (Gdk.Color) ->                    -- color
    m ()
widgetModifyBg _obj state color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = (fromIntegral . fromEnum) state
    maybeColor <- case color of
        Nothing -> return nullPtr
        Just jColor -> do
            let jColor' = unsafeManagedPtrGetPtr jColor
            return jColor'
    gtk_widget_modify_bg _obj' state' maybeColor
    touchManagedPtr _obj
    whenJust color touchManagedPtr
    return ()

-- method Widget::modify_cursor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "primary", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "secondary", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "primary", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "secondary", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_modify_cursor" gtk_widget_modify_cursor :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Color ->                        -- primary : TInterface "Gdk" "Color"
    Ptr Gdk.Color ->                        -- secondary : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED widgetModifyCursor ["(Since version 3.0)","Use gtk_widget_override_cursor() instead."]#-}
widgetModifyCursor ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (Gdk.Color) ->                    -- primary
    Maybe (Gdk.Color) ->                    -- secondary
    m ()
widgetModifyCursor _obj primary secondary = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePrimary <- case primary of
        Nothing -> return nullPtr
        Just jPrimary -> do
            let jPrimary' = unsafeManagedPtrGetPtr jPrimary
            return jPrimary'
    maybeSecondary <- case secondary of
        Nothing -> return nullPtr
        Just jSecondary -> do
            let jSecondary' = unsafeManagedPtrGetPtr jSecondary
            return jSecondary'
    gtk_widget_modify_cursor _obj' maybePrimary maybeSecondary
    touchManagedPtr _obj
    whenJust primary touchManagedPtr
    whenJust secondary touchManagedPtr
    return ()

-- method Widget::modify_fg
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_modify_fg" gtk_widget_modify_fg :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED widgetModifyFg ["(Since version 3.0)","Use gtk_widget_override_color() instead"]#-}
widgetModifyFg ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    StateType ->                            -- state
    Maybe (Gdk.Color) ->                    -- color
    m ()
widgetModifyFg _obj state color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = (fromIntegral . fromEnum) state
    maybeColor <- case color of
        Nothing -> return nullPtr
        Just jColor -> do
            let jColor' = unsafeManagedPtrGetPtr jColor
            return jColor'
    gtk_widget_modify_fg _obj' state' maybeColor
    touchManagedPtr _obj
    whenJust color touchManagedPtr
    return ()

-- method Widget::modify_font
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font_desc", argType = TInterface "Pango" "FontDescription", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font_desc", argType = TInterface "Pango" "FontDescription", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_modify_font" gtk_widget_modify_font :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Pango.FontDescription ->            -- font_desc : TInterface "Pango" "FontDescription"
    IO ()

{-# DEPRECATED widgetModifyFont ["(Since version 3.0)","Use gtk_widget_override_font() instead"]#-}
widgetModifyFont ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (Pango.FontDescription) ->        -- font_desc
    m ()
widgetModifyFont _obj font_desc = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFont_desc <- case font_desc of
        Nothing -> return nullPtr
        Just jFont_desc -> do
            let jFont_desc' = unsafeManagedPtrGetPtr jFont_desc
            return jFont_desc'
    gtk_widget_modify_font _obj' maybeFont_desc
    touchManagedPtr _obj
    whenJust font_desc touchManagedPtr
    return ()

-- method Widget::modify_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "RcStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "RcStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_modify_style" gtk_widget_modify_style :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr RcStyle ->                          -- style : TInterface "Gtk" "RcStyle"
    IO ()

{-# DEPRECATED widgetModifyStyle ["(Since version 3.0)","Use #GtkStyleContext with a custom #GtkStyleProvider instead"]#-}
widgetModifyStyle ::
    (MonadIO m, WidgetK a, RcStyleK b) =>
    a ->                                    -- _obj
    b ->                                    -- style
    m ()
widgetModifyStyle _obj style = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let style' = unsafeManagedPtrCastPtr style
    gtk_widget_modify_style _obj' style'
    touchManagedPtr _obj
    touchManagedPtr style
    return ()

-- method Widget::modify_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_modify_text" gtk_widget_modify_text :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO ()

{-# DEPRECATED widgetModifyText ["(Since version 3.0)","Use gtk_widget_override_color() instead"]#-}
widgetModifyText ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    StateType ->                            -- state
    Maybe (Gdk.Color) ->                    -- color
    m ()
widgetModifyText _obj state color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = (fromIntegral . fromEnum) state
    maybeColor <- case color of
        Nothing -> return nullPtr
        Just jColor -> do
            let jColor' = unsafeManagedPtrGetPtr jColor
            return jColor'
    gtk_widget_modify_text _obj' state' maybeColor
    touchManagedPtr _obj
    whenJust color touchManagedPtr
    return ()

-- method Widget::override_background_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_override_background_color" gtk_widget_override_background_color :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO ()

{-# DEPRECATED widgetOverrideBackgroundColor ["(Since version 3.16)","This function is not useful in the context of CSS-based","  rendering. If you wish to change the way a widget renders its background","  you should use a custom CSS style, through an application-specific","  #GtkStyleProvider and a CSS style class. You can also override the default","  drawing of a widget through the #GtkWidget::draw signal, and use Cairo to","  draw a specific color, regardless of the CSS style."]#-}
widgetOverrideBackgroundColor ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    Maybe (Gdk.RGBA) ->                     -- color
    m ()
widgetOverrideBackgroundColor _obj state color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    maybeColor <- case color of
        Nothing -> return nullPtr
        Just jColor -> do
            let jColor' = unsafeManagedPtrGetPtr jColor
            return jColor'
    gtk_widget_override_background_color _obj' state' maybeColor
    touchManagedPtr _obj
    whenJust color touchManagedPtr
    return ()

-- method Widget::override_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_override_color" gtk_widget_override_color :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO ()

{-# DEPRECATED widgetOverrideColor ["(Since version 3.16)","Use a custom style provider and style classes instead"]#-}
widgetOverrideColor ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- state
    Maybe (Gdk.RGBA) ->                     -- color
    m ()
widgetOverrideColor _obj state color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = gflagsToWord state
    maybeColor <- case color of
        Nothing -> return nullPtr
        Just jColor -> do
            let jColor' = unsafeManagedPtrGetPtr jColor
            return jColor'
    gtk_widget_override_color _obj' state' maybeColor
    touchManagedPtr _obj
    whenJust color touchManagedPtr
    return ()

-- method Widget::override_cursor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cursor", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "secondary_cursor", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cursor", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "secondary_cursor", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_override_cursor" gtk_widget_override_cursor :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.RGBA ->                         -- cursor : TInterface "Gdk" "RGBA"
    Ptr Gdk.RGBA ->                         -- secondary_cursor : TInterface "Gdk" "RGBA"
    IO ()

{-# DEPRECATED widgetOverrideCursor ["(Since version 3.16)","This function is not useful in the context of CSS-based","  rendering. If you wish to change the color used to render the primary","  and secondary cursors you should use a custom CSS style, through an","  application-specific #GtkStyleProvider and a CSS style class."]#-}
widgetOverrideCursor ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (Gdk.RGBA) ->                     -- cursor
    Maybe (Gdk.RGBA) ->                     -- secondary_cursor
    m ()
widgetOverrideCursor _obj cursor secondary_cursor = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCursor <- case cursor of
        Nothing -> return nullPtr
        Just jCursor -> do
            let jCursor' = unsafeManagedPtrGetPtr jCursor
            return jCursor'
    maybeSecondary_cursor <- case secondary_cursor of
        Nothing -> return nullPtr
        Just jSecondary_cursor -> do
            let jSecondary_cursor' = unsafeManagedPtrGetPtr jSecondary_cursor
            return jSecondary_cursor'
    gtk_widget_override_cursor _obj' maybeCursor maybeSecondary_cursor
    touchManagedPtr _obj
    whenJust cursor touchManagedPtr
    whenJust secondary_cursor touchManagedPtr
    return ()

-- method Widget::override_font
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font_desc", argType = TInterface "Pango" "FontDescription", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font_desc", argType = TInterface "Pango" "FontDescription", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_override_font" gtk_widget_override_font :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Pango.FontDescription ->            -- font_desc : TInterface "Pango" "FontDescription"
    IO ()

{-# DEPRECATED widgetOverrideFont ["(Since version 3.16)","This function is not useful in the context of CSS-based","  rendering. If you wish to change the font a widget uses to render its text","  you should use a custom CSS style, through an application-specific","  #GtkStyleProvider and a CSS style class."]#-}
widgetOverrideFont ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (Pango.FontDescription) ->        -- font_desc
    m ()
widgetOverrideFont _obj font_desc = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFont_desc <- case font_desc of
        Nothing -> return nullPtr
        Just jFont_desc -> do
            let jFont_desc' = unsafeManagedPtrGetPtr jFont_desc
            return jFont_desc'
    gtk_widget_override_font _obj' maybeFont_desc
    touchManagedPtr _obj
    whenJust font_desc touchManagedPtr
    return ()

-- method Widget::override_symbolic_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_override_symbolic_color" gtk_widget_override_symbolic_color :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- name : TBasicType TUTF8
    Ptr Gdk.RGBA ->                         -- color : TInterface "Gdk" "RGBA"
    IO ()

{-# DEPRECATED widgetOverrideSymbolicColor ["(Since version 3.16)","This function is not useful in the context of CSS-based","  rendering. If you wish to change the color used to render symbolic icons","  you should use a custom CSS style, through an application-specific","  #GtkStyleProvider and a CSS style class."]#-}
widgetOverrideSymbolicColor ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    Maybe (Gdk.RGBA) ->                     -- color
    m ()
widgetOverrideSymbolicColor _obj name color = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    maybeColor <- case color of
        Nothing -> return nullPtr
        Just jColor -> do
            let jColor' = unsafeManagedPtrGetPtr jColor
            return jColor'
    gtk_widget_override_symbolic_color _obj' name' maybeColor
    touchManagedPtr _obj
    whenJust color touchManagedPtr
    freeMem name'
    return ()

-- method Widget::path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path_length", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "path_reversed", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path" gtk_widget_path :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Word32 ->                           -- path_length : TBasicType TUInt32
    Ptr CString ->                          -- path : TBasicType TUTF8
    Ptr CString ->                          -- path_reversed : TBasicType TUTF8
    IO ()

{-# DEPRECATED widgetPath ["(Since version 3.0)","Use gtk_widget_get_path() instead"]#-}
widgetPath ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Word32,T.Text,T.Text)
widgetPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    path_length <- allocMem :: IO (Ptr Word32)
    path <- allocMem :: IO (Ptr CString)
    path_reversed <- allocMem :: IO (Ptr CString)
    gtk_widget_path _obj' path_length path path_reversed
    path_length' <- peek path_length
    path' <- peek path
    path'' <- cstringToText path'
    freeMem path'
    path_reversed' <- peek path_reversed
    path_reversed'' <- cstringToText path_reversed'
    freeMem path_reversed'
    touchManagedPtr _obj
    freeMem path_length
    freeMem path
    freeMem path_reversed
    return (path_length', path'', path_reversed'')

-- method Widget::queue_compute_expand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_queue_compute_expand" gtk_widget_queue_compute_expand :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetQueueComputeExpand ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetQueueComputeExpand _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_queue_compute_expand _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::queue_draw
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_queue_draw" gtk_widget_queue_draw :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetQueueDraw ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetQueueDraw _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_queue_draw _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::queue_draw_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_queue_draw_area" gtk_widget_queue_draw_area :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


widgetQueueDrawArea ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
widgetQueueDrawArea _obj x y width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_queue_draw_area _obj' x y width height
    touchManagedPtr _obj
    return ()

-- method Widget::queue_draw_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region", argType = TInterface "cairo" "Region", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region", argType = TInterface "cairo" "Region", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_queue_draw_region" gtk_widget_queue_draw_region :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Cairo.Region ->                     -- region : TInterface "cairo" "Region"
    IO ()


widgetQueueDrawRegion ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Cairo.Region ->                         -- region
    m ()
widgetQueueDrawRegion _obj region = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let region' = unsafeManagedPtrGetPtr region
    gtk_widget_queue_draw_region _obj' region'
    touchManagedPtr _obj
    touchManagedPtr region
    return ()

-- method Widget::queue_resize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_queue_resize" gtk_widget_queue_resize :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetQueueResize ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetQueueResize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_queue_resize _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::queue_resize_no_redraw
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_queue_resize_no_redraw" gtk_widget_queue_resize_no_redraw :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetQueueResizeNoRedraw ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetQueueResizeNoRedraw _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_queue_resize_no_redraw _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::realize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_realize" gtk_widget_realize :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetRealize ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetRealize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_realize _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::region_intersect
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region", argType = TInterface "cairo" "Region", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region", argType = TInterface "cairo" "Region", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Region"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_region_intersect" gtk_widget_region_intersect :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Cairo.Region ->                     -- region : TInterface "cairo" "Region"
    IO (Ptr Cairo.Region)

{-# DEPRECATED widgetRegionIntersect ["(Since version 3.14)","Use gtk_widget_get_allocation() and","    cairo_region_intersect_rectangle() to get the same behavior."]#-}
widgetRegionIntersect ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Cairo.Region ->                         -- region
    m Cairo.Region
widgetRegionIntersect _obj region = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let region' = unsafeManagedPtrGetPtr region
    result <- gtk_widget_region_intersect _obj' region'
    checkUnexpectedReturnNULL "gtk_widget_region_intersect" result
    result' <- (wrapBoxed Cairo.Region) result
    touchManagedPtr _obj
    touchManagedPtr region
    return result'

-- method Widget::register_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_register_window" gtk_widget_register_window :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    IO ()


widgetRegisterWindow ::
    (MonadIO m, WidgetK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    m ()
widgetRegisterWindow _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window' = unsafeManagedPtrCastPtr window
    gtk_widget_register_window _obj' window'
    touchManagedPtr _obj
    touchManagedPtr window
    return ()

-- method Widget::remove_accelerator
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_remove_accelerator" gtk_widget_remove_accelerator :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr AccelGroup ->                       -- accel_group : TInterface "Gtk" "AccelGroup"
    Word32 ->                               -- accel_key : TBasicType TUInt32
    CUInt ->                                -- accel_mods : TInterface "Gdk" "ModifierType"
    IO CInt


widgetRemoveAccelerator ::
    (MonadIO m, WidgetK a, AccelGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- accel_group
    Word32 ->                               -- accel_key
    [Gdk.ModifierType] ->                   -- accel_mods
    m Bool
widgetRemoveAccelerator _obj accel_group accel_key accel_mods = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accel_group' = unsafeManagedPtrCastPtr accel_group
    let accel_mods' = gflagsToWord accel_mods
    result <- gtk_widget_remove_accelerator _obj' accel_group' accel_key accel_mods'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr accel_group
    return result'

-- method Widget::remove_mnemonic_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_remove_mnemonic_label" gtk_widget_remove_mnemonic_label :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- label : TInterface "Gtk" "Widget"
    IO ()


widgetRemoveMnemonicLabel ::
    (MonadIO m, WidgetK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- label
    m ()
widgetRemoveMnemonicLabel _obj label = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let label' = unsafeManagedPtrCastPtr label
    gtk_widget_remove_mnemonic_label _obj' label'
    touchManagedPtr _obj
    touchManagedPtr label
    return ()

-- method Widget::remove_tick_callback
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_remove_tick_callback" gtk_widget_remove_tick_callback :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Word32 ->                               -- id : TBasicType TUInt32
    IO ()


widgetRemoveTickCallback ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- id
    m ()
widgetRemoveTickCallback _obj id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_remove_tick_callback _obj' id
    touchManagedPtr _obj
    return ()

-- method Widget::render_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_render_icon" gtk_widget_render_icon :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- stock_id : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    CString ->                              -- detail : TBasicType TUTF8
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED widgetRenderIcon ["(Since version 3.0)","Use gtk_widget_render_icon_pixbuf() instead."]#-}
widgetRenderIcon ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- stock_id
    Int32 ->                                -- size
    Maybe (T.Text) ->                       -- detail
    m GdkPixbuf.Pixbuf
widgetRenderIcon _obj stock_id size detail = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    stock_id' <- textToCString stock_id
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    result <- gtk_widget_render_icon _obj' stock_id' size maybeDetail
    checkUnexpectedReturnNULL "gtk_widget_render_icon" result
    result' <- (wrapObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    freeMem stock_id'
    freeMem maybeDetail
    return result'

-- method Widget::render_icon_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_render_icon_pixbuf" gtk_widget_render_icon_pixbuf :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- stock_id : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt32
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED widgetRenderIconPixbuf ["(Since version 3.10)","Use gtk_icon_theme_load_icon() instead."]#-}
widgetRenderIconPixbuf ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- stock_id
    Int32 ->                                -- size
    m GdkPixbuf.Pixbuf
widgetRenderIconPixbuf _obj stock_id size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    stock_id' <- textToCString stock_id
    result <- gtk_widget_render_icon_pixbuf _obj' stock_id' size
    checkUnexpectedReturnNULL "gtk_widget_render_icon_pixbuf" result
    result' <- (wrapObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    freeMem stock_id'
    return result'

-- method Widget::reparent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_parent", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "new_parent", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_reparent" gtk_widget_reparent :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- new_parent : TInterface "Gtk" "Widget"
    IO ()

{-# DEPRECATED widgetReparent ["(Since version 3.14)","Use gtk_container_remove() and gtk_container_add()."]#-}
widgetReparent ::
    (MonadIO m, WidgetK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- new_parent
    m ()
widgetReparent _obj new_parent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let new_parent' = unsafeManagedPtrCastPtr new_parent
    gtk_widget_reparent _obj' new_parent'
    touchManagedPtr _obj
    touchManagedPtr new_parent
    return ()

-- method Widget::reset_rc_styles
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_reset_rc_styles" gtk_widget_reset_rc_styles :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()

{-# DEPRECATED widgetResetRcStyles ["(Since version 3.0)","Use #GtkStyleContext instead, and gtk_widget_reset_style()"]#-}
widgetResetRcStyles ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetResetRcStyles _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_reset_rc_styles _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::reset_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_reset_style" gtk_widget_reset_style :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetResetStyle ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetResetStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_reset_style _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::send_expose
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_send_expose" gtk_widget_send_expose :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    IO Int32


widgetSendExpose ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Gdk.Event ->                            -- event
    m Int32
widgetSendExpose _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_widget_send_expose _obj' event'
    touchManagedPtr _obj
    touchManagedPtr event
    return result

-- method Widget::send_focus_change
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_send_focus_change" gtk_widget_send_focus_change :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    IO CInt


widgetSendFocusChange ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Gdk.Event ->                            -- event
    m Bool
widgetSendFocusChange _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_widget_send_focus_change _obj' event'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event
    return result'

-- method Widget::set_accel_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_accel_path" gtk_widget_set_accel_path :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- accel_path : TBasicType TUTF8
    Ptr AccelGroup ->                       -- accel_group : TInterface "Gtk" "AccelGroup"
    IO ()


widgetSetAccelPath ::
    (MonadIO m, WidgetK a, AccelGroupK b) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- accel_path
    Maybe (b) ->                            -- accel_group
    m ()
widgetSetAccelPath _obj accel_path accel_group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAccel_path <- case accel_path of
        Nothing -> return nullPtr
        Just jAccel_path -> do
            jAccel_path' <- textToCString jAccel_path
            return jAccel_path'
    maybeAccel_group <- case accel_group of
        Nothing -> return nullPtr
        Just jAccel_group -> do
            let jAccel_group' = unsafeManagedPtrCastPtr jAccel_group
            return jAccel_group'
    gtk_widget_set_accel_path _obj' maybeAccel_path maybeAccel_group
    touchManagedPtr _obj
    whenJust accel_group touchManagedPtr
    freeMem maybeAccel_path
    return ()

-- method Widget::set_allocation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allocation", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allocation", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_allocation" gtk_widget_set_allocation :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- allocation : TInterface "Gdk" "Rectangle"
    IO ()


widgetSetAllocation ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Gdk.Rectangle ->                        -- allocation
    m ()
widgetSetAllocation _obj allocation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let allocation' = unsafeManagedPtrGetPtr allocation
    gtk_widget_set_allocation _obj' allocation'
    touchManagedPtr _obj
    touchManagedPtr allocation
    return ()

-- method Widget::set_app_paintable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_paintable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_paintable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_app_paintable" gtk_widget_set_app_paintable :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- app_paintable : TBasicType TBoolean
    IO ()


widgetSetAppPaintable ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- app_paintable
    m ()
widgetSetAppPaintable _obj app_paintable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let app_paintable' = (fromIntegral . fromEnum) app_paintable
    gtk_widget_set_app_paintable _obj' app_paintable'
    touchManagedPtr _obj
    return ()

-- method Widget::set_can_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "can_default", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "can_default", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_can_default" gtk_widget_set_can_default :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- can_default : TBasicType TBoolean
    IO ()


widgetSetCanDefault ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- can_default
    m ()
widgetSetCanDefault _obj can_default = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let can_default' = (fromIntegral . fromEnum) can_default
    gtk_widget_set_can_default _obj' can_default'
    touchManagedPtr _obj
    return ()

-- method Widget::set_can_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "can_focus", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "can_focus", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_can_focus" gtk_widget_set_can_focus :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- can_focus : TBasicType TBoolean
    IO ()


widgetSetCanFocus ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- can_focus
    m ()
widgetSetCanFocus _obj can_focus = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let can_focus' = (fromIntegral . fromEnum) can_focus
    gtk_widget_set_can_focus _obj' can_focus'
    touchManagedPtr _obj
    return ()

-- method Widget::set_child_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_child_visible" gtk_widget_set_child_visible :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- is_visible : TBasicType TBoolean
    IO ()


widgetSetChildVisible ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- is_visible
    m ()
widgetSetChildVisible _obj is_visible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let is_visible' = (fromIntegral . fromEnum) is_visible
    gtk_widget_set_child_visible _obj' is_visible'
    touchManagedPtr _obj
    return ()

-- method Widget::set_clip
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clip", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clip", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_clip" gtk_widget_set_clip :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- clip : TInterface "Gdk" "Rectangle"
    IO ()


widgetSetClip ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Gdk.Rectangle ->                        -- clip
    m ()
widgetSetClip _obj clip = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let clip' = unsafeManagedPtrGetPtr clip
    gtk_widget_set_clip _obj' clip'
    touchManagedPtr _obj
    touchManagedPtr clip
    return ()

-- method Widget::set_composite_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_composite_name" gtk_widget_set_composite_name :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- name : TBasicType TUTF8
    IO ()

{-# DEPRECATED widgetSetCompositeName ["(Since version 3.10)","Use gtk_widget_class_set_template(), or don\8217t use this API at all."]#-}
widgetSetCompositeName ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
widgetSetCompositeName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    gtk_widget_set_composite_name _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method Widget::set_device_enabled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_device_enabled" gtk_widget_set_device_enabled :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Device ->                       -- device : TInterface "Gdk" "Device"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


widgetSetDeviceEnabled ::
    (MonadIO m, WidgetK a, Gdk.DeviceK b) =>
    a ->                                    -- _obj
    b ->                                    -- device
    Bool ->                                 -- enabled
    m ()
widgetSetDeviceEnabled _obj device enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let device' = unsafeManagedPtrCastPtr device
    let enabled' = (fromIntegral . fromEnum) enabled
    gtk_widget_set_device_enabled _obj' device' enabled'
    touchManagedPtr _obj
    touchManagedPtr device
    return ()

-- method Widget::set_device_events
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "events", argType = TInterface "Gdk" "EventMask", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "events", argType = TInterface "Gdk" "EventMask", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_device_events" gtk_widget_set_device_events :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Device ->                       -- device : TInterface "Gdk" "Device"
    CUInt ->                                -- events : TInterface "Gdk" "EventMask"
    IO ()


widgetSetDeviceEvents ::
    (MonadIO m, WidgetK a, Gdk.DeviceK b) =>
    a ->                                    -- _obj
    b ->                                    -- device
    [Gdk.EventMask] ->                      -- events
    m ()
widgetSetDeviceEvents _obj device events = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let device' = unsafeManagedPtrCastPtr device
    let events' = gflagsToWord events
    gtk_widget_set_device_events _obj' device' events'
    touchManagedPtr _obj
    touchManagedPtr device
    return ()

-- method Widget::set_direction
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dir", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dir", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_direction" gtk_widget_set_direction :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- dir : TInterface "Gtk" "TextDirection"
    IO ()


widgetSetDirection ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    TextDirection ->                        -- dir
    m ()
widgetSetDirection _obj dir = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let dir' = (fromIntegral . fromEnum) dir
    gtk_widget_set_direction _obj' dir'
    touchManagedPtr _obj
    return ()

-- method Widget::set_double_buffered
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "double_buffered", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "double_buffered", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_double_buffered" gtk_widget_set_double_buffered :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- double_buffered : TBasicType TBoolean
    IO ()

{-# DEPRECATED widgetSetDoubleBuffered ["(Since version 3.14)","This function does not work under non-X11 backends or with","non-native windows.","It should not be used in newly written code."]#-}
widgetSetDoubleBuffered ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- double_buffered
    m ()
widgetSetDoubleBuffered _obj double_buffered = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let double_buffered' = (fromIntegral . fromEnum) double_buffered
    gtk_widget_set_double_buffered _obj' double_buffered'
    touchManagedPtr _obj
    return ()

-- method Widget::set_events
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "events", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "events", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_events" gtk_widget_set_events :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- events : TBasicType TInt32
    IO ()


widgetSetEvents ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- events
    m ()
widgetSetEvents _obj events = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_set_events _obj' events
    touchManagedPtr _obj
    return ()

-- method Widget::set_font_map
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font_map", argType = TInterface "Pango" "FontMap", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font_map", argType = TInterface "Pango" "FontMap", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_font_map" gtk_widget_set_font_map :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Pango.FontMap ->                    -- font_map : TInterface "Pango" "FontMap"
    IO ()


widgetSetFontMap ::
    (MonadIO m, WidgetK a, Pango.FontMapK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- font_map
    m ()
widgetSetFontMap _obj font_map = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFont_map <- case font_map of
        Nothing -> return nullPtr
        Just jFont_map -> do
            let jFont_map' = unsafeManagedPtrCastPtr jFont_map
            return jFont_map'
    gtk_widget_set_font_map _obj' maybeFont_map
    touchManagedPtr _obj
    whenJust font_map touchManagedPtr
    return ()

-- method Widget::set_font_options
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "options", argType = TInterface "cairo" "FontOptions", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "options", argType = TInterface "cairo" "FontOptions", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_font_options" gtk_widget_set_font_options :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Cairo.FontOptions ->                -- options : TInterface "cairo" "FontOptions"
    IO ()


widgetSetFontOptions ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (Cairo.FontOptions) ->            -- options
    m ()
widgetSetFontOptions _obj options = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeOptions <- case options of
        Nothing -> return nullPtr
        Just jOptions -> do
            let jOptions' = unsafeManagedPtrGetPtr jOptions
            return jOptions'
    gtk_widget_set_font_options _obj' maybeOptions
    touchManagedPtr _obj
    whenJust options touchManagedPtr
    return ()

-- method Widget::set_halign
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TInterface "Gtk" "Align", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TInterface "Gtk" "Align", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_halign" gtk_widget_set_halign :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- align : TInterface "Gtk" "Align"
    IO ()


widgetSetHalign ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Align ->                                -- align
    m ()
widgetSetHalign _obj align = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let align' = (fromIntegral . fromEnum) align
    gtk_widget_set_halign _obj' align'
    touchManagedPtr _obj
    return ()

-- method Widget::set_has_tooltip
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_tooltip", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_tooltip", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_has_tooltip" gtk_widget_set_has_tooltip :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- has_tooltip : TBasicType TBoolean
    IO ()


widgetSetHasTooltip ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_tooltip
    m ()
widgetSetHasTooltip _obj has_tooltip = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_tooltip' = (fromIntegral . fromEnum) has_tooltip
    gtk_widget_set_has_tooltip _obj' has_tooltip'
    touchManagedPtr _obj
    return ()

-- method Widget::set_has_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_window", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_window", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_has_window" gtk_widget_set_has_window :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- has_window : TBasicType TBoolean
    IO ()


widgetSetHasWindow ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_window
    m ()
widgetSetHasWindow _obj has_window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_window' = (fromIntegral . fromEnum) has_window
    gtk_widget_set_has_window _obj' has_window'
    touchManagedPtr _obj
    return ()

-- method Widget::set_hexpand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_hexpand" gtk_widget_set_hexpand :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()


widgetSetHexpand ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- expand
    m ()
widgetSetHexpand _obj expand = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let expand' = (fromIntegral . fromEnum) expand
    gtk_widget_set_hexpand _obj' expand'
    touchManagedPtr _obj
    return ()

-- method Widget::set_hexpand_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "set", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "set", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_hexpand_set" gtk_widget_set_hexpand_set :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- set : TBasicType TBoolean
    IO ()


widgetSetHexpandSet ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- set
    m ()
widgetSetHexpandSet _obj set = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let set' = (fromIntegral . fromEnum) set
    gtk_widget_set_hexpand_set _obj' set'
    touchManagedPtr _obj
    return ()

-- method Widget::set_mapped
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mapped", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mapped", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_mapped" gtk_widget_set_mapped :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- mapped : TBasicType TBoolean
    IO ()


widgetSetMapped ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- mapped
    m ()
widgetSetMapped _obj mapped = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let mapped' = (fromIntegral . fromEnum) mapped
    gtk_widget_set_mapped _obj' mapped'
    touchManagedPtr _obj
    return ()

-- method Widget::set_margin_bottom
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_margin_bottom" gtk_widget_set_margin_bottom :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- margin : TBasicType TInt32
    IO ()


widgetSetMarginBottom ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- margin
    m ()
widgetSetMarginBottom _obj margin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_set_margin_bottom _obj' margin
    touchManagedPtr _obj
    return ()

-- method Widget::set_margin_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_margin_end" gtk_widget_set_margin_end :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- margin : TBasicType TInt32
    IO ()


widgetSetMarginEnd ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- margin
    m ()
widgetSetMarginEnd _obj margin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_set_margin_end _obj' margin
    touchManagedPtr _obj
    return ()

-- method Widget::set_margin_left
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_margin_left" gtk_widget_set_margin_left :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- margin : TBasicType TInt32
    IO ()

{-# DEPRECATED widgetSetMarginLeft ["(Since version 3.12)","Use gtk_widget_set_margin_start() instead."]#-}
widgetSetMarginLeft ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- margin
    m ()
widgetSetMarginLeft _obj margin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_set_margin_left _obj' margin
    touchManagedPtr _obj
    return ()

-- method Widget::set_margin_right
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_margin_right" gtk_widget_set_margin_right :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- margin : TBasicType TInt32
    IO ()

{-# DEPRECATED widgetSetMarginRight ["(Since version 3.12)","Use gtk_widget_set_margin_end() instead."]#-}
widgetSetMarginRight ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- margin
    m ()
widgetSetMarginRight _obj margin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_set_margin_right _obj' margin
    touchManagedPtr _obj
    return ()

-- method Widget::set_margin_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_margin_start" gtk_widget_set_margin_start :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- margin : TBasicType TInt32
    IO ()


widgetSetMarginStart ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- margin
    m ()
widgetSetMarginStart _obj margin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_set_margin_start _obj' margin
    touchManagedPtr _obj
    return ()

-- method Widget::set_margin_top
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_margin_top" gtk_widget_set_margin_top :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- margin : TBasicType TInt32
    IO ()


widgetSetMarginTop ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- margin
    m ()
widgetSetMarginTop _obj margin = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_set_margin_top _obj' margin
    touchManagedPtr _obj
    return ()

-- method Widget::set_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_name" gtk_widget_set_name :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


widgetSetName ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
widgetSetName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    gtk_widget_set_name _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method Widget::set_no_show_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "no_show_all", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "no_show_all", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_no_show_all" gtk_widget_set_no_show_all :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- no_show_all : TBasicType TBoolean
    IO ()


widgetSetNoShowAll ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- no_show_all
    m ()
widgetSetNoShowAll _obj no_show_all = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let no_show_all' = (fromIntegral . fromEnum) no_show_all
    gtk_widget_set_no_show_all _obj' no_show_all'
    touchManagedPtr _obj
    return ()

-- method Widget::set_opacity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "opacity", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "opacity", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_opacity" gtk_widget_set_opacity :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CDouble ->                              -- opacity : TBasicType TDouble
    IO ()


widgetSetOpacity ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Double ->                               -- opacity
    m ()
widgetSetOpacity _obj opacity = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let opacity' = realToFrac opacity
    gtk_widget_set_opacity _obj' opacity'
    touchManagedPtr _obj
    return ()

-- method Widget::set_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_parent" gtk_widget_set_parent :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- parent : TInterface "Gtk" "Widget"
    IO ()


widgetSetParent ::
    (MonadIO m, WidgetK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- parent
    m ()
widgetSetParent _obj parent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let parent' = unsafeManagedPtrCastPtr parent
    gtk_widget_set_parent _obj' parent'
    touchManagedPtr _obj
    touchManagedPtr parent
    return ()

-- method Widget::set_parent_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_parent_window" gtk_widget_set_parent_window :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Window ->                       -- parent_window : TInterface "Gdk" "Window"
    IO ()


widgetSetParentWindow ::
    (MonadIO m, WidgetK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- parent_window
    m ()
widgetSetParentWindow _obj parent_window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let parent_window' = unsafeManagedPtrCastPtr parent_window
    gtk_widget_set_parent_window _obj' parent_window'
    touchManagedPtr _obj
    touchManagedPtr parent_window
    return ()

-- method Widget::set_realized
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "realized", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "realized", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_realized" gtk_widget_set_realized :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- realized : TBasicType TBoolean
    IO ()


widgetSetRealized ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- realized
    m ()
widgetSetRealized _obj realized = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let realized' = (fromIntegral . fromEnum) realized
    gtk_widget_set_realized _obj' realized'
    touchManagedPtr _obj
    return ()

-- method Widget::set_receives_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "receives_default", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "receives_default", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_receives_default" gtk_widget_set_receives_default :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- receives_default : TBasicType TBoolean
    IO ()


widgetSetReceivesDefault ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- receives_default
    m ()
widgetSetReceivesDefault _obj receives_default = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let receives_default' = (fromIntegral . fromEnum) receives_default
    gtk_widget_set_receives_default _obj' receives_default'
    touchManagedPtr _obj
    return ()

-- method Widget::set_redraw_on_allocate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "redraw_on_allocate", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "redraw_on_allocate", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_redraw_on_allocate" gtk_widget_set_redraw_on_allocate :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- redraw_on_allocate : TBasicType TBoolean
    IO ()


widgetSetRedrawOnAllocate ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- redraw_on_allocate
    m ()
widgetSetRedrawOnAllocate _obj redraw_on_allocate = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let redraw_on_allocate' = (fromIntegral . fromEnum) redraw_on_allocate
    gtk_widget_set_redraw_on_allocate _obj' redraw_on_allocate'
    touchManagedPtr _obj
    return ()

-- method Widget::set_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_sensitive" gtk_widget_set_sensitive :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- sensitive : TBasicType TBoolean
    IO ()


widgetSetSensitive ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- sensitive
    m ()
widgetSetSensitive _obj sensitive = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let sensitive' = (fromIntegral . fromEnum) sensitive
    gtk_widget_set_sensitive _obj' sensitive'
    touchManagedPtr _obj
    return ()

-- method Widget::set_size_request
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_size_request" gtk_widget_set_size_request :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


widgetSetSizeRequest ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
widgetSetSizeRequest _obj width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_set_size_request _obj' width height
    touchManagedPtr _obj
    return ()

-- method Widget::set_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_state" gtk_widget_set_state :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- state : TInterface "Gtk" "StateType"
    IO ()

{-# DEPRECATED widgetSetState ["(Since version 3.0)","Use gtk_widget_set_state_flags() instead."]#-}
widgetSetState ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    StateType ->                            -- state
    m ()
widgetSetState _obj state = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let state' = (fromIntegral . fromEnum) state
    gtk_widget_set_state _obj' state'
    touchManagedPtr _obj
    return ()

-- method Widget::set_state_flags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clear", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "clear", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_state_flags" gtk_widget_set_state_flags :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- flags : TInterface "Gtk" "StateFlags"
    CInt ->                                 -- clear : TBasicType TBoolean
    IO ()


widgetSetStateFlags ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- flags
    Bool ->                                 -- clear
    m ()
widgetSetStateFlags _obj flags clear = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let flags' = gflagsToWord flags
    let clear' = (fromIntegral . fromEnum) clear
    gtk_widget_set_state_flags _obj' flags' clear'
    touchManagedPtr _obj
    return ()

-- method Widget::set_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_style" gtk_widget_set_style :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    IO ()

{-# DEPRECATED widgetSetStyle ["(Since version 3.0)","Use #GtkStyleContext instead"]#-}
widgetSetStyle ::
    (MonadIO m, WidgetK a, StyleK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- style
    m ()
widgetSetStyle _obj style = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeStyle <- case style of
        Nothing -> return nullPtr
        Just jStyle -> do
            let jStyle' = unsafeManagedPtrCastPtr jStyle
            return jStyle'
    gtk_widget_set_style _obj' maybeStyle
    touchManagedPtr _obj
    whenJust style touchManagedPtr
    return ()

-- method Widget::set_support_multidevice
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "support_multidevice", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "support_multidevice", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_support_multidevice" gtk_widget_set_support_multidevice :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- support_multidevice : TBasicType TBoolean
    IO ()


widgetSetSupportMultidevice ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- support_multidevice
    m ()
widgetSetSupportMultidevice _obj support_multidevice = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let support_multidevice' = (fromIntegral . fromEnum) support_multidevice
    gtk_widget_set_support_multidevice _obj' support_multidevice'
    touchManagedPtr _obj
    return ()

-- method Widget::set_tooltip_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_tooltip_markup" gtk_widget_set_tooltip_markup :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- markup : TBasicType TUTF8
    IO ()


widgetSetTooltipMarkup ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- markup
    m ()
widgetSetTooltipMarkup _obj markup = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeMarkup <- case markup of
        Nothing -> return nullPtr
        Just jMarkup -> do
            jMarkup' <- textToCString jMarkup
            return jMarkup'
    gtk_widget_set_tooltip_markup _obj' maybeMarkup
    touchManagedPtr _obj
    freeMem maybeMarkup
    return ()

-- method Widget::set_tooltip_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_tooltip_text" gtk_widget_set_tooltip_text :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


widgetSetTooltipText ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- text
    m ()
widgetSetTooltipText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeText <- case text of
        Nothing -> return nullPtr
        Just jText -> do
            jText' <- textToCString jText
            return jText'
    gtk_widget_set_tooltip_text _obj' maybeText
    touchManagedPtr _obj
    freeMem maybeText
    return ()

-- method Widget::set_tooltip_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "custom_window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "custom_window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_tooltip_window" gtk_widget_set_tooltip_window :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Window ->                           -- custom_window : TInterface "Gtk" "Window"
    IO ()


widgetSetTooltipWindow ::
    (MonadIO m, WidgetK a, WindowK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- custom_window
    m ()
widgetSetTooltipWindow _obj custom_window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCustom_window <- case custom_window of
        Nothing -> return nullPtr
        Just jCustom_window -> do
            let jCustom_window' = unsafeManagedPtrCastPtr jCustom_window
            return jCustom_window'
    gtk_widget_set_tooltip_window _obj' maybeCustom_window
    touchManagedPtr _obj
    whenJust custom_window touchManagedPtr
    return ()

-- method Widget::set_valign
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TInterface "Gtk" "Align", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TInterface "Gtk" "Align", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_valign" gtk_widget_set_valign :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- align : TInterface "Gtk" "Align"
    IO ()


widgetSetValign ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Align ->                                -- align
    m ()
widgetSetValign _obj align = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let align' = (fromIntegral . fromEnum) align
    gtk_widget_set_valign _obj' align'
    touchManagedPtr _obj
    return ()

-- method Widget::set_vexpand
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_vexpand" gtk_widget_set_vexpand :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()


widgetSetVexpand ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- expand
    m ()
widgetSetVexpand _obj expand = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let expand' = (fromIntegral . fromEnum) expand
    gtk_widget_set_vexpand _obj' expand'
    touchManagedPtr _obj
    return ()

-- method Widget::set_vexpand_set
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "set", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "set", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_vexpand_set" gtk_widget_set_vexpand_set :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- set : TBasicType TBoolean
    IO ()


widgetSetVexpandSet ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- set
    m ()
widgetSetVexpandSet _obj set = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let set' = (fromIntegral . fromEnum) set
    gtk_widget_set_vexpand_set _obj' set'
    touchManagedPtr _obj
    return ()

-- method Widget::set_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visible", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_visible" gtk_widget_set_visible :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CInt ->                                 -- visible : TBasicType TBoolean
    IO ()


widgetSetVisible ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- visible
    m ()
widgetSetVisible _obj visible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let visible' = (fromIntegral . fromEnum) visible
    gtk_widget_set_visible _obj' visible'
    touchManagedPtr _obj
    return ()

-- method Widget::set_visual
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visual", argType = TInterface "Gdk" "Visual", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "visual", argType = TInterface "Gdk" "Visual", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_visual" gtk_widget_set_visual :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Visual ->                       -- visual : TInterface "Gdk" "Visual"
    IO ()


widgetSetVisual ::
    (MonadIO m, WidgetK a, Gdk.VisualK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- visual
    m ()
widgetSetVisual _obj visual = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeVisual <- case visual of
        Nothing -> return nullPtr
        Just jVisual -> do
            let jVisual' = unsafeManagedPtrCastPtr jVisual
            return jVisual'
    gtk_widget_set_visual _obj' maybeVisual
    touchManagedPtr _obj
    whenJust visual touchManagedPtr
    return ()

-- method Widget::set_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_window" gtk_widget_set_window :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    IO ()


widgetSetWindow ::
    (MonadIO m, WidgetK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    m ()
widgetSetWindow _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    window' <- refObject window
    gtk_widget_set_window _obj' window'
    touchManagedPtr _obj
    touchManagedPtr window
    return ()

-- method Widget::shape_combine_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region", argType = TInterface "cairo" "Region", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region", argType = TInterface "cairo" "Region", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_shape_combine_region" gtk_widget_shape_combine_region :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Cairo.Region ->                     -- region : TInterface "cairo" "Region"
    IO ()


widgetShapeCombineRegion ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Maybe (Cairo.Region) ->                 -- region
    m ()
widgetShapeCombineRegion _obj region = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeRegion <- case region of
        Nothing -> return nullPtr
        Just jRegion -> do
            let jRegion' = unsafeManagedPtrGetPtr jRegion
            return jRegion'
    gtk_widget_shape_combine_region _obj' maybeRegion
    touchManagedPtr _obj
    whenJust region touchManagedPtr
    return ()

-- method Widget::show
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_show" gtk_widget_show :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetShow ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetShow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_show _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::show_all
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_show_all" gtk_widget_show_all :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetShowAll ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetShowAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_show_all _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::show_now
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_show_now" gtk_widget_show_now :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetShowNow ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetShowNow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_show_now _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::size_allocate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allocation", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allocation", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_size_allocate" gtk_widget_size_allocate :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- allocation : TInterface "Gdk" "Rectangle"
    IO ()


widgetSizeAllocate ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Gdk.Rectangle ->                        -- allocation
    m ()
widgetSizeAllocate _obj allocation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let allocation' = unsafeManagedPtrGetPtr allocation
    gtk_widget_size_allocate _obj' allocation'
    touchManagedPtr _obj
    touchManagedPtr allocation
    return ()

-- method Widget::size_allocate_with_baseline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allocation", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "baseline", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "allocation", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "baseline", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_size_allocate_with_baseline" gtk_widget_size_allocate_with_baseline :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Rectangle ->                    -- allocation : TInterface "Gdk" "Rectangle"
    Int32 ->                                -- baseline : TBasicType TInt32
    IO ()


widgetSizeAllocateWithBaseline ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    Gdk.Rectangle ->                        -- allocation
    Int32 ->                                -- baseline
    m ()
widgetSizeAllocateWithBaseline _obj allocation baseline = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let allocation' = unsafeManagedPtrGetPtr allocation
    gtk_widget_size_allocate_with_baseline _obj' allocation' baseline
    touchManagedPtr _obj
    touchManagedPtr allocation
    return ()

-- method Widget::size_request
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "requisition", argType = TInterface "Gtk" "Requisition", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_size_request" gtk_widget_size_request :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Requisition ->                      -- requisition : TInterface "Gtk" "Requisition"
    IO ()

{-# DEPRECATED widgetSizeRequest ["(Since version 3.0)","Use gtk_widget_get_preferred_size() instead."]#-}
widgetSizeRequest ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m (Requisition)
widgetSizeRequest _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    requisition <- callocBoxedBytes 8 :: IO (Ptr Requisition)
    gtk_widget_size_request _obj' requisition
    requisition' <- (wrapBoxed Requisition) requisition
    touchManagedPtr _obj
    return requisition'

-- method Widget::style_attach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_style_attach" gtk_widget_style_attach :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()

{-# DEPRECATED widgetStyleAttach ["(Since version 3.0)","This step is unnecessary with #GtkStyleContext."]#-}
widgetStyleAttach ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetStyleAttach _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_style_attach _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::style_get_property
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_style_get_property" gtk_widget_style_get_property :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()


widgetStyleGetProperty ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- property_name
    GValue ->                               -- value
    m ()
widgetStyleGetProperty _obj property_name value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    property_name' <- textToCString property_name
    let value' = unsafeManagedPtrGetPtr value
    gtk_widget_style_get_property _obj' property_name' value'
    touchManagedPtr _obj
    touchManagedPtr value
    freeMem property_name'
    return ()

-- method Widget::thaw_child_notify
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_thaw_child_notify" gtk_widget_thaw_child_notify :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetThawChildNotify ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetThawChildNotify _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_thaw_child_notify _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::translate_coordinates
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "src_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "src_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest_x", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "dest_y", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "src_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "src_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_translate_coordinates" gtk_widget_translate_coordinates :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Widget ->                           -- dest_widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- src_x : TBasicType TInt32
    Int32 ->                                -- src_y : TBasicType TInt32
    Ptr Int32 ->                            -- dest_x : TBasicType TInt32
    Ptr Int32 ->                            -- dest_y : TBasicType TInt32
    IO CInt


widgetTranslateCoordinates ::
    (MonadIO m, WidgetK a, WidgetK b) =>
    a ->                                    -- _obj
    b ->                                    -- dest_widget
    Int32 ->                                -- src_x
    Int32 ->                                -- src_y
    m (Bool,Int32,Int32)
widgetTranslateCoordinates _obj dest_widget src_x src_y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let dest_widget' = unsafeManagedPtrCastPtr dest_widget
    dest_x <- allocMem :: IO (Ptr Int32)
    dest_y <- allocMem :: IO (Ptr Int32)
    result <- gtk_widget_translate_coordinates _obj' dest_widget' src_x src_y dest_x dest_y
    let result' = (/= 0) result
    dest_x' <- peek dest_x
    dest_y' <- peek dest_y
    touchManagedPtr _obj
    touchManagedPtr dest_widget
    freeMem dest_x
    freeMem dest_y
    return (result', dest_x', dest_y')

-- method Widget::trigger_tooltip_query
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_trigger_tooltip_query" gtk_widget_trigger_tooltip_query :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetTriggerTooltipQuery ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetTriggerTooltipQuery _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_trigger_tooltip_query _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::unmap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_unmap" gtk_widget_unmap :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetUnmap ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetUnmap _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_unmap _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::unparent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_unparent" gtk_widget_unparent :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetUnparent ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetUnparent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_unparent _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::unrealize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_unrealize" gtk_widget_unrealize :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    IO ()


widgetUnrealize ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    m ()
widgetUnrealize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_widget_unrealize _obj'
    touchManagedPtr _obj
    return ()

-- method Widget::unregister_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_unregister_window" gtk_widget_unregister_window :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    IO ()


widgetUnregisterWindow ::
    (MonadIO m, WidgetK a, Gdk.WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    m ()
widgetUnregisterWindow _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window' = unsafeManagedPtrCastPtr window
    gtk_widget_unregister_window _obj' window'
    touchManagedPtr _obj
    touchManagedPtr window
    return ()

-- method Widget::unset_state_flags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_unset_state_flags" gtk_widget_unset_state_flags :: 
    Ptr Widget ->                           -- _obj : TInterface "Gtk" "Widget"
    CUInt ->                                -- flags : TInterface "Gtk" "StateFlags"
    IO ()


widgetUnsetStateFlags ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- _obj
    [StateFlags] ->                         -- flags
    m ()
widgetUnsetStateFlags _obj flags = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let flags' = gflagsToWord flags
    gtk_widget_unset_state_flags _obj' flags'
    touchManagedPtr _obj
    return ()

-- method Widget::get_default_direction
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TextDirection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_default_direction" gtk_widget_get_default_direction :: 
    IO CUInt


widgetGetDefaultDirection ::
    (MonadIO m) =>
    m TextDirection
widgetGetDefaultDirection  = liftIO $ do
    result <- gtk_widget_get_default_direction
    let result' = (toEnum . fromIntegral) result
    return result'

-- method Widget::get_default_style
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Style"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_default_style" gtk_widget_get_default_style :: 
    IO (Ptr Style)

{-# DEPRECATED widgetGetDefaultStyle ["(Since version 3.0)","Use #GtkStyleContext instead, and","    gtk_css_provider_get_default() to obtain a #GtkStyleProvider","    with the default widget style information."]#-}
widgetGetDefaultStyle ::
    (MonadIO m) =>
    m Style
widgetGetDefaultStyle  = liftIO $ do
    result <- gtk_widget_get_default_style
    checkUnexpectedReturnNULL "gtk_widget_get_default_style" result
    result' <- (newObject Style) result
    return result'

-- method Widget::pop_composite_child
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_pop_composite_child" gtk_widget_pop_composite_child :: 
    IO ()

{-# DEPRECATED widgetPopCompositeChild ["(Since version 3.10)","Use gtk_widget_class_set_template(), or don\8217t use this API at all."]#-}
widgetPopCompositeChild ::
    (MonadIO m) =>
    m ()
widgetPopCompositeChild  = liftIO $ do
    gtk_widget_pop_composite_child
    return ()

-- method Widget::push_composite_child
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_push_composite_child" gtk_widget_push_composite_child :: 
    IO ()

{-# DEPRECATED widgetPushCompositeChild ["(Since version 3.10)","This API never really worked well and was mostly unused, now","we have a more complete mechanism for composite children, see gtk_widget_class_set_template()."]#-}
widgetPushCompositeChild ::
    (MonadIO m) =>
    m ()
widgetPushCompositeChild  = liftIO $ do
    gtk_widget_push_composite_child
    return ()

-- method Widget::set_default_direction
-- method type : MemberFunction
-- Args : [Arg {argName = "dir", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "dir", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_default_direction" gtk_widget_set_default_direction :: 
    CUInt ->                                -- dir : TInterface "Gtk" "TextDirection"
    IO ()


widgetSetDefaultDirection ::
    (MonadIO m) =>
    TextDirection ->                        -- dir
    m ()
widgetSetDefaultDirection dir = liftIO $ do
    let dir' = (fromIntegral . fromEnum) dir
    gtk_widget_set_default_direction dir'
    return ()

-- signal Widget::accel-closures-changed
type WidgetAccelClosuresChangedCallback =
    IO ()

noWidgetAccelClosuresChangedCallback :: Maybe WidgetAccelClosuresChangedCallback
noWidgetAccelClosuresChangedCallback = Nothing

type WidgetAccelClosuresChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetAccelClosuresChangedCallback :: WidgetAccelClosuresChangedCallbackC -> IO (FunPtr WidgetAccelClosuresChangedCallbackC)

widgetAccelClosuresChangedClosure :: WidgetAccelClosuresChangedCallback -> IO Closure
widgetAccelClosuresChangedClosure cb = newCClosure =<< mkWidgetAccelClosuresChangedCallback wrapped
    where wrapped = widgetAccelClosuresChangedCallbackWrapper cb

widgetAccelClosuresChangedCallbackWrapper ::
    WidgetAccelClosuresChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
widgetAccelClosuresChangedCallbackWrapper _cb _ _ = do
    _cb 

onWidgetAccelClosuresChanged :: (GObject a, MonadIO m) => a -> WidgetAccelClosuresChangedCallback -> m SignalHandlerId
onWidgetAccelClosuresChanged obj cb = liftIO $ connectWidgetAccelClosuresChanged obj cb SignalConnectBefore
afterWidgetAccelClosuresChanged :: (GObject a, MonadIO m) => a -> WidgetAccelClosuresChangedCallback -> m SignalHandlerId
afterWidgetAccelClosuresChanged obj cb = connectWidgetAccelClosuresChanged obj cb SignalConnectAfter

connectWidgetAccelClosuresChanged :: (GObject a, MonadIO m) =>
                                     a -> WidgetAccelClosuresChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetAccelClosuresChanged obj cb after = liftIO $ do
    cb' <- mkWidgetAccelClosuresChangedCallback (widgetAccelClosuresChangedCallbackWrapper cb)
    connectSignalFunPtr obj "accel-closures-changed" cb' after

-- signal Widget::button-press-event
type WidgetButtonPressEventCallback =
    Gdk.EventButton ->
    IO Bool

noWidgetButtonPressEventCallback :: Maybe WidgetButtonPressEventCallback
noWidgetButtonPressEventCallback = Nothing

type WidgetButtonPressEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventButton ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetButtonPressEventCallback :: WidgetButtonPressEventCallbackC -> IO (FunPtr WidgetButtonPressEventCallbackC)

widgetButtonPressEventClosure :: WidgetButtonPressEventCallback -> IO Closure
widgetButtonPressEventClosure cb = newCClosure =<< mkWidgetButtonPressEventCallback wrapped
    where wrapped = widgetButtonPressEventCallbackWrapper cb

widgetButtonPressEventCallbackWrapper ::
    WidgetButtonPressEventCallback ->
    Ptr () ->
    Ptr Gdk.EventButton ->
    Ptr () ->
    IO CInt
widgetButtonPressEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 80 Gdk.EventButton) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetButtonPressEvent :: (GObject a, MonadIO m) => a -> WidgetButtonPressEventCallback -> m SignalHandlerId
onWidgetButtonPressEvent obj cb = liftIO $ connectWidgetButtonPressEvent obj cb SignalConnectBefore
afterWidgetButtonPressEvent :: (GObject a, MonadIO m) => a -> WidgetButtonPressEventCallback -> m SignalHandlerId
afterWidgetButtonPressEvent obj cb = connectWidgetButtonPressEvent obj cb SignalConnectAfter

connectWidgetButtonPressEvent :: (GObject a, MonadIO m) =>
                                 a -> WidgetButtonPressEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetButtonPressEvent obj cb after = liftIO $ do
    cb' <- mkWidgetButtonPressEventCallback (widgetButtonPressEventCallbackWrapper cb)
    connectSignalFunPtr obj "button-press-event" cb' after

-- signal Widget::button-release-event
type WidgetButtonReleaseEventCallback =
    Gdk.EventButton ->
    IO Bool

noWidgetButtonReleaseEventCallback :: Maybe WidgetButtonReleaseEventCallback
noWidgetButtonReleaseEventCallback = Nothing

type WidgetButtonReleaseEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventButton ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetButtonReleaseEventCallback :: WidgetButtonReleaseEventCallbackC -> IO (FunPtr WidgetButtonReleaseEventCallbackC)

widgetButtonReleaseEventClosure :: WidgetButtonReleaseEventCallback -> IO Closure
widgetButtonReleaseEventClosure cb = newCClosure =<< mkWidgetButtonReleaseEventCallback wrapped
    where wrapped = widgetButtonReleaseEventCallbackWrapper cb

widgetButtonReleaseEventCallbackWrapper ::
    WidgetButtonReleaseEventCallback ->
    Ptr () ->
    Ptr Gdk.EventButton ->
    Ptr () ->
    IO CInt
widgetButtonReleaseEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 80 Gdk.EventButton) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetButtonReleaseEvent :: (GObject a, MonadIO m) => a -> WidgetButtonReleaseEventCallback -> m SignalHandlerId
onWidgetButtonReleaseEvent obj cb = liftIO $ connectWidgetButtonReleaseEvent obj cb SignalConnectBefore
afterWidgetButtonReleaseEvent :: (GObject a, MonadIO m) => a -> WidgetButtonReleaseEventCallback -> m SignalHandlerId
afterWidgetButtonReleaseEvent obj cb = connectWidgetButtonReleaseEvent obj cb SignalConnectAfter

connectWidgetButtonReleaseEvent :: (GObject a, MonadIO m) =>
                                   a -> WidgetButtonReleaseEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetButtonReleaseEvent obj cb after = liftIO $ do
    cb' <- mkWidgetButtonReleaseEventCallback (widgetButtonReleaseEventCallbackWrapper cb)
    connectSignalFunPtr obj "button-release-event" cb' after

-- signal Widget::can-activate-accel
type WidgetCanActivateAccelCallback =
    Word32 ->
    IO Bool

noWidgetCanActivateAccelCallback :: Maybe WidgetCanActivateAccelCallback
noWidgetCanActivateAccelCallback = Nothing

type WidgetCanActivateAccelCallbackC =
    Ptr () ->                               -- object
    Word32 ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetCanActivateAccelCallback :: WidgetCanActivateAccelCallbackC -> IO (FunPtr WidgetCanActivateAccelCallbackC)

widgetCanActivateAccelClosure :: WidgetCanActivateAccelCallback -> IO Closure
widgetCanActivateAccelClosure cb = newCClosure =<< mkWidgetCanActivateAccelCallback wrapped
    where wrapped = widgetCanActivateAccelCallbackWrapper cb

widgetCanActivateAccelCallbackWrapper ::
    WidgetCanActivateAccelCallback ->
    Ptr () ->
    Word32 ->
    Ptr () ->
    IO CInt
widgetCanActivateAccelCallbackWrapper _cb _ signal_id _ = do
    result <- _cb  signal_id
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetCanActivateAccel :: (GObject a, MonadIO m) => a -> WidgetCanActivateAccelCallback -> m SignalHandlerId
onWidgetCanActivateAccel obj cb = liftIO $ connectWidgetCanActivateAccel obj cb SignalConnectBefore
afterWidgetCanActivateAccel :: (GObject a, MonadIO m) => a -> WidgetCanActivateAccelCallback -> m SignalHandlerId
afterWidgetCanActivateAccel obj cb = connectWidgetCanActivateAccel obj cb SignalConnectAfter

connectWidgetCanActivateAccel :: (GObject a, MonadIO m) =>
                                 a -> WidgetCanActivateAccelCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetCanActivateAccel obj cb after = liftIO $ do
    cb' <- mkWidgetCanActivateAccelCallback (widgetCanActivateAccelCallbackWrapper cb)
    connectSignalFunPtr obj "can-activate-accel" cb' after

-- signal Widget::child-notify
type WidgetChildNotifyCallback =
    GParamSpec ->
    IO ()

noWidgetChildNotifyCallback :: Maybe WidgetChildNotifyCallback
noWidgetChildNotifyCallback = Nothing

type WidgetChildNotifyCallbackC =
    Ptr () ->                               -- object
    Ptr GParamSpec ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetChildNotifyCallback :: WidgetChildNotifyCallbackC -> IO (FunPtr WidgetChildNotifyCallbackC)

widgetChildNotifyClosure :: WidgetChildNotifyCallback -> IO Closure
widgetChildNotifyClosure cb = newCClosure =<< mkWidgetChildNotifyCallback wrapped
    where wrapped = widgetChildNotifyCallbackWrapper cb

widgetChildNotifyCallbackWrapper ::
    WidgetChildNotifyCallback ->
    Ptr () ->
    Ptr GParamSpec ->
    Ptr () ->
    IO ()
widgetChildNotifyCallbackWrapper _cb _ child_property _ = do
    child_property' <- newGParamSpecFromPtr child_property
    _cb  child_property'

onWidgetChildNotify :: (GObject a, MonadIO m) => a -> WidgetChildNotifyCallback -> m SignalHandlerId
onWidgetChildNotify obj cb = liftIO $ connectWidgetChildNotify obj cb SignalConnectBefore
afterWidgetChildNotify :: (GObject a, MonadIO m) => a -> WidgetChildNotifyCallback -> m SignalHandlerId
afterWidgetChildNotify obj cb = connectWidgetChildNotify obj cb SignalConnectAfter

connectWidgetChildNotify :: (GObject a, MonadIO m) =>
                            a -> WidgetChildNotifyCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetChildNotify obj cb after = liftIO $ do
    cb' <- mkWidgetChildNotifyCallback (widgetChildNotifyCallbackWrapper cb)
    connectSignalFunPtr obj "child-notify" cb' after

-- signal Widget::composited-changed
type WidgetCompositedChangedCallback =
    IO ()

noWidgetCompositedChangedCallback :: Maybe WidgetCompositedChangedCallback
noWidgetCompositedChangedCallback = Nothing

type WidgetCompositedChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetCompositedChangedCallback :: WidgetCompositedChangedCallbackC -> IO (FunPtr WidgetCompositedChangedCallbackC)

widgetCompositedChangedClosure :: WidgetCompositedChangedCallback -> IO Closure
widgetCompositedChangedClosure cb = newCClosure =<< mkWidgetCompositedChangedCallback wrapped
    where wrapped = widgetCompositedChangedCallbackWrapper cb

widgetCompositedChangedCallbackWrapper ::
    WidgetCompositedChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
widgetCompositedChangedCallbackWrapper _cb _ _ = do
    _cb 

onWidgetCompositedChanged :: (GObject a, MonadIO m) => a -> WidgetCompositedChangedCallback -> m SignalHandlerId
onWidgetCompositedChanged obj cb = liftIO $ connectWidgetCompositedChanged obj cb SignalConnectBefore
afterWidgetCompositedChanged :: (GObject a, MonadIO m) => a -> WidgetCompositedChangedCallback -> m SignalHandlerId
afterWidgetCompositedChanged obj cb = connectWidgetCompositedChanged obj cb SignalConnectAfter

connectWidgetCompositedChanged :: (GObject a, MonadIO m) =>
                                  a -> WidgetCompositedChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetCompositedChanged obj cb after = liftIO $ do
    cb' <- mkWidgetCompositedChangedCallback (widgetCompositedChangedCallbackWrapper cb)
    connectSignalFunPtr obj "composited-changed" cb' after

-- signal Widget::configure-event
type WidgetConfigureEventCallback =
    Gdk.EventConfigure ->
    IO Bool

noWidgetConfigureEventCallback :: Maybe WidgetConfigureEventCallback
noWidgetConfigureEventCallback = Nothing

type WidgetConfigureEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventConfigure ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetConfigureEventCallback :: WidgetConfigureEventCallbackC -> IO (FunPtr WidgetConfigureEventCallbackC)

widgetConfigureEventClosure :: WidgetConfigureEventCallback -> IO Closure
widgetConfigureEventClosure cb = newCClosure =<< mkWidgetConfigureEventCallback wrapped
    where wrapped = widgetConfigureEventCallbackWrapper cb

widgetConfigureEventCallbackWrapper ::
    WidgetConfigureEventCallback ->
    Ptr () ->
    Ptr Gdk.EventConfigure ->
    Ptr () ->
    IO CInt
widgetConfigureEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 40 Gdk.EventConfigure) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetConfigureEvent :: (GObject a, MonadIO m) => a -> WidgetConfigureEventCallback -> m SignalHandlerId
onWidgetConfigureEvent obj cb = liftIO $ connectWidgetConfigureEvent obj cb SignalConnectBefore
afterWidgetConfigureEvent :: (GObject a, MonadIO m) => a -> WidgetConfigureEventCallback -> m SignalHandlerId
afterWidgetConfigureEvent obj cb = connectWidgetConfigureEvent obj cb SignalConnectAfter

connectWidgetConfigureEvent :: (GObject a, MonadIO m) =>
                               a -> WidgetConfigureEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetConfigureEvent obj cb after = liftIO $ do
    cb' <- mkWidgetConfigureEventCallback (widgetConfigureEventCallbackWrapper cb)
    connectSignalFunPtr obj "configure-event" cb' after

-- signal Widget::damage-event
type WidgetDamageEventCallback =
    Gdk.EventExpose ->
    IO Bool

noWidgetDamageEventCallback :: Maybe WidgetDamageEventCallback
noWidgetDamageEventCallback = Nothing

type WidgetDamageEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventExpose ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetDamageEventCallback :: WidgetDamageEventCallbackC -> IO (FunPtr WidgetDamageEventCallbackC)

widgetDamageEventClosure :: WidgetDamageEventCallback -> IO Closure
widgetDamageEventClosure cb = newCClosure =<< mkWidgetDamageEventCallback wrapped
    where wrapped = widgetDamageEventCallbackWrapper cb

widgetDamageEventCallbackWrapper ::
    WidgetDamageEventCallback ->
    Ptr () ->
    Ptr Gdk.EventExpose ->
    Ptr () ->
    IO CInt
widgetDamageEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 56 Gdk.EventExpose) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetDamageEvent :: (GObject a, MonadIO m) => a -> WidgetDamageEventCallback -> m SignalHandlerId
onWidgetDamageEvent obj cb = liftIO $ connectWidgetDamageEvent obj cb SignalConnectBefore
afterWidgetDamageEvent :: (GObject a, MonadIO m) => a -> WidgetDamageEventCallback -> m SignalHandlerId
afterWidgetDamageEvent obj cb = connectWidgetDamageEvent obj cb SignalConnectAfter

connectWidgetDamageEvent :: (GObject a, MonadIO m) =>
                            a -> WidgetDamageEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDamageEvent obj cb after = liftIO $ do
    cb' <- mkWidgetDamageEventCallback (widgetDamageEventCallbackWrapper cb)
    connectSignalFunPtr obj "damage-event" cb' after

-- signal Widget::delete-event
type WidgetDeleteEventCallback =
    Gdk.Event ->
    IO Bool

noWidgetDeleteEventCallback :: Maybe WidgetDeleteEventCallback
noWidgetDeleteEventCallback = Nothing

type WidgetDeleteEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.Event ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetDeleteEventCallback :: WidgetDeleteEventCallbackC -> IO (FunPtr WidgetDeleteEventCallbackC)

widgetDeleteEventClosure :: WidgetDeleteEventCallback -> IO Closure
widgetDeleteEventClosure cb = newCClosure =<< mkWidgetDeleteEventCallback wrapped
    where wrapped = widgetDeleteEventCallbackWrapper cb

widgetDeleteEventCallbackWrapper ::
    WidgetDeleteEventCallback ->
    Ptr () ->
    Ptr Gdk.Event ->
    Ptr () ->
    IO CInt
widgetDeleteEventCallbackWrapper _cb _ event _ = do
    event' <- (newBoxed Gdk.Event) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetDeleteEvent :: (GObject a, MonadIO m) => a -> WidgetDeleteEventCallback -> m SignalHandlerId
onWidgetDeleteEvent obj cb = liftIO $ connectWidgetDeleteEvent obj cb SignalConnectBefore
afterWidgetDeleteEvent :: (GObject a, MonadIO m) => a -> WidgetDeleteEventCallback -> m SignalHandlerId
afterWidgetDeleteEvent obj cb = connectWidgetDeleteEvent obj cb SignalConnectAfter

connectWidgetDeleteEvent :: (GObject a, MonadIO m) =>
                            a -> WidgetDeleteEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDeleteEvent obj cb after = liftIO $ do
    cb' <- mkWidgetDeleteEventCallback (widgetDeleteEventCallbackWrapper cb)
    connectSignalFunPtr obj "delete-event" cb' after

-- signal Widget::destroy
type WidgetDestroyCallback =
    IO ()

noWidgetDestroyCallback :: Maybe WidgetDestroyCallback
noWidgetDestroyCallback = Nothing

type WidgetDestroyCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetDestroyCallback :: WidgetDestroyCallbackC -> IO (FunPtr WidgetDestroyCallbackC)

widgetDestroyClosure :: WidgetDestroyCallback -> IO Closure
widgetDestroyClosure cb = newCClosure =<< mkWidgetDestroyCallback wrapped
    where wrapped = widgetDestroyCallbackWrapper cb

widgetDestroyCallbackWrapper ::
    WidgetDestroyCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
widgetDestroyCallbackWrapper _cb _ _ = do
    _cb 

onWidgetDestroy :: (GObject a, MonadIO m) => a -> WidgetDestroyCallback -> m SignalHandlerId
onWidgetDestroy obj cb = liftIO $ connectWidgetDestroy obj cb SignalConnectBefore
afterWidgetDestroy :: (GObject a, MonadIO m) => a -> WidgetDestroyCallback -> m SignalHandlerId
afterWidgetDestroy obj cb = connectWidgetDestroy obj cb SignalConnectAfter

connectWidgetDestroy :: (GObject a, MonadIO m) =>
                        a -> WidgetDestroyCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDestroy obj cb after = liftIO $ do
    cb' <- mkWidgetDestroyCallback (widgetDestroyCallbackWrapper cb)
    connectSignalFunPtr obj "destroy" cb' after

-- signal Widget::destroy-event
type WidgetDestroyEventCallback =
    Gdk.Event ->
    IO Bool

noWidgetDestroyEventCallback :: Maybe WidgetDestroyEventCallback
noWidgetDestroyEventCallback = Nothing

type WidgetDestroyEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.Event ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetDestroyEventCallback :: WidgetDestroyEventCallbackC -> IO (FunPtr WidgetDestroyEventCallbackC)

widgetDestroyEventClosure :: WidgetDestroyEventCallback -> IO Closure
widgetDestroyEventClosure cb = newCClosure =<< mkWidgetDestroyEventCallback wrapped
    where wrapped = widgetDestroyEventCallbackWrapper cb

widgetDestroyEventCallbackWrapper ::
    WidgetDestroyEventCallback ->
    Ptr () ->
    Ptr Gdk.Event ->
    Ptr () ->
    IO CInt
widgetDestroyEventCallbackWrapper _cb _ event _ = do
    event' <- (newBoxed Gdk.Event) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetDestroyEvent :: (GObject a, MonadIO m) => a -> WidgetDestroyEventCallback -> m SignalHandlerId
onWidgetDestroyEvent obj cb = liftIO $ connectWidgetDestroyEvent obj cb SignalConnectBefore
afterWidgetDestroyEvent :: (GObject a, MonadIO m) => a -> WidgetDestroyEventCallback -> m SignalHandlerId
afterWidgetDestroyEvent obj cb = connectWidgetDestroyEvent obj cb SignalConnectAfter

connectWidgetDestroyEvent :: (GObject a, MonadIO m) =>
                             a -> WidgetDestroyEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDestroyEvent obj cb after = liftIO $ do
    cb' <- mkWidgetDestroyEventCallback (widgetDestroyEventCallbackWrapper cb)
    connectSignalFunPtr obj "destroy-event" cb' after

-- signal Widget::direction-changed
type WidgetDirectionChangedCallback =
    TextDirection ->
    IO ()

noWidgetDirectionChangedCallback :: Maybe WidgetDirectionChangedCallback
noWidgetDirectionChangedCallback = Nothing

type WidgetDirectionChangedCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetDirectionChangedCallback :: WidgetDirectionChangedCallbackC -> IO (FunPtr WidgetDirectionChangedCallbackC)

widgetDirectionChangedClosure :: WidgetDirectionChangedCallback -> IO Closure
widgetDirectionChangedClosure cb = newCClosure =<< mkWidgetDirectionChangedCallback wrapped
    where wrapped = widgetDirectionChangedCallbackWrapper cb

widgetDirectionChangedCallbackWrapper ::
    WidgetDirectionChangedCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
widgetDirectionChangedCallbackWrapper _cb _ previous_direction _ = do
    let previous_direction' = (toEnum . fromIntegral) previous_direction
    _cb  previous_direction'

onWidgetDirectionChanged :: (GObject a, MonadIO m) => a -> WidgetDirectionChangedCallback -> m SignalHandlerId
onWidgetDirectionChanged obj cb = liftIO $ connectWidgetDirectionChanged obj cb SignalConnectBefore
afterWidgetDirectionChanged :: (GObject a, MonadIO m) => a -> WidgetDirectionChangedCallback -> m SignalHandlerId
afterWidgetDirectionChanged obj cb = connectWidgetDirectionChanged obj cb SignalConnectAfter

connectWidgetDirectionChanged :: (GObject a, MonadIO m) =>
                                 a -> WidgetDirectionChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDirectionChanged obj cb after = liftIO $ do
    cb' <- mkWidgetDirectionChangedCallback (widgetDirectionChangedCallbackWrapper cb)
    connectSignalFunPtr obj "direction-changed" cb' after

-- signal Widget::drag-begin
type WidgetDragBeginCallback =
    Gdk.DragContext ->
    IO ()

noWidgetDragBeginCallback :: Maybe WidgetDragBeginCallback
noWidgetDragBeginCallback = Nothing

type WidgetDragBeginCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetDragBeginCallback :: WidgetDragBeginCallbackC -> IO (FunPtr WidgetDragBeginCallbackC)

widgetDragBeginClosure :: WidgetDragBeginCallback -> IO Closure
widgetDragBeginClosure cb = newCClosure =<< mkWidgetDragBeginCallback wrapped
    where wrapped = widgetDragBeginCallbackWrapper cb

widgetDragBeginCallbackWrapper ::
    WidgetDragBeginCallback ->
    Ptr () ->
    Ptr Gdk.DragContext ->
    Ptr () ->
    IO ()
widgetDragBeginCallbackWrapper _cb _ context _ = do
    context' <- (newObject Gdk.DragContext) context
    _cb  context'

onWidgetDragBegin :: (GObject a, MonadIO m) => a -> WidgetDragBeginCallback -> m SignalHandlerId
onWidgetDragBegin obj cb = liftIO $ connectWidgetDragBegin obj cb SignalConnectBefore
afterWidgetDragBegin :: (GObject a, MonadIO m) => a -> WidgetDragBeginCallback -> m SignalHandlerId
afterWidgetDragBegin obj cb = connectWidgetDragBegin obj cb SignalConnectAfter

connectWidgetDragBegin :: (GObject a, MonadIO m) =>
                          a -> WidgetDragBeginCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDragBegin obj cb after = liftIO $ do
    cb' <- mkWidgetDragBeginCallback (widgetDragBeginCallbackWrapper cb)
    connectSignalFunPtr obj "drag-begin" cb' after

-- signal Widget::drag-data-delete
type WidgetDragDataDeleteCallback =
    Gdk.DragContext ->
    IO ()

noWidgetDragDataDeleteCallback :: Maybe WidgetDragDataDeleteCallback
noWidgetDragDataDeleteCallback = Nothing

type WidgetDragDataDeleteCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetDragDataDeleteCallback :: WidgetDragDataDeleteCallbackC -> IO (FunPtr WidgetDragDataDeleteCallbackC)

widgetDragDataDeleteClosure :: WidgetDragDataDeleteCallback -> IO Closure
widgetDragDataDeleteClosure cb = newCClosure =<< mkWidgetDragDataDeleteCallback wrapped
    where wrapped = widgetDragDataDeleteCallbackWrapper cb

widgetDragDataDeleteCallbackWrapper ::
    WidgetDragDataDeleteCallback ->
    Ptr () ->
    Ptr Gdk.DragContext ->
    Ptr () ->
    IO ()
widgetDragDataDeleteCallbackWrapper _cb _ context _ = do
    context' <- (newObject Gdk.DragContext) context
    _cb  context'

onWidgetDragDataDelete :: (GObject a, MonadIO m) => a -> WidgetDragDataDeleteCallback -> m SignalHandlerId
onWidgetDragDataDelete obj cb = liftIO $ connectWidgetDragDataDelete obj cb SignalConnectBefore
afterWidgetDragDataDelete :: (GObject a, MonadIO m) => a -> WidgetDragDataDeleteCallback -> m SignalHandlerId
afterWidgetDragDataDelete obj cb = connectWidgetDragDataDelete obj cb SignalConnectAfter

connectWidgetDragDataDelete :: (GObject a, MonadIO m) =>
                               a -> WidgetDragDataDeleteCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDragDataDelete obj cb after = liftIO $ do
    cb' <- mkWidgetDragDataDeleteCallback (widgetDragDataDeleteCallbackWrapper cb)
    connectSignalFunPtr obj "drag-data-delete" cb' after

-- signal Widget::drag-data-get
type WidgetDragDataGetCallback =
    Gdk.DragContext ->
    SelectionData ->
    Word32 ->
    Word32 ->
    IO ()

noWidgetDragDataGetCallback :: Maybe WidgetDragDataGetCallback
noWidgetDragDataGetCallback = Nothing

type WidgetDragDataGetCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext ->
    Ptr SelectionData ->
    Word32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetDragDataGetCallback :: WidgetDragDataGetCallbackC -> IO (FunPtr WidgetDragDataGetCallbackC)

widgetDragDataGetClosure :: WidgetDragDataGetCallback -> IO Closure
widgetDragDataGetClosure cb = newCClosure =<< mkWidgetDragDataGetCallback wrapped
    where wrapped = widgetDragDataGetCallbackWrapper cb

widgetDragDataGetCallbackWrapper ::
    WidgetDragDataGetCallback ->
    Ptr () ->
    Ptr Gdk.DragContext ->
    Ptr SelectionData ->
    Word32 ->
    Word32 ->
    Ptr () ->
    IO ()
widgetDragDataGetCallbackWrapper _cb _ context data_ info time _ = do
    context' <- (newObject Gdk.DragContext) context
    data_' <- (newBoxed SelectionData) data_
    _cb  context' data_' info time

onWidgetDragDataGet :: (GObject a, MonadIO m) => a -> WidgetDragDataGetCallback -> m SignalHandlerId
onWidgetDragDataGet obj cb = liftIO $ connectWidgetDragDataGet obj cb SignalConnectBefore
afterWidgetDragDataGet :: (GObject a, MonadIO m) => a -> WidgetDragDataGetCallback -> m SignalHandlerId
afterWidgetDragDataGet obj cb = connectWidgetDragDataGet obj cb SignalConnectAfter

connectWidgetDragDataGet :: (GObject a, MonadIO m) =>
                            a -> WidgetDragDataGetCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDragDataGet obj cb after = liftIO $ do
    cb' <- mkWidgetDragDataGetCallback (widgetDragDataGetCallbackWrapper cb)
    connectSignalFunPtr obj "drag-data-get" cb' after

-- signal Widget::drag-data-received
type WidgetDragDataReceivedCallback =
    Gdk.DragContext ->
    Int32 ->
    Int32 ->
    SelectionData ->
    Word32 ->
    Word32 ->
    IO ()

noWidgetDragDataReceivedCallback :: Maybe WidgetDragDataReceivedCallback
noWidgetDragDataReceivedCallback = Nothing

type WidgetDragDataReceivedCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext ->
    Int32 ->
    Int32 ->
    Ptr SelectionData ->
    Word32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetDragDataReceivedCallback :: WidgetDragDataReceivedCallbackC -> IO (FunPtr WidgetDragDataReceivedCallbackC)

widgetDragDataReceivedClosure :: WidgetDragDataReceivedCallback -> IO Closure
widgetDragDataReceivedClosure cb = newCClosure =<< mkWidgetDragDataReceivedCallback wrapped
    where wrapped = widgetDragDataReceivedCallbackWrapper cb

widgetDragDataReceivedCallbackWrapper ::
    WidgetDragDataReceivedCallback ->
    Ptr () ->
    Ptr Gdk.DragContext ->
    Int32 ->
    Int32 ->
    Ptr SelectionData ->
    Word32 ->
    Word32 ->
    Ptr () ->
    IO ()
widgetDragDataReceivedCallbackWrapper _cb _ context x y data_ info time _ = do
    context' <- (newObject Gdk.DragContext) context
    data_' <- (newBoxed SelectionData) data_
    _cb  context' x y data_' info time

onWidgetDragDataReceived :: (GObject a, MonadIO m) => a -> WidgetDragDataReceivedCallback -> m SignalHandlerId
onWidgetDragDataReceived obj cb = liftIO $ connectWidgetDragDataReceived obj cb SignalConnectBefore
afterWidgetDragDataReceived :: (GObject a, MonadIO m) => a -> WidgetDragDataReceivedCallback -> m SignalHandlerId
afterWidgetDragDataReceived obj cb = connectWidgetDragDataReceived obj cb SignalConnectAfter

connectWidgetDragDataReceived :: (GObject a, MonadIO m) =>
                                 a -> WidgetDragDataReceivedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDragDataReceived obj cb after = liftIO $ do
    cb' <- mkWidgetDragDataReceivedCallback (widgetDragDataReceivedCallbackWrapper cb)
    connectSignalFunPtr obj "drag-data-received" cb' after

-- signal Widget::drag-drop
type WidgetDragDropCallback =
    Gdk.DragContext ->
    Int32 ->
    Int32 ->
    Word32 ->
    IO Bool

noWidgetDragDropCallback :: Maybe WidgetDragDropCallback
noWidgetDragDropCallback = Nothing

type WidgetDragDropCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext ->
    Int32 ->
    Int32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetDragDropCallback :: WidgetDragDropCallbackC -> IO (FunPtr WidgetDragDropCallbackC)

widgetDragDropClosure :: WidgetDragDropCallback -> IO Closure
widgetDragDropClosure cb = newCClosure =<< mkWidgetDragDropCallback wrapped
    where wrapped = widgetDragDropCallbackWrapper cb

widgetDragDropCallbackWrapper ::
    WidgetDragDropCallback ->
    Ptr () ->
    Ptr Gdk.DragContext ->
    Int32 ->
    Int32 ->
    Word32 ->
    Ptr () ->
    IO CInt
widgetDragDropCallbackWrapper _cb _ context x y time _ = do
    context' <- (newObject Gdk.DragContext) context
    result <- _cb  context' x y time
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetDragDrop :: (GObject a, MonadIO m) => a -> WidgetDragDropCallback -> m SignalHandlerId
onWidgetDragDrop obj cb = liftIO $ connectWidgetDragDrop obj cb SignalConnectBefore
afterWidgetDragDrop :: (GObject a, MonadIO m) => a -> WidgetDragDropCallback -> m SignalHandlerId
afterWidgetDragDrop obj cb = connectWidgetDragDrop obj cb SignalConnectAfter

connectWidgetDragDrop :: (GObject a, MonadIO m) =>
                         a -> WidgetDragDropCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDragDrop obj cb after = liftIO $ do
    cb' <- mkWidgetDragDropCallback (widgetDragDropCallbackWrapper cb)
    connectSignalFunPtr obj "drag-drop" cb' after

-- signal Widget::drag-end
type WidgetDragEndCallback =
    Gdk.DragContext ->
    IO ()

noWidgetDragEndCallback :: Maybe WidgetDragEndCallback
noWidgetDragEndCallback = Nothing

type WidgetDragEndCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetDragEndCallback :: WidgetDragEndCallbackC -> IO (FunPtr WidgetDragEndCallbackC)

widgetDragEndClosure :: WidgetDragEndCallback -> IO Closure
widgetDragEndClosure cb = newCClosure =<< mkWidgetDragEndCallback wrapped
    where wrapped = widgetDragEndCallbackWrapper cb

widgetDragEndCallbackWrapper ::
    WidgetDragEndCallback ->
    Ptr () ->
    Ptr Gdk.DragContext ->
    Ptr () ->
    IO ()
widgetDragEndCallbackWrapper _cb _ context _ = do
    context' <- (newObject Gdk.DragContext) context
    _cb  context'

onWidgetDragEnd :: (GObject a, MonadIO m) => a -> WidgetDragEndCallback -> m SignalHandlerId
onWidgetDragEnd obj cb = liftIO $ connectWidgetDragEnd obj cb SignalConnectBefore
afterWidgetDragEnd :: (GObject a, MonadIO m) => a -> WidgetDragEndCallback -> m SignalHandlerId
afterWidgetDragEnd obj cb = connectWidgetDragEnd obj cb SignalConnectAfter

connectWidgetDragEnd :: (GObject a, MonadIO m) =>
                        a -> WidgetDragEndCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDragEnd obj cb after = liftIO $ do
    cb' <- mkWidgetDragEndCallback (widgetDragEndCallbackWrapper cb)
    connectSignalFunPtr obj "drag-end" cb' after

-- signal Widget::drag-failed
type WidgetDragFailedCallback =
    Gdk.DragContext ->
    DragResult ->
    IO Bool

noWidgetDragFailedCallback :: Maybe WidgetDragFailedCallback
noWidgetDragFailedCallback = Nothing

type WidgetDragFailedCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetDragFailedCallback :: WidgetDragFailedCallbackC -> IO (FunPtr WidgetDragFailedCallbackC)

widgetDragFailedClosure :: WidgetDragFailedCallback -> IO Closure
widgetDragFailedClosure cb = newCClosure =<< mkWidgetDragFailedCallback wrapped
    where wrapped = widgetDragFailedCallbackWrapper cb

widgetDragFailedCallbackWrapper ::
    WidgetDragFailedCallback ->
    Ptr () ->
    Ptr Gdk.DragContext ->
    CUInt ->
    Ptr () ->
    IO CInt
widgetDragFailedCallbackWrapper _cb _ context result_ _ = do
    context' <- (newObject Gdk.DragContext) context
    let result_' = (toEnum . fromIntegral) result_
    result <- _cb  context' result_'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetDragFailed :: (GObject a, MonadIO m) => a -> WidgetDragFailedCallback -> m SignalHandlerId
onWidgetDragFailed obj cb = liftIO $ connectWidgetDragFailed obj cb SignalConnectBefore
afterWidgetDragFailed :: (GObject a, MonadIO m) => a -> WidgetDragFailedCallback -> m SignalHandlerId
afterWidgetDragFailed obj cb = connectWidgetDragFailed obj cb SignalConnectAfter

connectWidgetDragFailed :: (GObject a, MonadIO m) =>
                           a -> WidgetDragFailedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDragFailed obj cb after = liftIO $ do
    cb' <- mkWidgetDragFailedCallback (widgetDragFailedCallbackWrapper cb)
    connectSignalFunPtr obj "drag-failed" cb' after

-- signal Widget::drag-leave
type WidgetDragLeaveCallback =
    Gdk.DragContext ->
    Word32 ->
    IO ()

noWidgetDragLeaveCallback :: Maybe WidgetDragLeaveCallback
noWidgetDragLeaveCallback = Nothing

type WidgetDragLeaveCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetDragLeaveCallback :: WidgetDragLeaveCallbackC -> IO (FunPtr WidgetDragLeaveCallbackC)

widgetDragLeaveClosure :: WidgetDragLeaveCallback -> IO Closure
widgetDragLeaveClosure cb = newCClosure =<< mkWidgetDragLeaveCallback wrapped
    where wrapped = widgetDragLeaveCallbackWrapper cb

widgetDragLeaveCallbackWrapper ::
    WidgetDragLeaveCallback ->
    Ptr () ->
    Ptr Gdk.DragContext ->
    Word32 ->
    Ptr () ->
    IO ()
widgetDragLeaveCallbackWrapper _cb _ context time _ = do
    context' <- (newObject Gdk.DragContext) context
    _cb  context' time

onWidgetDragLeave :: (GObject a, MonadIO m) => a -> WidgetDragLeaveCallback -> m SignalHandlerId
onWidgetDragLeave obj cb = liftIO $ connectWidgetDragLeave obj cb SignalConnectBefore
afterWidgetDragLeave :: (GObject a, MonadIO m) => a -> WidgetDragLeaveCallback -> m SignalHandlerId
afterWidgetDragLeave obj cb = connectWidgetDragLeave obj cb SignalConnectAfter

connectWidgetDragLeave :: (GObject a, MonadIO m) =>
                          a -> WidgetDragLeaveCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDragLeave obj cb after = liftIO $ do
    cb' <- mkWidgetDragLeaveCallback (widgetDragLeaveCallbackWrapper cb)
    connectSignalFunPtr obj "drag-leave" cb' after

-- signal Widget::drag-motion
type WidgetDragMotionCallback =
    Gdk.DragContext ->
    Int32 ->
    Int32 ->
    Word32 ->
    IO Bool

noWidgetDragMotionCallback :: Maybe WidgetDragMotionCallback
noWidgetDragMotionCallback = Nothing

type WidgetDragMotionCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext ->
    Int32 ->
    Int32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetDragMotionCallback :: WidgetDragMotionCallbackC -> IO (FunPtr WidgetDragMotionCallbackC)

widgetDragMotionClosure :: WidgetDragMotionCallback -> IO Closure
widgetDragMotionClosure cb = newCClosure =<< mkWidgetDragMotionCallback wrapped
    where wrapped = widgetDragMotionCallbackWrapper cb

widgetDragMotionCallbackWrapper ::
    WidgetDragMotionCallback ->
    Ptr () ->
    Ptr Gdk.DragContext ->
    Int32 ->
    Int32 ->
    Word32 ->
    Ptr () ->
    IO CInt
widgetDragMotionCallbackWrapper _cb _ context x y time _ = do
    context' <- (newObject Gdk.DragContext) context
    result <- _cb  context' x y time
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetDragMotion :: (GObject a, MonadIO m) => a -> WidgetDragMotionCallback -> m SignalHandlerId
onWidgetDragMotion obj cb = liftIO $ connectWidgetDragMotion obj cb SignalConnectBefore
afterWidgetDragMotion :: (GObject a, MonadIO m) => a -> WidgetDragMotionCallback -> m SignalHandlerId
afterWidgetDragMotion obj cb = connectWidgetDragMotion obj cb SignalConnectAfter

connectWidgetDragMotion :: (GObject a, MonadIO m) =>
                           a -> WidgetDragMotionCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDragMotion obj cb after = liftIO $ do
    cb' <- mkWidgetDragMotionCallback (widgetDragMotionCallbackWrapper cb)
    connectSignalFunPtr obj "drag-motion" cb' after

-- signal Widget::draw
type WidgetDrawCallback =
    Cairo.Context ->
    IO Bool

noWidgetDrawCallback :: Maybe WidgetDrawCallback
noWidgetDrawCallback = Nothing

type WidgetDrawCallbackC =
    Ptr () ->                               -- object
    Ptr Cairo.Context ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetDrawCallback :: WidgetDrawCallbackC -> IO (FunPtr WidgetDrawCallbackC)

widgetDrawClosure :: WidgetDrawCallback -> IO Closure
widgetDrawClosure cb = newCClosure =<< mkWidgetDrawCallback wrapped
    where wrapped = widgetDrawCallbackWrapper cb

widgetDrawCallbackWrapper ::
    WidgetDrawCallback ->
    Ptr () ->
    Ptr Cairo.Context ->
    Ptr () ->
    IO CInt
widgetDrawCallbackWrapper _cb _ cr _ = do
    cr' <- (newBoxed Cairo.Context) cr
    result <- _cb  cr'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetDraw :: (GObject a, MonadIO m) => a -> WidgetDrawCallback -> m SignalHandlerId
onWidgetDraw obj cb = liftIO $ connectWidgetDraw obj cb SignalConnectBefore
afterWidgetDraw :: (GObject a, MonadIO m) => a -> WidgetDrawCallback -> m SignalHandlerId
afterWidgetDraw obj cb = connectWidgetDraw obj cb SignalConnectAfter

connectWidgetDraw :: (GObject a, MonadIO m) =>
                     a -> WidgetDrawCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetDraw obj cb after = liftIO $ do
    cb' <- mkWidgetDrawCallback (widgetDrawCallbackWrapper cb)
    connectSignalFunPtr obj "draw" cb' after

-- signal Widget::enter-notify-event
type WidgetEnterNotifyEventCallback =
    Gdk.EventCrossing ->
    IO Bool

noWidgetEnterNotifyEventCallback :: Maybe WidgetEnterNotifyEventCallback
noWidgetEnterNotifyEventCallback = Nothing

type WidgetEnterNotifyEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventCrossing ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetEnterNotifyEventCallback :: WidgetEnterNotifyEventCallbackC -> IO (FunPtr WidgetEnterNotifyEventCallbackC)

widgetEnterNotifyEventClosure :: WidgetEnterNotifyEventCallback -> IO Closure
widgetEnterNotifyEventClosure cb = newCClosure =<< mkWidgetEnterNotifyEventCallback wrapped
    where wrapped = widgetEnterNotifyEventCallbackWrapper cb

widgetEnterNotifyEventCallbackWrapper ::
    WidgetEnterNotifyEventCallback ->
    Ptr () ->
    Ptr Gdk.EventCrossing ->
    Ptr () ->
    IO CInt
widgetEnterNotifyEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 88 Gdk.EventCrossing) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetEnterNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetEnterNotifyEventCallback -> m SignalHandlerId
onWidgetEnterNotifyEvent obj cb = liftIO $ connectWidgetEnterNotifyEvent obj cb SignalConnectBefore
afterWidgetEnterNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetEnterNotifyEventCallback -> m SignalHandlerId
afterWidgetEnterNotifyEvent obj cb = connectWidgetEnterNotifyEvent obj cb SignalConnectAfter

connectWidgetEnterNotifyEvent :: (GObject a, MonadIO m) =>
                                 a -> WidgetEnterNotifyEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetEnterNotifyEvent obj cb after = liftIO $ do
    cb' <- mkWidgetEnterNotifyEventCallback (widgetEnterNotifyEventCallbackWrapper cb)
    connectSignalFunPtr obj "enter-notify-event" cb' after

-- signal Widget::event
type WidgetEventCallback =
    Gdk.Event ->
    IO Bool

noWidgetEventCallback :: Maybe WidgetEventCallback
noWidgetEventCallback = Nothing

type WidgetEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.Event ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetEventCallback :: WidgetEventCallbackC -> IO (FunPtr WidgetEventCallbackC)

widgetEventClosure :: WidgetEventCallback -> IO Closure
widgetEventClosure cb = newCClosure =<< mkWidgetEventCallback wrapped
    where wrapped = widgetEventCallbackWrapper cb

widgetEventCallbackWrapper ::
    WidgetEventCallback ->
    Ptr () ->
    Ptr Gdk.Event ->
    Ptr () ->
    IO CInt
widgetEventCallbackWrapper _cb _ event _ = do
    event' <- (newBoxed Gdk.Event) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetEvent :: (GObject a, MonadIO m) => a -> WidgetEventCallback -> m SignalHandlerId
onWidgetEvent obj cb = liftIO $ connectWidgetEvent obj cb SignalConnectBefore
afterWidgetEvent :: (GObject a, MonadIO m) => a -> WidgetEventCallback -> m SignalHandlerId
afterWidgetEvent obj cb = connectWidgetEvent obj cb SignalConnectAfter

connectWidgetEvent :: (GObject a, MonadIO m) =>
                      a -> WidgetEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetEvent obj cb after = liftIO $ do
    cb' <- mkWidgetEventCallback (widgetEventCallbackWrapper cb)
    connectSignalFunPtr obj "event" cb' after

-- signal Widget::event-after
type WidgetEventAfterCallback =
    Gdk.Event ->
    IO ()

noWidgetEventAfterCallback :: Maybe WidgetEventAfterCallback
noWidgetEventAfterCallback = Nothing

type WidgetEventAfterCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.Event ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetEventAfterCallback :: WidgetEventAfterCallbackC -> IO (FunPtr WidgetEventAfterCallbackC)

widgetEventAfterClosure :: WidgetEventAfterCallback -> IO Closure
widgetEventAfterClosure cb = newCClosure =<< mkWidgetEventAfterCallback wrapped
    where wrapped = widgetEventAfterCallbackWrapper cb

widgetEventAfterCallbackWrapper ::
    WidgetEventAfterCallback ->
    Ptr () ->
    Ptr Gdk.Event ->
    Ptr () ->
    IO ()
widgetEventAfterCallbackWrapper _cb _ event _ = do
    event' <- (newBoxed Gdk.Event) event
    _cb  event'

onWidgetEventAfter :: (GObject a, MonadIO m) => a -> WidgetEventAfterCallback -> m SignalHandlerId
onWidgetEventAfter obj cb = liftIO $ connectWidgetEventAfter obj cb SignalConnectBefore
afterWidgetEventAfter :: (GObject a, MonadIO m) => a -> WidgetEventAfterCallback -> m SignalHandlerId
afterWidgetEventAfter obj cb = connectWidgetEventAfter obj cb SignalConnectAfter

connectWidgetEventAfter :: (GObject a, MonadIO m) =>
                           a -> WidgetEventAfterCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetEventAfter obj cb after = liftIO $ do
    cb' <- mkWidgetEventAfterCallback (widgetEventAfterCallbackWrapper cb)
    connectSignalFunPtr obj "event-after" cb' after

-- signal Widget::focus
type WidgetFocusCallback =
    DirectionType ->
    IO Bool

noWidgetFocusCallback :: Maybe WidgetFocusCallback
noWidgetFocusCallback = Nothing

type WidgetFocusCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetFocusCallback :: WidgetFocusCallbackC -> IO (FunPtr WidgetFocusCallbackC)

widgetFocusClosure :: WidgetFocusCallback -> IO Closure
widgetFocusClosure cb = newCClosure =<< mkWidgetFocusCallback wrapped
    where wrapped = widgetFocusCallbackWrapper cb

widgetFocusCallbackWrapper ::
    WidgetFocusCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO CInt
widgetFocusCallbackWrapper _cb _ direction _ = do
    let direction' = (toEnum . fromIntegral) direction
    result <- _cb  direction'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetFocus :: (GObject a, MonadIO m) => a -> WidgetFocusCallback -> m SignalHandlerId
onWidgetFocus obj cb = liftIO $ connectWidgetFocus obj cb SignalConnectBefore
afterWidgetFocus :: (GObject a, MonadIO m) => a -> WidgetFocusCallback -> m SignalHandlerId
afterWidgetFocus obj cb = connectWidgetFocus obj cb SignalConnectAfter

connectWidgetFocus :: (GObject a, MonadIO m) =>
                      a -> WidgetFocusCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetFocus obj cb after = liftIO $ do
    cb' <- mkWidgetFocusCallback (widgetFocusCallbackWrapper cb)
    connectSignalFunPtr obj "focus" cb' after

-- signal Widget::focus-in-event
type WidgetFocusInEventCallback =
    Gdk.EventFocus ->
    IO Bool

noWidgetFocusInEventCallback :: Maybe WidgetFocusInEventCallback
noWidgetFocusInEventCallback = Nothing

type WidgetFocusInEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventFocus ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetFocusInEventCallback :: WidgetFocusInEventCallbackC -> IO (FunPtr WidgetFocusInEventCallbackC)

widgetFocusInEventClosure :: WidgetFocusInEventCallback -> IO Closure
widgetFocusInEventClosure cb = newCClosure =<< mkWidgetFocusInEventCallback wrapped
    where wrapped = widgetFocusInEventCallbackWrapper cb

widgetFocusInEventCallbackWrapper ::
    WidgetFocusInEventCallback ->
    Ptr () ->
    Ptr Gdk.EventFocus ->
    Ptr () ->
    IO CInt
widgetFocusInEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 24 Gdk.EventFocus) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetFocusInEvent :: (GObject a, MonadIO m) => a -> WidgetFocusInEventCallback -> m SignalHandlerId
onWidgetFocusInEvent obj cb = liftIO $ connectWidgetFocusInEvent obj cb SignalConnectBefore
afterWidgetFocusInEvent :: (GObject a, MonadIO m) => a -> WidgetFocusInEventCallback -> m SignalHandlerId
afterWidgetFocusInEvent obj cb = connectWidgetFocusInEvent obj cb SignalConnectAfter

connectWidgetFocusInEvent :: (GObject a, MonadIO m) =>
                             a -> WidgetFocusInEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetFocusInEvent obj cb after = liftIO $ do
    cb' <- mkWidgetFocusInEventCallback (widgetFocusInEventCallbackWrapper cb)
    connectSignalFunPtr obj "focus-in-event" cb' after

-- signal Widget::focus-out-event
type WidgetFocusOutEventCallback =
    Gdk.EventFocus ->
    IO Bool

noWidgetFocusOutEventCallback :: Maybe WidgetFocusOutEventCallback
noWidgetFocusOutEventCallback = Nothing

type WidgetFocusOutEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventFocus ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetFocusOutEventCallback :: WidgetFocusOutEventCallbackC -> IO (FunPtr WidgetFocusOutEventCallbackC)

widgetFocusOutEventClosure :: WidgetFocusOutEventCallback -> IO Closure
widgetFocusOutEventClosure cb = newCClosure =<< mkWidgetFocusOutEventCallback wrapped
    where wrapped = widgetFocusOutEventCallbackWrapper cb

widgetFocusOutEventCallbackWrapper ::
    WidgetFocusOutEventCallback ->
    Ptr () ->
    Ptr Gdk.EventFocus ->
    Ptr () ->
    IO CInt
widgetFocusOutEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 24 Gdk.EventFocus) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetFocusOutEvent :: (GObject a, MonadIO m) => a -> WidgetFocusOutEventCallback -> m SignalHandlerId
onWidgetFocusOutEvent obj cb = liftIO $ connectWidgetFocusOutEvent obj cb SignalConnectBefore
afterWidgetFocusOutEvent :: (GObject a, MonadIO m) => a -> WidgetFocusOutEventCallback -> m SignalHandlerId
afterWidgetFocusOutEvent obj cb = connectWidgetFocusOutEvent obj cb SignalConnectAfter

connectWidgetFocusOutEvent :: (GObject a, MonadIO m) =>
                              a -> WidgetFocusOutEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetFocusOutEvent obj cb after = liftIO $ do
    cb' <- mkWidgetFocusOutEventCallback (widgetFocusOutEventCallbackWrapper cb)
    connectSignalFunPtr obj "focus-out-event" cb' after

-- signal Widget::grab-broken-event
type WidgetGrabBrokenEventCallback =
    Gdk.EventGrabBroken ->
    IO Bool

noWidgetGrabBrokenEventCallback :: Maybe WidgetGrabBrokenEventCallback
noWidgetGrabBrokenEventCallback = Nothing

type WidgetGrabBrokenEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventGrabBroken ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetGrabBrokenEventCallback :: WidgetGrabBrokenEventCallbackC -> IO (FunPtr WidgetGrabBrokenEventCallbackC)

widgetGrabBrokenEventClosure :: WidgetGrabBrokenEventCallback -> IO Closure
widgetGrabBrokenEventClosure cb = newCClosure =<< mkWidgetGrabBrokenEventCallback wrapped
    where wrapped = widgetGrabBrokenEventCallbackWrapper cb

widgetGrabBrokenEventCallbackWrapper ::
    WidgetGrabBrokenEventCallback ->
    Ptr () ->
    Ptr Gdk.EventGrabBroken ->
    Ptr () ->
    IO CInt
widgetGrabBrokenEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 40 Gdk.EventGrabBroken) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetGrabBrokenEvent :: (GObject a, MonadIO m) => a -> WidgetGrabBrokenEventCallback -> m SignalHandlerId
onWidgetGrabBrokenEvent obj cb = liftIO $ connectWidgetGrabBrokenEvent obj cb SignalConnectBefore
afterWidgetGrabBrokenEvent :: (GObject a, MonadIO m) => a -> WidgetGrabBrokenEventCallback -> m SignalHandlerId
afterWidgetGrabBrokenEvent obj cb = connectWidgetGrabBrokenEvent obj cb SignalConnectAfter

connectWidgetGrabBrokenEvent :: (GObject a, MonadIO m) =>
                                a -> WidgetGrabBrokenEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetGrabBrokenEvent obj cb after = liftIO $ do
    cb' <- mkWidgetGrabBrokenEventCallback (widgetGrabBrokenEventCallbackWrapper cb)
    connectSignalFunPtr obj "grab-broken-event" cb' after

-- signal Widget::grab-focus
type WidgetGrabFocusCallback =
    IO ()

noWidgetGrabFocusCallback :: Maybe WidgetGrabFocusCallback
noWidgetGrabFocusCallback = Nothing

type WidgetGrabFocusCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetGrabFocusCallback :: WidgetGrabFocusCallbackC -> IO (FunPtr WidgetGrabFocusCallbackC)

widgetGrabFocusClosure :: WidgetGrabFocusCallback -> IO Closure
widgetGrabFocusClosure cb = newCClosure =<< mkWidgetGrabFocusCallback wrapped
    where wrapped = widgetGrabFocusCallbackWrapper cb

widgetGrabFocusCallbackWrapper ::
    WidgetGrabFocusCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
widgetGrabFocusCallbackWrapper _cb _ _ = do
    _cb 

onWidgetGrabFocus :: (GObject a, MonadIO m) => a -> WidgetGrabFocusCallback -> m SignalHandlerId
onWidgetGrabFocus obj cb = liftIO $ connectWidgetGrabFocus obj cb SignalConnectBefore
afterWidgetGrabFocus :: (GObject a, MonadIO m) => a -> WidgetGrabFocusCallback -> m SignalHandlerId
afterWidgetGrabFocus obj cb = connectWidgetGrabFocus obj cb SignalConnectAfter

connectWidgetGrabFocus :: (GObject a, MonadIO m) =>
                          a -> WidgetGrabFocusCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetGrabFocus obj cb after = liftIO $ do
    cb' <- mkWidgetGrabFocusCallback (widgetGrabFocusCallbackWrapper cb)
    connectSignalFunPtr obj "grab-focus" cb' after

-- signal Widget::grab-notify
type WidgetGrabNotifyCallback =
    Bool ->
    IO ()

noWidgetGrabNotifyCallback :: Maybe WidgetGrabNotifyCallback
noWidgetGrabNotifyCallback = Nothing

type WidgetGrabNotifyCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetGrabNotifyCallback :: WidgetGrabNotifyCallbackC -> IO (FunPtr WidgetGrabNotifyCallbackC)

widgetGrabNotifyClosure :: WidgetGrabNotifyCallback -> IO Closure
widgetGrabNotifyClosure cb = newCClosure =<< mkWidgetGrabNotifyCallback wrapped
    where wrapped = widgetGrabNotifyCallbackWrapper cb

widgetGrabNotifyCallbackWrapper ::
    WidgetGrabNotifyCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO ()
widgetGrabNotifyCallbackWrapper _cb _ was_grabbed _ = do
    let was_grabbed' = (/= 0) was_grabbed
    _cb  was_grabbed'

onWidgetGrabNotify :: (GObject a, MonadIO m) => a -> WidgetGrabNotifyCallback -> m SignalHandlerId
onWidgetGrabNotify obj cb = liftIO $ connectWidgetGrabNotify obj cb SignalConnectBefore
afterWidgetGrabNotify :: (GObject a, MonadIO m) => a -> WidgetGrabNotifyCallback -> m SignalHandlerId
afterWidgetGrabNotify obj cb = connectWidgetGrabNotify obj cb SignalConnectAfter

connectWidgetGrabNotify :: (GObject a, MonadIO m) =>
                           a -> WidgetGrabNotifyCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetGrabNotify obj cb after = liftIO $ do
    cb' <- mkWidgetGrabNotifyCallback (widgetGrabNotifyCallbackWrapper cb)
    connectSignalFunPtr obj "grab-notify" cb' after

-- signal Widget::hide
type WidgetHideCallback =
    IO ()

noWidgetHideCallback :: Maybe WidgetHideCallback
noWidgetHideCallback = Nothing

type WidgetHideCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetHideCallback :: WidgetHideCallbackC -> IO (FunPtr WidgetHideCallbackC)

widgetHideClosure :: WidgetHideCallback -> IO Closure
widgetHideClosure cb = newCClosure =<< mkWidgetHideCallback wrapped
    where wrapped = widgetHideCallbackWrapper cb

widgetHideCallbackWrapper ::
    WidgetHideCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
widgetHideCallbackWrapper _cb _ _ = do
    _cb 

onWidgetHide :: (GObject a, MonadIO m) => a -> WidgetHideCallback -> m SignalHandlerId
onWidgetHide obj cb = liftIO $ connectWidgetHide obj cb SignalConnectBefore
afterWidgetHide :: (GObject a, MonadIO m) => a -> WidgetHideCallback -> m SignalHandlerId
afterWidgetHide obj cb = connectWidgetHide obj cb SignalConnectAfter

connectWidgetHide :: (GObject a, MonadIO m) =>
                     a -> WidgetHideCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetHide obj cb after = liftIO $ do
    cb' <- mkWidgetHideCallback (widgetHideCallbackWrapper cb)
    connectSignalFunPtr obj "hide" cb' after

-- signal Widget::hierarchy-changed
type WidgetHierarchyChangedCallback =
    Maybe Widget ->
    IO ()

noWidgetHierarchyChangedCallback :: Maybe WidgetHierarchyChangedCallback
noWidgetHierarchyChangedCallback = Nothing

type WidgetHierarchyChangedCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetHierarchyChangedCallback :: WidgetHierarchyChangedCallbackC -> IO (FunPtr WidgetHierarchyChangedCallbackC)

widgetHierarchyChangedClosure :: WidgetHierarchyChangedCallback -> IO Closure
widgetHierarchyChangedClosure cb = newCClosure =<< mkWidgetHierarchyChangedCallback wrapped
    where wrapped = widgetHierarchyChangedCallbackWrapper cb

widgetHierarchyChangedCallbackWrapper ::
    WidgetHierarchyChangedCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
widgetHierarchyChangedCallbackWrapper _cb _ previous_toplevel _ = do
    maybePrevious_toplevel <-
        if previous_toplevel == nullPtr
        then return Nothing
        else do
            previous_toplevel' <- (newObject Widget) previous_toplevel
            return $ Just previous_toplevel'
    _cb  maybePrevious_toplevel

onWidgetHierarchyChanged :: (GObject a, MonadIO m) => a -> WidgetHierarchyChangedCallback -> m SignalHandlerId
onWidgetHierarchyChanged obj cb = liftIO $ connectWidgetHierarchyChanged obj cb SignalConnectBefore
afterWidgetHierarchyChanged :: (GObject a, MonadIO m) => a -> WidgetHierarchyChangedCallback -> m SignalHandlerId
afterWidgetHierarchyChanged obj cb = connectWidgetHierarchyChanged obj cb SignalConnectAfter

connectWidgetHierarchyChanged :: (GObject a, MonadIO m) =>
                                 a -> WidgetHierarchyChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetHierarchyChanged obj cb after = liftIO $ do
    cb' <- mkWidgetHierarchyChangedCallback (widgetHierarchyChangedCallbackWrapper cb)
    connectSignalFunPtr obj "hierarchy-changed" cb' after

-- signal Widget::key-press-event
type WidgetKeyPressEventCallback =
    Gdk.EventKey ->
    IO Bool

noWidgetKeyPressEventCallback :: Maybe WidgetKeyPressEventCallback
noWidgetKeyPressEventCallback = Nothing

type WidgetKeyPressEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventKey ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetKeyPressEventCallback :: WidgetKeyPressEventCallbackC -> IO (FunPtr WidgetKeyPressEventCallbackC)

widgetKeyPressEventClosure :: WidgetKeyPressEventCallback -> IO Closure
widgetKeyPressEventClosure cb = newCClosure =<< mkWidgetKeyPressEventCallback wrapped
    where wrapped = widgetKeyPressEventCallbackWrapper cb

widgetKeyPressEventCallbackWrapper ::
    WidgetKeyPressEventCallback ->
    Ptr () ->
    Ptr Gdk.EventKey ->
    Ptr () ->
    IO CInt
widgetKeyPressEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 56 Gdk.EventKey) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetKeyPressEvent :: (GObject a, MonadIO m) => a -> WidgetKeyPressEventCallback -> m SignalHandlerId
onWidgetKeyPressEvent obj cb = liftIO $ connectWidgetKeyPressEvent obj cb SignalConnectBefore
afterWidgetKeyPressEvent :: (GObject a, MonadIO m) => a -> WidgetKeyPressEventCallback -> m SignalHandlerId
afterWidgetKeyPressEvent obj cb = connectWidgetKeyPressEvent obj cb SignalConnectAfter

connectWidgetKeyPressEvent :: (GObject a, MonadIO m) =>
                              a -> WidgetKeyPressEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetKeyPressEvent obj cb after = liftIO $ do
    cb' <- mkWidgetKeyPressEventCallback (widgetKeyPressEventCallbackWrapper cb)
    connectSignalFunPtr obj "key-press-event" cb' after

-- signal Widget::key-release-event
type WidgetKeyReleaseEventCallback =
    Gdk.EventKey ->
    IO Bool

noWidgetKeyReleaseEventCallback :: Maybe WidgetKeyReleaseEventCallback
noWidgetKeyReleaseEventCallback = Nothing

type WidgetKeyReleaseEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventKey ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetKeyReleaseEventCallback :: WidgetKeyReleaseEventCallbackC -> IO (FunPtr WidgetKeyReleaseEventCallbackC)

widgetKeyReleaseEventClosure :: WidgetKeyReleaseEventCallback -> IO Closure
widgetKeyReleaseEventClosure cb = newCClosure =<< mkWidgetKeyReleaseEventCallback wrapped
    where wrapped = widgetKeyReleaseEventCallbackWrapper cb

widgetKeyReleaseEventCallbackWrapper ::
    WidgetKeyReleaseEventCallback ->
    Ptr () ->
    Ptr Gdk.EventKey ->
    Ptr () ->
    IO CInt
widgetKeyReleaseEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 56 Gdk.EventKey) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetKeyReleaseEvent :: (GObject a, MonadIO m) => a -> WidgetKeyReleaseEventCallback -> m SignalHandlerId
onWidgetKeyReleaseEvent obj cb = liftIO $ connectWidgetKeyReleaseEvent obj cb SignalConnectBefore
afterWidgetKeyReleaseEvent :: (GObject a, MonadIO m) => a -> WidgetKeyReleaseEventCallback -> m SignalHandlerId
afterWidgetKeyReleaseEvent obj cb = connectWidgetKeyReleaseEvent obj cb SignalConnectAfter

connectWidgetKeyReleaseEvent :: (GObject a, MonadIO m) =>
                                a -> WidgetKeyReleaseEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetKeyReleaseEvent obj cb after = liftIO $ do
    cb' <- mkWidgetKeyReleaseEventCallback (widgetKeyReleaseEventCallbackWrapper cb)
    connectSignalFunPtr obj "key-release-event" cb' after

-- signal Widget::keynav-failed
type WidgetKeynavFailedCallback =
    DirectionType ->
    IO Bool

noWidgetKeynavFailedCallback :: Maybe WidgetKeynavFailedCallback
noWidgetKeynavFailedCallback = Nothing

type WidgetKeynavFailedCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetKeynavFailedCallback :: WidgetKeynavFailedCallbackC -> IO (FunPtr WidgetKeynavFailedCallbackC)

widgetKeynavFailedClosure :: WidgetKeynavFailedCallback -> IO Closure
widgetKeynavFailedClosure cb = newCClosure =<< mkWidgetKeynavFailedCallback wrapped
    where wrapped = widgetKeynavFailedCallbackWrapper cb

widgetKeynavFailedCallbackWrapper ::
    WidgetKeynavFailedCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO CInt
widgetKeynavFailedCallbackWrapper _cb _ direction _ = do
    let direction' = (toEnum . fromIntegral) direction
    result <- _cb  direction'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetKeynavFailed :: (GObject a, MonadIO m) => a -> WidgetKeynavFailedCallback -> m SignalHandlerId
onWidgetKeynavFailed obj cb = liftIO $ connectWidgetKeynavFailed obj cb SignalConnectBefore
afterWidgetKeynavFailed :: (GObject a, MonadIO m) => a -> WidgetKeynavFailedCallback -> m SignalHandlerId
afterWidgetKeynavFailed obj cb = connectWidgetKeynavFailed obj cb SignalConnectAfter

connectWidgetKeynavFailed :: (GObject a, MonadIO m) =>
                             a -> WidgetKeynavFailedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetKeynavFailed obj cb after = liftIO $ do
    cb' <- mkWidgetKeynavFailedCallback (widgetKeynavFailedCallbackWrapper cb)
    connectSignalFunPtr obj "keynav-failed" cb' after

-- signal Widget::leave-notify-event
type WidgetLeaveNotifyEventCallback =
    Gdk.EventCrossing ->
    IO Bool

noWidgetLeaveNotifyEventCallback :: Maybe WidgetLeaveNotifyEventCallback
noWidgetLeaveNotifyEventCallback = Nothing

type WidgetLeaveNotifyEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventCrossing ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetLeaveNotifyEventCallback :: WidgetLeaveNotifyEventCallbackC -> IO (FunPtr WidgetLeaveNotifyEventCallbackC)

widgetLeaveNotifyEventClosure :: WidgetLeaveNotifyEventCallback -> IO Closure
widgetLeaveNotifyEventClosure cb = newCClosure =<< mkWidgetLeaveNotifyEventCallback wrapped
    where wrapped = widgetLeaveNotifyEventCallbackWrapper cb

widgetLeaveNotifyEventCallbackWrapper ::
    WidgetLeaveNotifyEventCallback ->
    Ptr () ->
    Ptr Gdk.EventCrossing ->
    Ptr () ->
    IO CInt
widgetLeaveNotifyEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 88 Gdk.EventCrossing) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetLeaveNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetLeaveNotifyEventCallback -> m SignalHandlerId
onWidgetLeaveNotifyEvent obj cb = liftIO $ connectWidgetLeaveNotifyEvent obj cb SignalConnectBefore
afterWidgetLeaveNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetLeaveNotifyEventCallback -> m SignalHandlerId
afterWidgetLeaveNotifyEvent obj cb = connectWidgetLeaveNotifyEvent obj cb SignalConnectAfter

connectWidgetLeaveNotifyEvent :: (GObject a, MonadIO m) =>
                                 a -> WidgetLeaveNotifyEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetLeaveNotifyEvent obj cb after = liftIO $ do
    cb' <- mkWidgetLeaveNotifyEventCallback (widgetLeaveNotifyEventCallbackWrapper cb)
    connectSignalFunPtr obj "leave-notify-event" cb' after

-- signal Widget::map
type WidgetMapCallback =
    IO ()

noWidgetMapCallback :: Maybe WidgetMapCallback
noWidgetMapCallback = Nothing

type WidgetMapCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetMapCallback :: WidgetMapCallbackC -> IO (FunPtr WidgetMapCallbackC)

widgetMapClosure :: WidgetMapCallback -> IO Closure
widgetMapClosure cb = newCClosure =<< mkWidgetMapCallback wrapped
    where wrapped = widgetMapCallbackWrapper cb

widgetMapCallbackWrapper ::
    WidgetMapCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
widgetMapCallbackWrapper _cb _ _ = do
    _cb 

onWidgetMap :: (GObject a, MonadIO m) => a -> WidgetMapCallback -> m SignalHandlerId
onWidgetMap obj cb = liftIO $ connectWidgetMap obj cb SignalConnectBefore
afterWidgetMap :: (GObject a, MonadIO m) => a -> WidgetMapCallback -> m SignalHandlerId
afterWidgetMap obj cb = connectWidgetMap obj cb SignalConnectAfter

connectWidgetMap :: (GObject a, MonadIO m) =>
                    a -> WidgetMapCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetMap obj cb after = liftIO $ do
    cb' <- mkWidgetMapCallback (widgetMapCallbackWrapper cb)
    connectSignalFunPtr obj "map" cb' after

-- signal Widget::map-event
type WidgetMapEventCallback =
    Gdk.EventAny ->
    IO Bool

noWidgetMapEventCallback :: Maybe WidgetMapEventCallback
noWidgetMapEventCallback = Nothing

type WidgetMapEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventAny ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetMapEventCallback :: WidgetMapEventCallbackC -> IO (FunPtr WidgetMapEventCallbackC)

widgetMapEventClosure :: WidgetMapEventCallback -> IO Closure
widgetMapEventClosure cb = newCClosure =<< mkWidgetMapEventCallback wrapped
    where wrapped = widgetMapEventCallbackWrapper cb

widgetMapEventCallbackWrapper ::
    WidgetMapEventCallback ->
    Ptr () ->
    Ptr Gdk.EventAny ->
    Ptr () ->
    IO CInt
widgetMapEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 24 Gdk.EventAny) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetMapEvent :: (GObject a, MonadIO m) => a -> WidgetMapEventCallback -> m SignalHandlerId
onWidgetMapEvent obj cb = liftIO $ connectWidgetMapEvent obj cb SignalConnectBefore
afterWidgetMapEvent :: (GObject a, MonadIO m) => a -> WidgetMapEventCallback -> m SignalHandlerId
afterWidgetMapEvent obj cb = connectWidgetMapEvent obj cb SignalConnectAfter

connectWidgetMapEvent :: (GObject a, MonadIO m) =>
                         a -> WidgetMapEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetMapEvent obj cb after = liftIO $ do
    cb' <- mkWidgetMapEventCallback (widgetMapEventCallbackWrapper cb)
    connectSignalFunPtr obj "map-event" cb' after

-- signal Widget::mnemonic-activate
type WidgetMnemonicActivateCallback =
    Bool ->
    IO Bool

noWidgetMnemonicActivateCallback :: Maybe WidgetMnemonicActivateCallback
noWidgetMnemonicActivateCallback = Nothing

type WidgetMnemonicActivateCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetMnemonicActivateCallback :: WidgetMnemonicActivateCallbackC -> IO (FunPtr WidgetMnemonicActivateCallbackC)

widgetMnemonicActivateClosure :: WidgetMnemonicActivateCallback -> IO Closure
widgetMnemonicActivateClosure cb = newCClosure =<< mkWidgetMnemonicActivateCallback wrapped
    where wrapped = widgetMnemonicActivateCallbackWrapper cb

widgetMnemonicActivateCallbackWrapper ::
    WidgetMnemonicActivateCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO CInt
widgetMnemonicActivateCallbackWrapper _cb _ arg1 _ = do
    let arg1' = (/= 0) arg1
    result <- _cb  arg1'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetMnemonicActivate :: (GObject a, MonadIO m) => a -> WidgetMnemonicActivateCallback -> m SignalHandlerId
onWidgetMnemonicActivate obj cb = liftIO $ connectWidgetMnemonicActivate obj cb SignalConnectBefore
afterWidgetMnemonicActivate :: (GObject a, MonadIO m) => a -> WidgetMnemonicActivateCallback -> m SignalHandlerId
afterWidgetMnemonicActivate obj cb = connectWidgetMnemonicActivate obj cb SignalConnectAfter

connectWidgetMnemonicActivate :: (GObject a, MonadIO m) =>
                                 a -> WidgetMnemonicActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetMnemonicActivate obj cb after = liftIO $ do
    cb' <- mkWidgetMnemonicActivateCallback (widgetMnemonicActivateCallbackWrapper cb)
    connectSignalFunPtr obj "mnemonic-activate" cb' after

-- signal Widget::motion-notify-event
type WidgetMotionNotifyEventCallback =
    Gdk.EventMotion ->
    IO Bool

noWidgetMotionNotifyEventCallback :: Maybe WidgetMotionNotifyEventCallback
noWidgetMotionNotifyEventCallback = Nothing

type WidgetMotionNotifyEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventMotion ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetMotionNotifyEventCallback :: WidgetMotionNotifyEventCallbackC -> IO (FunPtr WidgetMotionNotifyEventCallbackC)

widgetMotionNotifyEventClosure :: WidgetMotionNotifyEventCallback -> IO Closure
widgetMotionNotifyEventClosure cb = newCClosure =<< mkWidgetMotionNotifyEventCallback wrapped
    where wrapped = widgetMotionNotifyEventCallbackWrapper cb

widgetMotionNotifyEventCallbackWrapper ::
    WidgetMotionNotifyEventCallback ->
    Ptr () ->
    Ptr Gdk.EventMotion ->
    Ptr () ->
    IO CInt
widgetMotionNotifyEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 80 Gdk.EventMotion) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetMotionNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetMotionNotifyEventCallback -> m SignalHandlerId
onWidgetMotionNotifyEvent obj cb = liftIO $ connectWidgetMotionNotifyEvent obj cb SignalConnectBefore
afterWidgetMotionNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetMotionNotifyEventCallback -> m SignalHandlerId
afterWidgetMotionNotifyEvent obj cb = connectWidgetMotionNotifyEvent obj cb SignalConnectAfter

connectWidgetMotionNotifyEvent :: (GObject a, MonadIO m) =>
                                  a -> WidgetMotionNotifyEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetMotionNotifyEvent obj cb after = liftIO $ do
    cb' <- mkWidgetMotionNotifyEventCallback (widgetMotionNotifyEventCallbackWrapper cb)
    connectSignalFunPtr obj "motion-notify-event" cb' after

-- signal Widget::move-focus
type WidgetMoveFocusCallback =
    DirectionType ->
    IO ()

noWidgetMoveFocusCallback :: Maybe WidgetMoveFocusCallback
noWidgetMoveFocusCallback = Nothing

type WidgetMoveFocusCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetMoveFocusCallback :: WidgetMoveFocusCallbackC -> IO (FunPtr WidgetMoveFocusCallbackC)

widgetMoveFocusClosure :: WidgetMoveFocusCallback -> IO Closure
widgetMoveFocusClosure cb = newCClosure =<< mkWidgetMoveFocusCallback wrapped
    where wrapped = widgetMoveFocusCallbackWrapper cb

widgetMoveFocusCallbackWrapper ::
    WidgetMoveFocusCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
widgetMoveFocusCallbackWrapper _cb _ direction _ = do
    let direction' = (toEnum . fromIntegral) direction
    _cb  direction'

onWidgetMoveFocus :: (GObject a, MonadIO m) => a -> WidgetMoveFocusCallback -> m SignalHandlerId
onWidgetMoveFocus obj cb = liftIO $ connectWidgetMoveFocus obj cb SignalConnectBefore
afterWidgetMoveFocus :: (GObject a, MonadIO m) => a -> WidgetMoveFocusCallback -> m SignalHandlerId
afterWidgetMoveFocus obj cb = connectWidgetMoveFocus obj cb SignalConnectAfter

connectWidgetMoveFocus :: (GObject a, MonadIO m) =>
                          a -> WidgetMoveFocusCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetMoveFocus obj cb after = liftIO $ do
    cb' <- mkWidgetMoveFocusCallback (widgetMoveFocusCallbackWrapper cb)
    connectSignalFunPtr obj "move-focus" cb' after

-- signal Widget::parent-set
type WidgetParentSetCallback =
    Maybe Widget ->
    IO ()

noWidgetParentSetCallback :: Maybe WidgetParentSetCallback
noWidgetParentSetCallback = Nothing

type WidgetParentSetCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetParentSetCallback :: WidgetParentSetCallbackC -> IO (FunPtr WidgetParentSetCallbackC)

widgetParentSetClosure :: WidgetParentSetCallback -> IO Closure
widgetParentSetClosure cb = newCClosure =<< mkWidgetParentSetCallback wrapped
    where wrapped = widgetParentSetCallbackWrapper cb

widgetParentSetCallbackWrapper ::
    WidgetParentSetCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
widgetParentSetCallbackWrapper _cb _ old_parent _ = do
    maybeOld_parent <-
        if old_parent == nullPtr
        then return Nothing
        else do
            old_parent' <- (newObject Widget) old_parent
            return $ Just old_parent'
    _cb  maybeOld_parent

onWidgetParentSet :: (GObject a, MonadIO m) => a -> WidgetParentSetCallback -> m SignalHandlerId
onWidgetParentSet obj cb = liftIO $ connectWidgetParentSet obj cb SignalConnectBefore
afterWidgetParentSet :: (GObject a, MonadIO m) => a -> WidgetParentSetCallback -> m SignalHandlerId
afterWidgetParentSet obj cb = connectWidgetParentSet obj cb SignalConnectAfter

connectWidgetParentSet :: (GObject a, MonadIO m) =>
                          a -> WidgetParentSetCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetParentSet obj cb after = liftIO $ do
    cb' <- mkWidgetParentSetCallback (widgetParentSetCallbackWrapper cb)
    connectSignalFunPtr obj "parent-set" cb' after

-- signal Widget::popup-menu
type WidgetPopupMenuCallback =
    IO Bool

noWidgetPopupMenuCallback :: Maybe WidgetPopupMenuCallback
noWidgetPopupMenuCallback = Nothing

type WidgetPopupMenuCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetPopupMenuCallback :: WidgetPopupMenuCallbackC -> IO (FunPtr WidgetPopupMenuCallbackC)

widgetPopupMenuClosure :: WidgetPopupMenuCallback -> IO Closure
widgetPopupMenuClosure cb = newCClosure =<< mkWidgetPopupMenuCallback wrapped
    where wrapped = widgetPopupMenuCallbackWrapper cb

widgetPopupMenuCallbackWrapper ::
    WidgetPopupMenuCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
widgetPopupMenuCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetPopupMenu :: (GObject a, MonadIO m) => a -> WidgetPopupMenuCallback -> m SignalHandlerId
onWidgetPopupMenu obj cb = liftIO $ connectWidgetPopupMenu obj cb SignalConnectBefore
afterWidgetPopupMenu :: (GObject a, MonadIO m) => a -> WidgetPopupMenuCallback -> m SignalHandlerId
afterWidgetPopupMenu obj cb = connectWidgetPopupMenu obj cb SignalConnectAfter

connectWidgetPopupMenu :: (GObject a, MonadIO m) =>
                          a -> WidgetPopupMenuCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetPopupMenu obj cb after = liftIO $ do
    cb' <- mkWidgetPopupMenuCallback (widgetPopupMenuCallbackWrapper cb)
    connectSignalFunPtr obj "popup-menu" cb' after

-- signal Widget::property-notify-event
type WidgetPropertyNotifyEventCallback =
    Gdk.EventProperty ->
    IO Bool

noWidgetPropertyNotifyEventCallback :: Maybe WidgetPropertyNotifyEventCallback
noWidgetPropertyNotifyEventCallback = Nothing

type WidgetPropertyNotifyEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventProperty ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetPropertyNotifyEventCallback :: WidgetPropertyNotifyEventCallbackC -> IO (FunPtr WidgetPropertyNotifyEventCallbackC)

widgetPropertyNotifyEventClosure :: WidgetPropertyNotifyEventCallback -> IO Closure
widgetPropertyNotifyEventClosure cb = newCClosure =<< mkWidgetPropertyNotifyEventCallback wrapped
    where wrapped = widgetPropertyNotifyEventCallbackWrapper cb

widgetPropertyNotifyEventCallbackWrapper ::
    WidgetPropertyNotifyEventCallback ->
    Ptr () ->
    Ptr Gdk.EventProperty ->
    Ptr () ->
    IO CInt
widgetPropertyNotifyEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 40 Gdk.EventProperty) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetPropertyNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetPropertyNotifyEventCallback -> m SignalHandlerId
onWidgetPropertyNotifyEvent obj cb = liftIO $ connectWidgetPropertyNotifyEvent obj cb SignalConnectBefore
afterWidgetPropertyNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetPropertyNotifyEventCallback -> m SignalHandlerId
afterWidgetPropertyNotifyEvent obj cb = connectWidgetPropertyNotifyEvent obj cb SignalConnectAfter

connectWidgetPropertyNotifyEvent :: (GObject a, MonadIO m) =>
                                    a -> WidgetPropertyNotifyEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetPropertyNotifyEvent obj cb after = liftIO $ do
    cb' <- mkWidgetPropertyNotifyEventCallback (widgetPropertyNotifyEventCallbackWrapper cb)
    connectSignalFunPtr obj "property-notify-event" cb' after

-- signal Widget::proximity-in-event
type WidgetProximityInEventCallback =
    Gdk.EventProximity ->
    IO Bool

noWidgetProximityInEventCallback :: Maybe WidgetProximityInEventCallback
noWidgetProximityInEventCallback = Nothing

type WidgetProximityInEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventProximity ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetProximityInEventCallback :: WidgetProximityInEventCallbackC -> IO (FunPtr WidgetProximityInEventCallbackC)

widgetProximityInEventClosure :: WidgetProximityInEventCallback -> IO Closure
widgetProximityInEventClosure cb = newCClosure =<< mkWidgetProximityInEventCallback wrapped
    where wrapped = widgetProximityInEventCallbackWrapper cb

widgetProximityInEventCallbackWrapper ::
    WidgetProximityInEventCallback ->
    Ptr () ->
    Ptr Gdk.EventProximity ->
    Ptr () ->
    IO CInt
widgetProximityInEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 32 Gdk.EventProximity) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetProximityInEvent :: (GObject a, MonadIO m) => a -> WidgetProximityInEventCallback -> m SignalHandlerId
onWidgetProximityInEvent obj cb = liftIO $ connectWidgetProximityInEvent obj cb SignalConnectBefore
afterWidgetProximityInEvent :: (GObject a, MonadIO m) => a -> WidgetProximityInEventCallback -> m SignalHandlerId
afterWidgetProximityInEvent obj cb = connectWidgetProximityInEvent obj cb SignalConnectAfter

connectWidgetProximityInEvent :: (GObject a, MonadIO m) =>
                                 a -> WidgetProximityInEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetProximityInEvent obj cb after = liftIO $ do
    cb' <- mkWidgetProximityInEventCallback (widgetProximityInEventCallbackWrapper cb)
    connectSignalFunPtr obj "proximity-in-event" cb' after

-- signal Widget::proximity-out-event
type WidgetProximityOutEventCallback =
    Gdk.EventProximity ->
    IO Bool

noWidgetProximityOutEventCallback :: Maybe WidgetProximityOutEventCallback
noWidgetProximityOutEventCallback = Nothing

type WidgetProximityOutEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventProximity ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetProximityOutEventCallback :: WidgetProximityOutEventCallbackC -> IO (FunPtr WidgetProximityOutEventCallbackC)

widgetProximityOutEventClosure :: WidgetProximityOutEventCallback -> IO Closure
widgetProximityOutEventClosure cb = newCClosure =<< mkWidgetProximityOutEventCallback wrapped
    where wrapped = widgetProximityOutEventCallbackWrapper cb

widgetProximityOutEventCallbackWrapper ::
    WidgetProximityOutEventCallback ->
    Ptr () ->
    Ptr Gdk.EventProximity ->
    Ptr () ->
    IO CInt
widgetProximityOutEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 32 Gdk.EventProximity) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetProximityOutEvent :: (GObject a, MonadIO m) => a -> WidgetProximityOutEventCallback -> m SignalHandlerId
onWidgetProximityOutEvent obj cb = liftIO $ connectWidgetProximityOutEvent obj cb SignalConnectBefore
afterWidgetProximityOutEvent :: (GObject a, MonadIO m) => a -> WidgetProximityOutEventCallback -> m SignalHandlerId
afterWidgetProximityOutEvent obj cb = connectWidgetProximityOutEvent obj cb SignalConnectAfter

connectWidgetProximityOutEvent :: (GObject a, MonadIO m) =>
                                  a -> WidgetProximityOutEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetProximityOutEvent obj cb after = liftIO $ do
    cb' <- mkWidgetProximityOutEventCallback (widgetProximityOutEventCallbackWrapper cb)
    connectSignalFunPtr obj "proximity-out-event" cb' after

-- signal Widget::query-tooltip
type WidgetQueryTooltipCallback =
    Int32 ->
    Int32 ->
    Bool ->
    Tooltip ->
    IO Bool

noWidgetQueryTooltipCallback :: Maybe WidgetQueryTooltipCallback
noWidgetQueryTooltipCallback = Nothing

type WidgetQueryTooltipCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Int32 ->
    CInt ->
    Ptr Tooltip ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetQueryTooltipCallback :: WidgetQueryTooltipCallbackC -> IO (FunPtr WidgetQueryTooltipCallbackC)

widgetQueryTooltipClosure :: WidgetQueryTooltipCallback -> IO Closure
widgetQueryTooltipClosure cb = newCClosure =<< mkWidgetQueryTooltipCallback wrapped
    where wrapped = widgetQueryTooltipCallbackWrapper cb

widgetQueryTooltipCallbackWrapper ::
    WidgetQueryTooltipCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    CInt ->
    Ptr Tooltip ->
    Ptr () ->
    IO CInt
widgetQueryTooltipCallbackWrapper _cb _ x y keyboard_mode tooltip _ = do
    let keyboard_mode' = (/= 0) keyboard_mode
    tooltip' <- (newObject Tooltip) tooltip
    result <- _cb  x y keyboard_mode' tooltip'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetQueryTooltip :: (GObject a, MonadIO m) => a -> WidgetQueryTooltipCallback -> m SignalHandlerId
onWidgetQueryTooltip obj cb = liftIO $ connectWidgetQueryTooltip obj cb SignalConnectBefore
afterWidgetQueryTooltip :: (GObject a, MonadIO m) => a -> WidgetQueryTooltipCallback -> m SignalHandlerId
afterWidgetQueryTooltip obj cb = connectWidgetQueryTooltip obj cb SignalConnectAfter

connectWidgetQueryTooltip :: (GObject a, MonadIO m) =>
                             a -> WidgetQueryTooltipCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetQueryTooltip obj cb after = liftIO $ do
    cb' <- mkWidgetQueryTooltipCallback (widgetQueryTooltipCallbackWrapper cb)
    connectSignalFunPtr obj "query-tooltip" cb' after

-- signal Widget::realize
type WidgetRealizeCallback =
    IO ()

noWidgetRealizeCallback :: Maybe WidgetRealizeCallback
noWidgetRealizeCallback = Nothing

type WidgetRealizeCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetRealizeCallback :: WidgetRealizeCallbackC -> IO (FunPtr WidgetRealizeCallbackC)

widgetRealizeClosure :: WidgetRealizeCallback -> IO Closure
widgetRealizeClosure cb = newCClosure =<< mkWidgetRealizeCallback wrapped
    where wrapped = widgetRealizeCallbackWrapper cb

widgetRealizeCallbackWrapper ::
    WidgetRealizeCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
widgetRealizeCallbackWrapper _cb _ _ = do
    _cb 

onWidgetRealize :: (GObject a, MonadIO m) => a -> WidgetRealizeCallback -> m SignalHandlerId
onWidgetRealize obj cb = liftIO $ connectWidgetRealize obj cb SignalConnectBefore
afterWidgetRealize :: (GObject a, MonadIO m) => a -> WidgetRealizeCallback -> m SignalHandlerId
afterWidgetRealize obj cb = connectWidgetRealize obj cb SignalConnectAfter

connectWidgetRealize :: (GObject a, MonadIO m) =>
                        a -> WidgetRealizeCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetRealize obj cb after = liftIO $ do
    cb' <- mkWidgetRealizeCallback (widgetRealizeCallbackWrapper cb)
    connectSignalFunPtr obj "realize" cb' after

-- signal Widget::screen-changed
type WidgetScreenChangedCallback =
    Maybe Gdk.Screen ->
    IO ()

noWidgetScreenChangedCallback :: Maybe WidgetScreenChangedCallback
noWidgetScreenChangedCallback = Nothing

type WidgetScreenChangedCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.Screen ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetScreenChangedCallback :: WidgetScreenChangedCallbackC -> IO (FunPtr WidgetScreenChangedCallbackC)

widgetScreenChangedClosure :: WidgetScreenChangedCallback -> IO Closure
widgetScreenChangedClosure cb = newCClosure =<< mkWidgetScreenChangedCallback wrapped
    where wrapped = widgetScreenChangedCallbackWrapper cb

widgetScreenChangedCallbackWrapper ::
    WidgetScreenChangedCallback ->
    Ptr () ->
    Ptr Gdk.Screen ->
    Ptr () ->
    IO ()
widgetScreenChangedCallbackWrapper _cb _ previous_screen _ = do
    maybePrevious_screen <-
        if previous_screen == nullPtr
        then return Nothing
        else do
            previous_screen' <- (newObject Gdk.Screen) previous_screen
            return $ Just previous_screen'
    _cb  maybePrevious_screen

onWidgetScreenChanged :: (GObject a, MonadIO m) => a -> WidgetScreenChangedCallback -> m SignalHandlerId
onWidgetScreenChanged obj cb = liftIO $ connectWidgetScreenChanged obj cb SignalConnectBefore
afterWidgetScreenChanged :: (GObject a, MonadIO m) => a -> WidgetScreenChangedCallback -> m SignalHandlerId
afterWidgetScreenChanged obj cb = connectWidgetScreenChanged obj cb SignalConnectAfter

connectWidgetScreenChanged :: (GObject a, MonadIO m) =>
                              a -> WidgetScreenChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetScreenChanged obj cb after = liftIO $ do
    cb' <- mkWidgetScreenChangedCallback (widgetScreenChangedCallbackWrapper cb)
    connectSignalFunPtr obj "screen-changed" cb' after

-- signal Widget::scroll-event
type WidgetScrollEventCallback =
    Gdk.EventScroll ->
    IO Bool

noWidgetScrollEventCallback :: Maybe WidgetScrollEventCallback
noWidgetScrollEventCallback = Nothing

type WidgetScrollEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventScroll ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetScrollEventCallback :: WidgetScrollEventCallbackC -> IO (FunPtr WidgetScrollEventCallbackC)

widgetScrollEventClosure :: WidgetScrollEventCallback -> IO Closure
widgetScrollEventClosure cb = newCClosure =<< mkWidgetScrollEventCallback wrapped
    where wrapped = widgetScrollEventCallbackWrapper cb

widgetScrollEventCallbackWrapper ::
    WidgetScrollEventCallback ->
    Ptr () ->
    Ptr Gdk.EventScroll ->
    Ptr () ->
    IO CInt
widgetScrollEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 88 Gdk.EventScroll) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetScrollEvent :: (GObject a, MonadIO m) => a -> WidgetScrollEventCallback -> m SignalHandlerId
onWidgetScrollEvent obj cb = liftIO $ connectWidgetScrollEvent obj cb SignalConnectBefore
afterWidgetScrollEvent :: (GObject a, MonadIO m) => a -> WidgetScrollEventCallback -> m SignalHandlerId
afterWidgetScrollEvent obj cb = connectWidgetScrollEvent obj cb SignalConnectAfter

connectWidgetScrollEvent :: (GObject a, MonadIO m) =>
                            a -> WidgetScrollEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetScrollEvent obj cb after = liftIO $ do
    cb' <- mkWidgetScrollEventCallback (widgetScrollEventCallbackWrapper cb)
    connectSignalFunPtr obj "scroll-event" cb' after

-- signal Widget::selection-clear-event
type WidgetSelectionClearEventCallback =
    Gdk.EventSelection ->
    IO Bool

noWidgetSelectionClearEventCallback :: Maybe WidgetSelectionClearEventCallback
noWidgetSelectionClearEventCallback = Nothing

type WidgetSelectionClearEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventSelection ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetSelectionClearEventCallback :: WidgetSelectionClearEventCallbackC -> IO (FunPtr WidgetSelectionClearEventCallbackC)

widgetSelectionClearEventClosure :: WidgetSelectionClearEventCallback -> IO Closure
widgetSelectionClearEventClosure cb = newCClosure =<< mkWidgetSelectionClearEventCallback wrapped
    where wrapped = widgetSelectionClearEventCallbackWrapper cb

widgetSelectionClearEventCallbackWrapper ::
    WidgetSelectionClearEventCallback ->
    Ptr () ->
    Ptr Gdk.EventSelection ->
    Ptr () ->
    IO CInt
widgetSelectionClearEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 64 Gdk.EventSelection) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetSelectionClearEvent :: (GObject a, MonadIO m) => a -> WidgetSelectionClearEventCallback -> m SignalHandlerId
onWidgetSelectionClearEvent obj cb = liftIO $ connectWidgetSelectionClearEvent obj cb SignalConnectBefore
afterWidgetSelectionClearEvent :: (GObject a, MonadIO m) => a -> WidgetSelectionClearEventCallback -> m SignalHandlerId
afterWidgetSelectionClearEvent obj cb = connectWidgetSelectionClearEvent obj cb SignalConnectAfter

connectWidgetSelectionClearEvent :: (GObject a, MonadIO m) =>
                                    a -> WidgetSelectionClearEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetSelectionClearEvent obj cb after = liftIO $ do
    cb' <- mkWidgetSelectionClearEventCallback (widgetSelectionClearEventCallbackWrapper cb)
    connectSignalFunPtr obj "selection-clear-event" cb' after

-- signal Widget::selection-get
type WidgetSelectionGetCallback =
    SelectionData ->
    Word32 ->
    Word32 ->
    IO ()

noWidgetSelectionGetCallback :: Maybe WidgetSelectionGetCallback
noWidgetSelectionGetCallback = Nothing

type WidgetSelectionGetCallbackC =
    Ptr () ->                               -- object
    Ptr SelectionData ->
    Word32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetSelectionGetCallback :: WidgetSelectionGetCallbackC -> IO (FunPtr WidgetSelectionGetCallbackC)

widgetSelectionGetClosure :: WidgetSelectionGetCallback -> IO Closure
widgetSelectionGetClosure cb = newCClosure =<< mkWidgetSelectionGetCallback wrapped
    where wrapped = widgetSelectionGetCallbackWrapper cb

widgetSelectionGetCallbackWrapper ::
    WidgetSelectionGetCallback ->
    Ptr () ->
    Ptr SelectionData ->
    Word32 ->
    Word32 ->
    Ptr () ->
    IO ()
widgetSelectionGetCallbackWrapper _cb _ data_ info time _ = do
    data_' <- (newBoxed SelectionData) data_
    _cb  data_' info time

onWidgetSelectionGet :: (GObject a, MonadIO m) => a -> WidgetSelectionGetCallback -> m SignalHandlerId
onWidgetSelectionGet obj cb = liftIO $ connectWidgetSelectionGet obj cb SignalConnectBefore
afterWidgetSelectionGet :: (GObject a, MonadIO m) => a -> WidgetSelectionGetCallback -> m SignalHandlerId
afterWidgetSelectionGet obj cb = connectWidgetSelectionGet obj cb SignalConnectAfter

connectWidgetSelectionGet :: (GObject a, MonadIO m) =>
                             a -> WidgetSelectionGetCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetSelectionGet obj cb after = liftIO $ do
    cb' <- mkWidgetSelectionGetCallback (widgetSelectionGetCallbackWrapper cb)
    connectSignalFunPtr obj "selection-get" cb' after

-- signal Widget::selection-notify-event
type WidgetSelectionNotifyEventCallback =
    Gdk.EventSelection ->
    IO Bool

noWidgetSelectionNotifyEventCallback :: Maybe WidgetSelectionNotifyEventCallback
noWidgetSelectionNotifyEventCallback = Nothing

type WidgetSelectionNotifyEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventSelection ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetSelectionNotifyEventCallback :: WidgetSelectionNotifyEventCallbackC -> IO (FunPtr WidgetSelectionNotifyEventCallbackC)

widgetSelectionNotifyEventClosure :: WidgetSelectionNotifyEventCallback -> IO Closure
widgetSelectionNotifyEventClosure cb = newCClosure =<< mkWidgetSelectionNotifyEventCallback wrapped
    where wrapped = widgetSelectionNotifyEventCallbackWrapper cb

widgetSelectionNotifyEventCallbackWrapper ::
    WidgetSelectionNotifyEventCallback ->
    Ptr () ->
    Ptr Gdk.EventSelection ->
    Ptr () ->
    IO CInt
widgetSelectionNotifyEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 64 Gdk.EventSelection) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetSelectionNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetSelectionNotifyEventCallback -> m SignalHandlerId
onWidgetSelectionNotifyEvent obj cb = liftIO $ connectWidgetSelectionNotifyEvent obj cb SignalConnectBefore
afterWidgetSelectionNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetSelectionNotifyEventCallback -> m SignalHandlerId
afterWidgetSelectionNotifyEvent obj cb = connectWidgetSelectionNotifyEvent obj cb SignalConnectAfter

connectWidgetSelectionNotifyEvent :: (GObject a, MonadIO m) =>
                                     a -> WidgetSelectionNotifyEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetSelectionNotifyEvent obj cb after = liftIO $ do
    cb' <- mkWidgetSelectionNotifyEventCallback (widgetSelectionNotifyEventCallbackWrapper cb)
    connectSignalFunPtr obj "selection-notify-event" cb' after

-- signal Widget::selection-received
type WidgetSelectionReceivedCallback =
    SelectionData ->
    Word32 ->
    IO ()

noWidgetSelectionReceivedCallback :: Maybe WidgetSelectionReceivedCallback
noWidgetSelectionReceivedCallback = Nothing

type WidgetSelectionReceivedCallbackC =
    Ptr () ->                               -- object
    Ptr SelectionData ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetSelectionReceivedCallback :: WidgetSelectionReceivedCallbackC -> IO (FunPtr WidgetSelectionReceivedCallbackC)

widgetSelectionReceivedClosure :: WidgetSelectionReceivedCallback -> IO Closure
widgetSelectionReceivedClosure cb = newCClosure =<< mkWidgetSelectionReceivedCallback wrapped
    where wrapped = widgetSelectionReceivedCallbackWrapper cb

widgetSelectionReceivedCallbackWrapper ::
    WidgetSelectionReceivedCallback ->
    Ptr () ->
    Ptr SelectionData ->
    Word32 ->
    Ptr () ->
    IO ()
widgetSelectionReceivedCallbackWrapper _cb _ data_ time _ = do
    data_' <- (newBoxed SelectionData) data_
    _cb  data_' time

onWidgetSelectionReceived :: (GObject a, MonadIO m) => a -> WidgetSelectionReceivedCallback -> m SignalHandlerId
onWidgetSelectionReceived obj cb = liftIO $ connectWidgetSelectionReceived obj cb SignalConnectBefore
afterWidgetSelectionReceived :: (GObject a, MonadIO m) => a -> WidgetSelectionReceivedCallback -> m SignalHandlerId
afterWidgetSelectionReceived obj cb = connectWidgetSelectionReceived obj cb SignalConnectAfter

connectWidgetSelectionReceived :: (GObject a, MonadIO m) =>
                                  a -> WidgetSelectionReceivedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetSelectionReceived obj cb after = liftIO $ do
    cb' <- mkWidgetSelectionReceivedCallback (widgetSelectionReceivedCallbackWrapper cb)
    connectSignalFunPtr obj "selection-received" cb' after

-- signal Widget::selection-request-event
type WidgetSelectionRequestEventCallback =
    Gdk.EventSelection ->
    IO Bool

noWidgetSelectionRequestEventCallback :: Maybe WidgetSelectionRequestEventCallback
noWidgetSelectionRequestEventCallback = Nothing

type WidgetSelectionRequestEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventSelection ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetSelectionRequestEventCallback :: WidgetSelectionRequestEventCallbackC -> IO (FunPtr WidgetSelectionRequestEventCallbackC)

widgetSelectionRequestEventClosure :: WidgetSelectionRequestEventCallback -> IO Closure
widgetSelectionRequestEventClosure cb = newCClosure =<< mkWidgetSelectionRequestEventCallback wrapped
    where wrapped = widgetSelectionRequestEventCallbackWrapper cb

widgetSelectionRequestEventCallbackWrapper ::
    WidgetSelectionRequestEventCallback ->
    Ptr () ->
    Ptr Gdk.EventSelection ->
    Ptr () ->
    IO CInt
widgetSelectionRequestEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 64 Gdk.EventSelection) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetSelectionRequestEvent :: (GObject a, MonadIO m) => a -> WidgetSelectionRequestEventCallback -> m SignalHandlerId
onWidgetSelectionRequestEvent obj cb = liftIO $ connectWidgetSelectionRequestEvent obj cb SignalConnectBefore
afterWidgetSelectionRequestEvent :: (GObject a, MonadIO m) => a -> WidgetSelectionRequestEventCallback -> m SignalHandlerId
afterWidgetSelectionRequestEvent obj cb = connectWidgetSelectionRequestEvent obj cb SignalConnectAfter

connectWidgetSelectionRequestEvent :: (GObject a, MonadIO m) =>
                                      a -> WidgetSelectionRequestEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetSelectionRequestEvent obj cb after = liftIO $ do
    cb' <- mkWidgetSelectionRequestEventCallback (widgetSelectionRequestEventCallbackWrapper cb)
    connectSignalFunPtr obj "selection-request-event" cb' after

-- signal Widget::show
type WidgetShowCallback =
    IO ()

noWidgetShowCallback :: Maybe WidgetShowCallback
noWidgetShowCallback = Nothing

type WidgetShowCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetShowCallback :: WidgetShowCallbackC -> IO (FunPtr WidgetShowCallbackC)

widgetShowClosure :: WidgetShowCallback -> IO Closure
widgetShowClosure cb = newCClosure =<< mkWidgetShowCallback wrapped
    where wrapped = widgetShowCallbackWrapper cb

widgetShowCallbackWrapper ::
    WidgetShowCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
widgetShowCallbackWrapper _cb _ _ = do
    _cb 

onWidgetShow :: (GObject a, MonadIO m) => a -> WidgetShowCallback -> m SignalHandlerId
onWidgetShow obj cb = liftIO $ connectWidgetShow obj cb SignalConnectBefore
afterWidgetShow :: (GObject a, MonadIO m) => a -> WidgetShowCallback -> m SignalHandlerId
afterWidgetShow obj cb = connectWidgetShow obj cb SignalConnectAfter

connectWidgetShow :: (GObject a, MonadIO m) =>
                     a -> WidgetShowCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetShow obj cb after = liftIO $ do
    cb' <- mkWidgetShowCallback (widgetShowCallbackWrapper cb)
    connectSignalFunPtr obj "show" cb' after

-- signal Widget::show-help
type WidgetShowHelpCallback =
    WidgetHelpType ->
    IO Bool

noWidgetShowHelpCallback :: Maybe WidgetShowHelpCallback
noWidgetShowHelpCallback = Nothing

type WidgetShowHelpCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetShowHelpCallback :: WidgetShowHelpCallbackC -> IO (FunPtr WidgetShowHelpCallbackC)

widgetShowHelpClosure :: WidgetShowHelpCallback -> IO Closure
widgetShowHelpClosure cb = newCClosure =<< mkWidgetShowHelpCallback wrapped
    where wrapped = widgetShowHelpCallbackWrapper cb

widgetShowHelpCallbackWrapper ::
    WidgetShowHelpCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO CInt
widgetShowHelpCallbackWrapper _cb _ help_type _ = do
    let help_type' = (toEnum . fromIntegral) help_type
    result <- _cb  help_type'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetShowHelp :: (GObject a, MonadIO m) => a -> WidgetShowHelpCallback -> m SignalHandlerId
onWidgetShowHelp obj cb = liftIO $ connectWidgetShowHelp obj cb SignalConnectBefore
afterWidgetShowHelp :: (GObject a, MonadIO m) => a -> WidgetShowHelpCallback -> m SignalHandlerId
afterWidgetShowHelp obj cb = connectWidgetShowHelp obj cb SignalConnectAfter

connectWidgetShowHelp :: (GObject a, MonadIO m) =>
                         a -> WidgetShowHelpCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetShowHelp obj cb after = liftIO $ do
    cb' <- mkWidgetShowHelpCallback (widgetShowHelpCallbackWrapper cb)
    connectSignalFunPtr obj "show-help" cb' after

-- signal Widget::size-allocate
type WidgetSizeAllocateCallback =
    Gdk.Rectangle ->
    IO ()

noWidgetSizeAllocateCallback :: Maybe WidgetSizeAllocateCallback
noWidgetSizeAllocateCallback = Nothing

type WidgetSizeAllocateCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.Rectangle ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetSizeAllocateCallback :: WidgetSizeAllocateCallbackC -> IO (FunPtr WidgetSizeAllocateCallbackC)

widgetSizeAllocateClosure :: WidgetSizeAllocateCallback -> IO Closure
widgetSizeAllocateClosure cb = newCClosure =<< mkWidgetSizeAllocateCallback wrapped
    where wrapped = widgetSizeAllocateCallbackWrapper cb

widgetSizeAllocateCallbackWrapper ::
    WidgetSizeAllocateCallback ->
    Ptr () ->
    Ptr Gdk.Rectangle ->
    Ptr () ->
    IO ()
widgetSizeAllocateCallbackWrapper _cb _ allocation _ = do
    allocation' <- (newBoxed Gdk.Rectangle) allocation
    _cb  allocation'

onWidgetSizeAllocate :: (GObject a, MonadIO m) => a -> WidgetSizeAllocateCallback -> m SignalHandlerId
onWidgetSizeAllocate obj cb = liftIO $ connectWidgetSizeAllocate obj cb SignalConnectBefore
afterWidgetSizeAllocate :: (GObject a, MonadIO m) => a -> WidgetSizeAllocateCallback -> m SignalHandlerId
afterWidgetSizeAllocate obj cb = connectWidgetSizeAllocate obj cb SignalConnectAfter

connectWidgetSizeAllocate :: (GObject a, MonadIO m) =>
                             a -> WidgetSizeAllocateCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetSizeAllocate obj cb after = liftIO $ do
    cb' <- mkWidgetSizeAllocateCallback (widgetSizeAllocateCallbackWrapper cb)
    connectSignalFunPtr obj "size-allocate" cb' after

-- signal Widget::state-changed
type WidgetStateChangedCallback =
    StateType ->
    IO ()

noWidgetStateChangedCallback :: Maybe WidgetStateChangedCallback
noWidgetStateChangedCallback = Nothing

type WidgetStateChangedCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetStateChangedCallback :: WidgetStateChangedCallbackC -> IO (FunPtr WidgetStateChangedCallbackC)

widgetStateChangedClosure :: WidgetStateChangedCallback -> IO Closure
widgetStateChangedClosure cb = newCClosure =<< mkWidgetStateChangedCallback wrapped
    where wrapped = widgetStateChangedCallbackWrapper cb

widgetStateChangedCallbackWrapper ::
    WidgetStateChangedCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
widgetStateChangedCallbackWrapper _cb _ state _ = do
    let state' = (toEnum . fromIntegral) state
    _cb  state'

onWidgetStateChanged :: (GObject a, MonadIO m) => a -> WidgetStateChangedCallback -> m SignalHandlerId
onWidgetStateChanged obj cb = liftIO $ connectWidgetStateChanged obj cb SignalConnectBefore
afterWidgetStateChanged :: (GObject a, MonadIO m) => a -> WidgetStateChangedCallback -> m SignalHandlerId
afterWidgetStateChanged obj cb = connectWidgetStateChanged obj cb SignalConnectAfter

connectWidgetStateChanged :: (GObject a, MonadIO m) =>
                             a -> WidgetStateChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetStateChanged obj cb after = liftIO $ do
    cb' <- mkWidgetStateChangedCallback (widgetStateChangedCallbackWrapper cb)
    connectSignalFunPtr obj "state-changed" cb' after

-- signal Widget::state-flags-changed
type WidgetStateFlagsChangedCallback =
    [StateFlags] ->
    IO ()

noWidgetStateFlagsChangedCallback :: Maybe WidgetStateFlagsChangedCallback
noWidgetStateFlagsChangedCallback = Nothing

type WidgetStateFlagsChangedCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetStateFlagsChangedCallback :: WidgetStateFlagsChangedCallbackC -> IO (FunPtr WidgetStateFlagsChangedCallbackC)

widgetStateFlagsChangedClosure :: WidgetStateFlagsChangedCallback -> IO Closure
widgetStateFlagsChangedClosure cb = newCClosure =<< mkWidgetStateFlagsChangedCallback wrapped
    where wrapped = widgetStateFlagsChangedCallbackWrapper cb

widgetStateFlagsChangedCallbackWrapper ::
    WidgetStateFlagsChangedCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
widgetStateFlagsChangedCallbackWrapper _cb _ flags _ = do
    let flags' = wordToGFlags flags
    _cb  flags'

onWidgetStateFlagsChanged :: (GObject a, MonadIO m) => a -> WidgetStateFlagsChangedCallback -> m SignalHandlerId
onWidgetStateFlagsChanged obj cb = liftIO $ connectWidgetStateFlagsChanged obj cb SignalConnectBefore
afterWidgetStateFlagsChanged :: (GObject a, MonadIO m) => a -> WidgetStateFlagsChangedCallback -> m SignalHandlerId
afterWidgetStateFlagsChanged obj cb = connectWidgetStateFlagsChanged obj cb SignalConnectAfter

connectWidgetStateFlagsChanged :: (GObject a, MonadIO m) =>
                                  a -> WidgetStateFlagsChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetStateFlagsChanged obj cb after = liftIO $ do
    cb' <- mkWidgetStateFlagsChangedCallback (widgetStateFlagsChangedCallbackWrapper cb)
    connectSignalFunPtr obj "state-flags-changed" cb' after

-- signal Widget::style-set
type WidgetStyleSetCallback =
    Maybe Style ->
    IO ()

noWidgetStyleSetCallback :: Maybe WidgetStyleSetCallback
noWidgetStyleSetCallback = Nothing

type WidgetStyleSetCallbackC =
    Ptr () ->                               -- object
    Ptr Style ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetStyleSetCallback :: WidgetStyleSetCallbackC -> IO (FunPtr WidgetStyleSetCallbackC)

widgetStyleSetClosure :: WidgetStyleSetCallback -> IO Closure
widgetStyleSetClosure cb = newCClosure =<< mkWidgetStyleSetCallback wrapped
    where wrapped = widgetStyleSetCallbackWrapper cb

widgetStyleSetCallbackWrapper ::
    WidgetStyleSetCallback ->
    Ptr () ->
    Ptr Style ->
    Ptr () ->
    IO ()
widgetStyleSetCallbackWrapper _cb _ previous_style _ = do
    maybePrevious_style <-
        if previous_style == nullPtr
        then return Nothing
        else do
            previous_style' <- (newObject Style) previous_style
            return $ Just previous_style'
    _cb  maybePrevious_style

onWidgetStyleSet :: (GObject a, MonadIO m) => a -> WidgetStyleSetCallback -> m SignalHandlerId
onWidgetStyleSet obj cb = liftIO $ connectWidgetStyleSet obj cb SignalConnectBefore
afterWidgetStyleSet :: (GObject a, MonadIO m) => a -> WidgetStyleSetCallback -> m SignalHandlerId
afterWidgetStyleSet obj cb = connectWidgetStyleSet obj cb SignalConnectAfter

connectWidgetStyleSet :: (GObject a, MonadIO m) =>
                         a -> WidgetStyleSetCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetStyleSet obj cb after = liftIO $ do
    cb' <- mkWidgetStyleSetCallback (widgetStyleSetCallbackWrapper cb)
    connectSignalFunPtr obj "style-set" cb' after

-- signal Widget::style-updated
type WidgetStyleUpdatedCallback =
    IO ()

noWidgetStyleUpdatedCallback :: Maybe WidgetStyleUpdatedCallback
noWidgetStyleUpdatedCallback = Nothing

type WidgetStyleUpdatedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetStyleUpdatedCallback :: WidgetStyleUpdatedCallbackC -> IO (FunPtr WidgetStyleUpdatedCallbackC)

widgetStyleUpdatedClosure :: WidgetStyleUpdatedCallback -> IO Closure
widgetStyleUpdatedClosure cb = newCClosure =<< mkWidgetStyleUpdatedCallback wrapped
    where wrapped = widgetStyleUpdatedCallbackWrapper cb

widgetStyleUpdatedCallbackWrapper ::
    WidgetStyleUpdatedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
widgetStyleUpdatedCallbackWrapper _cb _ _ = do
    _cb 

onWidgetStyleUpdated :: (GObject a, MonadIO m) => a -> WidgetStyleUpdatedCallback -> m SignalHandlerId
onWidgetStyleUpdated obj cb = liftIO $ connectWidgetStyleUpdated obj cb SignalConnectBefore
afterWidgetStyleUpdated :: (GObject a, MonadIO m) => a -> WidgetStyleUpdatedCallback -> m SignalHandlerId
afterWidgetStyleUpdated obj cb = connectWidgetStyleUpdated obj cb SignalConnectAfter

connectWidgetStyleUpdated :: (GObject a, MonadIO m) =>
                             a -> WidgetStyleUpdatedCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetStyleUpdated obj cb after = liftIO $ do
    cb' <- mkWidgetStyleUpdatedCallback (widgetStyleUpdatedCallbackWrapper cb)
    connectSignalFunPtr obj "style-updated" cb' after

-- signal Widget::touch-event
type WidgetTouchEventCallback =
    Gdk.Event ->
    IO Bool

noWidgetTouchEventCallback :: Maybe WidgetTouchEventCallback
noWidgetTouchEventCallback = Nothing

type WidgetTouchEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.Event ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetTouchEventCallback :: WidgetTouchEventCallbackC -> IO (FunPtr WidgetTouchEventCallbackC)

widgetTouchEventClosure :: WidgetTouchEventCallback -> IO Closure
widgetTouchEventClosure cb = newCClosure =<< mkWidgetTouchEventCallback wrapped
    where wrapped = widgetTouchEventCallbackWrapper cb

widgetTouchEventCallbackWrapper ::
    WidgetTouchEventCallback ->
    Ptr () ->
    Ptr Gdk.Event ->
    Ptr () ->
    IO CInt
widgetTouchEventCallbackWrapper _cb _ object _ = do
    object' <- (newBoxed Gdk.Event) object
    result <- _cb  object'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetTouchEvent :: (GObject a, MonadIO m) => a -> WidgetTouchEventCallback -> m SignalHandlerId
onWidgetTouchEvent obj cb = liftIO $ connectWidgetTouchEvent obj cb SignalConnectBefore
afterWidgetTouchEvent :: (GObject a, MonadIO m) => a -> WidgetTouchEventCallback -> m SignalHandlerId
afterWidgetTouchEvent obj cb = connectWidgetTouchEvent obj cb SignalConnectAfter

connectWidgetTouchEvent :: (GObject a, MonadIO m) =>
                           a -> WidgetTouchEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetTouchEvent obj cb after = liftIO $ do
    cb' <- mkWidgetTouchEventCallback (widgetTouchEventCallbackWrapper cb)
    connectSignalFunPtr obj "touch-event" cb' after

-- signal Widget::unmap
type WidgetUnmapCallback =
    IO ()

noWidgetUnmapCallback :: Maybe WidgetUnmapCallback
noWidgetUnmapCallback = Nothing

type WidgetUnmapCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetUnmapCallback :: WidgetUnmapCallbackC -> IO (FunPtr WidgetUnmapCallbackC)

widgetUnmapClosure :: WidgetUnmapCallback -> IO Closure
widgetUnmapClosure cb = newCClosure =<< mkWidgetUnmapCallback wrapped
    where wrapped = widgetUnmapCallbackWrapper cb

widgetUnmapCallbackWrapper ::
    WidgetUnmapCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
widgetUnmapCallbackWrapper _cb _ _ = do
    _cb 

onWidgetUnmap :: (GObject a, MonadIO m) => a -> WidgetUnmapCallback -> m SignalHandlerId
onWidgetUnmap obj cb = liftIO $ connectWidgetUnmap obj cb SignalConnectBefore
afterWidgetUnmap :: (GObject a, MonadIO m) => a -> WidgetUnmapCallback -> m SignalHandlerId
afterWidgetUnmap obj cb = connectWidgetUnmap obj cb SignalConnectAfter

connectWidgetUnmap :: (GObject a, MonadIO m) =>
                      a -> WidgetUnmapCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetUnmap obj cb after = liftIO $ do
    cb' <- mkWidgetUnmapCallback (widgetUnmapCallbackWrapper cb)
    connectSignalFunPtr obj "unmap" cb' after

-- signal Widget::unmap-event
type WidgetUnmapEventCallback =
    Gdk.EventAny ->
    IO Bool

noWidgetUnmapEventCallback :: Maybe WidgetUnmapEventCallback
noWidgetUnmapEventCallback = Nothing

type WidgetUnmapEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventAny ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetUnmapEventCallback :: WidgetUnmapEventCallbackC -> IO (FunPtr WidgetUnmapEventCallbackC)

widgetUnmapEventClosure :: WidgetUnmapEventCallback -> IO Closure
widgetUnmapEventClosure cb = newCClosure =<< mkWidgetUnmapEventCallback wrapped
    where wrapped = widgetUnmapEventCallbackWrapper cb

widgetUnmapEventCallbackWrapper ::
    WidgetUnmapEventCallback ->
    Ptr () ->
    Ptr Gdk.EventAny ->
    Ptr () ->
    IO CInt
widgetUnmapEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 24 Gdk.EventAny) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetUnmapEvent :: (GObject a, MonadIO m) => a -> WidgetUnmapEventCallback -> m SignalHandlerId
onWidgetUnmapEvent obj cb = liftIO $ connectWidgetUnmapEvent obj cb SignalConnectBefore
afterWidgetUnmapEvent :: (GObject a, MonadIO m) => a -> WidgetUnmapEventCallback -> m SignalHandlerId
afterWidgetUnmapEvent obj cb = connectWidgetUnmapEvent obj cb SignalConnectAfter

connectWidgetUnmapEvent :: (GObject a, MonadIO m) =>
                           a -> WidgetUnmapEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetUnmapEvent obj cb after = liftIO $ do
    cb' <- mkWidgetUnmapEventCallback (widgetUnmapEventCallbackWrapper cb)
    connectSignalFunPtr obj "unmap-event" cb' after

-- signal Widget::unrealize
type WidgetUnrealizeCallback =
    IO ()

noWidgetUnrealizeCallback :: Maybe WidgetUnrealizeCallback
noWidgetUnrealizeCallback = Nothing

type WidgetUnrealizeCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWidgetUnrealizeCallback :: WidgetUnrealizeCallbackC -> IO (FunPtr WidgetUnrealizeCallbackC)

widgetUnrealizeClosure :: WidgetUnrealizeCallback -> IO Closure
widgetUnrealizeClosure cb = newCClosure =<< mkWidgetUnrealizeCallback wrapped
    where wrapped = widgetUnrealizeCallbackWrapper cb

widgetUnrealizeCallbackWrapper ::
    WidgetUnrealizeCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
widgetUnrealizeCallbackWrapper _cb _ _ = do
    _cb 

onWidgetUnrealize :: (GObject a, MonadIO m) => a -> WidgetUnrealizeCallback -> m SignalHandlerId
onWidgetUnrealize obj cb = liftIO $ connectWidgetUnrealize obj cb SignalConnectBefore
afterWidgetUnrealize :: (GObject a, MonadIO m) => a -> WidgetUnrealizeCallback -> m SignalHandlerId
afterWidgetUnrealize obj cb = connectWidgetUnrealize obj cb SignalConnectAfter

connectWidgetUnrealize :: (GObject a, MonadIO m) =>
                          a -> WidgetUnrealizeCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetUnrealize obj cb after = liftIO $ do
    cb' <- mkWidgetUnrealizeCallback (widgetUnrealizeCallbackWrapper cb)
    connectSignalFunPtr obj "unrealize" cb' after

-- signal Widget::visibility-notify-event
type WidgetVisibilityNotifyEventCallback =
    Gdk.EventVisibility ->
    IO Bool

noWidgetVisibilityNotifyEventCallback :: Maybe WidgetVisibilityNotifyEventCallback
noWidgetVisibilityNotifyEventCallback = Nothing

type WidgetVisibilityNotifyEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventVisibility ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetVisibilityNotifyEventCallback :: WidgetVisibilityNotifyEventCallbackC -> IO (FunPtr WidgetVisibilityNotifyEventCallbackC)

widgetVisibilityNotifyEventClosure :: WidgetVisibilityNotifyEventCallback -> IO Closure
widgetVisibilityNotifyEventClosure cb = newCClosure =<< mkWidgetVisibilityNotifyEventCallback wrapped
    where wrapped = widgetVisibilityNotifyEventCallbackWrapper cb

widgetVisibilityNotifyEventCallbackWrapper ::
    WidgetVisibilityNotifyEventCallback ->
    Ptr () ->
    Ptr Gdk.EventVisibility ->
    Ptr () ->
    IO CInt
widgetVisibilityNotifyEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 24 Gdk.EventVisibility) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetVisibilityNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetVisibilityNotifyEventCallback -> m SignalHandlerId
onWidgetVisibilityNotifyEvent obj cb = liftIO $ connectWidgetVisibilityNotifyEvent obj cb SignalConnectBefore
afterWidgetVisibilityNotifyEvent :: (GObject a, MonadIO m) => a -> WidgetVisibilityNotifyEventCallback -> m SignalHandlerId
afterWidgetVisibilityNotifyEvent obj cb = connectWidgetVisibilityNotifyEvent obj cb SignalConnectAfter

connectWidgetVisibilityNotifyEvent :: (GObject a, MonadIO m) =>
                                      a -> WidgetVisibilityNotifyEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetVisibilityNotifyEvent obj cb after = liftIO $ do
    cb' <- mkWidgetVisibilityNotifyEventCallback (widgetVisibilityNotifyEventCallbackWrapper cb)
    connectSignalFunPtr obj "visibility-notify-event" cb' after

-- signal Widget::window-state-event
type WidgetWindowStateEventCallback =
    Gdk.EventWindowState ->
    IO Bool

noWidgetWindowStateEventCallback :: Maybe WidgetWindowStateEventCallback
noWidgetWindowStateEventCallback = Nothing

type WidgetWindowStateEventCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.EventWindowState ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWidgetWindowStateEventCallback :: WidgetWindowStateEventCallbackC -> IO (FunPtr WidgetWindowStateEventCallbackC)

widgetWindowStateEventClosure :: WidgetWindowStateEventCallback -> IO Closure
widgetWindowStateEventClosure cb = newCClosure =<< mkWidgetWindowStateEventCallback wrapped
    where wrapped = widgetWindowStateEventCallbackWrapper cb

widgetWindowStateEventCallbackWrapper ::
    WidgetWindowStateEventCallback ->
    Ptr () ->
    Ptr Gdk.EventWindowState ->
    Ptr () ->
    IO CInt
widgetWindowStateEventCallbackWrapper _cb _ event _ = do
    event' <- (newPtr 32 Gdk.EventWindowState) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWidgetWindowStateEvent :: (GObject a, MonadIO m) => a -> WidgetWindowStateEventCallback -> m SignalHandlerId
onWidgetWindowStateEvent obj cb = liftIO $ connectWidgetWindowStateEvent obj cb SignalConnectBefore
afterWidgetWindowStateEvent :: (GObject a, MonadIO m) => a -> WidgetWindowStateEventCallback -> m SignalHandlerId
afterWidgetWindowStateEvent obj cb = connectWidgetWindowStateEvent obj cb SignalConnectAfter

connectWidgetWindowStateEvent :: (GObject a, MonadIO m) =>
                                 a -> WidgetWindowStateEventCallback -> SignalConnectMode -> m SignalHandlerId
connectWidgetWindowStateEvent obj cb after = liftIO $ do
    cb' <- mkWidgetWindowStateEventCallback (widgetWindowStateEventCallbackWrapper cb)
    connectSignalFunPtr obj "window-state-event" cb' after

-- object WidgetAccessible 
newtype WidgetAccessible = WidgetAccessible (ForeignPtr WidgetAccessible)
noWidgetAccessible :: Maybe WidgetAccessible
noWidgetAccessible = Nothing

foreign import ccall "gtk_widget_accessible_get_type"
    c_gtk_widget_accessible_get_type :: IO GType

type instance ParentTypes WidgetAccessible = '[Accessible, Atk.Object, GObject.Object, Atk.Component]

instance GObject WidgetAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_widget_accessible_get_type
    

class GObject o => WidgetAccessibleK o
instance (GObject o, IsDescendantOf WidgetAccessible o) => WidgetAccessibleK o

toWidgetAccessible :: WidgetAccessibleK o => o -> IO WidgetAccessible
toWidgetAccessible = unsafeCastTo WidgetAccessible

-- Enum WidgetHelpType

data WidgetHelpType = 
      WidgetHelpTypeTooltip
    | WidgetHelpTypeWhatsThis
    | AnotherWidgetHelpType Int
    deriving (Show, Eq)

instance Enum WidgetHelpType where
    fromEnum WidgetHelpTypeTooltip = 0
    fromEnum WidgetHelpTypeWhatsThis = 1
    fromEnum (AnotherWidgetHelpType k) = k

    toEnum 0 = WidgetHelpTypeTooltip
    toEnum 1 = WidgetHelpTypeWhatsThis
    toEnum k = AnotherWidgetHelpType k

foreign import ccall "gtk_widget_help_type_get_type" c_gtk_widget_help_type_get_type :: 
    IO GType

instance BoxedEnum WidgetHelpType where
    boxedEnumType _ = c_gtk_widget_help_type_get_type

-- struct WidgetPath
newtype WidgetPath = WidgetPath (ForeignPtr WidgetPath)
noWidgetPath :: Maybe WidgetPath
noWidgetPath = Nothing

foreign import ccall "gtk_widget_path_get_type" c_gtk_widget_path_get_type :: 
    IO GType

instance BoxedObject WidgetPath where
    boxedType _ = c_gtk_widget_path_get_type

-- method WidgetPath::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "WidgetPath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_new" gtk_widget_path_new :: 
    IO (Ptr WidgetPath)


widgetPathNew ::
    (MonadIO m) =>
    m WidgetPath
widgetPathNew  = liftIO $ do
    result <- gtk_widget_path_new
    checkUnexpectedReturnNULL "gtk_widget_path_new" result
    result' <- (wrapBoxed WidgetPath) result
    return result'

-- method WidgetPath::append_for_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_append_for_widget" gtk_widget_path_append_for_widget :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO Int32


widgetPathAppendForWidget ::
    (MonadIO m, WidgetK a) =>
    WidgetPath ->                           -- _obj
    a ->                                    -- widget
    m Int32
widgetPathAppendForWidget _obj widget = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_widget_path_append_for_widget _obj' widget'
    touchManagedPtr _obj
    touchManagedPtr widget
    return result

-- method WidgetPath::append_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_append_type" gtk_widget_path_append_type :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    CGType ->                               -- type : TBasicType TGType
    IO Int32


widgetPathAppendType ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    GType ->                                -- type
    m Int32
widgetPathAppendType _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let type_' = gtypeToCGType type_
    result <- gtk_widget_path_append_type _obj' type_'
    touchManagedPtr _obj
    return result

-- method WidgetPath::append_with_siblings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "siblings", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling_index", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "siblings", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sibling_index", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_append_with_siblings" gtk_widget_path_append_with_siblings :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Ptr WidgetPath ->                       -- siblings : TInterface "Gtk" "WidgetPath"
    Word32 ->                               -- sibling_index : TBasicType TUInt32
    IO Int32


widgetPathAppendWithSiblings ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    WidgetPath ->                           -- siblings
    Word32 ->                               -- sibling_index
    m Int32
widgetPathAppendWithSiblings _obj siblings sibling_index = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let siblings' = unsafeManagedPtrGetPtr siblings
    result <- gtk_widget_path_append_with_siblings _obj' siblings' sibling_index
    touchManagedPtr _obj
    touchManagedPtr siblings
    return result

-- method WidgetPath::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "WidgetPath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_copy" gtk_widget_path_copy :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    IO (Ptr WidgetPath)


widgetPathCopy ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    m WidgetPath
widgetPathCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_copy _obj'
    checkUnexpectedReturnNULL "gtk_widget_path_copy" result
    result' <- (wrapBoxed WidgetPath) result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_free" gtk_widget_path_free :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    IO ()


widgetPathFree ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    m ()
widgetPathFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_widget_path_free _obj'
    touchManagedPtr _obj
    return ()

-- method WidgetPath::get_object_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TGType
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_get_object_type" gtk_widget_path_get_object_type :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    IO CGType


widgetPathGetObjectType ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    m GType
widgetPathGetObjectType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_get_object_type _obj'
    let result' = GType result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::has_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_has_parent" gtk_widget_path_has_parent :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    CGType ->                               -- type : TBasicType TGType
    IO CInt


widgetPathHasParent ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    GType ->                                -- type
    m Bool
widgetPathHasParent _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let type_' = gtypeToCGType type_
    result <- gtk_widget_path_has_parent _obj' type_'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::is_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_is_type" gtk_widget_path_is_type :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    CGType ->                               -- type : TBasicType TGType
    IO CInt


widgetPathIsType ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    GType ->                                -- type
    m Bool
widgetPathIsType _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let type_' = gtypeToCGType type_
    result <- gtk_widget_path_is_type _obj' type_'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::iter_add_class
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_add_class" gtk_widget_path_iter_add_class :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    CString ->                              -- name : TBasicType TUTF8
    IO ()


widgetPathIterAddClass ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    T.Text ->                               -- name
    m ()
widgetPathIterAddClass _obj pos name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    name' <- textToCString name
    gtk_widget_path_iter_add_class _obj' pos name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method WidgetPath::iter_add_qclass
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "qname", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "qname", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_add_qclass" gtk_widget_path_iter_add_qclass :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    Word32 ->                               -- qname : TBasicType TUInt32
    IO ()


widgetPathIterAddQclass ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    Word32 ->                               -- qname
    m ()
widgetPathIterAddQclass _obj pos qname = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_widget_path_iter_add_qclass _obj' pos qname
    touchManagedPtr _obj
    return ()

-- method WidgetPath::iter_add_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "RegionFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "RegionFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_add_region" gtk_widget_path_iter_add_region :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    CString ->                              -- name : TBasicType TUTF8
    CUInt ->                                -- flags : TInterface "Gtk" "RegionFlags"
    IO ()

{-# DEPRECATED widgetPathIterAddRegion ["(Since version 3.14)","The use of regions is deprecated."]#-}
widgetPathIterAddRegion ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    T.Text ->                               -- name
    [RegionFlags] ->                        -- flags
    m ()
widgetPathIterAddRegion _obj pos name flags = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    name' <- textToCString name
    let flags' = gflagsToWord flags
    gtk_widget_path_iter_add_region _obj' pos name' flags'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method WidgetPath::iter_clear_classes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_clear_classes" gtk_widget_path_iter_clear_classes :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    IO ()


widgetPathIterClearClasses ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    m ()
widgetPathIterClearClasses _obj pos = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_widget_path_iter_clear_classes _obj' pos
    touchManagedPtr _obj
    return ()

-- method WidgetPath::iter_clear_regions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_clear_regions" gtk_widget_path_iter_clear_regions :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    IO ()

{-# DEPRECATED widgetPathIterClearRegions ["(Since version 3.14)","The use of regions is deprecated."]#-}
widgetPathIterClearRegions ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    m ()
widgetPathIterClearRegions _obj pos = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_widget_path_iter_clear_regions _obj' pos
    touchManagedPtr _obj
    return ()

-- method WidgetPath::iter_get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_get_name" gtk_widget_path_iter_get_name :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    IO CString


widgetPathIterGetName ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    m T.Text
widgetPathIterGetName _obj pos = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_iter_get_name _obj' pos
    checkUnexpectedReturnNULL "gtk_widget_path_iter_get_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::iter_get_object_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TGType
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_get_object_type" gtk_widget_path_iter_get_object_type :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    IO CGType


widgetPathIterGetObjectType ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    m GType
widgetPathIterGetObjectType _obj pos = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_iter_get_object_type _obj' pos
    let result' = GType result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::iter_get_sibling_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_get_sibling_index" gtk_widget_path_iter_get_sibling_index :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    IO Word32


widgetPathIterGetSiblingIndex ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    m Word32
widgetPathIterGetSiblingIndex _obj pos = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_iter_get_sibling_index _obj' pos
    touchManagedPtr _obj
    return result

-- method WidgetPath::iter_get_siblings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "WidgetPath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_get_siblings" gtk_widget_path_iter_get_siblings :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    IO (Ptr WidgetPath)


widgetPathIterGetSiblings ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    m WidgetPath
widgetPathIterGetSiblings _obj pos = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_iter_get_siblings _obj' pos
    checkUnexpectedReturnNULL "gtk_widget_path_iter_get_siblings" result
    result' <- (newBoxed WidgetPath) result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::iter_get_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "StateFlags"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_get_state" gtk_widget_path_iter_get_state :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    IO CUInt


widgetPathIterGetState ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    m [StateFlags]
widgetPathIterGetState _obj pos = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_iter_get_state _obj' pos
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::iter_has_class
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_has_class" gtk_widget_path_iter_has_class :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    CString ->                              -- name : TBasicType TUTF8
    IO CInt


widgetPathIterHasClass ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    T.Text ->                               -- name
    m Bool
widgetPathIterHasClass _obj pos name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    name' <- textToCString name
    result <- gtk_widget_path_iter_has_class _obj' pos name'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem name'
    return result'

-- method WidgetPath::iter_has_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_has_name" gtk_widget_path_iter_has_name :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    CString ->                              -- name : TBasicType TUTF8
    IO CInt


widgetPathIterHasName ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    T.Text ->                               -- name
    m Bool
widgetPathIterHasName _obj pos name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    name' <- textToCString name
    result <- gtk_widget_path_iter_has_name _obj' pos name'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem name'
    return result'

-- method WidgetPath::iter_has_qclass
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "qname", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "qname", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_has_qclass" gtk_widget_path_iter_has_qclass :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    Word32 ->                               -- qname : TBasicType TUInt32
    IO CInt


widgetPathIterHasQclass ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    Word32 ->                               -- qname
    m Bool
widgetPathIterHasQclass _obj pos qname = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_iter_has_qclass _obj' pos qname
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::iter_has_qname
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "qname", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "qname", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_has_qname" gtk_widget_path_iter_has_qname :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    Word32 ->                               -- qname : TBasicType TUInt32
    IO CInt


widgetPathIterHasQname ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    Word32 ->                               -- qname
    m Bool
widgetPathIterHasQname _obj pos qname = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_iter_has_qname _obj' pos qname
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::iter_has_qregion
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "qname", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "RegionFlags", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "qname", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_has_qregion" gtk_widget_path_iter_has_qregion :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    Word32 ->                               -- qname : TBasicType TUInt32
    Ptr CUInt ->                            -- flags : TInterface "Gtk" "RegionFlags"
    IO CInt

{-# DEPRECATED widgetPathIterHasQregion ["(Since version 3.14)","The use of regions is deprecated."]#-}
widgetPathIterHasQregion ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    Word32 ->                               -- qname
    m (Bool,[RegionFlags])
widgetPathIterHasQregion _obj pos qname = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    flags <- allocMem :: IO (Ptr CUInt)
    result <- gtk_widget_path_iter_has_qregion _obj' pos qname flags
    let result' = (/= 0) result
    flags' <- peek flags
    let flags'' = wordToGFlags flags'
    touchManagedPtr _obj
    freeMem flags
    return (result', flags'')

-- method WidgetPath::iter_has_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "RegionFlags", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_has_region" gtk_widget_path_iter_has_region :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    CString ->                              -- name : TBasicType TUTF8
    Ptr CUInt ->                            -- flags : TInterface "Gtk" "RegionFlags"
    IO CInt

{-# DEPRECATED widgetPathIterHasRegion ["(Since version 3.14)","The use of regions is deprecated."]#-}
widgetPathIterHasRegion ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    T.Text ->                               -- name
    m (Bool,[RegionFlags])
widgetPathIterHasRegion _obj pos name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    name' <- textToCString name
    flags <- allocMem :: IO (Ptr CUInt)
    result <- gtk_widget_path_iter_has_region _obj' pos name' flags
    let result' = (/= 0) result
    flags' <- peek flags
    let flags'' = wordToGFlags flags'
    touchManagedPtr _obj
    freeMem name'
    freeMem flags
    return (result', flags'')

-- method WidgetPath::iter_list_classes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_list_classes" gtk_widget_path_iter_list_classes :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    IO (Ptr (GSList CString))


widgetPathIterListClasses ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    m [T.Text]
widgetPathIterListClasses _obj pos = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_iter_list_classes _obj' pos
    checkUnexpectedReturnNULL "gtk_widget_path_iter_list_classes" result
    result' <- unpackGSList result
    result'' <- mapM cstringToText result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method WidgetPath::iter_list_regions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_list_regions" gtk_widget_path_iter_list_regions :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    IO (Ptr (GSList CString))

{-# DEPRECATED widgetPathIterListRegions ["(Since version 3.14)","The use of regions is deprecated."]#-}
widgetPathIterListRegions ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    m [T.Text]
widgetPathIterListRegions _obj pos = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_iter_list_regions _obj' pos
    checkUnexpectedReturnNULL "gtk_widget_path_iter_list_regions" result
    result' <- unpackGSList result
    result'' <- mapM cstringToText result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method WidgetPath::iter_remove_class
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_remove_class" gtk_widget_path_iter_remove_class :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    CString ->                              -- name : TBasicType TUTF8
    IO ()


widgetPathIterRemoveClass ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    T.Text ->                               -- name
    m ()
widgetPathIterRemoveClass _obj pos name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    name' <- textToCString name
    gtk_widget_path_iter_remove_class _obj' pos name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method WidgetPath::iter_remove_region
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_remove_region" gtk_widget_path_iter_remove_region :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    CString ->                              -- name : TBasicType TUTF8
    IO ()

{-# DEPRECATED widgetPathIterRemoveRegion ["(Since version 3.14)","The use of regions is deprecated."]#-}
widgetPathIterRemoveRegion ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    T.Text ->                               -- name
    m ()
widgetPathIterRemoveRegion _obj pos name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    name' <- textToCString name
    gtk_widget_path_iter_remove_region _obj' pos name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method WidgetPath::iter_set_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_set_name" gtk_widget_path_iter_set_name :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    CString ->                              -- name : TBasicType TUTF8
    IO ()


widgetPathIterSetName ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    T.Text ->                               -- name
    m ()
widgetPathIterSetName _obj pos name = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    name' <- textToCString name
    gtk_widget_path_iter_set_name _obj' pos name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- method WidgetPath::iter_set_object_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_set_object_type" gtk_widget_path_iter_set_object_type :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    CGType ->                               -- type : TBasicType TGType
    IO ()


widgetPathIterSetObjectType ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    GType ->                                -- type
    m ()
widgetPathIterSetObjectType _obj pos type_ = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let type_' = gtypeToCGType type_
    gtk_widget_path_iter_set_object_type _obj' pos type_'
    touchManagedPtr _obj
    return ()

-- method WidgetPath::iter_set_state
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_iter_set_state" gtk_widget_path_iter_set_state :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    Int32 ->                                -- pos : TBasicType TInt32
    CUInt ->                                -- state : TInterface "Gtk" "StateFlags"
    IO ()


widgetPathIterSetState ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    Int32 ->                                -- pos
    [StateFlags] ->                         -- state
    m ()
widgetPathIterSetState _obj pos state = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let state' = gflagsToWord state
    gtk_widget_path_iter_set_state _obj' pos state'
    touchManagedPtr _obj
    return ()

-- method WidgetPath::length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_length" gtk_widget_path_length :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    IO Int32


widgetPathLength ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    m Int32
widgetPathLength _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_length _obj'
    touchManagedPtr _obj
    return result

-- method WidgetPath::prepend_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_prepend_type" gtk_widget_path_prepend_type :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    CGType ->                               -- type : TBasicType TGType
    IO ()


widgetPathPrependType ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    GType ->                                -- type
    m ()
widgetPathPrependType _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let type_' = gtypeToCGType type_
    gtk_widget_path_prepend_type _obj' type_'
    touchManagedPtr _obj
    return ()

-- method WidgetPath::ref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "WidgetPath"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_ref" gtk_widget_path_ref :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    IO (Ptr WidgetPath)


widgetPathRef ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    m WidgetPath
widgetPathRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_ref _obj'
    checkUnexpectedReturnNULL "gtk_widget_path_ref" result
    result' <- (wrapBoxed WidgetPath) result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::to_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_to_string" gtk_widget_path_to_string :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    IO CString


widgetPathToString ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    m T.Text
widgetPathToString _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- gtk_widget_path_to_string _obj'
    checkUnexpectedReturnNULL "gtk_widget_path_to_string" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method WidgetPath::unref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WidgetPath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_path_unref" gtk_widget_path_unref :: 
    Ptr WidgetPath ->                       -- _obj : TInterface "Gtk" "WidgetPath"
    IO ()


widgetPathUnref ::
    (MonadIO m) =>
    WidgetPath ->                           -- _obj
    m ()
widgetPathUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    gtk_widget_path_unref _obj'
    touchManagedPtr _obj
    return ()

-- object Window 
newtype Window = Window (ForeignPtr Window)
noWindow :: Maybe Window
noWindow = Nothing

foreign import ccall "gtk_window_get_type"
    c_gtk_window_get_type :: IO GType

type instance ParentTypes Window = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Window where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_window_get_type
    

class GObject o => WindowK o
instance (GObject o, IsDescendantOf Window o) => WindowK o

toWindow :: WindowK o => o -> IO Window
toWindow = unsafeCastTo Window

-- method Window::new
-- method type : Constructor
-- Args : [Arg {argName = "type", argType = TInterface "Gtk" "WindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type", argType = TInterface "Gtk" "WindowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_new" gtk_window_new :: 
    CUInt ->                                -- type : TInterface "Gtk" "WindowType"
    IO (Ptr Window)


windowNew ::
    (MonadIO m) =>
    WindowType ->                           -- type
    m Window
windowNew type_ = liftIO $ do
    let type_' = (fromIntegral . fromEnum) type_
    result <- gtk_window_new type_'
    checkUnexpectedReturnNULL "gtk_window_new" result
    result' <- (newObject Window) result
    return result'

-- method Window::activate_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_activate_default" gtk_window_activate_default :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowActivateDefault ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowActivateDefault _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_activate_default _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::activate_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_activate_focus" gtk_window_activate_focus :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowActivateFocus ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowActivateFocus _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_activate_focus _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::activate_key
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_activate_key" gtk_window_activate_key :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Gdk.EventKey ->                     -- event : TInterface "Gdk" "EventKey"
    IO CInt


windowActivateKey ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Gdk.EventKey ->                         -- event
    m Bool
windowActivateKey _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_window_activate_key _obj' event'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event
    return result'

-- method Window::add_accel_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_add_accel_group" gtk_window_add_accel_group :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr AccelGroup ->                       -- accel_group : TInterface "Gtk" "AccelGroup"
    IO ()


windowAddAccelGroup ::
    (MonadIO m, WindowK a, AccelGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- accel_group
    m ()
windowAddAccelGroup _obj accel_group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accel_group' = unsafeManagedPtrCastPtr accel_group
    gtk_window_add_accel_group _obj' accel_group'
    touchManagedPtr _obj
    touchManagedPtr accel_group
    return ()

-- method Window::add_mnemonic
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_add_mnemonic" gtk_window_add_mnemonic :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Word32 ->                               -- keyval : TBasicType TUInt32
    Ptr Widget ->                           -- target : TInterface "Gtk" "Widget"
    IO ()


windowAddMnemonic ::
    (MonadIO m, WindowK a, WidgetK b) =>
    a ->                                    -- _obj
    Word32 ->                               -- keyval
    b ->                                    -- target
    m ()
windowAddMnemonic _obj keyval target = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let target' = unsafeManagedPtrCastPtr target
    gtk_window_add_mnemonic _obj' keyval target'
    touchManagedPtr _obj
    touchManagedPtr target
    return ()

-- method Window::begin_move_drag
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "root_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "root_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timestamp", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "root_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "root_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timestamp", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_begin_move_drag" gtk_window_begin_move_drag :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Int32 ->                                -- button : TBasicType TInt32
    Int32 ->                                -- root_x : TBasicType TInt32
    Int32 ->                                -- root_y : TBasicType TInt32
    Word32 ->                               -- timestamp : TBasicType TUInt32
    IO ()


windowBeginMoveDrag ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- button
    Int32 ->                                -- root_x
    Int32 ->                                -- root_y
    Word32 ->                               -- timestamp
    m ()
windowBeginMoveDrag _obj button root_x root_y timestamp = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_begin_move_drag _obj' button root_x root_y timestamp
    touchManagedPtr _obj
    return ()

-- method Window::begin_resize_drag
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "edge", argType = TInterface "Gdk" "WindowEdge", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "root_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "root_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timestamp", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "edge", argType = TInterface "Gdk" "WindowEdge", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "root_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "root_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timestamp", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_begin_resize_drag" gtk_window_begin_resize_drag :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CUInt ->                                -- edge : TInterface "Gdk" "WindowEdge"
    Int32 ->                                -- button : TBasicType TInt32
    Int32 ->                                -- root_x : TBasicType TInt32
    Int32 ->                                -- root_y : TBasicType TInt32
    Word32 ->                               -- timestamp : TBasicType TUInt32
    IO ()


windowBeginResizeDrag ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Gdk.WindowEdge ->                       -- edge
    Int32 ->                                -- button
    Int32 ->                                -- root_x
    Int32 ->                                -- root_y
    Word32 ->                               -- timestamp
    m ()
windowBeginResizeDrag _obj edge button root_x root_y timestamp = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let edge' = (fromIntegral . fromEnum) edge
    gtk_window_begin_resize_drag _obj' edge' button root_x root_y timestamp
    touchManagedPtr _obj
    return ()

-- method Window::close
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_close" gtk_window_close :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO ()


windowClose ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m ()
windowClose _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_close _obj'
    touchManagedPtr _obj
    return ()

-- method Window::deiconify
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_deiconify" gtk_window_deiconify :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO ()


windowDeiconify ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m ()
windowDeiconify _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_deiconify _obj'
    touchManagedPtr _obj
    return ()

-- method Window::fullscreen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_fullscreen" gtk_window_fullscreen :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO ()


windowFullscreen ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m ()
windowFullscreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_fullscreen _obj'
    touchManagedPtr _obj
    return ()

-- method Window::fullscreen_on_monitor
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "monitor", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "monitor", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_fullscreen_on_monitor" gtk_window_fullscreen_on_monitor :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    Int32 ->                                -- monitor : TBasicType TInt32
    IO ()


windowFullscreenOnMonitor ::
    (MonadIO m, WindowK a, Gdk.ScreenK b) =>
    a ->                                    -- _obj
    b ->                                    -- screen
    Int32 ->                                -- monitor
    m ()
windowFullscreenOnMonitor _obj screen monitor = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let screen' = unsafeManagedPtrCastPtr screen
    gtk_window_fullscreen_on_monitor _obj' screen' monitor
    touchManagedPtr _obj
    touchManagedPtr screen
    return ()

-- method Window::get_accept_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_accept_focus" gtk_window_get_accept_focus :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetAcceptFocus ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetAcceptFocus _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_accept_focus _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_application
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Application"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_application" gtk_window_get_application :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO (Ptr Application)


windowGetApplication ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Application
windowGetApplication _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_application _obj'
    checkUnexpectedReturnNULL "gtk_window_get_application" result
    result' <- (newObject Application) result
    touchManagedPtr _obj
    return result'

-- method Window::get_attached_to
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_attached_to" gtk_window_get_attached_to :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO (Ptr Widget)


windowGetAttachedTo ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Widget
windowGetAttachedTo _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_attached_to _obj'
    checkUnexpectedReturnNULL "gtk_window_get_attached_to" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Window::get_decorated
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_decorated" gtk_window_get_decorated :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetDecorated ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetDecorated _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_decorated _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_default_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_default_size" gtk_window_get_default_size :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Int32 ->                            -- width : TBasicType TInt32
    Ptr Int32 ->                            -- height : TBasicType TInt32
    IO ()


windowGetDefaultSize ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
windowGetDefaultSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    width <- allocMem :: IO (Ptr Int32)
    height <- allocMem :: IO (Ptr Int32)
    gtk_window_get_default_size _obj' width height
    width' <- peek width
    height' <- peek height
    touchManagedPtr _obj
    freeMem width
    freeMem height
    return (width', height')

-- method Window::get_default_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_default_widget" gtk_window_get_default_widget :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO (Ptr Widget)


windowGetDefaultWidget ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Widget
windowGetDefaultWidget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_default_widget _obj'
    checkUnexpectedReturnNULL "gtk_window_get_default_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Window::get_deletable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_deletable" gtk_window_get_deletable :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetDeletable ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetDeletable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_deletable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_destroy_with_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_destroy_with_parent" gtk_window_get_destroy_with_parent :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetDestroyWithParent ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetDestroyWithParent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_destroy_with_parent _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_focus" gtk_window_get_focus :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO (Ptr Widget)


windowGetFocus ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Widget
windowGetFocus _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_focus _obj'
    checkUnexpectedReturnNULL "gtk_window_get_focus" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Window::get_focus_on_map
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_focus_on_map" gtk_window_get_focus_on_map :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetFocusOnMap ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetFocusOnMap _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_focus_on_map _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_focus_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_focus_visible" gtk_window_get_focus_visible :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetFocusVisible ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetFocusVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_focus_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_gravity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Gravity"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_gravity" gtk_window_get_gravity :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CUInt


windowGetGravity ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Gdk.Gravity
windowGetGravity _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_gravity _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Window::get_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "WindowGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_group" gtk_window_get_group :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO (Ptr WindowGroup)


windowGetGroup ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m WindowGroup
windowGetGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_group _obj'
    checkUnexpectedReturnNULL "gtk_window_get_group" result
    result' <- (newObject WindowGroup) result
    touchManagedPtr _obj
    return result'

-- method Window::get_has_resize_grip
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_has_resize_grip" gtk_window_get_has_resize_grip :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt

{-# DEPRECATED windowGetHasResizeGrip ["(Since version 3.14)","Resize grips have been removed."]#-}
windowGetHasResizeGrip ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetHasResizeGrip _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_has_resize_grip _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_hide_titlebar_when_maximized
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_hide_titlebar_when_maximized" gtk_window_get_hide_titlebar_when_maximized :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetHideTitlebarWhenMaximized ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetHideTitlebarWhenMaximized _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_hide_titlebar_when_maximized _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_icon" gtk_window_get_icon :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO (Ptr GdkPixbuf.Pixbuf)


windowGetIcon ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m GdkPixbuf.Pixbuf
windowGetIcon _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_icon _obj'
    checkUnexpectedReturnNULL "gtk_window_get_icon" result
    result' <- (newObject GdkPixbuf.Pixbuf) result
    touchManagedPtr _obj
    return result'

-- method Window::get_icon_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "GdkPixbuf" "Pixbuf")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_icon_list" gtk_window_get_icon_list :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO (Ptr (GList (Ptr GdkPixbuf.Pixbuf)))


windowGetIconList ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m [GdkPixbuf.Pixbuf]
windowGetIconList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_icon_list _obj'
    checkUnexpectedReturnNULL "gtk_window_get_icon_list" result
    result' <- unpackGList result
    result'' <- mapM (newObject GdkPixbuf.Pixbuf) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method Window::get_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_icon_name" gtk_window_get_icon_name :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CString


windowGetIconName ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m T.Text
windowGetIconName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_icon_name _obj'
    checkUnexpectedReturnNULL "gtk_window_get_icon_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Window::get_mnemonic_modifier
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "ModifierType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_mnemonic_modifier" gtk_window_get_mnemonic_modifier :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CUInt


windowGetMnemonicModifier ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m [Gdk.ModifierType]
windowGetMnemonicModifier _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_mnemonic_modifier _obj'
    let result' = wordToGFlags result
    touchManagedPtr _obj
    return result'

-- method Window::get_mnemonics_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_mnemonics_visible" gtk_window_get_mnemonics_visible :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetMnemonicsVisible ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetMnemonicsVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_mnemonics_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_modal
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_modal" gtk_window_get_modal :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetModal ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetModal _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_modal _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_opacity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_opacity" gtk_window_get_opacity :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CDouble

{-# DEPRECATED windowGetOpacity ["(Since version 3.8)","Use gtk_widget_get_opacity instead."]#-}
windowGetOpacity ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Double
windowGetOpacity _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_opacity _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Window::get_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "root_x", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "root_y", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_position" gtk_window_get_position :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Int32 ->                            -- root_x : TBasicType TInt32
    Ptr Int32 ->                            -- root_y : TBasicType TInt32
    IO ()


windowGetPosition ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
windowGetPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    root_x <- allocMem :: IO (Ptr Int32)
    root_y <- allocMem :: IO (Ptr Int32)
    gtk_window_get_position _obj' root_x root_y
    root_x' <- peek root_x
    root_y' <- peek root_y
    touchManagedPtr _obj
    freeMem root_x
    freeMem root_y
    return (root_x', root_y')

-- method Window::get_resizable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_resizable" gtk_window_get_resizable :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetResizable ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetResizable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_resizable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_resize_grip_area
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_resize_grip_area" gtk_window_get_resize_grip_area :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Gdk.Rectangle ->                    -- rect : TInterface "Gdk" "Rectangle"
    IO CInt

{-# DEPRECATED windowGetResizeGripArea ["(Since version 3.14)","Resize grips have been removed."]#-}
windowGetResizeGripArea ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m (Bool,Gdk.Rectangle)
windowGetResizeGripArea _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    rect <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
    result <- gtk_window_get_resize_grip_area _obj' rect
    let result' = (/= 0) result
    rect' <- (wrapBoxed Gdk.Rectangle) rect
    touchManagedPtr _obj
    return (result', rect')

-- method Window::get_role
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_role" gtk_window_get_role :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CString


windowGetRole ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m T.Text
windowGetRole _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_role _obj'
    checkUnexpectedReturnNULL "gtk_window_get_role" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Window::get_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Screen"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_screen" gtk_window_get_screen :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO (Ptr Gdk.Screen)


windowGetScreen ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Gdk.Screen
windowGetScreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_screen _obj'
    checkUnexpectedReturnNULL "gtk_window_get_screen" result
    result' <- (newObject Gdk.Screen) result
    touchManagedPtr _obj
    return result'

-- method Window::get_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_size" gtk_window_get_size :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Int32 ->                            -- width : TBasicType TInt32
    Ptr Int32 ->                            -- height : TBasicType TInt32
    IO ()


windowGetSize ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
windowGetSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    width <- allocMem :: IO (Ptr Int32)
    height <- allocMem :: IO (Ptr Int32)
    gtk_window_get_size _obj' width height
    width' <- peek width
    height' <- peek height
    touchManagedPtr _obj
    freeMem width
    freeMem height
    return (width', height')

-- method Window::get_skip_pager_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_skip_pager_hint" gtk_window_get_skip_pager_hint :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetSkipPagerHint ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetSkipPagerHint _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_skip_pager_hint _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_skip_taskbar_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_skip_taskbar_hint" gtk_window_get_skip_taskbar_hint :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetSkipTaskbarHint ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetSkipTaskbarHint _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_skip_taskbar_hint _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_title" gtk_window_get_title :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CString


windowGetTitle ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m T.Text
windowGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_title _obj'
    checkUnexpectedReturnNULL "gtk_window_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Window::get_titlebar
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_titlebar" gtk_window_get_titlebar :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO (Ptr Widget)


windowGetTitlebar ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Widget
windowGetTitlebar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_titlebar _obj'
    checkUnexpectedReturnNULL "gtk_window_get_titlebar" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method Window::get_transient_for
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_transient_for" gtk_window_get_transient_for :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO (Ptr Window)


windowGetTransientFor ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Window
windowGetTransientFor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_transient_for _obj'
    checkUnexpectedReturnNULL "gtk_window_get_transient_for" result
    result' <- (newObject Window) result
    touchManagedPtr _obj
    return result'

-- method Window::get_type_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "WindowTypeHint"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_type_hint" gtk_window_get_type_hint :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CUInt


windowGetTypeHint ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Gdk.WindowTypeHint
windowGetTypeHint _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_type_hint _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Window::get_urgency_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_urgency_hint" gtk_window_get_urgency_hint :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowGetUrgencyHint ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowGetUrgencyHint _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_urgency_hint _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::get_window_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "WindowType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_window_type" gtk_window_get_window_type :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CUInt


windowGetWindowType ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m WindowType
windowGetWindowType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_get_window_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Window::has_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_has_group" gtk_window_has_group :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowHasGroup ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowHasGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_has_group _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::has_toplevel_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_has_toplevel_focus" gtk_window_has_toplevel_focus :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowHasToplevelFocus ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowHasToplevelFocus _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_has_toplevel_focus _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::iconify
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_iconify" gtk_window_iconify :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO ()


windowIconify ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m ()
windowIconify _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_iconify _obj'
    touchManagedPtr _obj
    return ()

-- method Window::is_active
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_is_active" gtk_window_is_active :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowIsActive ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowIsActive _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_is_active _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::is_maximized
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_is_maximized" gtk_window_is_maximized :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt


windowIsMaximized ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowIsMaximized _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_is_maximized _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::maximize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_maximize" gtk_window_maximize :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO ()


windowMaximize ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m ()
windowMaximize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_maximize _obj'
    touchManagedPtr _obj
    return ()

-- method Window::mnemonic_activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifier", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifier", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_mnemonic_activate" gtk_window_mnemonic_activate :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Word32 ->                               -- keyval : TBasicType TUInt32
    CUInt ->                                -- modifier : TInterface "Gdk" "ModifierType"
    IO CInt


windowMnemonicActivate ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- keyval
    [Gdk.ModifierType] ->                   -- modifier
    m Bool
windowMnemonicActivate _obj keyval modifier = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let modifier' = gflagsToWord modifier
    result <- gtk_window_mnemonic_activate _obj' keyval modifier'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::move
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_move" gtk_window_move :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO ()


windowMove ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    m ()
windowMove _obj x y = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_move _obj' x y
    touchManagedPtr _obj
    return ()

-- method Window::parse_geometry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "geometry", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "geometry", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_parse_geometry" gtk_window_parse_geometry :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CString ->                              -- geometry : TBasicType TUTF8
    IO CInt


windowParseGeometry ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- geometry
    m Bool
windowParseGeometry _obj geometry = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    geometry' <- textToCString geometry
    result <- gtk_window_parse_geometry _obj' geometry'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem geometry'
    return result'

-- method Window::present
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_present" gtk_window_present :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO ()


windowPresent ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m ()
windowPresent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_present _obj'
    touchManagedPtr _obj
    return ()

-- method Window::present_with_time
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timestamp", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timestamp", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_present_with_time" gtk_window_present_with_time :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Word32 ->                               -- timestamp : TBasicType TUInt32
    IO ()


windowPresentWithTime ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- timestamp
    m ()
windowPresentWithTime _obj timestamp = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_present_with_time _obj' timestamp
    touchManagedPtr _obj
    return ()

-- method Window::propagate_key_event
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_propagate_key_event" gtk_window_propagate_key_event :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Gdk.EventKey ->                     -- event : TInterface "Gdk" "EventKey"
    IO CInt


windowPropagateKeyEvent ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Gdk.EventKey ->                         -- event
    m Bool
windowPropagateKeyEvent _obj event = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_window_propagate_key_event _obj' event'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr event
    return result'

-- method Window::remove_accel_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_group", argType = TInterface "Gtk" "AccelGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_remove_accel_group" gtk_window_remove_accel_group :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr AccelGroup ->                       -- accel_group : TInterface "Gtk" "AccelGroup"
    IO ()


windowRemoveAccelGroup ::
    (MonadIO m, WindowK a, AccelGroupK b) =>
    a ->                                    -- _obj
    b ->                                    -- accel_group
    m ()
windowRemoveAccelGroup _obj accel_group = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accel_group' = unsafeManagedPtrCastPtr accel_group
    gtk_window_remove_accel_group _obj' accel_group'
    touchManagedPtr _obj
    touchManagedPtr accel_group
    return ()

-- method Window::remove_mnemonic
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_remove_mnemonic" gtk_window_remove_mnemonic :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Word32 ->                               -- keyval : TBasicType TUInt32
    Ptr Widget ->                           -- target : TInterface "Gtk" "Widget"
    IO ()


windowRemoveMnemonic ::
    (MonadIO m, WindowK a, WidgetK b) =>
    a ->                                    -- _obj
    Word32 ->                               -- keyval
    b ->                                    -- target
    m ()
windowRemoveMnemonic _obj keyval target = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let target' = unsafeManagedPtrCastPtr target
    gtk_window_remove_mnemonic _obj' keyval target'
    touchManagedPtr _obj
    touchManagedPtr target
    return ()

-- method Window::reshow_with_initial_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_reshow_with_initial_size" gtk_window_reshow_with_initial_size :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO ()

{-# DEPRECATED windowReshowWithInitialSize ["(Since version 3.10)","GUI builders can call gtk_widget_hide(),","  gtk_widget_unrealize() and then gtk_widget_show() on @window","  themselves, if they still need this functionality."]#-}
windowReshowWithInitialSize ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m ()
windowReshowWithInitialSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_reshow_with_initial_size _obj'
    touchManagedPtr _obj
    return ()

-- method Window::resize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_resize" gtk_window_resize :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


windowResize ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
windowResize _obj width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_resize _obj' width height
    touchManagedPtr _obj
    return ()

-- method Window::resize_grip_is_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_resize_grip_is_visible" gtk_window_resize_grip_is_visible :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO CInt

{-# DEPRECATED windowResizeGripIsVisible ["(Since version 3.14)","Resize grips have been removed."]#-}
windowResizeGripIsVisible ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m Bool
windowResizeGripIsVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_resize_grip_is_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Window::resize_to_geometry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_resize_to_geometry" gtk_window_resize_to_geometry :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


windowResizeToGeometry ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
windowResizeToGeometry _obj width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_resize_to_geometry _obj' width height
    touchManagedPtr _obj
    return ()

-- method Window::set_accept_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_accept_focus" gtk_window_set_accept_focus :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetAcceptFocus ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetAcceptFocus _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_accept_focus _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_application
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application", argType = TInterface "Gtk" "Application", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_application" gtk_window_set_application :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Application ->                      -- application : TInterface "Gtk" "Application"
    IO ()


windowSetApplication ::
    (MonadIO m, WindowK a, ApplicationK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- application
    m ()
windowSetApplication _obj application = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeApplication <- case application of
        Nothing -> return nullPtr
        Just jApplication -> do
            let jApplication' = unsafeManagedPtrCastPtr jApplication
            return jApplication'
    gtk_window_set_application _obj' maybeApplication
    touchManagedPtr _obj
    whenJust application touchManagedPtr
    return ()

-- method Window::set_attached_to
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attach_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attach_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_attached_to" gtk_window_set_attached_to :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Widget ->                           -- attach_widget : TInterface "Gtk" "Widget"
    IO ()


windowSetAttachedTo ::
    (MonadIO m, WindowK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- attach_widget
    m ()
windowSetAttachedTo _obj attach_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeAttach_widget <- case attach_widget of
        Nothing -> return nullPtr
        Just jAttach_widget -> do
            let jAttach_widget' = unsafeManagedPtrCastPtr jAttach_widget
            return jAttach_widget'
    gtk_window_set_attached_to _obj' maybeAttach_widget
    touchManagedPtr _obj
    whenJust attach_widget touchManagedPtr
    return ()

-- method Window::set_decorated
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_decorated" gtk_window_set_decorated :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetDecorated ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetDecorated _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_decorated _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_default
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "default_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_default" gtk_window_set_default :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Widget ->                           -- default_widget : TInterface "Gtk" "Widget"
    IO ()


windowSetDefault ::
    (MonadIO m, WindowK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- default_widget
    m ()
windowSetDefault _obj default_widget = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeDefault_widget <- case default_widget of
        Nothing -> return nullPtr
        Just jDefault_widget -> do
            let jDefault_widget' = unsafeManagedPtrCastPtr jDefault_widget
            return jDefault_widget'
    gtk_window_set_default _obj' maybeDefault_widget
    touchManagedPtr _obj
    whenJust default_widget touchManagedPtr
    return ()

-- method Window::set_default_geometry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_default_geometry" gtk_window_set_default_geometry :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


windowSetDefaultGeometry ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
windowSetDefaultGeometry _obj width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_set_default_geometry _obj' width height
    touchManagedPtr _obj
    return ()

-- method Window::set_default_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_default_size" gtk_window_set_default_size :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


windowSetDefaultSize ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
windowSetDefaultSize _obj width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_set_default_size _obj' width height
    touchManagedPtr _obj
    return ()

-- method Window::set_deletable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_deletable" gtk_window_set_deletable :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetDeletable ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetDeletable _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_deletable _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_destroy_with_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_destroy_with_parent" gtk_window_set_destroy_with_parent :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetDestroyWithParent ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetDestroyWithParent _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_destroy_with_parent _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_focus
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "focus", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_focus" gtk_window_set_focus :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Widget ->                           -- focus : TInterface "Gtk" "Widget"
    IO ()


windowSetFocus ::
    (MonadIO m, WindowK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- focus
    m ()
windowSetFocus _obj focus = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeFocus <- case focus of
        Nothing -> return nullPtr
        Just jFocus -> do
            let jFocus' = unsafeManagedPtrCastPtr jFocus
            return jFocus'
    gtk_window_set_focus _obj' maybeFocus
    touchManagedPtr _obj
    whenJust focus touchManagedPtr
    return ()

-- method Window::set_focus_on_map
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_focus_on_map" gtk_window_set_focus_on_map :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetFocusOnMap ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetFocusOnMap _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_focus_on_map _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_focus_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_focus_visible" gtk_window_set_focus_visible :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetFocusVisible ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetFocusVisible _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_focus_visible _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_geometry_hints
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "geometry_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "geometry", argType = TInterface "Gdk" "Geometry", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "geom_mask", argType = TInterface "Gdk" "WindowHints", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "geometry_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "geometry", argType = TInterface "Gdk" "Geometry", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "geom_mask", argType = TInterface "Gdk" "WindowHints", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_geometry_hints" gtk_window_set_geometry_hints :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Widget ->                           -- geometry_widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Geometry ->                     -- geometry : TInterface "Gdk" "Geometry"
    CUInt ->                                -- geom_mask : TInterface "Gdk" "WindowHints"
    IO ()


windowSetGeometryHints ::
    (MonadIO m, WindowK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- geometry_widget
    Maybe (Gdk.Geometry) ->                 -- geometry
    [Gdk.WindowHints] ->                    -- geom_mask
    m ()
windowSetGeometryHints _obj geometry_widget geometry geom_mask = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeGeometry_widget <- case geometry_widget of
        Nothing -> return nullPtr
        Just jGeometry_widget -> do
            let jGeometry_widget' = unsafeManagedPtrCastPtr jGeometry_widget
            return jGeometry_widget'
    maybeGeometry <- case geometry of
        Nothing -> return nullPtr
        Just jGeometry -> do
            let jGeometry' = unsafeManagedPtrGetPtr jGeometry
            return jGeometry'
    let geom_mask' = gflagsToWord geom_mask
    gtk_window_set_geometry_hints _obj' maybeGeometry_widget maybeGeometry geom_mask'
    touchManagedPtr _obj
    whenJust geometry_widget touchManagedPtr
    whenJust geometry touchManagedPtr
    return ()

-- method Window::set_gravity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gravity", argType = TInterface "Gdk" "Gravity", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gravity", argType = TInterface "Gdk" "Gravity", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_gravity" gtk_window_set_gravity :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CUInt ->                                -- gravity : TInterface "Gdk" "Gravity"
    IO ()


windowSetGravity ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Gdk.Gravity ->                          -- gravity
    m ()
windowSetGravity _obj gravity = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let gravity' = (fromIntegral . fromEnum) gravity
    gtk_window_set_gravity _obj' gravity'
    touchManagedPtr _obj
    return ()

-- method Window::set_has_resize_grip
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_has_resize_grip" gtk_window_set_has_resize_grip :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- value : TBasicType TBoolean
    IO ()

{-# DEPRECATED windowSetHasResizeGrip ["(Since version 3.14)","Resize grips have been removed."]#-}
windowSetHasResizeGrip ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- value
    m ()
windowSetHasResizeGrip _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = (fromIntegral . fromEnum) value
    gtk_window_set_has_resize_grip _obj' value'
    touchManagedPtr _obj
    return ()

-- method Window::set_has_user_ref_count
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_has_user_ref_count" gtk_window_set_has_user_ref_count :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetHasUserRefCount ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetHasUserRefCount _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_has_user_ref_count _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_hide_titlebar_when_maximized
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_hide_titlebar_when_maximized" gtk_window_set_hide_titlebar_when_maximized :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetHideTitlebarWhenMaximized ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetHideTitlebarWhenMaximized _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_hide_titlebar_when_maximized _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_icon" gtk_window_set_icon :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr GdkPixbuf.Pixbuf ->                 -- icon : TInterface "GdkPixbuf" "Pixbuf"
    IO ()


windowSetIcon ::
    (MonadIO m, WindowK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- icon
    m ()
windowSetIcon _obj icon = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeIcon <- case icon of
        Nothing -> return nullPtr
        Just jIcon -> do
            let jIcon' = unsafeManagedPtrCastPtr jIcon
            return jIcon'
    gtk_window_set_icon _obj' maybeIcon
    touchManagedPtr _obj
    whenJust icon touchManagedPtr
    return ()

-- method Window::set_icon_from_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_window_set_icon_from_file" gtk_window_set_icon_from_file :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CString ->                              -- filename : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO CInt


windowSetIconFromFile ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    [Char] ->                               -- filename
    m ()
windowSetIconFromFile _obj filename = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filename' <- stringToCString filename
    onException (do
        _ <- propagateGError $ gtk_window_set_icon_from_file _obj' filename'
        touchManagedPtr _obj
        freeMem filename'
        return ()
     ) (do
        freeMem filename'
     )

-- method Window::set_icon_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "list", argType = TGList (TInterface "GdkPixbuf" "Pixbuf"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "list", argType = TGList (TInterface "GdkPixbuf" "Pixbuf"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_icon_list" gtk_window_set_icon_list :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr (GList (Ptr GdkPixbuf.Pixbuf)) ->   -- list : TGList (TInterface "GdkPixbuf" "Pixbuf")
    IO ()


windowSetIconList ::
    (MonadIO m, WindowK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- _obj
    [b] ->                                  -- list
    m ()
windowSetIconList _obj list = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let list' = map unsafeManagedPtrCastPtr list
    list'' <- packGList list'
    gtk_window_set_icon_list _obj' list''
    touchManagedPtr _obj
    mapM_ touchManagedPtr list
    g_list_free list''
    return ()

-- method Window::set_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_icon_name" gtk_window_set_icon_name :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


windowSetIconName ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- name
    m ()
windowSetIconName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeName <- case name of
        Nothing -> return nullPtr
        Just jName -> do
            jName' <- textToCString jName
            return jName'
    gtk_window_set_icon_name _obj' maybeName
    touchManagedPtr _obj
    freeMem maybeName
    return ()

-- method Window::set_keep_above
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_keep_above" gtk_window_set_keep_above :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetKeepAbove ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetKeepAbove _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_keep_above _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_keep_below
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_keep_below" gtk_window_set_keep_below :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetKeepBelow ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetKeepBelow _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_keep_below _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_mnemonic_modifier
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifier", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifier", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_mnemonic_modifier" gtk_window_set_mnemonic_modifier :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CUInt ->                                -- modifier : TInterface "Gdk" "ModifierType"
    IO ()


windowSetMnemonicModifier ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    [Gdk.ModifierType] ->                   -- modifier
    m ()
windowSetMnemonicModifier _obj modifier = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let modifier' = gflagsToWord modifier
    gtk_window_set_mnemonic_modifier _obj' modifier'
    touchManagedPtr _obj
    return ()

-- method Window::set_mnemonics_visible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_mnemonics_visible" gtk_window_set_mnemonics_visible :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetMnemonicsVisible ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetMnemonicsVisible _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_mnemonics_visible _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_modal
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modal", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modal", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_modal" gtk_window_set_modal :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- modal : TBasicType TBoolean
    IO ()


windowSetModal ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- modal
    m ()
windowSetModal _obj modal = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let modal' = (fromIntegral . fromEnum) modal
    gtk_window_set_modal _obj' modal'
    touchManagedPtr _obj
    return ()

-- method Window::set_opacity
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "opacity", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "opacity", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_opacity" gtk_window_set_opacity :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CDouble ->                              -- opacity : TBasicType TDouble
    IO ()

{-# DEPRECATED windowSetOpacity ["(Since version 3.8)","Use gtk_widget_set_opacity instead."]#-}
windowSetOpacity ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Double ->                               -- opacity
    m ()
windowSetOpacity _obj opacity = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let opacity' = realToFrac opacity
    gtk_window_set_opacity _obj' opacity'
    touchManagedPtr _obj
    return ()

-- method Window::set_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "WindowPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TInterface "Gtk" "WindowPosition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_position" gtk_window_set_position :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CUInt ->                                -- position : TInterface "Gtk" "WindowPosition"
    IO ()


windowSetPosition ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    WindowPosition ->                       -- position
    m ()
windowSetPosition _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let position' = (fromIntegral . fromEnum) position
    gtk_window_set_position _obj' position'
    touchManagedPtr _obj
    return ()

-- method Window::set_resizable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resizable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resizable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_resizable" gtk_window_set_resizable :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- resizable : TBasicType TBoolean
    IO ()


windowSetResizable ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- resizable
    m ()
windowSetResizable _obj resizable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let resizable' = (fromIntegral . fromEnum) resizable
    gtk_window_set_resizable _obj' resizable'
    touchManagedPtr _obj
    return ()

-- method Window::set_role
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "role", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "role", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_role" gtk_window_set_role :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CString ->                              -- role : TBasicType TUTF8
    IO ()


windowSetRole ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- role
    m ()
windowSetRole _obj role = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    role' <- textToCString role
    gtk_window_set_role _obj' role'
    touchManagedPtr _obj
    freeMem role'
    return ()

-- method Window::set_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_screen" gtk_window_set_screen :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO ()


windowSetScreen ::
    (MonadIO m, WindowK a, Gdk.ScreenK b) =>
    a ->                                    -- _obj
    b ->                                    -- screen
    m ()
windowSetScreen _obj screen = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let screen' = unsafeManagedPtrCastPtr screen
    gtk_window_set_screen _obj' screen'
    touchManagedPtr _obj
    touchManagedPtr screen
    return ()

-- method Window::set_skip_pager_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_skip_pager_hint" gtk_window_set_skip_pager_hint :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetSkipPagerHint ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetSkipPagerHint _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_skip_pager_hint _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_skip_taskbar_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_skip_taskbar_hint" gtk_window_set_skip_taskbar_hint :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetSkipTaskbarHint ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetSkipTaskbarHint _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_skip_taskbar_hint _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_startup_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "startup_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "startup_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_startup_id" gtk_window_set_startup_id :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CString ->                              -- startup_id : TBasicType TUTF8
    IO ()


windowSetStartupId ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- startup_id
    m ()
windowSetStartupId _obj startup_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    startup_id' <- textToCString startup_id
    gtk_window_set_startup_id _obj' startup_id'
    touchManagedPtr _obj
    freeMem startup_id'
    return ()

-- method Window::set_title
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_title" gtk_window_set_title :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CString ->                              -- title : TBasicType TUTF8
    IO ()


windowSetTitle ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- title
    m ()
windowSetTitle _obj title = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    title' <- textToCString title
    gtk_window_set_title _obj' title'
    touchManagedPtr _obj
    freeMem title'
    return ()

-- method Window::set_titlebar
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "titlebar", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "titlebar", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_titlebar" gtk_window_set_titlebar :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Widget ->                           -- titlebar : TInterface "Gtk" "Widget"
    IO ()


windowSetTitlebar ::
    (MonadIO m, WindowK a, WidgetK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- titlebar
    m ()
windowSetTitlebar _obj titlebar = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeTitlebar <- case titlebar of
        Nothing -> return nullPtr
        Just jTitlebar -> do
            let jTitlebar' = unsafeManagedPtrCastPtr jTitlebar
            return jTitlebar'
    gtk_window_set_titlebar _obj' maybeTitlebar
    touchManagedPtr _obj
    whenJust titlebar touchManagedPtr
    return ()

-- method Window::set_transient_for
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_transient_for" gtk_window_set_transient_for :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    Ptr Window ->                           -- parent : TInterface "Gtk" "Window"
    IO ()


windowSetTransientFor ::
    (MonadIO m, WindowK a, WindowK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- parent
    m ()
windowSetTransientFor _obj parent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    gtk_window_set_transient_for _obj' maybeParent
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    return ()

-- method Window::set_type_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hint", argType = TInterface "Gdk" "WindowTypeHint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hint", argType = TInterface "Gdk" "WindowTypeHint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_type_hint" gtk_window_set_type_hint :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CUInt ->                                -- hint : TInterface "Gdk" "WindowTypeHint"
    IO ()


windowSetTypeHint ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Gdk.WindowTypeHint ->                   -- hint
    m ()
windowSetTypeHint _obj hint = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let hint' = (fromIntegral . fromEnum) hint
    gtk_window_set_type_hint _obj' hint'
    touchManagedPtr _obj
    return ()

-- method Window::set_urgency_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_urgency_hint" gtk_window_set_urgency_hint :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetUrgencyHint ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- setting
    m ()
windowSetUrgencyHint _obj setting = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_urgency_hint _obj' setting'
    touchManagedPtr _obj
    return ()

-- method Window::set_wmclass
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wmclass_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wmclass_class", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wmclass_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "wmclass_class", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_wmclass" gtk_window_set_wmclass :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    CString ->                              -- wmclass_name : TBasicType TUTF8
    CString ->                              -- wmclass_class : TBasicType TUTF8
    IO ()


windowSetWmclass ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- wmclass_name
    T.Text ->                               -- wmclass_class
    m ()
windowSetWmclass _obj wmclass_name wmclass_class = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    wmclass_name' <- textToCString wmclass_name
    wmclass_class' <- textToCString wmclass_class
    gtk_window_set_wmclass _obj' wmclass_name' wmclass_class'
    touchManagedPtr _obj
    freeMem wmclass_name'
    freeMem wmclass_class'
    return ()

-- method Window::stick
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_stick" gtk_window_stick :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO ()


windowStick ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m ()
windowStick _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_stick _obj'
    touchManagedPtr _obj
    return ()

-- method Window::unfullscreen
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_unfullscreen" gtk_window_unfullscreen :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO ()


windowUnfullscreen ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m ()
windowUnfullscreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_unfullscreen _obj'
    touchManagedPtr _obj
    return ()

-- method Window::unmaximize
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_unmaximize" gtk_window_unmaximize :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO ()


windowUnmaximize ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m ()
windowUnmaximize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_unmaximize _obj'
    touchManagedPtr _obj
    return ()

-- method Window::unstick
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_unstick" gtk_window_unstick :: 
    Ptr Window ->                           -- _obj : TInterface "Gtk" "Window"
    IO ()


windowUnstick ::
    (MonadIO m, WindowK a) =>
    a ->                                    -- _obj
    m ()
windowUnstick _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_window_unstick _obj'
    touchManagedPtr _obj
    return ()

-- method Window::get_default_icon_list
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TGList (TInterface "GdkPixbuf" "Pixbuf")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_default_icon_list" gtk_window_get_default_icon_list :: 
    IO (Ptr (GList (Ptr GdkPixbuf.Pixbuf)))


windowGetDefaultIconList ::
    (MonadIO m) =>
    m [GdkPixbuf.Pixbuf]
windowGetDefaultIconList  = liftIO $ do
    result <- gtk_window_get_default_icon_list
    checkUnexpectedReturnNULL "gtk_window_get_default_icon_list" result
    result' <- unpackGList result
    result'' <- mapM (newObject GdkPixbuf.Pixbuf) result'
    g_list_free result
    return result''

-- method Window::get_default_icon_name
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_get_default_icon_name" gtk_window_get_default_icon_name :: 
    IO CString


windowGetDefaultIconName ::
    (MonadIO m) =>
    m T.Text
windowGetDefaultIconName  = liftIO $ do
    result <- gtk_window_get_default_icon_name
    checkUnexpectedReturnNULL "gtk_window_get_default_icon_name" result
    result' <- cstringToText result
    return result'

-- method Window::list_toplevels
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TGList (TInterface "Gtk" "Widget")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_list_toplevels" gtk_window_list_toplevels :: 
    IO (Ptr (GList (Ptr Widget)))


windowListToplevels ::
    (MonadIO m) =>
    m [Widget]
windowListToplevels  = liftIO $ do
    result <- gtk_window_list_toplevels
    checkUnexpectedReturnNULL "gtk_window_list_toplevels" result
    result' <- unpackGList result
    result'' <- mapM (newObject Widget) result'
    g_list_free result
    return result''

-- method Window::set_auto_startup_notification
-- method type : MemberFunction
-- Args : [Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_auto_startup_notification" gtk_window_set_auto_startup_notification :: 
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()


windowSetAutoStartupNotification ::
    (MonadIO m) =>
    Bool ->                                 -- setting
    m ()
windowSetAutoStartupNotification setting = liftIO $ do
    let setting' = (fromIntegral . fromEnum) setting
    gtk_window_set_auto_startup_notification setting'
    return ()

-- method Window::set_default_icon
-- method type : MemberFunction
-- Args : [Arg {argName = "icon", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_default_icon" gtk_window_set_default_icon :: 
    Ptr GdkPixbuf.Pixbuf ->                 -- icon : TInterface "GdkPixbuf" "Pixbuf"
    IO ()


windowSetDefaultIcon ::
    (MonadIO m, GdkPixbuf.PixbufK a) =>
    a ->                                    -- icon
    m ()
windowSetDefaultIcon icon = liftIO $ do
    let icon' = unsafeManagedPtrCastPtr icon
    gtk_window_set_default_icon icon'
    touchManagedPtr icon
    return ()

-- method Window::set_default_icon_from_file
-- method type : MemberFunction
-- Args : [Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_window_set_default_icon_from_file" gtk_window_set_default_icon_from_file :: 
    CString ->                              -- filename : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO CInt


windowSetDefaultIconFromFile ::
    (MonadIO m) =>
    [Char] ->                               -- filename
    m ()
windowSetDefaultIconFromFile filename = liftIO $ do
    filename' <- stringToCString filename
    onException (do
        _ <- propagateGError $ gtk_window_set_default_icon_from_file filename'
        freeMem filename'
        return ()
     ) (do
        freeMem filename'
     )

-- method Window::set_default_icon_list
-- method type : MemberFunction
-- Args : [Arg {argName = "list", argType = TGList (TInterface "GdkPixbuf" "Pixbuf"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferContainer}]
-- Lengths : []
-- hInArgs : [Arg {argName = "list", argType = TGList (TInterface "GdkPixbuf" "Pixbuf"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferContainer}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_default_icon_list" gtk_window_set_default_icon_list :: 
    Ptr (GList (Ptr GdkPixbuf.Pixbuf)) ->   -- list : TGList (TInterface "GdkPixbuf" "Pixbuf")
    IO ()


windowSetDefaultIconList ::
    (MonadIO m, GdkPixbuf.PixbufK a) =>
    [a] ->                                  -- list
    m ()
windowSetDefaultIconList list = liftIO $ do
    let list' = map unsafeManagedPtrCastPtr list
    list'' <- packGList list'
    gtk_window_set_default_icon_list list''
    mapM_ touchManagedPtr list
    return ()

-- method Window::set_default_icon_name
-- method type : MemberFunction
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_default_icon_name" gtk_window_set_default_icon_name :: 
    CString ->                              -- name : TBasicType TUTF8
    IO ()


windowSetDefaultIconName ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m ()
windowSetDefaultIconName name = liftIO $ do
    name' <- textToCString name
    gtk_window_set_default_icon_name name'
    freeMem name'
    return ()

-- method Window::set_interactive_debugging
-- method type : MemberFunction
-- Args : [Arg {argName = "enable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "enable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_set_interactive_debugging" gtk_window_set_interactive_debugging :: 
    CInt ->                                 -- enable : TBasicType TBoolean
    IO ()


windowSetInteractiveDebugging ::
    (MonadIO m) =>
    Bool ->                                 -- enable
    m ()
windowSetInteractiveDebugging enable = liftIO $ do
    let enable' = (fromIntegral . fromEnum) enable
    gtk_window_set_interactive_debugging enable'
    return ()

-- signal Window::activate-default
type WindowActivateDefaultCallback =
    IO ()

noWindowActivateDefaultCallback :: Maybe WindowActivateDefaultCallback
noWindowActivateDefaultCallback = Nothing

type WindowActivateDefaultCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowActivateDefaultCallback :: WindowActivateDefaultCallbackC -> IO (FunPtr WindowActivateDefaultCallbackC)

windowActivateDefaultClosure :: WindowActivateDefaultCallback -> IO Closure
windowActivateDefaultClosure cb = newCClosure =<< mkWindowActivateDefaultCallback wrapped
    where wrapped = windowActivateDefaultCallbackWrapper cb

windowActivateDefaultCallbackWrapper ::
    WindowActivateDefaultCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowActivateDefaultCallbackWrapper _cb _ _ = do
    _cb 

onWindowActivateDefault :: (GObject a, MonadIO m) => a -> WindowActivateDefaultCallback -> m SignalHandlerId
onWindowActivateDefault obj cb = liftIO $ connectWindowActivateDefault obj cb SignalConnectBefore
afterWindowActivateDefault :: (GObject a, MonadIO m) => a -> WindowActivateDefaultCallback -> m SignalHandlerId
afterWindowActivateDefault obj cb = connectWindowActivateDefault obj cb SignalConnectAfter

connectWindowActivateDefault :: (GObject a, MonadIO m) =>
                                a -> WindowActivateDefaultCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowActivateDefault obj cb after = liftIO $ do
    cb' <- mkWindowActivateDefaultCallback (windowActivateDefaultCallbackWrapper cb)
    connectSignalFunPtr obj "activate-default" cb' after

-- signal Window::activate-focus
type WindowActivateFocusCallback =
    IO ()

noWindowActivateFocusCallback :: Maybe WindowActivateFocusCallback
noWindowActivateFocusCallback = Nothing

type WindowActivateFocusCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowActivateFocusCallback :: WindowActivateFocusCallbackC -> IO (FunPtr WindowActivateFocusCallbackC)

windowActivateFocusClosure :: WindowActivateFocusCallback -> IO Closure
windowActivateFocusClosure cb = newCClosure =<< mkWindowActivateFocusCallback wrapped
    where wrapped = windowActivateFocusCallbackWrapper cb

windowActivateFocusCallbackWrapper ::
    WindowActivateFocusCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowActivateFocusCallbackWrapper _cb _ _ = do
    _cb 

onWindowActivateFocus :: (GObject a, MonadIO m) => a -> WindowActivateFocusCallback -> m SignalHandlerId
onWindowActivateFocus obj cb = liftIO $ connectWindowActivateFocus obj cb SignalConnectBefore
afterWindowActivateFocus :: (GObject a, MonadIO m) => a -> WindowActivateFocusCallback -> m SignalHandlerId
afterWindowActivateFocus obj cb = connectWindowActivateFocus obj cb SignalConnectAfter

connectWindowActivateFocus :: (GObject a, MonadIO m) =>
                              a -> WindowActivateFocusCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowActivateFocus obj cb after = liftIO $ do
    cb' <- mkWindowActivateFocusCallback (windowActivateFocusCallbackWrapper cb)
    connectSignalFunPtr obj "activate-focus" cb' after

-- signal Window::enable-debugging
type WindowEnableDebuggingCallback =
    Bool ->
    IO Bool

noWindowEnableDebuggingCallback :: Maybe WindowEnableDebuggingCallback
noWindowEnableDebuggingCallback = Nothing

type WindowEnableDebuggingCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWindowEnableDebuggingCallback :: WindowEnableDebuggingCallbackC -> IO (FunPtr WindowEnableDebuggingCallbackC)

windowEnableDebuggingClosure :: WindowEnableDebuggingCallback -> IO Closure
windowEnableDebuggingClosure cb = newCClosure =<< mkWindowEnableDebuggingCallback wrapped
    where wrapped = windowEnableDebuggingCallbackWrapper cb

windowEnableDebuggingCallbackWrapper ::
    WindowEnableDebuggingCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO CInt
windowEnableDebuggingCallbackWrapper _cb _ toggle _ = do
    let toggle' = (/= 0) toggle
    result <- _cb  toggle'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWindowEnableDebugging :: (GObject a, MonadIO m) => a -> WindowEnableDebuggingCallback -> m SignalHandlerId
onWindowEnableDebugging obj cb = liftIO $ connectWindowEnableDebugging obj cb SignalConnectBefore
afterWindowEnableDebugging :: (GObject a, MonadIO m) => a -> WindowEnableDebuggingCallback -> m SignalHandlerId
afterWindowEnableDebugging obj cb = connectWindowEnableDebugging obj cb SignalConnectAfter

connectWindowEnableDebugging :: (GObject a, MonadIO m) =>
                                a -> WindowEnableDebuggingCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowEnableDebugging obj cb after = liftIO $ do
    cb' <- mkWindowEnableDebuggingCallback (windowEnableDebuggingCallbackWrapper cb)
    connectSignalFunPtr obj "enable-debugging" cb' after

-- signal Window::keys-changed
type WindowKeysChangedCallback =
    IO ()

noWindowKeysChangedCallback :: Maybe WindowKeysChangedCallback
noWindowKeysChangedCallback = Nothing

type WindowKeysChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowKeysChangedCallback :: WindowKeysChangedCallbackC -> IO (FunPtr WindowKeysChangedCallbackC)

windowKeysChangedClosure :: WindowKeysChangedCallback -> IO Closure
windowKeysChangedClosure cb = newCClosure =<< mkWindowKeysChangedCallback wrapped
    where wrapped = windowKeysChangedCallbackWrapper cb

windowKeysChangedCallbackWrapper ::
    WindowKeysChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowKeysChangedCallbackWrapper _cb _ _ = do
    _cb 

onWindowKeysChanged :: (GObject a, MonadIO m) => a -> WindowKeysChangedCallback -> m SignalHandlerId
onWindowKeysChanged obj cb = liftIO $ connectWindowKeysChanged obj cb SignalConnectBefore
afterWindowKeysChanged :: (GObject a, MonadIO m) => a -> WindowKeysChangedCallback -> m SignalHandlerId
afterWindowKeysChanged obj cb = connectWindowKeysChanged obj cb SignalConnectAfter

connectWindowKeysChanged :: (GObject a, MonadIO m) =>
                            a -> WindowKeysChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowKeysChanged obj cb after = liftIO $ do
    cb' <- mkWindowKeysChangedCallback (windowKeysChangedCallbackWrapper cb)
    connectSignalFunPtr obj "keys-changed" cb' after

-- signal Window::set-focus
type WindowSetFocusCallback =
    Widget ->
    IO ()

noWindowSetFocusCallback :: Maybe WindowSetFocusCallback
noWindowSetFocusCallback = Nothing

type WindowSetFocusCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowSetFocusCallback :: WindowSetFocusCallbackC -> IO (FunPtr WindowSetFocusCallbackC)

windowSetFocusClosure :: WindowSetFocusCallback -> IO Closure
windowSetFocusClosure cb = newCClosure =<< mkWindowSetFocusCallback wrapped
    where wrapped = windowSetFocusCallbackWrapper cb

windowSetFocusCallbackWrapper ::
    WindowSetFocusCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
windowSetFocusCallbackWrapper _cb _ object _ = do
    object' <- (newObject Widget) object
    _cb  object'

onWindowSetFocus :: (GObject a, MonadIO m) => a -> WindowSetFocusCallback -> m SignalHandlerId
onWindowSetFocus obj cb = liftIO $ connectWindowSetFocus obj cb SignalConnectBefore
afterWindowSetFocus :: (GObject a, MonadIO m) => a -> WindowSetFocusCallback -> m SignalHandlerId
afterWindowSetFocus obj cb = connectWindowSetFocus obj cb SignalConnectAfter

connectWindowSetFocus :: (GObject a, MonadIO m) =>
                         a -> WindowSetFocusCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowSetFocus obj cb after = liftIO $ do
    cb' <- mkWindowSetFocusCallback (windowSetFocusCallbackWrapper cb)
    connectSignalFunPtr obj "set-focus" cb' after

-- object WindowAccessible 
newtype WindowAccessible = WindowAccessible (ForeignPtr WindowAccessible)
noWindowAccessible :: Maybe WindowAccessible
noWindowAccessible = Nothing

foreign import ccall "gtk_window_accessible_get_type"
    c_gtk_window_accessible_get_type :: IO GType

type instance ParentTypes WindowAccessible = '[ContainerAccessible, WidgetAccessible, Accessible, Atk.Object, GObject.Object, Atk.Component, Atk.Window]

instance GObject WindowAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_window_accessible_get_type
    

class GObject o => WindowAccessibleK o
instance (GObject o, IsDescendantOf WindowAccessible o) => WindowAccessibleK o

toWindowAccessible :: WindowAccessibleK o => o -> IO WindowAccessible
toWindowAccessible = unsafeCastTo WindowAccessible

-- struct WindowGeometryInfo
newtype WindowGeometryInfo = WindowGeometryInfo (ForeignPtr WindowGeometryInfo)
noWindowGeometryInfo :: Maybe WindowGeometryInfo
noWindowGeometryInfo = Nothing

-- object WindowGroup 
newtype WindowGroup = WindowGroup (ForeignPtr WindowGroup)
noWindowGroup :: Maybe WindowGroup
noWindowGroup = Nothing

foreign import ccall "gtk_window_group_get_type"
    c_gtk_window_group_get_type :: IO GType

type instance ParentTypes WindowGroup = '[GObject.Object]

instance GObject WindowGroup where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_window_group_get_type
    

class GObject o => WindowGroupK o
instance (GObject o, IsDescendantOf WindowGroup o) => WindowGroupK o

toWindowGroup :: WindowGroupK o => o -> IO WindowGroup
toWindowGroup = unsafeCastTo WindowGroup

-- method WindowGroup::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "WindowGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_group_new" gtk_window_group_new :: 
    IO (Ptr WindowGroup)


windowGroupNew ::
    (MonadIO m) =>
    m WindowGroup
windowGroupNew  = liftIO $ do
    result <- gtk_window_group_new
    checkUnexpectedReturnNULL "gtk_window_group_new" result
    result' <- (wrapObject WindowGroup) result
    return result'

-- method WindowGroup::add_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WindowGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WindowGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_group_add_window" gtk_window_group_add_window :: 
    Ptr WindowGroup ->                      -- _obj : TInterface "Gtk" "WindowGroup"
    Ptr Window ->                           -- window : TInterface "Gtk" "Window"
    IO ()


windowGroupAddWindow ::
    (MonadIO m, WindowGroupK a, WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    m ()
windowGroupAddWindow _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window' = unsafeManagedPtrCastPtr window
    gtk_window_group_add_window _obj' window'
    touchManagedPtr _obj
    touchManagedPtr window
    return ()

-- method WindowGroup::get_current_device_grab
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WindowGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WindowGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_group_get_current_device_grab" gtk_window_group_get_current_device_grab :: 
    Ptr WindowGroup ->                      -- _obj : TInterface "Gtk" "WindowGroup"
    Ptr Gdk.Device ->                       -- device : TInterface "Gdk" "Device"
    IO (Ptr Widget)


windowGroupGetCurrentDeviceGrab ::
    (MonadIO m, WindowGroupK a, Gdk.DeviceK b) =>
    a ->                                    -- _obj
    b ->                                    -- device
    m Widget
windowGroupGetCurrentDeviceGrab _obj device = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let device' = unsafeManagedPtrCastPtr device
    result <- gtk_window_group_get_current_device_grab _obj' device'
    checkUnexpectedReturnNULL "gtk_window_group_get_current_device_grab" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    touchManagedPtr device
    return result'

-- method WindowGroup::get_current_grab
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WindowGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WindowGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_group_get_current_grab" gtk_window_group_get_current_grab :: 
    Ptr WindowGroup ->                      -- _obj : TInterface "Gtk" "WindowGroup"
    IO (Ptr Widget)


windowGroupGetCurrentGrab ::
    (MonadIO m, WindowGroupK a) =>
    a ->                                    -- _obj
    m Widget
windowGroupGetCurrentGrab _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_group_get_current_grab _obj'
    checkUnexpectedReturnNULL "gtk_window_group_get_current_grab" result
    result' <- (newObject Widget) result
    touchManagedPtr _obj
    return result'

-- method WindowGroup::list_windows
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WindowGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WindowGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "Window")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_group_list_windows" gtk_window_group_list_windows :: 
    Ptr WindowGroup ->                      -- _obj : TInterface "Gtk" "WindowGroup"
    IO (Ptr (GList (Ptr Window)))


windowGroupListWindows ::
    (MonadIO m, WindowGroupK a) =>
    a ->                                    -- _obj
    m [Window]
windowGroupListWindows _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_window_group_list_windows _obj'
    checkUnexpectedReturnNULL "gtk_window_group_list_windows" result
    result' <- unpackGList result
    result'' <- mapM (newObject Window) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method WindowGroup::remove_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "WindowGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "WindowGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_window_group_remove_window" gtk_window_group_remove_window :: 
    Ptr WindowGroup ->                      -- _obj : TInterface "Gtk" "WindowGroup"
    Ptr Window ->                           -- window : TInterface "Gtk" "Window"
    IO ()


windowGroupRemoveWindow ::
    (MonadIO m, WindowGroupK a, WindowK b) =>
    a ->                                    -- _obj
    b ->                                    -- window
    m ()
windowGroupRemoveWindow _obj window = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let window' = unsafeManagedPtrCastPtr window
    gtk_window_group_remove_window _obj' window'
    touchManagedPtr _obj
    touchManagedPtr window
    return ()

-- Enum WindowPosition

data WindowPosition = 
      WindowPositionNone
    | WindowPositionCenter
    | WindowPositionMouse
    | WindowPositionCenterAlways
    | WindowPositionCenterOnParent
    | AnotherWindowPosition Int
    deriving (Show, Eq)

instance Enum WindowPosition where
    fromEnum WindowPositionNone = 0
    fromEnum WindowPositionCenter = 1
    fromEnum WindowPositionMouse = 2
    fromEnum WindowPositionCenterAlways = 3
    fromEnum WindowPositionCenterOnParent = 4
    fromEnum (AnotherWindowPosition k) = k

    toEnum 0 = WindowPositionNone
    toEnum 1 = WindowPositionCenter
    toEnum 2 = WindowPositionMouse
    toEnum 3 = WindowPositionCenterAlways
    toEnum 4 = WindowPositionCenterOnParent
    toEnum k = AnotherWindowPosition k

foreign import ccall "gtk_window_position_get_type" c_gtk_window_position_get_type :: 
    IO GType

instance BoxedEnum WindowPosition where
    boxedEnumType _ = c_gtk_window_position_get_type

-- Enum WindowType

data WindowType = 
      WindowTypeToplevel
    | WindowTypePopup
    | AnotherWindowType Int
    deriving (Show, Eq)

instance Enum WindowType where
    fromEnum WindowTypeToplevel = 0
    fromEnum WindowTypePopup = 1
    fromEnum (AnotherWindowType k) = k

    toEnum 0 = WindowTypeToplevel
    toEnum 1 = WindowTypePopup
    toEnum k = AnotherWindowType k

foreign import ccall "gtk_window_type_get_type" c_gtk_window_type_get_type :: 
    IO GType

instance BoxedEnum WindowType where
    boxedEnumType _ = c_gtk_window_type_get_type

-- Enum WrapMode

data WrapMode = 
      WrapModeNone
    | WrapModeChar
    | WrapModeWord
    | WrapModeWordChar
    | AnotherWrapMode Int
    deriving (Show, Eq)

instance Enum WrapMode where
    fromEnum WrapModeNone = 0
    fromEnum WrapModeChar = 1
    fromEnum WrapModeWord = 2
    fromEnum WrapModeWordChar = 3
    fromEnum (AnotherWrapMode k) = k

    toEnum 0 = WrapModeNone
    toEnum 1 = WrapModeChar
    toEnum 2 = WrapModeWord
    toEnum 3 = WrapModeWordChar
    toEnum k = AnotherWrapMode k

foreign import ccall "gtk_wrap_mode_get_type" c_gtk_wrap_mode_get_type :: 
    IO GType

instance BoxedEnum WrapMode where
    boxedEnumType _ = c_gtk_wrap_mode_get_type

-- constant _BINARY_AGE

_BINARY_AGE :: Int32
_BINARY_AGE = 1806
-- constant _INPUT_ERROR

_INPUT_ERROR :: Int32
_INPUT_ERROR = -1
-- constant _INTERFACE_AGE

_INTERFACE_AGE :: Int32
_INTERFACE_AGE = 6
-- constant _LEVEL_BAR_OFFSET_HIGH

_LEVEL_BAR_OFFSET_HIGH :: T.Text
_LEVEL_BAR_OFFSET_HIGH = "high"
-- constant _LEVEL_BAR_OFFSET_LOW

_LEVEL_BAR_OFFSET_LOW :: T.Text
_LEVEL_BAR_OFFSET_LOW = "low"
-- constant _MAJOR_VERSION

_MAJOR_VERSION :: Int32
_MAJOR_VERSION = 3
-- constant _MAX_COMPOSE_LEN

_MAX_COMPOSE_LEN :: Int32
_MAX_COMPOSE_LEN = 7
-- constant _MICRO_VERSION

_MICRO_VERSION :: Int32
_MICRO_VERSION = 6
-- constant _MINOR_VERSION

_MINOR_VERSION :: Int32
_MINOR_VERSION = 18
-- constant _PAPER_NAME_A3

_PAPER_NAME_A3 :: T.Text
_PAPER_NAME_A3 = "iso_a3"
-- constant _PAPER_NAME_A4

_PAPER_NAME_A4 :: T.Text
_PAPER_NAME_A4 = "iso_a4"
-- constant _PAPER_NAME_A5

_PAPER_NAME_A5 :: T.Text
_PAPER_NAME_A5 = "iso_a5"
-- constant _PAPER_NAME_B5

_PAPER_NAME_B5 :: T.Text
_PAPER_NAME_B5 = "iso_b5"
-- constant _PAPER_NAME_EXECUTIVE

_PAPER_NAME_EXECUTIVE :: T.Text
_PAPER_NAME_EXECUTIVE = "na_executive"
-- constant _PAPER_NAME_LEGAL

_PAPER_NAME_LEGAL :: T.Text
_PAPER_NAME_LEGAL = "na_legal"
-- constant _PAPER_NAME_LETTER

_PAPER_NAME_LETTER :: T.Text
_PAPER_NAME_LETTER = "na_letter"
-- constant _PATH_PRIO_MASK

_PATH_PRIO_MASK :: Int32
_PATH_PRIO_MASK = 15
-- constant _PRINT_SETTINGS_COLLATE

_PRINT_SETTINGS_COLLATE :: T.Text
_PRINT_SETTINGS_COLLATE = "collate"
-- constant _PRINT_SETTINGS_DEFAULT_SOURCE

_PRINT_SETTINGS_DEFAULT_SOURCE :: T.Text
_PRINT_SETTINGS_DEFAULT_SOURCE = "default-source"
-- constant _PRINT_SETTINGS_DITHER

_PRINT_SETTINGS_DITHER :: T.Text
_PRINT_SETTINGS_DITHER = "dither"
-- constant _PRINT_SETTINGS_DUPLEX

_PRINT_SETTINGS_DUPLEX :: T.Text
_PRINT_SETTINGS_DUPLEX = "duplex"
-- constant _PRINT_SETTINGS_FINISHINGS

_PRINT_SETTINGS_FINISHINGS :: T.Text
_PRINT_SETTINGS_FINISHINGS = "finishings"
-- constant _PRINT_SETTINGS_MEDIA_TYPE

_PRINT_SETTINGS_MEDIA_TYPE :: T.Text
_PRINT_SETTINGS_MEDIA_TYPE = "media-type"
-- constant _PRINT_SETTINGS_NUMBER_UP

_PRINT_SETTINGS_NUMBER_UP :: T.Text
_PRINT_SETTINGS_NUMBER_UP = "number-up"
-- constant _PRINT_SETTINGS_NUMBER_UP_LAYOUT

_PRINT_SETTINGS_NUMBER_UP_LAYOUT :: T.Text
_PRINT_SETTINGS_NUMBER_UP_LAYOUT = "number-up-layout"
-- constant _PRINT_SETTINGS_N_COPIES

_PRINT_SETTINGS_N_COPIES :: T.Text
_PRINT_SETTINGS_N_COPIES = "n-copies"
-- constant _PRINT_SETTINGS_ORIENTATION

_PRINT_SETTINGS_ORIENTATION :: T.Text
_PRINT_SETTINGS_ORIENTATION = "orientation"
-- constant _PRINT_SETTINGS_OUTPUT_BASENAME

_PRINT_SETTINGS_OUTPUT_BASENAME :: T.Text
_PRINT_SETTINGS_OUTPUT_BASENAME = "output-basename"
-- constant _PRINT_SETTINGS_OUTPUT_BIN

_PRINT_SETTINGS_OUTPUT_BIN :: T.Text
_PRINT_SETTINGS_OUTPUT_BIN = "output-bin"
-- constant _PRINT_SETTINGS_OUTPUT_DIR

_PRINT_SETTINGS_OUTPUT_DIR :: T.Text
_PRINT_SETTINGS_OUTPUT_DIR = "output-dir"
-- constant _PRINT_SETTINGS_OUTPUT_FILE_FORMAT

_PRINT_SETTINGS_OUTPUT_FILE_FORMAT :: T.Text
_PRINT_SETTINGS_OUTPUT_FILE_FORMAT = "output-file-format"
-- constant _PRINT_SETTINGS_OUTPUT_URI

_PRINT_SETTINGS_OUTPUT_URI :: T.Text
_PRINT_SETTINGS_OUTPUT_URI = "output-uri"
-- constant _PRINT_SETTINGS_PAGE_RANGES

_PRINT_SETTINGS_PAGE_RANGES :: T.Text
_PRINT_SETTINGS_PAGE_RANGES = "page-ranges"
-- constant _PRINT_SETTINGS_PAGE_SET

_PRINT_SETTINGS_PAGE_SET :: T.Text
_PRINT_SETTINGS_PAGE_SET = "page-set"
-- constant _PRINT_SETTINGS_PAPER_FORMAT

_PRINT_SETTINGS_PAPER_FORMAT :: T.Text
_PRINT_SETTINGS_PAPER_FORMAT = "paper-format"
-- constant _PRINT_SETTINGS_PAPER_HEIGHT

_PRINT_SETTINGS_PAPER_HEIGHT :: T.Text
_PRINT_SETTINGS_PAPER_HEIGHT = "paper-height"
-- constant _PRINT_SETTINGS_PAPER_WIDTH

_PRINT_SETTINGS_PAPER_WIDTH :: T.Text
_PRINT_SETTINGS_PAPER_WIDTH = "paper-width"
-- constant _PRINT_SETTINGS_PRINTER

_PRINT_SETTINGS_PRINTER :: T.Text
_PRINT_SETTINGS_PRINTER = "printer"
-- constant _PRINT_SETTINGS_PRINTER_LPI

_PRINT_SETTINGS_PRINTER_LPI :: T.Text
_PRINT_SETTINGS_PRINTER_LPI = "printer-lpi"
-- constant _PRINT_SETTINGS_PRINT_PAGES

_PRINT_SETTINGS_PRINT_PAGES :: T.Text
_PRINT_SETTINGS_PRINT_PAGES = "print-pages"
-- constant _PRINT_SETTINGS_QUALITY

_PRINT_SETTINGS_QUALITY :: T.Text
_PRINT_SETTINGS_QUALITY = "quality"
-- constant _PRINT_SETTINGS_RESOLUTION

_PRINT_SETTINGS_RESOLUTION :: T.Text
_PRINT_SETTINGS_RESOLUTION = "resolution"
-- constant _PRINT_SETTINGS_RESOLUTION_X

_PRINT_SETTINGS_RESOLUTION_X :: T.Text
_PRINT_SETTINGS_RESOLUTION_X = "resolution-x"
-- constant _PRINT_SETTINGS_RESOLUTION_Y

_PRINT_SETTINGS_RESOLUTION_Y :: T.Text
_PRINT_SETTINGS_RESOLUTION_Y = "resolution-y"
-- constant _PRINT_SETTINGS_REVERSE

_PRINT_SETTINGS_REVERSE :: T.Text
_PRINT_SETTINGS_REVERSE = "reverse"
-- constant _PRINT_SETTINGS_SCALE

_PRINT_SETTINGS_SCALE :: T.Text
_PRINT_SETTINGS_SCALE = "scale"
-- constant _PRINT_SETTINGS_USE_COLOR

_PRINT_SETTINGS_USE_COLOR :: T.Text
_PRINT_SETTINGS_USE_COLOR = "use-color"
-- constant _PRINT_SETTINGS_WIN32_DRIVER_EXTRA

_PRINT_SETTINGS_WIN32_DRIVER_EXTRA :: T.Text
_PRINT_SETTINGS_WIN32_DRIVER_EXTRA = "win32-driver-extra"
-- constant _PRINT_SETTINGS_WIN32_DRIVER_VERSION

_PRINT_SETTINGS_WIN32_DRIVER_VERSION :: T.Text
_PRINT_SETTINGS_WIN32_DRIVER_VERSION = "win32-driver-version"
-- constant _PRIORITY_RESIZE

_PRIORITY_RESIZE :: Int32
_PRIORITY_RESIZE = 10
-- constant _STOCK_ABOUT
{-# DEPRECATED _STOCK_ABOUT ["(Since version 3.10)","Use named icon &quot;help-about&quot; or the label &quot;_About&quot;."]#-}
_STOCK_ABOUT :: T.Text
_STOCK_ABOUT = "gtk-about"
-- constant _STOCK_ADD
{-# DEPRECATED _STOCK_ADD ["(Since version 3.10)","Use named icon &quot;list-add&quot; or the label &quot;_Add&quot;."]#-}
_STOCK_ADD :: T.Text
_STOCK_ADD = "gtk-add"
-- constant _STOCK_APPLY
{-# DEPRECATED _STOCK_APPLY ["(Since version 3.10)","Do not use an icon. Use label &quot;_Apply&quot;."]#-}
_STOCK_APPLY :: T.Text
_STOCK_APPLY = "gtk-apply"
-- constant _STOCK_BOLD
{-# DEPRECATED _STOCK_BOLD ["(Since version 3.10)","Use named icon &quot;format-text-bold&quot;."]#-}
_STOCK_BOLD :: T.Text
_STOCK_BOLD = "gtk-bold"
-- constant _STOCK_CANCEL
{-# DEPRECATED _STOCK_CANCEL ["(Since version 3.10)","Do not use an icon. Use label &quot;_Cancel&quot;."]#-}
_STOCK_CANCEL :: T.Text
_STOCK_CANCEL = "gtk-cancel"
-- constant _STOCK_CAPS_LOCK_WARNING
{-# DEPRECATED _STOCK_CAPS_LOCK_WARNING ["(Since version 3.10)","Use named icon &quot;dialog-warning-symbolic&quot;."]#-}
_STOCK_CAPS_LOCK_WARNING :: T.Text
_STOCK_CAPS_LOCK_WARNING = "gtk-caps-lock-warning"
-- constant _STOCK_CDROM
{-# DEPRECATED _STOCK_CDROM ["(Since version 3.10)","Use named icon &quot;media-optical&quot;."]#-}
_STOCK_CDROM :: T.Text
_STOCK_CDROM = "gtk-cdrom"
-- constant _STOCK_CLEAR
{-# DEPRECATED _STOCK_CLEAR ["(Since version 3.10)","Use named icon &quot;edit-clear&quot;."]#-}
_STOCK_CLEAR :: T.Text
_STOCK_CLEAR = "gtk-clear"
-- constant _STOCK_CLOSE
{-# DEPRECATED _STOCK_CLOSE ["(Since version 3.10)","Use named icon &quot;window-close&quot; or the label &quot;_Close&quot;."]#-}
_STOCK_CLOSE :: T.Text
_STOCK_CLOSE = "gtk-close"
-- constant _STOCK_COLOR_PICKER
{-# DEPRECATED _STOCK_COLOR_PICKER ["(Since version 3.10)"]#-}
_STOCK_COLOR_PICKER :: T.Text
_STOCK_COLOR_PICKER = "gtk-color-picker"
-- constant _STOCK_CONNECT
{-# DEPRECATED _STOCK_CONNECT ["(Since version 3.10)"]#-}
_STOCK_CONNECT :: T.Text
_STOCK_CONNECT = "gtk-connect"
-- constant _STOCK_CONVERT
{-# DEPRECATED _STOCK_CONVERT ["(Since version 3.10)"]#-}
_STOCK_CONVERT :: T.Text
_STOCK_CONVERT = "gtk-convert"
-- constant _STOCK_COPY
{-# DEPRECATED _STOCK_COPY ["(Since version 3.10)","Use the named icon &quot;edit-copy&quot; or the label &quot;_Copy&quot;."]#-}
_STOCK_COPY :: T.Text
_STOCK_COPY = "gtk-copy"
-- constant _STOCK_CUT
{-# DEPRECATED _STOCK_CUT ["(Since version 3.10)","Use the named icon &quot;edit-cut&quot; or the label &quot;Cu_t&quot;."]#-}
_STOCK_CUT :: T.Text
_STOCK_CUT = "gtk-cut"
-- constant _STOCK_DELETE
{-# DEPRECATED _STOCK_DELETE ["(Since version 3.10)","Use the named icon &quot;edit-delete&quot; or the label &quot;_Delete&quot;."]#-}
_STOCK_DELETE :: T.Text
_STOCK_DELETE = "gtk-delete"
-- constant _STOCK_DIALOG_AUTHENTICATION
{-# DEPRECATED _STOCK_DIALOG_AUTHENTICATION ["(Since version 3.10)","Use named icon &quot;dialog-password&quot;."]#-}
_STOCK_DIALOG_AUTHENTICATION :: T.Text
_STOCK_DIALOG_AUTHENTICATION = "gtk-dialog-authentication"
-- constant _STOCK_DIALOG_ERROR
{-# DEPRECATED _STOCK_DIALOG_ERROR ["(Since version 3.10)","Use named icon &quot;dialog-error&quot;."]#-}
_STOCK_DIALOG_ERROR :: T.Text
_STOCK_DIALOG_ERROR = "gtk-dialog-error"
-- constant _STOCK_DIALOG_INFO
{-# DEPRECATED _STOCK_DIALOG_INFO ["(Since version 3.10)","Use named icon &quot;dialog-information&quot;."]#-}
_STOCK_DIALOG_INFO :: T.Text
_STOCK_DIALOG_INFO = "gtk-dialog-info"
-- constant _STOCK_DIALOG_QUESTION
{-# DEPRECATED _STOCK_DIALOG_QUESTION ["(Since version 3.10)","Use named icon &quot;dialog-question&quot;."]#-}
_STOCK_DIALOG_QUESTION :: T.Text
_STOCK_DIALOG_QUESTION = "gtk-dialog-question"
-- constant _STOCK_DIALOG_WARNING
{-# DEPRECATED _STOCK_DIALOG_WARNING ["(Since version 3.10)","Use named icon &quot;dialog-warning&quot;."]#-}
_STOCK_DIALOG_WARNING :: T.Text
_STOCK_DIALOG_WARNING = "gtk-dialog-warning"
-- constant _STOCK_DIRECTORY
{-# DEPRECATED _STOCK_DIRECTORY ["(Since version 3.10)","Use named icon &quot;folder&quot;."]#-}
_STOCK_DIRECTORY :: T.Text
_STOCK_DIRECTORY = "gtk-directory"
-- constant _STOCK_DISCARD
{-# DEPRECATED _STOCK_DISCARD ["(Since version 3.10)"]#-}
_STOCK_DISCARD :: T.Text
_STOCK_DISCARD = "gtk-discard"
-- constant _STOCK_DISCONNECT
{-# DEPRECATED _STOCK_DISCONNECT ["(Since version 3.10)"]#-}
_STOCK_DISCONNECT :: T.Text
_STOCK_DISCONNECT = "gtk-disconnect"
-- constant _STOCK_DND
{-# DEPRECATED _STOCK_DND ["(Since version 3.10)"]#-}
_STOCK_DND :: T.Text
_STOCK_DND = "gtk-dnd"
-- constant _STOCK_DND_MULTIPLE
{-# DEPRECATED _STOCK_DND_MULTIPLE ["(Since version 3.10)"]#-}
_STOCK_DND_MULTIPLE :: T.Text
_STOCK_DND_MULTIPLE = "gtk-dnd-multiple"
-- constant _STOCK_EDIT
{-# DEPRECATED _STOCK_EDIT ["(Since version 3.10)"]#-}
_STOCK_EDIT :: T.Text
_STOCK_EDIT = "gtk-edit"
-- constant _STOCK_EXECUTE
{-# DEPRECATED _STOCK_EXECUTE ["(Since version 3.10)","Use named icon &quot;system-run&quot;."]#-}
_STOCK_EXECUTE :: T.Text
_STOCK_EXECUTE = "gtk-execute"
-- constant _STOCK_FILE
{-# DEPRECATED _STOCK_FILE ["(Since version 3.10)","Use named icon &quot;text-x-generic&quot;."]#-}
_STOCK_FILE :: T.Text
_STOCK_FILE = "gtk-file"
-- constant _STOCK_FIND
{-# DEPRECATED _STOCK_FIND ["(Since version 3.10)","Use named icon &quot;edit-find&quot;."]#-}
_STOCK_FIND :: T.Text
_STOCK_FIND = "gtk-find"
-- constant _STOCK_FIND_AND_REPLACE
{-# DEPRECATED _STOCK_FIND_AND_REPLACE ["(Since version 3.10)","Use named icon &quot;edit-find-replace&quot;."]#-}
_STOCK_FIND_AND_REPLACE :: T.Text
_STOCK_FIND_AND_REPLACE = "gtk-find-and-replace"
-- constant _STOCK_FLOPPY
{-# DEPRECATED _STOCK_FLOPPY ["(Since version 3.10)"]#-}
_STOCK_FLOPPY :: T.Text
_STOCK_FLOPPY = "gtk-floppy"
-- constant _STOCK_FULLSCREEN
{-# DEPRECATED _STOCK_FULLSCREEN ["(Since version 3.10)","Use named icon &quot;view-fullscreen&quot;."]#-}
_STOCK_FULLSCREEN :: T.Text
_STOCK_FULLSCREEN = "gtk-fullscreen"
-- constant _STOCK_GOTO_BOTTOM
{-# DEPRECATED _STOCK_GOTO_BOTTOM ["(Since version 3.10)","Use named icon &quot;go-bottom&quot;."]#-}
_STOCK_GOTO_BOTTOM :: T.Text
_STOCK_GOTO_BOTTOM = "gtk-goto-bottom"
-- constant _STOCK_GOTO_FIRST
{-# DEPRECATED _STOCK_GOTO_FIRST ["(Since version 3.10)","Use named icon &quot;go-first&quot;."]#-}
_STOCK_GOTO_FIRST :: T.Text
_STOCK_GOTO_FIRST = "gtk-goto-first"
-- constant _STOCK_GOTO_LAST
{-# DEPRECATED _STOCK_GOTO_LAST ["(Since version 3.10)","Use named icon &quot;go-last&quot;."]#-}
_STOCK_GOTO_LAST :: T.Text
_STOCK_GOTO_LAST = "gtk-goto-last"
-- constant _STOCK_GOTO_TOP
{-# DEPRECATED _STOCK_GOTO_TOP ["(Since version 3.10)","Use named icon &quot;go-top&quot;."]#-}
_STOCK_GOTO_TOP :: T.Text
_STOCK_GOTO_TOP = "gtk-goto-top"
-- constant _STOCK_GO_BACK
{-# DEPRECATED _STOCK_GO_BACK ["(Since version 3.10)","Use named icon &quot;go-previous&quot;."]#-}
_STOCK_GO_BACK :: T.Text
_STOCK_GO_BACK = "gtk-go-back"
-- constant _STOCK_GO_DOWN
{-# DEPRECATED _STOCK_GO_DOWN ["(Since version 3.10)","Use named icon &quot;go-down&quot;."]#-}
_STOCK_GO_DOWN :: T.Text
_STOCK_GO_DOWN = "gtk-go-down"
-- constant _STOCK_GO_FORWARD
{-# DEPRECATED _STOCK_GO_FORWARD ["(Since version 3.10)","Use named icon &quot;go-next&quot;."]#-}
_STOCK_GO_FORWARD :: T.Text
_STOCK_GO_FORWARD = "gtk-go-forward"
-- constant _STOCK_GO_UP
{-# DEPRECATED _STOCK_GO_UP ["(Since version 3.10)","Use named icon &quot;go-up&quot;."]#-}
_STOCK_GO_UP :: T.Text
_STOCK_GO_UP = "gtk-go-up"
-- constant _STOCK_HARDDISK
{-# DEPRECATED _STOCK_HARDDISK ["(Since version 3.10)","Use named icon &quot;drive-harddisk&quot;."]#-}
_STOCK_HARDDISK :: T.Text
_STOCK_HARDDISK = "gtk-harddisk"
-- constant _STOCK_HELP
{-# DEPRECATED _STOCK_HELP ["(Since version 3.10)","Use named icon &quot;help-browser&quot;."]#-}
_STOCK_HELP :: T.Text
_STOCK_HELP = "gtk-help"
-- constant _STOCK_HOME
{-# DEPRECATED _STOCK_HOME ["(Since version 3.10)","Use named icon &quot;go-home&quot;."]#-}
_STOCK_HOME :: T.Text
_STOCK_HOME = "gtk-home"
-- constant _STOCK_INDENT
{-# DEPRECATED _STOCK_INDENT ["(Since version 3.10)","Use named icon &quot;format-indent-more&quot;."]#-}
_STOCK_INDENT :: T.Text
_STOCK_INDENT = "gtk-indent"
-- constant _STOCK_INDEX
{-# DEPRECATED _STOCK_INDEX ["(Since version 3.10)"]#-}
_STOCK_INDEX :: T.Text
_STOCK_INDEX = "gtk-index"
-- constant _STOCK_INFO
{-# DEPRECATED _STOCK_INFO ["(Since version 3.10)","Use named icon &quot;dialog-information&quot;."]#-}
_STOCK_INFO :: T.Text
_STOCK_INFO = "gtk-info"
-- constant _STOCK_ITALIC
{-# DEPRECATED _STOCK_ITALIC ["(Since version 3.10)","Use named icon &quot;format-text-italic&quot;."]#-}
_STOCK_ITALIC :: T.Text
_STOCK_ITALIC = "gtk-italic"
-- constant _STOCK_JUMP_TO
{-# DEPRECATED _STOCK_JUMP_TO ["(Since version 3.10)","Use named icon &quot;go-jump&quot;."]#-}
_STOCK_JUMP_TO :: T.Text
_STOCK_JUMP_TO = "gtk-jump-to"
-- constant _STOCK_JUSTIFY_CENTER
{-# DEPRECATED _STOCK_JUSTIFY_CENTER ["(Since version 3.10)","Use named icon &quot;format-justify-center&quot;."]#-}
_STOCK_JUSTIFY_CENTER :: T.Text
_STOCK_JUSTIFY_CENTER = "gtk-justify-center"
-- constant _STOCK_JUSTIFY_FILL
{-# DEPRECATED _STOCK_JUSTIFY_FILL ["(Since version 3.10)","Use named icon &quot;format-justify-fill&quot;."]#-}
_STOCK_JUSTIFY_FILL :: T.Text
_STOCK_JUSTIFY_FILL = "gtk-justify-fill"
-- constant _STOCK_JUSTIFY_LEFT
{-# DEPRECATED _STOCK_JUSTIFY_LEFT ["(Since version 3.10)","Use named icon &quot;format-justify-left&quot;."]#-}
_STOCK_JUSTIFY_LEFT :: T.Text
_STOCK_JUSTIFY_LEFT = "gtk-justify-left"
-- constant _STOCK_JUSTIFY_RIGHT
{-# DEPRECATED _STOCK_JUSTIFY_RIGHT ["(Since version 3.10)","Use named icon &quot;format-justify-right&quot;."]#-}
_STOCK_JUSTIFY_RIGHT :: T.Text
_STOCK_JUSTIFY_RIGHT = "gtk-justify-right"
-- constant _STOCK_LEAVE_FULLSCREEN
{-# DEPRECATED _STOCK_LEAVE_FULLSCREEN ["(Since version 3.10)","Use named icon &quot;view-restore&quot;."]#-}
_STOCK_LEAVE_FULLSCREEN :: T.Text
_STOCK_LEAVE_FULLSCREEN = "gtk-leave-fullscreen"
-- constant _STOCK_MEDIA_FORWARD
{-# DEPRECATED _STOCK_MEDIA_FORWARD ["(Since version 3.10)","Use named icon &quot;media-seek-forward&quot; or the label &quot;_Forward&quot;."]#-}
_STOCK_MEDIA_FORWARD :: T.Text
_STOCK_MEDIA_FORWARD = "gtk-media-forward"
-- constant _STOCK_MEDIA_NEXT
{-# DEPRECATED _STOCK_MEDIA_NEXT ["(Since version 3.10)","Use named icon &quot;media-skip-forward&quot; or the label &quot;_Next&quot;."]#-}
_STOCK_MEDIA_NEXT :: T.Text
_STOCK_MEDIA_NEXT = "gtk-media-next"
-- constant _STOCK_MEDIA_PAUSE
{-# DEPRECATED _STOCK_MEDIA_PAUSE ["(Since version 3.10)","Use named icon &quot;media-playback-pause&quot; or the label &quot;P_ause&quot;."]#-}
_STOCK_MEDIA_PAUSE :: T.Text
_STOCK_MEDIA_PAUSE = "gtk-media-pause"
-- constant _STOCK_MEDIA_PLAY
{-# DEPRECATED _STOCK_MEDIA_PLAY ["(Since version 3.10)","Use named icon &quot;media-playback-start&quot; or the label &quot;_Play&quot;."]#-}
_STOCK_MEDIA_PLAY :: T.Text
_STOCK_MEDIA_PLAY = "gtk-media-play"
-- constant _STOCK_MEDIA_PREVIOUS
{-# DEPRECATED _STOCK_MEDIA_PREVIOUS ["(Since version 3.10)","Use named icon &quot;media-skip-backward&quot; or the label &quot;Pre_vious&quot;."]#-}
_STOCK_MEDIA_PREVIOUS :: T.Text
_STOCK_MEDIA_PREVIOUS = "gtk-media-previous"
-- constant _STOCK_MEDIA_RECORD
{-# DEPRECATED _STOCK_MEDIA_RECORD ["(Since version 3.10)","Use named icon &quot;media-record&quot; or the label &quot;_Record&quot;."]#-}
_STOCK_MEDIA_RECORD :: T.Text
_STOCK_MEDIA_RECORD = "gtk-media-record"
-- constant _STOCK_MEDIA_REWIND
{-# DEPRECATED _STOCK_MEDIA_REWIND ["(Since version 3.10)","Use named icon &quot;media-seek-backward&quot; or the label &quot;R_ewind&quot;."]#-}
_STOCK_MEDIA_REWIND :: T.Text
_STOCK_MEDIA_REWIND = "gtk-media-rewind"
-- constant _STOCK_MEDIA_STOP
{-# DEPRECATED _STOCK_MEDIA_STOP ["(Since version 3.10)","Use named icon &quot;media-playback-stop&quot; or the label &quot;_Stop&quot;."]#-}
_STOCK_MEDIA_STOP :: T.Text
_STOCK_MEDIA_STOP = "gtk-media-stop"
-- constant _STOCK_MISSING_IMAGE
{-# DEPRECATED _STOCK_MISSING_IMAGE ["(Since version 3.10)","Use named icon &quot;image-missing&quot;."]#-}
_STOCK_MISSING_IMAGE :: T.Text
_STOCK_MISSING_IMAGE = "gtk-missing-image"
-- constant _STOCK_NETWORK
{-# DEPRECATED _STOCK_NETWORK ["(Since version 3.10)","Use named icon &quot;network-workgroup&quot;."]#-}
_STOCK_NETWORK :: T.Text
_STOCK_NETWORK = "gtk-network"
-- constant _STOCK_NEW
{-# DEPRECATED _STOCK_NEW ["(Since version 3.10)","Use named icon &quot;document-new&quot; or the label &quot;_New&quot;."]#-}
_STOCK_NEW :: T.Text
_STOCK_NEW = "gtk-new"
-- constant _STOCK_NO
{-# DEPRECATED _STOCK_NO ["(Since version 3.10)"]#-}
_STOCK_NO :: T.Text
_STOCK_NO = "gtk-no"
-- constant _STOCK_OK
{-# DEPRECATED _STOCK_OK ["(Since version 3.10)","Do not use an icon. Use label &quot;_OK&quot;."]#-}
_STOCK_OK :: T.Text
_STOCK_OK = "gtk-ok"
-- constant _STOCK_OPEN
{-# DEPRECATED _STOCK_OPEN ["(Since version 3.10)","Use named icon &quot;document-open&quot; or the label &quot;_Open&quot;."]#-}
_STOCK_OPEN :: T.Text
_STOCK_OPEN = "gtk-open"
-- constant _STOCK_ORIENTATION_LANDSCAPE
{-# DEPRECATED _STOCK_ORIENTATION_LANDSCAPE ["(Since version 3.10)"]#-}
_STOCK_ORIENTATION_LANDSCAPE :: T.Text
_STOCK_ORIENTATION_LANDSCAPE = "gtk-orientation-landscape"
-- constant _STOCK_ORIENTATION_PORTRAIT
{-# DEPRECATED _STOCK_ORIENTATION_PORTRAIT ["(Since version 3.10)"]#-}
_STOCK_ORIENTATION_PORTRAIT :: T.Text
_STOCK_ORIENTATION_PORTRAIT = "gtk-orientation-portrait"
-- constant _STOCK_ORIENTATION_REVERSE_LANDSCAPE
{-# DEPRECATED _STOCK_ORIENTATION_REVERSE_LANDSCAPE ["(Since version 3.10)"]#-}
_STOCK_ORIENTATION_REVERSE_LANDSCAPE :: T.Text
_STOCK_ORIENTATION_REVERSE_LANDSCAPE = "gtk-orientation-reverse-landscape"
-- constant _STOCK_ORIENTATION_REVERSE_PORTRAIT
{-# DEPRECATED _STOCK_ORIENTATION_REVERSE_PORTRAIT ["(Since version 3.10)"]#-}
_STOCK_ORIENTATION_REVERSE_PORTRAIT :: T.Text
_STOCK_ORIENTATION_REVERSE_PORTRAIT = "gtk-orientation-reverse-portrait"
-- constant _STOCK_PAGE_SETUP
{-# DEPRECATED _STOCK_PAGE_SETUP ["(Since version 3.10)","Use named icon &quot;document-page-setup&quot; or the label &quot;Page Set_up&quot;."]#-}
_STOCK_PAGE_SETUP :: T.Text
_STOCK_PAGE_SETUP = "gtk-page-setup"
-- constant _STOCK_PASTE
{-# DEPRECATED _STOCK_PASTE ["(Since version 3.10)","Use named icon &quot;edit-paste&quot; or the label &quot;_Paste&quot;."]#-}
_STOCK_PASTE :: T.Text
_STOCK_PASTE = "gtk-paste"
-- constant _STOCK_PREFERENCES
{-# DEPRECATED _STOCK_PREFERENCES ["(Since version 3.10)","Use named icon &quot;preferences-system&quot; or the label &quot;_Preferences&quot;."]#-}
_STOCK_PREFERENCES :: T.Text
_STOCK_PREFERENCES = "gtk-preferences"
-- constant _STOCK_PRINT
{-# DEPRECATED _STOCK_PRINT ["(Since version 3.10)","Use named icon &quot;document-print&quot; or the label &quot;_Print&quot;."]#-}
_STOCK_PRINT :: T.Text
_STOCK_PRINT = "gtk-print"
-- constant _STOCK_PRINT_ERROR
{-# DEPRECATED _STOCK_PRINT_ERROR ["(Since version 3.10)","Use named icon &quot;printer-error&quot;."]#-}
_STOCK_PRINT_ERROR :: T.Text
_STOCK_PRINT_ERROR = "gtk-print-error"
-- constant _STOCK_PRINT_PAUSED
{-# DEPRECATED _STOCK_PRINT_PAUSED ["(Since version 3.10)"]#-}
_STOCK_PRINT_PAUSED :: T.Text
_STOCK_PRINT_PAUSED = "gtk-print-paused"
-- constant _STOCK_PRINT_PREVIEW
{-# DEPRECATED _STOCK_PRINT_PREVIEW ["(Since version 3.10)","Use label &quot;Pre_view&quot;."]#-}
_STOCK_PRINT_PREVIEW :: T.Text
_STOCK_PRINT_PREVIEW = "gtk-print-preview"
-- constant _STOCK_PRINT_REPORT
{-# DEPRECATED _STOCK_PRINT_REPORT ["(Since version 3.10)"]#-}
_STOCK_PRINT_REPORT :: T.Text
_STOCK_PRINT_REPORT = "gtk-print-report"
-- constant _STOCK_PRINT_WARNING
{-# DEPRECATED _STOCK_PRINT_WARNING ["(Since version 3.10)"]#-}
_STOCK_PRINT_WARNING :: T.Text
_STOCK_PRINT_WARNING = "gtk-print-warning"
-- constant _STOCK_PROPERTIES
{-# DEPRECATED _STOCK_PROPERTIES ["(Since version 3.10)","Use named icon &quot;document-properties&quot; or the label &quot;_Properties&quot;."]#-}
_STOCK_PROPERTIES :: T.Text
_STOCK_PROPERTIES = "gtk-properties"
-- constant _STOCK_QUIT
{-# DEPRECATED _STOCK_QUIT ["(Since version 3.10)","Use named icon &quot;application-exit&quot; or the label &quot;_Quit&quot;."]#-}
_STOCK_QUIT :: T.Text
_STOCK_QUIT = "gtk-quit"
-- constant _STOCK_REDO
{-# DEPRECATED _STOCK_REDO ["(Since version 3.10)","Use named icon &quot;edit-redo&quot; or the label &quot;_Redo&quot;."]#-}
_STOCK_REDO :: T.Text
_STOCK_REDO = "gtk-redo"
-- constant _STOCK_REFRESH
{-# DEPRECATED _STOCK_REFRESH ["(Since version 3.10)","Use named icon &quot;view-refresh&quot; or the label &quot;_Refresh&quot;."]#-}
_STOCK_REFRESH :: T.Text
_STOCK_REFRESH = "gtk-refresh"
-- constant _STOCK_REMOVE
{-# DEPRECATED _STOCK_REMOVE ["(Since version 3.10)","Use named icon &quot;list-remove&quot; or the label &quot;_Remove&quot;."]#-}
_STOCK_REMOVE :: T.Text
_STOCK_REMOVE = "gtk-remove"
-- constant _STOCK_REVERT_TO_SAVED
{-# DEPRECATED _STOCK_REVERT_TO_SAVED ["(Since version 3.10)","Use named icon &quot;document-revert&quot; or the label &quot;_Revert&quot;."]#-}
_STOCK_REVERT_TO_SAVED :: T.Text
_STOCK_REVERT_TO_SAVED = "gtk-revert-to-saved"
-- constant _STOCK_SAVE
{-# DEPRECATED _STOCK_SAVE ["(Since version 3.10)","Use named icon &quot;document-save&quot; or the label &quot;_Save&quot;."]#-}
_STOCK_SAVE :: T.Text
_STOCK_SAVE = "gtk-save"
-- constant _STOCK_SAVE_AS
{-# DEPRECATED _STOCK_SAVE_AS ["(Since version 3.10)","Use named icon &quot;document-save-as&quot; or the label &quot;Save _As&quot;."]#-}
_STOCK_SAVE_AS :: T.Text
_STOCK_SAVE_AS = "gtk-save-as"
-- constant _STOCK_SELECT_ALL
{-# DEPRECATED _STOCK_SELECT_ALL ["(Since version 3.10)","Use named icon &quot;edit-select-all&quot; or the label &quot;Select _All&quot;."]#-}
_STOCK_SELECT_ALL :: T.Text
_STOCK_SELECT_ALL = "gtk-select-all"
-- constant _STOCK_SELECT_COLOR
{-# DEPRECATED _STOCK_SELECT_COLOR ["(Since version 3.10)"]#-}
_STOCK_SELECT_COLOR :: T.Text
_STOCK_SELECT_COLOR = "gtk-select-color"
-- constant _STOCK_SELECT_FONT
{-# DEPRECATED _STOCK_SELECT_FONT ["(Since version 3.10)"]#-}
_STOCK_SELECT_FONT :: T.Text
_STOCK_SELECT_FONT = "gtk-select-font"
-- constant _STOCK_SORT_ASCENDING
{-# DEPRECATED _STOCK_SORT_ASCENDING ["(Since version 3.10)","Use named icon &quot;view-sort-ascending&quot;."]#-}
_STOCK_SORT_ASCENDING :: T.Text
_STOCK_SORT_ASCENDING = "gtk-sort-ascending"
-- constant _STOCK_SORT_DESCENDING
{-# DEPRECATED _STOCK_SORT_DESCENDING ["(Since version 3.10)","Use named icon &quot;view-sort-descending&quot;."]#-}
_STOCK_SORT_DESCENDING :: T.Text
_STOCK_SORT_DESCENDING = "gtk-sort-descending"
-- constant _STOCK_SPELL_CHECK
{-# DEPRECATED _STOCK_SPELL_CHECK ["(Since version 3.10)","Use named icon &quot;tools-check-spelling&quot;."]#-}
_STOCK_SPELL_CHECK :: T.Text
_STOCK_SPELL_CHECK = "gtk-spell-check"
-- constant _STOCK_STOP
{-# DEPRECATED _STOCK_STOP ["(Since version 3.10)","Use named icon &quot;process-stop&quot; or the label &quot;_Stop&quot;."]#-}
_STOCK_STOP :: T.Text
_STOCK_STOP = "gtk-stop"
-- constant _STOCK_STRIKETHROUGH
{-# DEPRECATED _STOCK_STRIKETHROUGH ["(Since version 3.10)","Use named icon &quot;format-text-strikethrough&quot; or the label &quot;_Strikethrough&quot;."]#-}
_STOCK_STRIKETHROUGH :: T.Text
_STOCK_STRIKETHROUGH = "gtk-strikethrough"
-- constant _STOCK_UNDELETE
{-# DEPRECATED _STOCK_UNDELETE ["(Since version 3.10)"]#-}
_STOCK_UNDELETE :: T.Text
_STOCK_UNDELETE = "gtk-undelete"
-- constant _STOCK_UNDERLINE
{-# DEPRECATED _STOCK_UNDERLINE ["(Since version 3.10)","Use named icon &quot;format-text-underline&quot; or the label &quot;_Underline&quot;."]#-}
_STOCK_UNDERLINE :: T.Text
_STOCK_UNDERLINE = "gtk-underline"
-- constant _STOCK_UNDO
{-# DEPRECATED _STOCK_UNDO ["(Since version 3.10)","Use named icon &quot;edit-undo&quot; or the label &quot;_Undo&quot;."]#-}
_STOCK_UNDO :: T.Text
_STOCK_UNDO = "gtk-undo"
-- constant _STOCK_UNINDENT
{-# DEPRECATED _STOCK_UNINDENT ["(Since version 3.10)","Use named icon &quot;format-indent-less&quot;."]#-}
_STOCK_UNINDENT :: T.Text
_STOCK_UNINDENT = "gtk-unindent"
-- constant _STOCK_YES
{-# DEPRECATED _STOCK_YES ["(Since version 3.10)"]#-}
_STOCK_YES :: T.Text
_STOCK_YES = "gtk-yes"
-- constant _STOCK_ZOOM_100
{-# DEPRECATED _STOCK_ZOOM_100 ["(Since version 3.10)","Use named icon &quot;zoom-original&quot; or the label &quot;_Normal Size&quot;."]#-}
_STOCK_ZOOM_100 :: T.Text
_STOCK_ZOOM_100 = "gtk-zoom-100"
-- constant _STOCK_ZOOM_FIT
{-# DEPRECATED _STOCK_ZOOM_FIT ["(Since version 3.10)","Use named icon &quot;zoom-fit-best&quot; or the label &quot;Best _Fit&quot;."]#-}
_STOCK_ZOOM_FIT :: T.Text
_STOCK_ZOOM_FIT = "gtk-zoom-fit"
-- constant _STOCK_ZOOM_IN
{-# DEPRECATED _STOCK_ZOOM_IN ["(Since version 3.10)","Use named icon &quot;zoom-in&quot; or the label &quot;Zoom _In&quot;."]#-}
_STOCK_ZOOM_IN :: T.Text
_STOCK_ZOOM_IN = "gtk-zoom-in"
-- constant _STOCK_ZOOM_OUT
{-# DEPRECATED _STOCK_ZOOM_OUT ["(Since version 3.10)","Use named icon &quot;zoom-out&quot; or the label &quot;Zoom _Out&quot;."]#-}
_STOCK_ZOOM_OUT :: T.Text
_STOCK_ZOOM_OUT = "gtk-zoom-out"
-- constant _STYLE_CLASS_ACCELERATOR

_STYLE_CLASS_ACCELERATOR :: T.Text
_STYLE_CLASS_ACCELERATOR = "accelerator"
-- constant _STYLE_CLASS_ARROW

_STYLE_CLASS_ARROW :: T.Text
_STYLE_CLASS_ARROW = "arrow"
-- constant _STYLE_CLASS_BACKGROUND

_STYLE_CLASS_BACKGROUND :: T.Text
_STYLE_CLASS_BACKGROUND = "background"
-- constant _STYLE_CLASS_BOTTOM

_STYLE_CLASS_BOTTOM :: T.Text
_STYLE_CLASS_BOTTOM = "bottom"
-- constant _STYLE_CLASS_BUTTON

_STYLE_CLASS_BUTTON :: T.Text
_STYLE_CLASS_BUTTON = "button"
-- constant _STYLE_CLASS_CALENDAR

_STYLE_CLASS_CALENDAR :: T.Text
_STYLE_CLASS_CALENDAR = "calendar"
-- constant _STYLE_CLASS_CELL

_STYLE_CLASS_CELL :: T.Text
_STYLE_CLASS_CELL = "cell"
-- constant _STYLE_CLASS_CHECK

_STYLE_CLASS_CHECK :: T.Text
_STYLE_CLASS_CHECK = "check"
-- constant _STYLE_CLASS_COMBOBOX_ENTRY

_STYLE_CLASS_COMBOBOX_ENTRY :: T.Text
_STYLE_CLASS_COMBOBOX_ENTRY = "combobox-entry"
-- constant _STYLE_CLASS_CONTEXT_MENU

_STYLE_CLASS_CONTEXT_MENU :: T.Text
_STYLE_CLASS_CONTEXT_MENU = "context-menu"
-- constant _STYLE_CLASS_CSD

_STYLE_CLASS_CSD :: T.Text
_STYLE_CLASS_CSD = "csd"
-- constant _STYLE_CLASS_CURSOR_HANDLE

_STYLE_CLASS_CURSOR_HANDLE :: T.Text
_STYLE_CLASS_CURSOR_HANDLE = "cursor-handle"
-- constant _STYLE_CLASS_DEFAULT

_STYLE_CLASS_DEFAULT :: T.Text
_STYLE_CLASS_DEFAULT = "default"
-- constant _STYLE_CLASS_DESTRUCTIVE_ACTION

_STYLE_CLASS_DESTRUCTIVE_ACTION :: T.Text
_STYLE_CLASS_DESTRUCTIVE_ACTION = "destructive-action"
-- constant _STYLE_CLASS_DIM_LABEL

_STYLE_CLASS_DIM_LABEL :: T.Text
_STYLE_CLASS_DIM_LABEL = "dim-label"
-- constant _STYLE_CLASS_DND

_STYLE_CLASS_DND :: T.Text
_STYLE_CLASS_DND = "dnd"
-- constant _STYLE_CLASS_DOCK

_STYLE_CLASS_DOCK :: T.Text
_STYLE_CLASS_DOCK = "dock"
-- constant _STYLE_CLASS_ENTRY

_STYLE_CLASS_ENTRY :: T.Text
_STYLE_CLASS_ENTRY = "entry"
-- constant _STYLE_CLASS_ERROR

_STYLE_CLASS_ERROR :: T.Text
_STYLE_CLASS_ERROR = "error"
-- constant _STYLE_CLASS_EXPANDER

_STYLE_CLASS_EXPANDER :: T.Text
_STYLE_CLASS_EXPANDER = "expander"
-- constant _STYLE_CLASS_FLAT

_STYLE_CLASS_FLAT :: T.Text
_STYLE_CLASS_FLAT = "flat"
-- constant _STYLE_CLASS_FRAME

_STYLE_CLASS_FRAME :: T.Text
_STYLE_CLASS_FRAME = "frame"
-- constant _STYLE_CLASS_GRIP

_STYLE_CLASS_GRIP :: T.Text
_STYLE_CLASS_GRIP = "grip"
-- constant _STYLE_CLASS_HEADER

_STYLE_CLASS_HEADER :: T.Text
_STYLE_CLASS_HEADER = "header"
-- constant _STYLE_CLASS_HIGHLIGHT

_STYLE_CLASS_HIGHLIGHT :: T.Text
_STYLE_CLASS_HIGHLIGHT = "highlight"
-- constant _STYLE_CLASS_HORIZONTAL

_STYLE_CLASS_HORIZONTAL :: T.Text
_STYLE_CLASS_HORIZONTAL = "horizontal"
-- constant _STYLE_CLASS_IMAGE

_STYLE_CLASS_IMAGE :: T.Text
_STYLE_CLASS_IMAGE = "image"
-- constant _STYLE_CLASS_INFO

_STYLE_CLASS_INFO :: T.Text
_STYLE_CLASS_INFO = "info"
-- constant _STYLE_CLASS_INLINE_TOOLBAR

_STYLE_CLASS_INLINE_TOOLBAR :: T.Text
_STYLE_CLASS_INLINE_TOOLBAR = "inline-toolbar"
-- constant _STYLE_CLASS_INSERTION_CURSOR

_STYLE_CLASS_INSERTION_CURSOR :: T.Text
_STYLE_CLASS_INSERTION_CURSOR = "insertion-cursor"
-- constant _STYLE_CLASS_LABEL

_STYLE_CLASS_LABEL :: T.Text
_STYLE_CLASS_LABEL = "label"
-- constant _STYLE_CLASS_LEFT

_STYLE_CLASS_LEFT :: T.Text
_STYLE_CLASS_LEFT = "left"
-- constant _STYLE_CLASS_LEVEL_BAR

_STYLE_CLASS_LEVEL_BAR :: T.Text
_STYLE_CLASS_LEVEL_BAR = "level-bar"
-- constant _STYLE_CLASS_LINKED

_STYLE_CLASS_LINKED :: T.Text
_STYLE_CLASS_LINKED = "linked"
-- constant _STYLE_CLASS_LIST

_STYLE_CLASS_LIST :: T.Text
_STYLE_CLASS_LIST = "list"
-- constant _STYLE_CLASS_LIST_ROW

_STYLE_CLASS_LIST_ROW :: T.Text
_STYLE_CLASS_LIST_ROW = "list-row"
-- constant _STYLE_CLASS_MARK

_STYLE_CLASS_MARK :: T.Text
_STYLE_CLASS_MARK = "mark"
-- constant _STYLE_CLASS_MENU

_STYLE_CLASS_MENU :: T.Text
_STYLE_CLASS_MENU = "menu"
-- constant _STYLE_CLASS_MENUBAR

_STYLE_CLASS_MENUBAR :: T.Text
_STYLE_CLASS_MENUBAR = "menubar"
-- constant _STYLE_CLASS_MENUITEM

_STYLE_CLASS_MENUITEM :: T.Text
_STYLE_CLASS_MENUITEM = "menuitem"
-- constant _STYLE_CLASS_MESSAGE_DIALOG

_STYLE_CLASS_MESSAGE_DIALOG :: T.Text
_STYLE_CLASS_MESSAGE_DIALOG = "message-dialog"
-- constant _STYLE_CLASS_MONOSPACE

_STYLE_CLASS_MONOSPACE :: T.Text
_STYLE_CLASS_MONOSPACE = "monospace"
-- constant _STYLE_CLASS_NEEDS_ATTENTION

_STYLE_CLASS_NEEDS_ATTENTION :: T.Text
_STYLE_CLASS_NEEDS_ATTENTION = "needs-attention"
-- constant _STYLE_CLASS_NOTEBOOK

_STYLE_CLASS_NOTEBOOK :: T.Text
_STYLE_CLASS_NOTEBOOK = "notebook"
-- constant _STYLE_CLASS_OSD

_STYLE_CLASS_OSD :: T.Text
_STYLE_CLASS_OSD = "osd"
-- constant _STYLE_CLASS_OVERSHOOT

_STYLE_CLASS_OVERSHOOT :: T.Text
_STYLE_CLASS_OVERSHOOT = "overshoot"
-- constant _STYLE_CLASS_PANE_SEPARATOR

_STYLE_CLASS_PANE_SEPARATOR :: T.Text
_STYLE_CLASS_PANE_SEPARATOR = "pane-separator"
-- constant _STYLE_CLASS_PAPER

_STYLE_CLASS_PAPER :: T.Text
_STYLE_CLASS_PAPER = "paper"
-- constant _STYLE_CLASS_POPOVER

_STYLE_CLASS_POPOVER :: T.Text
_STYLE_CLASS_POPOVER = "popover"
-- constant _STYLE_CLASS_POPUP

_STYLE_CLASS_POPUP :: T.Text
_STYLE_CLASS_POPUP = "popup"
-- constant _STYLE_CLASS_PRIMARY_TOOLBAR

_STYLE_CLASS_PRIMARY_TOOLBAR :: T.Text
_STYLE_CLASS_PRIMARY_TOOLBAR = "primary-toolbar"
-- constant _STYLE_CLASS_PROGRESSBAR

_STYLE_CLASS_PROGRESSBAR :: T.Text
_STYLE_CLASS_PROGRESSBAR = "progressbar"
-- constant _STYLE_CLASS_PULSE

_STYLE_CLASS_PULSE :: T.Text
_STYLE_CLASS_PULSE = "pulse"
-- constant _STYLE_CLASS_QUESTION

_STYLE_CLASS_QUESTION :: T.Text
_STYLE_CLASS_QUESTION = "question"
-- constant _STYLE_CLASS_RADIO

_STYLE_CLASS_RADIO :: T.Text
_STYLE_CLASS_RADIO = "radio"
-- constant _STYLE_CLASS_RAISED

_STYLE_CLASS_RAISED :: T.Text
_STYLE_CLASS_RAISED = "raised"
-- constant _STYLE_CLASS_READ_ONLY

_STYLE_CLASS_READ_ONLY :: T.Text
_STYLE_CLASS_READ_ONLY = "read-only"
-- constant _STYLE_CLASS_RIGHT

_STYLE_CLASS_RIGHT :: T.Text
_STYLE_CLASS_RIGHT = "right"
-- constant _STYLE_CLASS_RUBBERBAND

_STYLE_CLASS_RUBBERBAND :: T.Text
_STYLE_CLASS_RUBBERBAND = "rubberband"
-- constant _STYLE_CLASS_SCALE

_STYLE_CLASS_SCALE :: T.Text
_STYLE_CLASS_SCALE = "scale"
-- constant _STYLE_CLASS_SCALE_HAS_MARKS_ABOVE

_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE :: T.Text
_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE = "scale-has-marks-above"
-- constant _STYLE_CLASS_SCALE_HAS_MARKS_BELOW

_STYLE_CLASS_SCALE_HAS_MARKS_BELOW :: T.Text
_STYLE_CLASS_SCALE_HAS_MARKS_BELOW = "scale-has-marks-below"
-- constant _STYLE_CLASS_SCROLLBAR

_STYLE_CLASS_SCROLLBAR :: T.Text
_STYLE_CLASS_SCROLLBAR = "scrollbar"
-- constant _STYLE_CLASS_SCROLLBARS_JUNCTION

_STYLE_CLASS_SCROLLBARS_JUNCTION :: T.Text
_STYLE_CLASS_SCROLLBARS_JUNCTION = "scrollbars-junction"
-- constant _STYLE_CLASS_SEPARATOR

_STYLE_CLASS_SEPARATOR :: T.Text
_STYLE_CLASS_SEPARATOR = "separator"
-- constant _STYLE_CLASS_SIDEBAR

_STYLE_CLASS_SIDEBAR :: T.Text
_STYLE_CLASS_SIDEBAR = "sidebar"
-- constant _STYLE_CLASS_SLIDER

_STYLE_CLASS_SLIDER :: T.Text
_STYLE_CLASS_SLIDER = "slider"
-- constant _STYLE_CLASS_SPINBUTTON

_STYLE_CLASS_SPINBUTTON :: T.Text
_STYLE_CLASS_SPINBUTTON = "spinbutton"
-- constant _STYLE_CLASS_SPINNER

_STYLE_CLASS_SPINNER :: T.Text
_STYLE_CLASS_SPINNER = "spinner"
-- constant _STYLE_CLASS_STATUSBAR

_STYLE_CLASS_STATUSBAR :: T.Text
_STYLE_CLASS_STATUSBAR = "statusbar"
-- constant _STYLE_CLASS_SUBTITLE

_STYLE_CLASS_SUBTITLE :: T.Text
_STYLE_CLASS_SUBTITLE = "subtitle"
-- constant _STYLE_CLASS_SUGGESTED_ACTION

_STYLE_CLASS_SUGGESTED_ACTION :: T.Text
_STYLE_CLASS_SUGGESTED_ACTION = "suggested-action"
-- constant _STYLE_CLASS_TITLE

_STYLE_CLASS_TITLE :: T.Text
_STYLE_CLASS_TITLE = "title"
-- constant _STYLE_CLASS_TITLEBAR

_STYLE_CLASS_TITLEBAR :: T.Text
_STYLE_CLASS_TITLEBAR = "titlebar"
-- constant _STYLE_CLASS_TOOLBAR

_STYLE_CLASS_TOOLBAR :: T.Text
_STYLE_CLASS_TOOLBAR = "toolbar"
-- constant _STYLE_CLASS_TOOLTIP

_STYLE_CLASS_TOOLTIP :: T.Text
_STYLE_CLASS_TOOLTIP = "tooltip"
-- constant _STYLE_CLASS_TOP

_STYLE_CLASS_TOP :: T.Text
_STYLE_CLASS_TOP = "top"
-- constant _STYLE_CLASS_TOUCH_SELECTION

_STYLE_CLASS_TOUCH_SELECTION :: T.Text
_STYLE_CLASS_TOUCH_SELECTION = "touch-selection"
-- constant _STYLE_CLASS_TROUGH

_STYLE_CLASS_TROUGH :: T.Text
_STYLE_CLASS_TROUGH = "trough"
-- constant _STYLE_CLASS_UNDERSHOOT

_STYLE_CLASS_UNDERSHOOT :: T.Text
_STYLE_CLASS_UNDERSHOOT = "undershoot"
-- constant _STYLE_CLASS_VERTICAL

_STYLE_CLASS_VERTICAL :: T.Text
_STYLE_CLASS_VERTICAL = "vertical"
-- constant _STYLE_CLASS_VIEW

_STYLE_CLASS_VIEW :: T.Text
_STYLE_CLASS_VIEW = "view"
-- constant _STYLE_CLASS_WARNING

_STYLE_CLASS_WARNING :: T.Text
_STYLE_CLASS_WARNING = "warning"
-- constant _STYLE_CLASS_WIDE

_STYLE_CLASS_WIDE :: T.Text
_STYLE_CLASS_WIDE = "wide"
-- constant _STYLE_PROPERTY_BACKGROUND_COLOR

_STYLE_PROPERTY_BACKGROUND_COLOR :: T.Text
_STYLE_PROPERTY_BACKGROUND_COLOR = "background-color"
-- constant _STYLE_PROPERTY_BACKGROUND_IMAGE

_STYLE_PROPERTY_BACKGROUND_IMAGE :: T.Text
_STYLE_PROPERTY_BACKGROUND_IMAGE = "background-image"
-- constant _STYLE_PROPERTY_BORDER_COLOR

_STYLE_PROPERTY_BORDER_COLOR :: T.Text
_STYLE_PROPERTY_BORDER_COLOR = "border-color"
-- constant _STYLE_PROPERTY_BORDER_RADIUS

_STYLE_PROPERTY_BORDER_RADIUS :: T.Text
_STYLE_PROPERTY_BORDER_RADIUS = "border-radius"
-- constant _STYLE_PROPERTY_BORDER_STYLE

_STYLE_PROPERTY_BORDER_STYLE :: T.Text
_STYLE_PROPERTY_BORDER_STYLE = "border-style"
-- constant _STYLE_PROPERTY_BORDER_WIDTH

_STYLE_PROPERTY_BORDER_WIDTH :: T.Text
_STYLE_PROPERTY_BORDER_WIDTH = "border-width"
-- constant _STYLE_PROPERTY_COLOR

_STYLE_PROPERTY_COLOR :: T.Text
_STYLE_PROPERTY_COLOR = "color"
-- constant _STYLE_PROPERTY_FONT

_STYLE_PROPERTY_FONT :: T.Text
_STYLE_PROPERTY_FONT = "font"
-- constant _STYLE_PROPERTY_MARGIN

_STYLE_PROPERTY_MARGIN :: T.Text
_STYLE_PROPERTY_MARGIN = "margin"
-- constant _STYLE_PROPERTY_PADDING

_STYLE_PROPERTY_PADDING :: T.Text
_STYLE_PROPERTY_PADDING = "padding"
-- constant _STYLE_PROVIDER_PRIORITY_APPLICATION

_STYLE_PROVIDER_PRIORITY_APPLICATION :: Int32
_STYLE_PROVIDER_PRIORITY_APPLICATION = 600
-- constant _STYLE_PROVIDER_PRIORITY_FALLBACK

_STYLE_PROVIDER_PRIORITY_FALLBACK :: Int32
_STYLE_PROVIDER_PRIORITY_FALLBACK = 1
-- constant _STYLE_PROVIDER_PRIORITY_SETTINGS

_STYLE_PROVIDER_PRIORITY_SETTINGS :: Int32
_STYLE_PROVIDER_PRIORITY_SETTINGS = 400
-- constant _STYLE_PROVIDER_PRIORITY_THEME

_STYLE_PROVIDER_PRIORITY_THEME :: Int32
_STYLE_PROVIDER_PRIORITY_THEME = 200
-- constant _STYLE_PROVIDER_PRIORITY_USER

_STYLE_PROVIDER_PRIORITY_USER :: Int32
_STYLE_PROVIDER_PRIORITY_USER = 800
-- constant _STYLE_REGION_COLUMN

_STYLE_REGION_COLUMN :: T.Text
_STYLE_REGION_COLUMN = "column"
-- constant _STYLE_REGION_COLUMN_HEADER

_STYLE_REGION_COLUMN_HEADER :: T.Text
_STYLE_REGION_COLUMN_HEADER = "column-header"
-- constant _STYLE_REGION_ROW

_STYLE_REGION_ROW :: T.Text
_STYLE_REGION_ROW = "row"
-- constant _STYLE_REGION_TAB

_STYLE_REGION_TAB :: T.Text
_STYLE_REGION_TAB = "tab"
-- constant _TEXT_VIEW_PRIORITY_VALIDATE

_TEXT_VIEW_PRIORITY_VALIDATE :: Int32
_TEXT_VIEW_PRIORITY_VALIDATE = 5
-- constant _TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID

_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID :: Int32
_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID = -1
-- constant _TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID

_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID :: Int32
_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID = -2
-- function gtk_accel_groups_activate
-- Args : [Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accel_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_groups_activate" gtk_accel_groups_activate :: 
    Ptr GObject.Object ->                   -- object : TInterface "GObject" "Object"
    Word32 ->                               -- accel_key : TBasicType TUInt32
    CUInt ->                                -- accel_mods : TInterface "Gdk" "ModifierType"
    IO CInt


accelGroupsActivate ::
    (MonadIO m, GObject.ObjectK a) =>
    a ->                                    -- object
    Word32 ->                               -- accel_key
    [Gdk.ModifierType] ->                   -- accel_mods
    m Bool
accelGroupsActivate object accel_key accel_mods = liftIO $ do
    let object' = unsafeManagedPtrCastPtr object
    let accel_mods' = gflagsToWord accel_mods
    result <- gtk_accel_groups_activate object' accel_key accel_mods'
    let result' = (/= 0) result
    touchManagedPtr object
    return result'

-- function gtk_accel_groups_from_object
-- Args : [Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Gtk" "AccelGroup")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accel_groups_from_object" gtk_accel_groups_from_object :: 
    Ptr GObject.Object ->                   -- object : TInterface "GObject" "Object"
    IO (Ptr (GSList (Ptr AccelGroup)))


accelGroupsFromObject ::
    (MonadIO m, GObject.ObjectK a) =>
    a ->                                    -- object
    m [AccelGroup]
accelGroupsFromObject object = liftIO $ do
    let object' = unsafeManagedPtrCastPtr object
    result <- gtk_accel_groups_from_object object'
    checkUnexpectedReturnNULL "gtk_accel_groups_from_object" result
    result' <- unpackGSList result
    result'' <- mapM (newObject AccelGroup) result'
    touchManagedPtr object
    return result''

-- function gtk_accelerator_get_default_mod_mask
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gdk" "ModifierType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accelerator_get_default_mod_mask" gtk_accelerator_get_default_mod_mask :: 
    IO CUInt


acceleratorGetDefaultModMask ::
    (MonadIO m) =>
    m [Gdk.ModifierType]
acceleratorGetDefaultModMask  = liftIO $ do
    result <- gtk_accelerator_get_default_mod_mask
    let result' = wordToGFlags result
    return result'

-- function gtk_accelerator_get_label
-- Args : [Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accelerator_get_label" gtk_accelerator_get_label :: 
    Word32 ->                               -- accelerator_key : TBasicType TUInt32
    CUInt ->                                -- accelerator_mods : TInterface "Gdk" "ModifierType"
    IO CString


acceleratorGetLabel ::
    (MonadIO m) =>
    Word32 ->                               -- accelerator_key
    [Gdk.ModifierType] ->                   -- accelerator_mods
    m T.Text
acceleratorGetLabel accelerator_key accelerator_mods = liftIO $ do
    let accelerator_mods' = gflagsToWord accelerator_mods
    result <- gtk_accelerator_get_label accelerator_key accelerator_mods'
    checkUnexpectedReturnNULL "gtk_accelerator_get_label" result
    result' <- cstringToText result
    freeMem result
    return result'

-- function gtk_accelerator_get_label_with_keycode
-- Args : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keycode", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keycode", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accelerator_get_label_with_keycode" gtk_accelerator_get_label_with_keycode :: 
    Ptr Gdk.Display ->                      -- display : TInterface "Gdk" "Display"
    Word32 ->                               -- accelerator_key : TBasicType TUInt32
    Word32 ->                               -- keycode : TBasicType TUInt32
    CUInt ->                                -- accelerator_mods : TInterface "Gdk" "ModifierType"
    IO CString


acceleratorGetLabelWithKeycode ::
    (MonadIO m, Gdk.DisplayK a) =>
    Maybe (a) ->                            -- display
    Word32 ->                               -- accelerator_key
    Word32 ->                               -- keycode
    [Gdk.ModifierType] ->                   -- accelerator_mods
    m T.Text
acceleratorGetLabelWithKeycode display accelerator_key keycode accelerator_mods = liftIO $ do
    maybeDisplay <- case display of
        Nothing -> return nullPtr
        Just jDisplay -> do
            let jDisplay' = unsafeManagedPtrCastPtr jDisplay
            return jDisplay'
    let accelerator_mods' = gflagsToWord accelerator_mods
    result <- gtk_accelerator_get_label_with_keycode maybeDisplay accelerator_key keycode accelerator_mods'
    checkUnexpectedReturnNULL "gtk_accelerator_get_label_with_keycode" result
    result' <- cstringToText result
    freeMem result
    whenJust display touchManagedPtr
    return result'

-- function gtk_accelerator_name
-- Args : [Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accelerator_name" gtk_accelerator_name :: 
    Word32 ->                               -- accelerator_key : TBasicType TUInt32
    CUInt ->                                -- accelerator_mods : TInterface "Gdk" "ModifierType"
    IO CString


acceleratorName ::
    (MonadIO m) =>
    Word32 ->                               -- accelerator_key
    [Gdk.ModifierType] ->                   -- accelerator_mods
    m T.Text
acceleratorName accelerator_key accelerator_mods = liftIO $ do
    let accelerator_mods' = gflagsToWord accelerator_mods
    result <- gtk_accelerator_name accelerator_key accelerator_mods'
    checkUnexpectedReturnNULL "gtk_accelerator_name" result
    result' <- cstringToText result
    freeMem result
    return result'

-- function gtk_accelerator_name_with_keycode
-- Args : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keycode", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keycode", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accelerator_name_with_keycode" gtk_accelerator_name_with_keycode :: 
    Ptr Gdk.Display ->                      -- display : TInterface "Gdk" "Display"
    Word32 ->                               -- accelerator_key : TBasicType TUInt32
    Word32 ->                               -- keycode : TBasicType TUInt32
    CUInt ->                                -- accelerator_mods : TInterface "Gdk" "ModifierType"
    IO CString


acceleratorNameWithKeycode ::
    (MonadIO m, Gdk.DisplayK a) =>
    Maybe (a) ->                            -- display
    Word32 ->                               -- accelerator_key
    Word32 ->                               -- keycode
    [Gdk.ModifierType] ->                   -- accelerator_mods
    m T.Text
acceleratorNameWithKeycode display accelerator_key keycode accelerator_mods = liftIO $ do
    maybeDisplay <- case display of
        Nothing -> return nullPtr
        Just jDisplay -> do
            let jDisplay' = unsafeManagedPtrCastPtr jDisplay
            return jDisplay'
    let accelerator_mods' = gflagsToWord accelerator_mods
    result <- gtk_accelerator_name_with_keycode maybeDisplay accelerator_key keycode accelerator_mods'
    checkUnexpectedReturnNULL "gtk_accelerator_name_with_keycode" result
    result' <- cstringToText result
    freeMem result
    whenJust display touchManagedPtr
    return result'

-- function gtk_accelerator_parse
-- Args : [Arg {argName = "accelerator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "accelerator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accelerator_parse" gtk_accelerator_parse :: 
    CString ->                              -- accelerator : TBasicType TUTF8
    Ptr Word32 ->                           -- accelerator_key : TBasicType TUInt32
    Ptr CUInt ->                            -- accelerator_mods : TInterface "Gdk" "ModifierType"
    IO ()


acceleratorParse ::
    (MonadIO m) =>
    T.Text ->                               -- accelerator
    m (Word32,[Gdk.ModifierType])
acceleratorParse accelerator = liftIO $ do
    accelerator' <- textToCString accelerator
    accelerator_key <- allocMem :: IO (Ptr Word32)
    accelerator_mods <- allocMem :: IO (Ptr CUInt)
    gtk_accelerator_parse accelerator' accelerator_key accelerator_mods
    accelerator_key' <- peek accelerator_key
    accelerator_mods' <- peek accelerator_mods
    let accelerator_mods'' = wordToGFlags accelerator_mods'
    freeMem accelerator'
    freeMem accelerator_key
    freeMem accelerator_mods
    return (accelerator_key', accelerator_mods'')

-- function gtk_accelerator_parse_with_keycode
-- Args : [Arg {argName = "accelerator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "accelerator_key", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "accelerator_codes", argType = TCArray True (-1) (-1) (TBasicType TUInt32), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "accelerator_mods", argType = TInterface "Gdk" "ModifierType", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "accelerator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accelerator_parse_with_keycode" gtk_accelerator_parse_with_keycode :: 
    CString ->                              -- accelerator : TBasicType TUTF8
    Ptr Word32 ->                           -- accelerator_key : TBasicType TUInt32
    Ptr (Ptr Word32) ->                     -- accelerator_codes : TCArray True (-1) (-1) (TBasicType TUInt32)
    Ptr CUInt ->                            -- accelerator_mods : TInterface "Gdk" "ModifierType"
    IO ()


acceleratorParseWithKeycode ::
    (MonadIO m) =>
    T.Text ->                               -- accelerator
    m (Word32,[Word32],[Gdk.ModifierType])
acceleratorParseWithKeycode accelerator = liftIO $ do
    accelerator' <- textToCString accelerator
    accelerator_key <- allocMem :: IO (Ptr Word32)
    accelerator_codes <- allocMem :: IO (Ptr (Ptr Word32))
    accelerator_mods <- allocMem :: IO (Ptr CUInt)
    gtk_accelerator_parse_with_keycode accelerator' accelerator_key accelerator_codes accelerator_mods
    accelerator_key' <- peek accelerator_key
    accelerator_codes' <- peek accelerator_codes
    accelerator_codes'' <- unpackZeroTerminatedStorableArray accelerator_codes'
    freeMem accelerator_codes'
    accelerator_mods' <- peek accelerator_mods
    let accelerator_mods'' = wordToGFlags accelerator_mods'
    freeMem accelerator'
    freeMem accelerator_key
    freeMem accelerator_codes
    freeMem accelerator_mods
    return (accelerator_key', accelerator_codes'', accelerator_mods'')

-- function gtk_accelerator_set_default_mod_mask
-- Args : [Arg {argName = "default_mod_mask", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "default_mod_mask", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accelerator_set_default_mod_mask" gtk_accelerator_set_default_mod_mask :: 
    CUInt ->                                -- default_mod_mask : TInterface "Gdk" "ModifierType"
    IO ()


acceleratorSetDefaultModMask ::
    (MonadIO m) =>
    [Gdk.ModifierType] ->                   -- default_mod_mask
    m ()
acceleratorSetDefaultModMask default_mod_mask = liftIO $ do
    let default_mod_mask' = gflagsToWord default_mod_mask
    gtk_accelerator_set_default_mod_mask default_mod_mask'
    return ()

-- function gtk_accelerator_valid
-- Args : [Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_accelerator_valid" gtk_accelerator_valid :: 
    Word32 ->                               -- keyval : TBasicType TUInt32
    CUInt ->                                -- modifiers : TInterface "Gdk" "ModifierType"
    IO CInt


acceleratorValid ::
    (MonadIO m) =>
    Word32 ->                               -- keyval
    [Gdk.ModifierType] ->                   -- modifiers
    m Bool
acceleratorValid keyval modifiers = liftIO $ do
    let modifiers' = gflagsToWord modifiers
    result <- gtk_accelerator_valid keyval modifiers'
    let result' = (/= 0) result
    return result'

-- function gtk_alternative_dialog_button_order
-- Args : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_alternative_dialog_button_order" gtk_alternative_dialog_button_order :: 
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    IO CInt

{-# DEPRECATED alternativeDialogButtonOrder ["(Since version 3.10)","Deprecated"]#-}
alternativeDialogButtonOrder ::
    (MonadIO m, Gdk.ScreenK a) =>
    Maybe (a) ->                            -- screen
    m Bool
alternativeDialogButtonOrder screen = liftIO $ do
    maybeScreen <- case screen of
        Nothing -> return nullPtr
        Just jScreen -> do
            let jScreen' = unsafeManagedPtrCastPtr jScreen
            return jScreen'
    result <- gtk_alternative_dialog_button_order maybeScreen
    let result' = (/= 0) result
    whenJust screen touchManagedPtr
    return result'

-- function gtk_binding_entry_add_signal_from_string
-- Args : [Arg {argName = "binding_set", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "signal_desc", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "binding_set", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "signal_desc", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GLib" "TokenType"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_binding_entry_add_signal_from_string" gtk_binding_entry_add_signal_from_string :: 
    Ptr BindingSet ->                       -- binding_set : TInterface "Gtk" "BindingSet"
    CString ->                              -- signal_desc : TBasicType TUTF8
    IO CUInt


bindingEntryAddSignalFromString ::
    (MonadIO m) =>
    BindingSet ->                           -- binding_set
    T.Text ->                               -- signal_desc
    m GLib.TokenType
bindingEntryAddSignalFromString binding_set signal_desc = liftIO $ do
    let binding_set' = unsafeManagedPtrGetPtr binding_set
    signal_desc' <- textToCString signal_desc
    result <- gtk_binding_entry_add_signal_from_string binding_set' signal_desc'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr binding_set
    freeMem signal_desc'
    return result'

-- function gtk_binding_entry_add_signall
-- Args : [Arg {argName = "binding_set", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "signal_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "binding_args", argType = TGSList (TInterface "Gtk" "BindingArg"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "binding_set", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "signal_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "binding_args", argType = TGSList (TInterface "Gtk" "BindingArg"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_binding_entry_add_signall" gtk_binding_entry_add_signall :: 
    Ptr BindingSet ->                       -- binding_set : TInterface "Gtk" "BindingSet"
    Word32 ->                               -- keyval : TBasicType TUInt32
    CUInt ->                                -- modifiers : TInterface "Gdk" "ModifierType"
    CString ->                              -- signal_name : TBasicType TUTF8
    Ptr (GSList (Ptr BindingArg)) ->        -- binding_args : TGSList (TInterface "Gtk" "BindingArg")
    IO ()


bindingEntryAddSignall ::
    (MonadIO m) =>
    BindingSet ->                           -- binding_set
    Word32 ->                               -- keyval
    [Gdk.ModifierType] ->                   -- modifiers
    T.Text ->                               -- signal_name
    [BindingArg] ->                         -- binding_args
    m ()
bindingEntryAddSignall binding_set keyval modifiers signal_name binding_args = liftIO $ do
    let binding_set' = unsafeManagedPtrGetPtr binding_set
    let modifiers' = gflagsToWord modifiers
    signal_name' <- textToCString signal_name
    let binding_args' = map unsafeManagedPtrGetPtr binding_args
    binding_args'' <- packGSList binding_args'
    gtk_binding_entry_add_signall binding_set' keyval modifiers' signal_name' binding_args''
    touchManagedPtr binding_set
    mapM_ touchManagedPtr binding_args
    freeMem signal_name'
    g_slist_free binding_args''
    return ()

-- function gtk_binding_entry_remove
-- Args : [Arg {argName = "binding_set", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "binding_set", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_binding_entry_remove" gtk_binding_entry_remove :: 
    Ptr BindingSet ->                       -- binding_set : TInterface "Gtk" "BindingSet"
    Word32 ->                               -- keyval : TBasicType TUInt32
    CUInt ->                                -- modifiers : TInterface "Gdk" "ModifierType"
    IO ()


bindingEntryRemove ::
    (MonadIO m) =>
    BindingSet ->                           -- binding_set
    Word32 ->                               -- keyval
    [Gdk.ModifierType] ->                   -- modifiers
    m ()
bindingEntryRemove binding_set keyval modifiers = liftIO $ do
    let binding_set' = unsafeManagedPtrGetPtr binding_set
    let modifiers' = gflagsToWord modifiers
    gtk_binding_entry_remove binding_set' keyval modifiers'
    touchManagedPtr binding_set
    return ()

-- function gtk_binding_entry_skip
-- Args : [Arg {argName = "binding_set", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "binding_set", argType = TInterface "Gtk" "BindingSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_binding_entry_skip" gtk_binding_entry_skip :: 
    Ptr BindingSet ->                       -- binding_set : TInterface "Gtk" "BindingSet"
    Word32 ->                               -- keyval : TBasicType TUInt32
    CUInt ->                                -- modifiers : TInterface "Gdk" "ModifierType"
    IO ()


bindingEntrySkip ::
    (MonadIO m) =>
    BindingSet ->                           -- binding_set
    Word32 ->                               -- keyval
    [Gdk.ModifierType] ->                   -- modifiers
    m ()
bindingEntrySkip binding_set keyval modifiers = liftIO $ do
    let binding_set' = unsafeManagedPtrGetPtr binding_set
    let modifiers' = gflagsToWord modifiers
    gtk_binding_entry_skip binding_set' keyval modifiers'
    touchManagedPtr binding_set
    return ()

-- function gtk_binding_set_find
-- Args : [Arg {argName = "set_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "set_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "BindingSet"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_binding_set_find" gtk_binding_set_find :: 
    CString ->                              -- set_name : TBasicType TUTF8
    IO (Ptr BindingSet)


bindingSetFind ::
    (MonadIO m) =>
    T.Text ->                               -- set_name
    m BindingSet
bindingSetFind set_name_ = liftIO $ do
    set_name_' <- textToCString set_name_
    result <- gtk_binding_set_find set_name_'
    checkUnexpectedReturnNULL "gtk_binding_set_find" result
    result' <- (newPtr 64 BindingSet) result
    freeMem set_name_'
    return result'

-- function gtk_bindings_activate
-- Args : [Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_bindings_activate" gtk_bindings_activate :: 
    Ptr GObject.Object ->                   -- object : TInterface "GObject" "Object"
    Word32 ->                               -- keyval : TBasicType TUInt32
    CUInt ->                                -- modifiers : TInterface "Gdk" "ModifierType"
    IO CInt


bindingsActivate ::
    (MonadIO m, GObject.ObjectK a) =>
    a ->                                    -- object
    Word32 ->                               -- keyval
    [Gdk.ModifierType] ->                   -- modifiers
    m Bool
bindingsActivate object keyval modifiers = liftIO $ do
    let object' = unsafeManagedPtrCastPtr object
    let modifiers' = gflagsToWord modifiers
    result <- gtk_bindings_activate object' keyval modifiers'
    let result' = (/= 0) result
    touchManagedPtr object
    return result'

-- function gtk_bindings_activate_event
-- Args : [Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "EventKey", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_bindings_activate_event" gtk_bindings_activate_event :: 
    Ptr GObject.Object ->                   -- object : TInterface "GObject" "Object"
    Ptr Gdk.EventKey ->                     -- event : TInterface "Gdk" "EventKey"
    IO CInt


bindingsActivateEvent ::
    (MonadIO m, GObject.ObjectK a) =>
    a ->                                    -- object
    Gdk.EventKey ->                         -- event
    m Bool
bindingsActivateEvent object event = liftIO $ do
    let object' = unsafeManagedPtrCastPtr object
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_bindings_activate_event object' event'
    let result' = (/= 0) result
    touchManagedPtr object
    touchManagedPtr event
    return result'

-- function gtk_builder_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_builder_error_quark" gtk_builder_error_quark :: 
    IO Word32


builderErrorQuark ::
    (MonadIO m) =>
    m Word32
builderErrorQuark  = liftIO $ do
    result <- gtk_builder_error_quark
    return result

-- function gtk_cairo_should_draw_window
-- Args : [Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cairo_should_draw_window" gtk_cairo_should_draw_window :: 
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    IO CInt


cairoShouldDrawWindow ::
    (MonadIO m, Gdk.WindowK a) =>
    Cairo.Context ->                        -- cr
    a ->                                    -- window
    m Bool
cairoShouldDrawWindow cr window = liftIO $ do
    let cr' = unsafeManagedPtrGetPtr cr
    let window' = unsafeManagedPtrCastPtr window
    result <- gtk_cairo_should_draw_window cr' window'
    let result' = (/= 0) result
    touchManagedPtr cr
    touchManagedPtr window
    return result'

-- function gtk_cairo_transform_to_window
-- Args : [Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cairo_transform_to_window" gtk_cairo_transform_to_window :: 
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Window ->                       -- window : TInterface "Gdk" "Window"
    IO ()


cairoTransformToWindow ::
    (MonadIO m, WidgetK a, Gdk.WindowK b) =>
    Cairo.Context ->                        -- cr
    a ->                                    -- widget
    b ->                                    -- window
    m ()
cairoTransformToWindow cr widget window = liftIO $ do
    let cr' = unsafeManagedPtrGetPtr cr
    let widget' = unsafeManagedPtrCastPtr widget
    let window' = unsafeManagedPtrCastPtr window
    gtk_cairo_transform_to_window cr' widget' window'
    touchManagedPtr cr
    touchManagedPtr widget
    touchManagedPtr window
    return ()

-- function gtk_check_version
-- Args : [Arg {argName = "required_major", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "required_minor", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "required_micro", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "required_major", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "required_minor", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "required_micro", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_check_version" gtk_check_version :: 
    Word32 ->                               -- required_major : TBasicType TUInt32
    Word32 ->                               -- required_minor : TBasicType TUInt32
    Word32 ->                               -- required_micro : TBasicType TUInt32
    IO CString


checkVersion ::
    (MonadIO m) =>
    Word32 ->                               -- required_major
    Word32 ->                               -- required_minor
    Word32 ->                               -- required_micro
    m T.Text
checkVersion required_major required_minor required_micro = liftIO $ do
    result <- gtk_check_version required_major required_minor required_micro
    checkUnexpectedReturnNULL "gtk_check_version" result
    result' <- cstringToText result
    return result'

-- function gtk_css_provider_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_css_provider_error_quark" gtk_css_provider_error_quark :: 
    IO Word32


cssProviderErrorQuark ::
    (MonadIO m) =>
    m Word32
cssProviderErrorQuark  = liftIO $ do
    result <- gtk_css_provider_error_quark
    return result

-- function gtk_device_grab_add
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "block_others", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "block_others", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_device_grab_add" gtk_device_grab_add :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Device ->                       -- device : TInterface "Gdk" "Device"
    CInt ->                                 -- block_others : TBasicType TBoolean
    IO ()


deviceGrabAdd ::
    (MonadIO m, WidgetK a, Gdk.DeviceK b) =>
    a ->                                    -- widget
    b ->                                    -- device
    Bool ->                                 -- block_others
    m ()
deviceGrabAdd widget device block_others = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    let device' = unsafeManagedPtrCastPtr device
    let block_others' = (fromIntegral . fromEnum) block_others
    gtk_device_grab_add widget' device' block_others'
    touchManagedPtr widget
    touchManagedPtr device
    return ()

-- function gtk_device_grab_remove
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "device", argType = TInterface "Gdk" "Device", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_device_grab_remove" gtk_device_grab_remove :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Device ->                       -- device : TInterface "Gdk" "Device"
    IO ()


deviceGrabRemove ::
    (MonadIO m, WidgetK a, Gdk.DeviceK b) =>
    a ->                                    -- widget
    b ->                                    -- device
    m ()
deviceGrabRemove widget device = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    let device' = unsafeManagedPtrCastPtr device
    gtk_device_grab_remove widget' device'
    touchManagedPtr widget
    touchManagedPtr device
    return ()

-- function gtk_disable_setlocale
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_disable_setlocale" gtk_disable_setlocale :: 
    IO ()


disableSetlocale ::
    (MonadIO m) =>
    m ()
disableSetlocale  = liftIO $ do
    gtk_disable_setlocale
    return ()

-- function gtk_distribute_natural_allocation
-- Args : [Arg {argName = "extra_space", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_requested_sizes", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sizes", argType = TInterface "Gtk" "RequestedSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "extra_space", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_requested_sizes", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "sizes", argType = TInterface "Gtk" "RequestedSize", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_distribute_natural_allocation" gtk_distribute_natural_allocation :: 
    Int32 ->                                -- extra_space : TBasicType TInt32
    Word32 ->                               -- n_requested_sizes : TBasicType TUInt32
    Ptr RequestedSize ->                    -- sizes : TInterface "Gtk" "RequestedSize"
    IO Int32


distributeNaturalAllocation ::
    (MonadIO m) =>
    Int32 ->                                -- extra_space
    Word32 ->                               -- n_requested_sizes
    RequestedSize ->                        -- sizes
    m Int32
distributeNaturalAllocation extra_space n_requested_sizes sizes = liftIO $ do
    let sizes' = unsafeManagedPtrGetPtr sizes
    result <- gtk_distribute_natural_allocation extra_space n_requested_sizes sizes'
    touchManagedPtr sizes
    return result

-- function gtk_drag_cancel
-- Args : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_cancel" gtk_drag_cancel :: 
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    IO ()


dragCancel ::
    (MonadIO m, Gdk.DragContextK a) =>
    a ->                                    -- context
    m ()
dragCancel context = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    gtk_drag_cancel context'
    touchManagedPtr context
    return ()

-- function gtk_drag_finish
-- Args : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "success", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "del", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "time_", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "success", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "del", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "time_", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_finish" gtk_drag_finish :: 
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    CInt ->                                 -- success : TBasicType TBoolean
    CInt ->                                 -- del : TBasicType TBoolean
    Word32 ->                               -- time_ : TBasicType TUInt32
    IO ()


dragFinish ::
    (MonadIO m, Gdk.DragContextK a) =>
    a ->                                    -- context
    Bool ->                                 -- success
    Bool ->                                 -- del
    Word32 ->                               -- time_
    m ()
dragFinish context success del time_ = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let success' = (fromIntegral . fromEnum) success
    let del' = (fromIntegral . fromEnum) del
    gtk_drag_finish context' success' del' time_
    touchManagedPtr context
    return ()

-- function gtk_drag_get_source_widget
-- Args : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_get_source_widget" gtk_drag_get_source_widget :: 
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    IO (Ptr Widget)


dragGetSourceWidget ::
    (MonadIO m, Gdk.DragContextK a) =>
    a ->                                    -- context
    m Widget
dragGetSourceWidget context = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    result <- gtk_drag_get_source_widget context'
    checkUnexpectedReturnNULL "gtk_drag_get_source_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr context
    return result'

-- function gtk_drag_set_icon_default
-- Args : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_set_icon_default" gtk_drag_set_icon_default :: 
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    IO ()


dragSetIconDefault ::
    (MonadIO m, Gdk.DragContextK a) =>
    a ->                                    -- context
    m ()
dragSetIconDefault context = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    gtk_drag_set_icon_default context'
    touchManagedPtr context
    return ()

-- function gtk_drag_set_icon_gicon
-- Args : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon", argType = TInterface "Gio" "Icon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_set_icon_gicon" gtk_drag_set_icon_gicon :: 
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    Ptr Gio.Icon ->                         -- icon : TInterface "Gio" "Icon"
    Int32 ->                                -- hot_x : TBasicType TInt32
    Int32 ->                                -- hot_y : TBasicType TInt32
    IO ()


dragSetIconGicon ::
    (MonadIO m, Gdk.DragContextK a, Gio.IconK b) =>
    a ->                                    -- context
    b ->                                    -- icon
    Int32 ->                                -- hot_x
    Int32 ->                                -- hot_y
    m ()
dragSetIconGicon context icon hot_x hot_y = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let icon' = unsafeManagedPtrCastPtr icon
    gtk_drag_set_icon_gicon context' icon' hot_x hot_y
    touchManagedPtr context
    touchManagedPtr icon
    return ()

-- function gtk_drag_set_icon_name
-- Args : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_set_icon_name" gtk_drag_set_icon_name :: 
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    CString ->                              -- icon_name : TBasicType TUTF8
    Int32 ->                                -- hot_x : TBasicType TInt32
    Int32 ->                                -- hot_y : TBasicType TInt32
    IO ()


dragSetIconName ::
    (MonadIO m, Gdk.DragContextK a) =>
    a ->                                    -- context
    T.Text ->                               -- icon_name
    Int32 ->                                -- hot_x
    Int32 ->                                -- hot_y
    m ()
dragSetIconName context icon_name hot_x hot_y = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    icon_name' <- textToCString icon_name
    gtk_drag_set_icon_name context' icon_name' hot_x hot_y
    touchManagedPtr context
    freeMem icon_name'
    return ()

-- function gtk_drag_set_icon_pixbuf
-- Args : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_set_icon_pixbuf" gtk_drag_set_icon_pixbuf :: 
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    Int32 ->                                -- hot_x : TBasicType TInt32
    Int32 ->                                -- hot_y : TBasicType TInt32
    IO ()


dragSetIconPixbuf ::
    (MonadIO m, Gdk.DragContextK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- context
    b ->                                    -- pixbuf
    Int32 ->                                -- hot_x
    Int32 ->                                -- hot_y
    m ()
dragSetIconPixbuf context pixbuf hot_x hot_y = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    gtk_drag_set_icon_pixbuf context' pixbuf' hot_x hot_y
    touchManagedPtr context
    touchManagedPtr pixbuf
    return ()

-- function gtk_drag_set_icon_stock
-- Args : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_set_icon_stock" gtk_drag_set_icon_stock :: 
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    CString ->                              -- stock_id : TBasicType TUTF8
    Int32 ->                                -- hot_x : TBasicType TInt32
    Int32 ->                                -- hot_y : TBasicType TInt32
    IO ()

{-# DEPRECATED dragSetIconStock ["(Since version 3.10)","Use gtk_drag_set_icon_name() instead."]#-}
dragSetIconStock ::
    (MonadIO m, Gdk.DragContextK a) =>
    a ->                                    -- context
    T.Text ->                               -- stock_id
    Int32 ->                                -- hot_x
    Int32 ->                                -- hot_y
    m ()
dragSetIconStock context stock_id hot_x hot_y = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    stock_id' <- textToCString stock_id
    gtk_drag_set_icon_stock context' stock_id' hot_x hot_y
    touchManagedPtr context
    freeMem stock_id'
    return ()

-- function gtk_drag_set_icon_surface
-- Args : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "surface", argType = TInterface "cairo" "Surface", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "surface", argType = TInterface "cairo" "Surface", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_set_icon_surface" gtk_drag_set_icon_surface :: 
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    Ptr Cairo.Surface ->                    -- surface : TInterface "cairo" "Surface"
    IO ()


dragSetIconSurface ::
    (MonadIO m, Gdk.DragContextK a) =>
    a ->                                    -- context
    Cairo.Surface ->                        -- surface
    m ()
dragSetIconSurface context surface = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let surface' = unsafeManagedPtrGetPtr surface
    gtk_drag_set_icon_surface context' surface'
    touchManagedPtr context
    touchManagedPtr surface
    return ()

-- function gtk_drag_set_icon_widget
-- Args : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gdk" "DragContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hot_y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_set_icon_widget" gtk_drag_set_icon_widget :: 
    Ptr Gdk.DragContext ->                  -- context : TInterface "Gdk" "DragContext"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Int32 ->                                -- hot_x : TBasicType TInt32
    Int32 ->                                -- hot_y : TBasicType TInt32
    IO ()


dragSetIconWidget ::
    (MonadIO m, Gdk.DragContextK a, WidgetK b) =>
    a ->                                    -- context
    b ->                                    -- widget
    Int32 ->                                -- hot_x
    Int32 ->                                -- hot_y
    m ()
dragSetIconWidget context widget hot_x hot_y = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_drag_set_icon_widget context' widget' hot_x hot_y
    touchManagedPtr context
    touchManagedPtr widget
    return ()

-- function gtk_draw_insertion_cursor
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "location", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_primary", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_arrow", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "location", argType = TInterface "Gdk" "Rectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "is_primary", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Gtk" "TextDirection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw_arrow", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_draw_insertion_cursor" gtk_draw_insertion_cursor :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    Ptr Gdk.Rectangle ->                    -- location : TInterface "Gdk" "Rectangle"
    CInt ->                                 -- is_primary : TBasicType TBoolean
    CUInt ->                                -- direction : TInterface "Gtk" "TextDirection"
    CInt ->                                 -- draw_arrow : TBasicType TBoolean
    IO ()

{-# DEPRECATED drawInsertionCursor ["(Since version 3.4)","Use gtk_render_insertion_cursor() instead."]#-}
drawInsertionCursor ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    Cairo.Context ->                        -- cr
    Gdk.Rectangle ->                        -- location
    Bool ->                                 -- is_primary
    TextDirection ->                        -- direction
    Bool ->                                 -- draw_arrow
    m ()
drawInsertionCursor widget cr location is_primary direction draw_arrow = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    let cr' = unsafeManagedPtrGetPtr cr
    let location' = unsafeManagedPtrGetPtr location
    let is_primary' = (fromIntegral . fromEnum) is_primary
    let direction' = (fromIntegral . fromEnum) direction
    let draw_arrow' = (fromIntegral . fromEnum) draw_arrow
    gtk_draw_insertion_cursor widget' cr' location' is_primary' direction' draw_arrow'
    touchManagedPtr widget
    touchManagedPtr cr
    touchManagedPtr location
    return ()

-- function gtk_events_pending
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_events_pending" gtk_events_pending :: 
    IO CInt


eventsPending ::
    (MonadIO m) =>
    m Bool
eventsPending  = liftIO $ do
    result <- gtk_events_pending
    let result' = (/= 0) result
    return result'

-- function gtk_false
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_false" gtk_false :: 
    IO CInt


false ::
    (MonadIO m) =>
    m Bool
false  = liftIO $ do
    result <- gtk_false
    let result' = (/= 0) result
    return result'

-- function gtk_file_chooser_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_error_quark" gtk_file_chooser_error_quark :: 
    IO Word32


fileChooserErrorQuark ::
    (MonadIO m) =>
    m Word32
fileChooserErrorQuark  = liftIO $ do
    result <- gtk_file_chooser_error_quark
    return result

-- function gtk_get_binary_age
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_binary_age" gtk_get_binary_age :: 
    IO Word32


getBinaryAge ::
    (MonadIO m) =>
    m Word32
getBinaryAge  = liftIO $ do
    result <- gtk_get_binary_age
    return result

-- function gtk_get_current_event
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gdk" "Event"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_current_event" gtk_get_current_event :: 
    IO (Ptr Gdk.Event)


getCurrentEvent ::
    (MonadIO m) =>
    m Gdk.Event
getCurrentEvent  = liftIO $ do
    result <- gtk_get_current_event
    checkUnexpectedReturnNULL "gtk_get_current_event" result
    result' <- (wrapBoxed Gdk.Event) result
    return result'

-- function gtk_get_current_event_device
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gdk" "Device"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_current_event_device" gtk_get_current_event_device :: 
    IO (Ptr Gdk.Device)


getCurrentEventDevice ::
    (MonadIO m) =>
    m Gdk.Device
getCurrentEventDevice  = liftIO $ do
    result <- gtk_get_current_event_device
    checkUnexpectedReturnNULL "gtk_get_current_event_device" result
    result' <- (newObject Gdk.Device) result
    return result'

-- function gtk_get_current_event_state
-- Args : [Arg {argName = "state", argType = TInterface "Gdk" "ModifierType", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_current_event_state" gtk_get_current_event_state :: 
    Ptr CUInt ->                            -- state : TInterface "Gdk" "ModifierType"
    IO CInt


getCurrentEventState ::
    (MonadIO m) =>
    m (Bool,[Gdk.ModifierType])
getCurrentEventState  = liftIO $ do
    state <- allocMem :: IO (Ptr CUInt)
    result <- gtk_get_current_event_state state
    let result' = (/= 0) result
    state' <- peek state
    let state'' = wordToGFlags state'
    freeMem state
    return (result', state'')

-- function gtk_get_current_event_time
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_current_event_time" gtk_get_current_event_time :: 
    IO Word32


getCurrentEventTime ::
    (MonadIO m) =>
    m Word32
getCurrentEventTime  = liftIO $ do
    result <- gtk_get_current_event_time
    return result

-- function gtk_get_debug_flags
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_debug_flags" gtk_get_debug_flags :: 
    IO Word32


getDebugFlags ::
    (MonadIO m) =>
    m Word32
getDebugFlags  = liftIO $ do
    result <- gtk_get_debug_flags
    return result

-- function gtk_get_default_language
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Pango" "Language"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_default_language" gtk_get_default_language :: 
    IO (Ptr Pango.Language)


getDefaultLanguage ::
    (MonadIO m) =>
    m Pango.Language
getDefaultLanguage  = liftIO $ do
    result <- gtk_get_default_language
    checkUnexpectedReturnNULL "gtk_get_default_language" result
    result' <- (newBoxed Pango.Language) result
    return result'

-- function gtk_get_event_widget
-- Args : [Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_event_widget" gtk_get_event_widget :: 
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    IO (Ptr Widget)


getEventWidget ::
    (MonadIO m) =>
    Gdk.Event ->                            -- event
    m Widget
getEventWidget event = liftIO $ do
    let event' = unsafeManagedPtrGetPtr event
    result <- gtk_get_event_widget event'
    checkUnexpectedReturnNULL "gtk_get_event_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr event
    return result'

-- function gtk_get_interface_age
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_interface_age" gtk_get_interface_age :: 
    IO Word32


getInterfaceAge ::
    (MonadIO m) =>
    m Word32
getInterfaceAge  = liftIO $ do
    result <- gtk_get_interface_age
    return result

-- function gtk_get_locale_direction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "TextDirection"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_locale_direction" gtk_get_locale_direction :: 
    IO CUInt


getLocaleDirection ::
    (MonadIO m) =>
    m TextDirection
getLocaleDirection  = liftIO $ do
    result <- gtk_get_locale_direction
    let result' = (toEnum . fromIntegral) result
    return result'

-- function gtk_get_major_version
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_major_version" gtk_get_major_version :: 
    IO Word32


getMajorVersion ::
    (MonadIO m) =>
    m Word32
getMajorVersion  = liftIO $ do
    result <- gtk_get_major_version
    return result

-- function gtk_get_micro_version
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_micro_version" gtk_get_micro_version :: 
    IO Word32


getMicroVersion ::
    (MonadIO m) =>
    m Word32
getMicroVersion  = liftIO $ do
    result <- gtk_get_micro_version
    return result

-- function gtk_get_minor_version
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_minor_version" gtk_get_minor_version :: 
    IO Word32


getMinorVersion ::
    (MonadIO m) =>
    m Word32
getMinorVersion  = liftIO $ do
    result <- gtk_get_minor_version
    return result

-- function gtk_get_option_group
-- Args : [Arg {argName = "open_default_display", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "open_default_display", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GLib" "OptionGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_get_option_group" gtk_get_option_group :: 
    CInt ->                                 -- open_default_display : TBasicType TBoolean
    IO (Ptr GLib.OptionGroup)


getOptionGroup ::
    (MonadIO m) =>
    Bool ->                                 -- open_default_display
    m GLib.OptionGroup
getOptionGroup open_default_display = liftIO $ do
    let open_default_display' = (fromIntegral . fromEnum) open_default_display
    result <- gtk_get_option_group open_default_display'
    checkUnexpectedReturnNULL "gtk_get_option_group" result
    result' <- (wrapBoxed GLib.OptionGroup) result
    return result'

-- function gtk_grab_get_current
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grab_get_current" gtk_grab_get_current :: 
    IO (Ptr Widget)


grabGetCurrent ::
    (MonadIO m) =>
    m Widget
grabGetCurrent  = liftIO $ do
    result <- gtk_grab_get_current
    checkUnexpectedReturnNULL "gtk_grab_get_current" result
    result' <- (newObject Widget) result
    return result'

-- function gtk_icon_size_from_name
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_size_from_name" gtk_icon_size_from_name :: 
    CString ->                              -- name : TBasicType TUTF8
    IO Int32

{-# DEPRECATED iconSizeFromName ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSizeFromName ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m Int32
iconSizeFromName name = liftIO $ do
    name' <- textToCString name
    result <- gtk_icon_size_from_name name'
    freeMem name'
    return result

-- function gtk_icon_size_get_name
-- Args : [Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_size_get_name" gtk_icon_size_get_name :: 
    Int32 ->                                -- size : TBasicType TInt32
    IO CString

{-# DEPRECATED iconSizeGetName ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSizeGetName ::
    (MonadIO m) =>
    Int32 ->                                -- size
    m T.Text
iconSizeGetName size = liftIO $ do
    result <- gtk_icon_size_get_name size
    checkUnexpectedReturnNULL "gtk_icon_size_get_name" result
    result' <- cstringToText result
    return result'

-- function gtk_icon_size_lookup
-- Args : [Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_size_lookup" gtk_icon_size_lookup :: 
    Int32 ->                                -- size : TBasicType TInt32
    Ptr Int32 ->                            -- width : TBasicType TInt32
    Ptr Int32 ->                            -- height : TBasicType TInt32
    IO CInt


iconSizeLookup ::
    (MonadIO m) =>
    Int32 ->                                -- size
    m (Bool,Int32,Int32)
iconSizeLookup size = liftIO $ do
    width <- allocMem :: IO (Ptr Int32)
    height <- allocMem :: IO (Ptr Int32)
    result <- gtk_icon_size_lookup size width height
    let result' = (/= 0) result
    width' <- peek width
    height' <- peek height
    freeMem width
    freeMem height
    return (result', width', height')

-- function gtk_icon_size_lookup_for_settings
-- Args : [Arg {argName = "settings", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "settings", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_size_lookup_for_settings" gtk_icon_size_lookup_for_settings :: 
    Ptr Settings ->                         -- settings : TInterface "Gtk" "Settings"
    Int32 ->                                -- size : TBasicType TInt32
    Ptr Int32 ->                            -- width : TBasicType TInt32
    Ptr Int32 ->                            -- height : TBasicType TInt32
    IO CInt

{-# DEPRECATED iconSizeLookupForSettings ["(Since version 3.10)","Use gtk_icon_size_lookup() instead."]#-}
iconSizeLookupForSettings ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- settings
    Int32 ->                                -- size
    m (Bool,Int32,Int32)
iconSizeLookupForSettings settings size = liftIO $ do
    let settings' = unsafeManagedPtrCastPtr settings
    width <- allocMem :: IO (Ptr Int32)
    height <- allocMem :: IO (Ptr Int32)
    result <- gtk_icon_size_lookup_for_settings settings' size width height
    let result' = (/= 0) result
    width' <- peek width
    height' <- peek height
    touchManagedPtr settings
    freeMem width
    freeMem height
    return (result', width', height')

-- function gtk_icon_size_register
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_size_register" gtk_icon_size_register :: 
    CString ->                              -- name : TBasicType TUTF8
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO Int32

{-# DEPRECATED iconSizeRegister ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSizeRegister ::
    (MonadIO m) =>
    T.Text ->                               -- name
    Int32 ->                                -- width
    Int32 ->                                -- height
    m Int32
iconSizeRegister name width height = liftIO $ do
    name' <- textToCString name
    result <- gtk_icon_size_register name' width height
    freeMem name'
    return result

-- function gtk_icon_size_register_alias
-- Args : [Arg {argName = "alias", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "alias", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_size_register_alias" gtk_icon_size_register_alias :: 
    CString ->                              -- alias : TBasicType TUTF8
    Int32 ->                                -- target : TBasicType TInt32
    IO ()

{-# DEPRECATED iconSizeRegisterAlias ["(Since version 3.10)","Use #GtkIconTheme instead."]#-}
iconSizeRegisterAlias ::
    (MonadIO m) =>
    T.Text ->                               -- alias
    Int32 ->                                -- target
    m ()
iconSizeRegisterAlias alias target = liftIO $ do
    alias' <- textToCString alias
    gtk_icon_size_register_alias alias' target
    freeMem alias'
    return ()

-- function gtk_icon_theme_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_icon_theme_error_quark" gtk_icon_theme_error_quark :: 
    IO Word32


iconThemeErrorQuark ::
    (MonadIO m) =>
    m Word32
iconThemeErrorQuark  = liftIO $ do
    result <- gtk_icon_theme_error_quark
    return result

-- function gtk_init
-- Args : [Arg {argName = "argc", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "argv", argType = TCArray False (-1) 0 (TBasicType TUTF8), direction = DirectionInout, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "argc", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "argv", argType = TCArray False (-1) 0 (TBasicType TUTF8), direction = DirectionInout, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_init" gtk_init :: 
    Ptr Int32 ->                            -- argc : TBasicType TInt32
    Ptr (Ptr CString) ->                    -- argv : TCArray False (-1) 0 (TBasicType TUTF8)
    IO ()


init ::
    (MonadIO m) =>
    Maybe ([T.Text]) ->                     -- argv
    m ((Maybe [T.Text]))
init argv = liftIO $ do
    let argc = case argv of
            Nothing -> 0
            Just jArgv -> fromIntegral $ length jArgv
    argc' <- allocMem :: IO (Ptr Int32)
    poke argc' argc
    maybeArgv <- case argv of
        Nothing -> return nullPtr
        Just jArgv -> do
            jArgv' <- packUTF8CArray jArgv
            return jArgv'
    maybeArgv' <- allocMem :: IO (Ptr (Ptr CString))
    poke maybeArgv' maybeArgv
    gtk_init argc' maybeArgv'
    argc'' <- peek argc'
    maybeArgv'' <- peek maybeArgv'
    maybeMaybeArgv'' <- convertIfNonNull maybeArgv'' $ \maybeArgv''' -> do
        maybeArgv'''' <- (unpackUTF8CArrayWithLength argc'') maybeArgv'''
        (mapCArrayWithLength argc'') freeMem maybeArgv'''
        freeMem maybeArgv'''
        return maybeArgv''''
    freeMem argc'
    freeMem maybeArgv'
    return maybeMaybeArgv''

-- function gtk_init_check
-- Args : [Arg {argName = "argc", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "argv", argType = TCArray False (-1) 0 (TBasicType TUTF8), direction = DirectionInout, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "argc", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "argv", argType = TCArray False (-1) 0 (TBasicType TUTF8), direction = DirectionInout, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_init_check" gtk_init_check :: 
    Ptr Int32 ->                            -- argc : TBasicType TInt32
    Ptr (Ptr CString) ->                    -- argv : TCArray False (-1) 0 (TBasicType TUTF8)
    IO CInt


initCheck ::
    (MonadIO m) =>
    Maybe ([T.Text]) ->                     -- argv
    m (Bool,(Maybe [T.Text]))
initCheck argv = liftIO $ do
    let argc = case argv of
            Nothing -> 0
            Just jArgv -> fromIntegral $ length jArgv
    argc' <- allocMem :: IO (Ptr Int32)
    poke argc' argc
    maybeArgv <- case argv of
        Nothing -> return nullPtr
        Just jArgv -> do
            jArgv' <- packUTF8CArray jArgv
            return jArgv'
    maybeArgv' <- allocMem :: IO (Ptr (Ptr CString))
    poke maybeArgv' maybeArgv
    result <- gtk_init_check argc' maybeArgv'
    argc'' <- peek argc'
    let result' = (/= 0) result
    maybeArgv'' <- peek maybeArgv'
    maybeMaybeArgv'' <- convertIfNonNull maybeArgv'' $ \maybeArgv''' -> do
        maybeArgv'''' <- (unpackUTF8CArrayWithLength argc'') maybeArgv'''
        (mapCArrayWithLength argc'') freeMem maybeArgv'''
        freeMem maybeArgv'''
        return maybeArgv''''
    freeMem argc'
    freeMem maybeArgv'
    return (result', maybeMaybeArgv'')

-- function gtk_init_with_args
-- Args : [Arg {argName = "argc", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "argv", argType = TCArray False (-1) 0 (TBasicType TUTF8), direction = DirectionInout, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "parameter_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "entries", argType = TCArray True (-1) (-1) (TInterface "GLib" "OptionEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "translation_domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "argc", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "argv", argType = TCArray False (-1) 0 (TBasicType TUTF8), direction = DirectionInout, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "parameter_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "entries", argType = TCArray True (-1) (-1) (TInterface "GLib" "OptionEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "translation_domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_init_with_args" gtk_init_with_args :: 
    Ptr Int32 ->                            -- argc : TBasicType TInt32
    Ptr (Ptr CString) ->                    -- argv : TCArray False (-1) 0 (TBasicType TUTF8)
    CString ->                              -- parameter_string : TBasicType TUTF8
    Ptr (Ptr GLib.OptionEntry) ->           -- entries : TCArray True (-1) (-1) (TInterface "GLib" "OptionEntry")
    CString ->                              -- translation_domain : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt


initWithArgs ::
    (MonadIO m) =>
    Maybe ([T.Text]) ->                     -- argv
    Maybe (T.Text) ->                       -- parameter_string
    [GLib.OptionEntry] ->                   -- entries
    Maybe (T.Text) ->                       -- translation_domain
    m ((Maybe [T.Text]))
initWithArgs argv parameter_string entries translation_domain = liftIO $ do
    let argc = case argv of
            Nothing -> 0
            Just jArgv -> fromIntegral $ length jArgv
    argc' <- allocMem :: IO (Ptr Int32)
    poke argc' argc
    maybeArgv <- case argv of
        Nothing -> return nullPtr
        Just jArgv -> do
            jArgv' <- packUTF8CArray jArgv
            return jArgv'
    maybeArgv' <- allocMem :: IO (Ptr (Ptr CString))
    poke maybeArgv' maybeArgv
    maybeParameter_string <- case parameter_string of
        Nothing -> return nullPtr
        Just jParameter_string -> do
            jParameter_string' <- textToCString jParameter_string
            return jParameter_string'
    let entries' = map unsafeManagedPtrGetPtr entries
    entries'' <- packZeroTerminatedPtrArray entries'
    maybeTranslation_domain <- case translation_domain of
        Nothing -> return nullPtr
        Just jTranslation_domain -> do
            jTranslation_domain' <- textToCString jTranslation_domain
            return jTranslation_domain'
    onException (do
        _ <- propagateGError $ gtk_init_with_args argc' maybeArgv' maybeParameter_string entries'' maybeTranslation_domain
        argc'' <- peek argc'
        maybeArgv'' <- peek maybeArgv'
        maybeMaybeArgv'' <- convertIfNonNull maybeArgv'' $ \maybeArgv''' -> do
            maybeArgv'''' <- (unpackUTF8CArrayWithLength argc'') maybeArgv'''
            (mapCArrayWithLength argc'') freeMem maybeArgv'''
            freeMem maybeArgv'''
            return maybeArgv''''
        mapM_ touchManagedPtr entries
        freeMem argc'
        freeMem maybeArgv'
        freeMem maybeParameter_string
        freeMem entries''
        freeMem maybeTranslation_domain
        return maybeMaybeArgv''
     ) (do
        freeMem argc'
        freeMem maybeArgv'
        freeMem maybeParameter_string
        freeMem entries''
        freeMem maybeTranslation_domain
     )

-- function gtk_key_snooper_remove
-- Args : [Arg {argName = "snooper_handler_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "snooper_handler_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_key_snooper_remove" gtk_key_snooper_remove :: 
    Word32 ->                               -- snooper_handler_id : TBasicType TUInt32
    IO ()

{-# DEPRECATED keySnooperRemove ["(Since version 3.4)","Key snooping should not be done. Events should","    be handled by widgets."]#-}
keySnooperRemove ::
    (MonadIO m) =>
    Word32 ->                               -- snooper_handler_id
    m ()
keySnooperRemove snooper_handler_id = liftIO $ do
    gtk_key_snooper_remove snooper_handler_id
    return ()

-- function gtk_main
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_main" gtk_main :: 
    IO ()


main ::
    (MonadIO m) =>
    m ()
main  = liftIO $ do
    gtk_main
    return ()

-- function gtk_main_do_event
-- Args : [Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_main_do_event" gtk_main_do_event :: 
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    IO ()


mainDoEvent ::
    (MonadIO m) =>
    Gdk.Event ->                            -- event
    m ()
mainDoEvent event = liftIO $ do
    let event' = unsafeManagedPtrGetPtr event
    gtk_main_do_event event'
    touchManagedPtr event
    return ()

-- function gtk_main_iteration
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_main_iteration" gtk_main_iteration :: 
    IO CInt


mainIteration ::
    (MonadIO m) =>
    m Bool
mainIteration  = liftIO $ do
    result <- gtk_main_iteration
    let result' = (/= 0) result
    return result'

-- function gtk_main_iteration_do
-- Args : [Arg {argName = "blocking", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "blocking", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_main_iteration_do" gtk_main_iteration_do :: 
    CInt ->                                 -- blocking : TBasicType TBoolean
    IO CInt


mainIterationDo ::
    (MonadIO m) =>
    Bool ->                                 -- blocking
    m Bool
mainIterationDo blocking = liftIO $ do
    let blocking' = (fromIntegral . fromEnum) blocking
    result <- gtk_main_iteration_do blocking'
    let result' = (/= 0) result
    return result'

-- function gtk_main_level
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_main_level" gtk_main_level :: 
    IO Word32


mainLevel ::
    (MonadIO m) =>
    m Word32
mainLevel  = liftIO $ do
    result <- gtk_main_level
    return result

-- function gtk_main_quit
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_main_quit" gtk_main_quit :: 
    IO ()


mainQuit ::
    (MonadIO m) =>
    m ()
mainQuit  = liftIO $ do
    gtk_main_quit
    return ()

-- function gtk_paint_arrow
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "arrow_type", argType = TInterface "Gtk" "ArrowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fill", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "arrow_type", argType = TInterface "Gtk" "ArrowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fill", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_arrow" gtk_paint_arrow :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    CUInt ->                                -- arrow_type : TInterface "Gtk" "ArrowType"
    CInt ->                                 -- fill : TBasicType TBoolean
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED paintArrow ["(Since version 3.0)","Use gtk_render_arrow() instead"]#-}
paintArrow ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    ArrowType ->                            -- arrow_type
    Bool ->                                 -- fill
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
paintArrow style cr state_type shadow_type widget detail arrow_type fill x y width height = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    let arrow_type' = (fromIntegral . fromEnum) arrow_type
    let fill' = (fromIntegral . fromEnum) fill
    gtk_paint_arrow style' cr' state_type' shadow_type' maybeWidget maybeDetail arrow_type' fill' x y width height
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_box
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_box" gtk_paint_box :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED paintBox ["(Since version 3.0)","Use gtk_render_frame() and gtk_render_background() instead"]#-}
paintBox ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
paintBox style cr state_type shadow_type widget detail x y width height = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    gtk_paint_box style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_box_gap
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_box_gap" gtk_paint_box_gap :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    CUInt ->                                -- gap_side : TInterface "Gtk" "PositionType"
    Int32 ->                                -- gap_x : TBasicType TInt32
    Int32 ->                                -- gap_width : TBasicType TInt32
    IO ()

{-# DEPRECATED paintBoxGap ["(Since version 3.0)","Use gtk_render_frame_gap() instead"]#-}
paintBoxGap ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    PositionType ->                         -- gap_side
    Int32 ->                                -- gap_x
    Int32 ->                                -- gap_width
    m ()
paintBoxGap style cr state_type shadow_type widget detail x y width height gap_side gap_x gap_width = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    let gap_side' = (fromIntegral . fromEnum) gap_side
    gtk_paint_box_gap style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height gap_side' gap_x gap_width
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_check
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_check" gtk_paint_check :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED paintCheck ["(Since version 3.0)","Use gtk_render_check() instead"]#-}
paintCheck ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
paintCheck style cr state_type shadow_type widget detail x y width height = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    gtk_paint_check style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_diamond
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_diamond" gtk_paint_diamond :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED paintDiamond ["(Since version 3.0)","Use cairo instead"]#-}
paintDiamond ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
paintDiamond style cr state_type shadow_type widget detail x y width height = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    gtk_paint_diamond style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_expander
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expander_style", argType = TInterface "Gtk" "ExpanderStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expander_style", argType = TInterface "Gtk" "ExpanderStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_expander" gtk_paint_expander :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    CUInt ->                                -- expander_style : TInterface "Gtk" "ExpanderStyle"
    IO ()

{-# DEPRECATED paintExpander ["(Since version 3.0)","Use gtk_render_expander() instead"]#-}
paintExpander ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    ExpanderStyle ->                        -- expander_style
    m ()
paintExpander style cr state_type widget detail x y expander_style = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    let expander_style' = (fromIntegral . fromEnum) expander_style
    gtk_paint_expander style' cr' state_type' maybeWidget maybeDetail x y expander_style'
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_extension
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_extension" gtk_paint_extension :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    CUInt ->                                -- gap_side : TInterface "Gtk" "PositionType"
    IO ()

{-# DEPRECATED paintExtension ["(Since version 3.0)","Use gtk_render_extension() instead"]#-}
paintExtension ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    PositionType ->                         -- gap_side
    m ()
paintExtension style cr state_type shadow_type widget detail x y width height gap_side = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    let gap_side' = (fromIntegral . fromEnum) gap_side
    gtk_paint_extension style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height gap_side'
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_flat_box
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_flat_box" gtk_paint_flat_box :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED paintFlatBox ["(Since version 3.0)","Use gtk_render_frame() and gtk_render_background() instead"]#-}
paintFlatBox ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
paintFlatBox style cr state_type shadow_type widget detail x y width height = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    gtk_paint_flat_box style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_focus
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_focus" gtk_paint_focus :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED paintFocus ["(Since version 3.0)","Use gtk_render_focus() instead"]#-}
paintFocus ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
paintFocus style cr state_type widget detail x y width height = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    gtk_paint_focus style' cr' state_type' maybeWidget maybeDetail x y width height
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_handle
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_handle" gtk_paint_handle :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    IO ()

{-# DEPRECATED paintHandle ["(Since version 3.0)","Use gtk_render_handle() instead"]#-}
paintHandle ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    Orientation ->                          -- orientation
    m ()
paintHandle style cr state_type shadow_type widget detail x y width height orientation = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    let orientation' = (fromIntegral . fromEnum) orientation
    gtk_paint_handle style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height orientation'
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_hline
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x1", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x2", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x1", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x2", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_hline" gtk_paint_hline :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x1 : TBasicType TInt32
    Int32 ->                                -- x2 : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    IO ()

{-# DEPRECATED paintHline ["(Since version 3.0)","Use gtk_render_line() instead"]#-}
paintHline ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x1
    Int32 ->                                -- x2
    Int32 ->                                -- y
    m ()
paintHline style cr state_type widget detail x1 x2 y = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    gtk_paint_hline style' cr' state_type' maybeWidget maybeDetail x1 x2 y
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_layout
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_text", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "use_text", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_layout" gtk_paint_layout :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CInt ->                                 -- use_text : TBasicType TBoolean
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Ptr Pango.Layout ->                     -- layout : TInterface "Pango" "Layout"
    IO ()

{-# DEPRECATED paintLayout ["(Since version 3.0)","Use gtk_render_layout() instead"]#-}
paintLayout ::
    (MonadIO m, StyleK a, WidgetK b, Pango.LayoutK c) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    Bool ->                                 -- use_text
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    c ->                                    -- layout
    m ()
paintLayout style cr state_type use_text widget detail x y layout = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let use_text' = (fromIntegral . fromEnum) use_text
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    let layout' = unsafeManagedPtrCastPtr layout
    gtk_paint_layout style' cr' state_type' use_text' maybeWidget maybeDetail x y layout'
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    touchManagedPtr layout
    freeMem maybeDetail
    return ()

-- function gtk_paint_option
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_option" gtk_paint_option :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED paintOption ["(Since version 3.0)","Use gtk_render_option() instead"]#-}
paintOption ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
paintOption style cr state_type shadow_type widget detail x y width height = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    gtk_paint_option style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_resize_grip
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "edge", argType = TInterface "Gdk" "WindowEdge", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "edge", argType = TInterface "Gdk" "WindowEdge", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_resize_grip" gtk_paint_resize_grip :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    CUInt ->                                -- edge : TInterface "Gdk" "WindowEdge"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED paintResizeGrip ["(Since version 3.0)","Use gtk_render_handle() instead"]#-}
paintResizeGrip ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Gdk.WindowEdge ->                       -- edge
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
paintResizeGrip style cr state_type widget detail edge x y width height = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    let edge' = (fromIntegral . fromEnum) edge
    gtk_paint_resize_grip style' cr' state_type' maybeWidget maybeDetail edge' x y width height
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_shadow
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_shadow" gtk_paint_shadow :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED paintShadow ["(Since version 3.0)","Use gtk_render_frame() instead"]#-}
paintShadow ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
paintShadow style cr state_type shadow_type widget detail x y width height = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    gtk_paint_shadow style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_shadow_gap
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_shadow_gap" gtk_paint_shadow_gap :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    CUInt ->                                -- gap_side : TInterface "Gtk" "PositionType"
    Int32 ->                                -- gap_x : TBasicType TInt32
    Int32 ->                                -- gap_width : TBasicType TInt32
    IO ()

{-# DEPRECATED paintShadowGap ["(Since version 3.0)","Use gtk_render_frame_gap() instead"]#-}
paintShadowGap ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    PositionType ->                         -- gap_side
    Int32 ->                                -- gap_x
    Int32 ->                                -- gap_width
    m ()
paintShadowGap style cr state_type shadow_type widget detail x y width height gap_side gap_x gap_width = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    let gap_side' = (fromIntegral . fromEnum) gap_side
    gtk_paint_shadow_gap style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height gap_side' gap_x gap_width
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_slider
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_slider" gtk_paint_slider :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    IO ()

{-# DEPRECATED paintSlider ["(Since version 3.0)","Use gtk_render_slider() instead"]#-}
paintSlider ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    Orientation ->                          -- orientation
    m ()
paintSlider style cr state_type shadow_type widget detail x y width height orientation = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    let orientation' = (fromIntegral . fromEnum) orientation
    gtk_paint_slider style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height orientation'
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_spinner
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "step", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_spinner" gtk_paint_spinner :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Word32 ->                               -- step : TBasicType TUInt32
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED paintSpinner ["(Since version 3.0)","Use gtk_render_activity() instead"]#-}
paintSpinner ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Word32 ->                               -- step
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
paintSpinner style cr state_type widget detail step x y width height = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    gtk_paint_spinner style' cr' state_type' maybeWidget maybeDetail step x y width height
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_tab
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "shadow_type", argType = TInterface "Gtk" "ShadowType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_tab" gtk_paint_tab :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    CUInt ->                                -- shadow_type : TInterface "Gtk" "ShadowType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED paintTab ["(Since version 3.0)","Use cairo instead"]#-}
paintTab ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    ShadowType ->                           -- shadow_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
paintTab style cr state_type shadow_type widget detail x y width height = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    let shadow_type' = (fromIntegral . fromEnum) shadow_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    gtk_paint_tab style' cr' state_type' shadow_type' maybeWidget maybeDetail x y width height
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paint_vline
-- Args : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y1_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y2_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state_type", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "detail", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y1_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y2_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paint_vline" gtk_paint_vline :: 
    Ptr Style ->                            -- style : TInterface "Gtk" "Style"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CUInt ->                                -- state_type : TInterface "Gtk" "StateType"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- detail : TBasicType TUTF8
    Int32 ->                                -- y1_ : TBasicType TInt32
    Int32 ->                                -- y2_ : TBasicType TInt32
    Int32 ->                                -- x : TBasicType TInt32
    IO ()

{-# DEPRECATED paintVline ["(Since version 3.0)","Use gtk_render_line() instead"]#-}
paintVline ::
    (MonadIO m, StyleK a, WidgetK b) =>
    a ->                                    -- style
    Cairo.Context ->                        -- cr
    StateType ->                            -- state_type
    Maybe (b) ->                            -- widget
    Maybe (T.Text) ->                       -- detail
    Int32 ->                                -- y1_
    Int32 ->                                -- y2_
    Int32 ->                                -- x
    m ()
paintVline style cr state_type widget detail y1_ y2_ x = liftIO $ do
    let style' = unsafeManagedPtrCastPtr style
    let cr' = unsafeManagedPtrGetPtr cr
    let state_type' = (fromIntegral . fromEnum) state_type
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    maybeDetail <- case detail of
        Nothing -> return nullPtr
        Just jDetail -> do
            jDetail' <- textToCString jDetail
            return jDetail'
    gtk_paint_vline style' cr' state_type' maybeWidget maybeDetail y1_ y2_ x
    touchManagedPtr style
    touchManagedPtr cr
    whenJust widget touchManagedPtr
    freeMem maybeDetail
    return ()

-- function gtk_paper_size_get_default
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_get_default" gtk_paper_size_get_default :: 
    IO CString


paperSizeGetDefault ::
    (MonadIO m) =>
    m T.Text
paperSizeGetDefault  = liftIO $ do
    result <- gtk_paper_size_get_default
    checkUnexpectedReturnNULL "gtk_paper_size_get_default" result
    result' <- cstringToText result
    return result'

-- function gtk_paper_size_get_paper_sizes
-- Args : [Arg {argName = "include_custom", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "include_custom", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gtk" "PaperSize")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_paper_size_get_paper_sizes" gtk_paper_size_get_paper_sizes :: 
    CInt ->                                 -- include_custom : TBasicType TBoolean
    IO (Ptr (GList (Ptr PaperSize)))


paperSizeGetPaperSizes ::
    (MonadIO m) =>
    Bool ->                                 -- include_custom
    m [PaperSize]
paperSizeGetPaperSizes include_custom = liftIO $ do
    let include_custom' = (fromIntegral . fromEnum) include_custom
    result <- gtk_paper_size_get_paper_sizes include_custom'
    checkUnexpectedReturnNULL "gtk_paper_size_get_paper_sizes" result
    result' <- unpackGList result
    result'' <- mapM (wrapBoxed PaperSize) result'
    g_list_free result
    return result''

-- function gtk_parse_args
-- Args : [Arg {argName = "argc", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "argv", argType = TCArray False (-1) 0 (TBasicType TUTF8), direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "argc", argType = TBasicType TInt32, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "argv", argType = TCArray False (-1) 0 (TBasicType TUTF8), direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_parse_args" gtk_parse_args :: 
    Ptr Int32 ->                            -- argc : TBasicType TInt32
    Ptr (Ptr CString) ->                    -- argv : TCArray False (-1) 0 (TBasicType TUTF8)
    IO CInt


parseArgs ::
    (MonadIO m) =>
    [T.Text] ->                             -- argv
    m (Bool,[T.Text])
parseArgs argv = liftIO $ do
    let argc = fromIntegral $ length argv
    argc' <- allocMem :: IO (Ptr Int32)
    poke argc' argc
    argv' <- packUTF8CArray argv
    argv'' <- allocMem :: IO (Ptr (Ptr CString))
    poke argv'' argv'
    result <- gtk_parse_args argc' argv''
    argc'' <- peek argc'
    let result' = (/= 0) result
    argv''' <- peek argv''
    argv'''' <- (unpackUTF8CArrayWithLength argc'') argv'''
    (mapCArrayWithLength argc'') freeMem argv'''
    freeMem argv'''
    freeMem argc'
    freeMem argv''
    return (result', argv'''')

-- function gtk_print_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_error_quark" gtk_print_error_quark :: 
    IO Word32


printErrorQuark ::
    (MonadIO m) =>
    m Word32
printErrorQuark  = liftIO $ do
    result <- gtk_print_error_quark
    return result

-- function gtk_print_run_page_setup_dialog
-- Args : [Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_setup", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "settings", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_setup", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "settings", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PageSetup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_run_page_setup_dialog" gtk_print_run_page_setup_dialog :: 
    Ptr Window ->                           -- parent : TInterface "Gtk" "Window"
    Ptr PageSetup ->                        -- page_setup : TInterface "Gtk" "PageSetup"
    Ptr PrintSettings ->                    -- settings : TInterface "Gtk" "PrintSettings"
    IO (Ptr PageSetup)


printRunPageSetupDialog ::
    (MonadIO m, WindowK a, PageSetupK b, PrintSettingsK c) =>
    Maybe (a) ->                            -- parent
    Maybe (b) ->                            -- page_setup
    c ->                                    -- settings
    m PageSetup
printRunPageSetupDialog parent page_setup settings = liftIO $ do
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    maybePage_setup <- case page_setup of
        Nothing -> return nullPtr
        Just jPage_setup -> do
            let jPage_setup' = unsafeManagedPtrCastPtr jPage_setup
            return jPage_setup'
    let settings' = unsafeManagedPtrCastPtr settings
    result <- gtk_print_run_page_setup_dialog maybeParent maybePage_setup settings'
    checkUnexpectedReturnNULL "gtk_print_run_page_setup_dialog" result
    result' <- (wrapObject PageSetup) result
    whenJust parent touchManagedPtr
    whenJust page_setup touchManagedPtr
    touchManagedPtr settings
    return result'

-- function gtk_print_run_page_setup_dialog_async
-- Args : [Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_setup", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "settings", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "done_cb", argType = TInterface "Gtk" "PageSetupDoneFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_setup", argType = TInterface "Gtk" "PageSetup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "settings", argType = TInterface "Gtk" "PrintSettings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "done_cb", argType = TInterface "Gtk" "PageSetupDoneFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_print_run_page_setup_dialog_async" gtk_print_run_page_setup_dialog_async :: 
    Ptr Window ->                           -- parent : TInterface "Gtk" "Window"
    Ptr PageSetup ->                        -- page_setup : TInterface "Gtk" "PageSetup"
    Ptr PrintSettings ->                    -- settings : TInterface "Gtk" "PrintSettings"
    FunPtr PageSetupDoneFuncC ->            -- done_cb : TInterface "Gtk" "PageSetupDoneFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    IO ()


printRunPageSetupDialogAsync ::
    (MonadIO m, WindowK a, PageSetupK b, PrintSettingsK c) =>
    Maybe (a) ->                            -- parent
    Maybe (b) ->                            -- page_setup
    c ->                                    -- settings
    PageSetupDoneFunc ->                    -- done_cb
    m ()
printRunPageSetupDialogAsync parent page_setup settings done_cb = liftIO $ do
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    maybePage_setup <- case page_setup of
        Nothing -> return nullPtr
        Just jPage_setup -> do
            let jPage_setup' = unsafeManagedPtrCastPtr jPage_setup
            return jPage_setup'
    let settings' = unsafeManagedPtrCastPtr settings
    ptrdone_cb <- callocMem :: IO (Ptr (FunPtr PageSetupDoneFuncC))
    done_cb' <- mkPageSetupDoneFunc (pageSetupDoneFuncWrapper (Just ptrdone_cb) done_cb)
    poke ptrdone_cb done_cb'
    let data_ = nullPtr
    gtk_print_run_page_setup_dialog_async maybeParent maybePage_setup settings' done_cb' data_
    whenJust parent touchManagedPtr
    whenJust page_setup touchManagedPtr
    touchManagedPtr settings
    return ()

-- function gtk_propagate_event
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "event", argType = TInterface "Gdk" "Event", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_propagate_event" gtk_propagate_event :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Event ->                        -- event : TInterface "Gdk" "Event"
    IO ()


propagateEvent ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    Gdk.Event ->                            -- event
    m ()
propagateEvent widget event = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    let event' = unsafeManagedPtrGetPtr event
    gtk_propagate_event widget' event'
    touchManagedPtr widget
    touchManagedPtr event
    return ()

-- function gtk_rc_add_default_file
-- Args : [Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_add_default_file" gtk_rc_add_default_file :: 
    CString ->                              -- filename : TBasicType TFileName
    IO ()

{-# DEPRECATED rcAddDefaultFile ["(Since version 3.0)","Use #GtkStyleContext with a custom #GtkStyleProvider instead"]#-}
rcAddDefaultFile ::
    (MonadIO m) =>
    [Char] ->                               -- filename
    m ()
rcAddDefaultFile filename = liftIO $ do
    filename' <- stringToCString filename
    gtk_rc_add_default_file filename'
    freeMem filename'
    return ()

-- function gtk_rc_find_module_in_path
-- Args : [Arg {argName = "module_file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "module_file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFileName
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_find_module_in_path" gtk_rc_find_module_in_path :: 
    CString ->                              -- module_file : TBasicType TUTF8
    IO CString

{-# DEPRECATED rcFindModuleInPath ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcFindModuleInPath ::
    (MonadIO m) =>
    T.Text ->                               -- module_file
    m [Char]
rcFindModuleInPath module_file = liftIO $ do
    module_file' <- textToCString module_file
    result <- gtk_rc_find_module_in_path module_file'
    checkUnexpectedReturnNULL "gtk_rc_find_module_in_path" result
    result' <- cstringToString result
    freeMem result
    freeMem module_file'
    return result'

-- function gtk_rc_find_pixmap_in_path
-- Args : [Arg {argName = "settings", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixmap_file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "settings", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixmap_file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFileName
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_find_pixmap_in_path" gtk_rc_find_pixmap_in_path :: 
    Ptr Settings ->                         -- settings : TInterface "Gtk" "Settings"
    Ptr GLib.Scanner ->                     -- scanner : TInterface "GLib" "Scanner"
    CString ->                              -- pixmap_file : TBasicType TUTF8
    IO CString

{-# DEPRECATED rcFindPixmapInPath ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcFindPixmapInPath ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- settings
    GLib.Scanner ->                         -- scanner
    T.Text ->                               -- pixmap_file
    m [Char]
rcFindPixmapInPath settings scanner pixmap_file = liftIO $ do
    let settings' = unsafeManagedPtrCastPtr settings
    let scanner' = unsafeManagedPtrGetPtr scanner
    pixmap_file' <- textToCString pixmap_file
    result <- gtk_rc_find_pixmap_in_path settings' scanner' pixmap_file'
    checkUnexpectedReturnNULL "gtk_rc_find_pixmap_in_path" result
    result' <- cstringToString result
    freeMem result
    touchManagedPtr settings
    touchManagedPtr scanner
    freeMem pixmap_file'
    return result'

-- function gtk_rc_get_default_files
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TCArray True (-1) (-1) (TBasicType TFileName)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_get_default_files" gtk_rc_get_default_files :: 
    IO (Ptr CString)

{-# DEPRECATED rcGetDefaultFiles ["(Since version 3.0)","Use #GtkStyleContext instead"]#-}
rcGetDefaultFiles ::
    (MonadIO m) =>
    m [[Char]]
rcGetDefaultFiles  = liftIO $ do
    result <- gtk_rc_get_default_files
    checkUnexpectedReturnNULL "gtk_rc_get_default_files" result
    result' <- unpackZeroTerminatedFileNameArray result
    return result'

-- function gtk_rc_get_im_module_file
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TFileName
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_get_im_module_file" gtk_rc_get_im_module_file :: 
    IO CString

{-# DEPRECATED rcGetImModuleFile ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcGetImModuleFile ::
    (MonadIO m) =>
    m [Char]
rcGetImModuleFile  = liftIO $ do
    result <- gtk_rc_get_im_module_file
    checkUnexpectedReturnNULL "gtk_rc_get_im_module_file" result
    result' <- cstringToString result
    freeMem result
    return result'

-- function gtk_rc_get_im_module_path
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TFileName
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_get_im_module_path" gtk_rc_get_im_module_path :: 
    IO CString

{-# DEPRECATED rcGetImModulePath ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcGetImModulePath ::
    (MonadIO m) =>
    m [Char]
rcGetImModulePath  = liftIO $ do
    result <- gtk_rc_get_im_module_path
    checkUnexpectedReturnNULL "gtk_rc_get_im_module_path" result
    result' <- cstringToString result
    freeMem result
    return result'

-- function gtk_rc_get_module_dir
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TFileName
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_get_module_dir" gtk_rc_get_module_dir :: 
    IO CString

{-# DEPRECATED rcGetModuleDir ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcGetModuleDir ::
    (MonadIO m) =>
    m [Char]
rcGetModuleDir  = liftIO $ do
    result <- gtk_rc_get_module_dir
    checkUnexpectedReturnNULL "gtk_rc_get_module_dir" result
    result' <- cstringToString result
    freeMem result
    return result'

-- function gtk_rc_get_style
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Style"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_get_style" gtk_rc_get_style :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO (Ptr Style)

{-# DEPRECATED rcGetStyle ["(Since version 3.0)","Use #GtkStyleContext instead"]#-}
rcGetStyle ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m Style
rcGetStyle widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_rc_get_style widget'
    checkUnexpectedReturnNULL "gtk_rc_get_style" result
    result' <- (newObject Style) result
    touchManagedPtr widget
    return result'

-- function gtk_rc_get_style_by_paths
-- Args : [Arg {argName = "settings", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "settings", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "class_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Style"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_get_style_by_paths" gtk_rc_get_style_by_paths :: 
    Ptr Settings ->                         -- settings : TInterface "Gtk" "Settings"
    CString ->                              -- widget_path : TBasicType TUTF8
    CString ->                              -- class_path : TBasicType TUTF8
    CGType ->                               -- type : TBasicType TGType
    IO (Ptr Style)

{-# DEPRECATED rcGetStyleByPaths ["(Since version 3.0)","Use #GtkStyleContext instead"]#-}
rcGetStyleByPaths ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- settings
    Maybe (T.Text) ->                       -- widget_path
    Maybe (T.Text) ->                       -- class_path
    GType ->                                -- type
    m Style
rcGetStyleByPaths settings widget_path class_path type_ = liftIO $ do
    let settings' = unsafeManagedPtrCastPtr settings
    maybeWidget_path <- case widget_path of
        Nothing -> return nullPtr
        Just jWidget_path -> do
            jWidget_path' <- textToCString jWidget_path
            return jWidget_path'
    maybeClass_path <- case class_path of
        Nothing -> return nullPtr
        Just jClass_path -> do
            jClass_path' <- textToCString jClass_path
            return jClass_path'
    let type_' = gtypeToCGType type_
    result <- gtk_rc_get_style_by_paths settings' maybeWidget_path maybeClass_path type_'
    checkUnexpectedReturnNULL "gtk_rc_get_style_by_paths" result
    result' <- (newObject Style) result
    touchManagedPtr settings
    freeMem maybeWidget_path
    freeMem maybeClass_path
    return result'

-- function gtk_rc_get_theme_dir
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_get_theme_dir" gtk_rc_get_theme_dir :: 
    IO CString

{-# DEPRECATED rcGetThemeDir ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcGetThemeDir ::
    (MonadIO m) =>
    m T.Text
rcGetThemeDir  = liftIO $ do
    result <- gtk_rc_get_theme_dir
    checkUnexpectedReturnNULL "gtk_rc_get_theme_dir" result
    result' <- cstringToText result
    freeMem result
    return result'

-- function gtk_rc_parse
-- Args : [Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_parse" gtk_rc_parse :: 
    CString ->                              -- filename : TBasicType TUTF8
    IO ()

{-# DEPRECATED rcParse ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcParse ::
    (MonadIO m) =>
    T.Text ->                               -- filename
    m ()
rcParse filename = liftIO $ do
    filename' <- textToCString filename
    gtk_rc_parse filename'
    freeMem filename'
    return ()

-- function gtk_rc_parse_color
-- Args : [Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_parse_color" gtk_rc_parse_color :: 
    Ptr GLib.Scanner ->                     -- scanner : TInterface "GLib" "Scanner"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO Word32

{-# DEPRECATED rcParseColor ["(Since version 3.0)","Use #GtkCssProvider instead"]#-}
rcParseColor ::
    (MonadIO m) =>
    GLib.Scanner ->                         -- scanner
    m (Word32,Gdk.Color)
rcParseColor scanner = liftIO $ do
    let scanner' = unsafeManagedPtrGetPtr scanner
    color <- callocBoxedBytes 12 :: IO (Ptr Gdk.Color)
    result <- gtk_rc_parse_color scanner' color
    color' <- (wrapBoxed Gdk.Color) color
    touchManagedPtr scanner
    return (result, color')

-- function gtk_rc_parse_color_full
-- Args : [Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "RcStyle", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "Color", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "RcStyle", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_parse_color_full" gtk_rc_parse_color_full :: 
    Ptr GLib.Scanner ->                     -- scanner : TInterface "GLib" "Scanner"
    Ptr RcStyle ->                          -- style : TInterface "Gtk" "RcStyle"
    Ptr Gdk.Color ->                        -- color : TInterface "Gdk" "Color"
    IO Word32

{-# DEPRECATED rcParseColorFull ["(Since version 3.0)","Use #GtkCssProvider instead"]#-}
rcParseColorFull ::
    (MonadIO m, RcStyleK a) =>
    GLib.Scanner ->                         -- scanner
    Maybe (a) ->                            -- style
    m (Word32,Gdk.Color)
rcParseColorFull scanner style = liftIO $ do
    let scanner' = unsafeManagedPtrGetPtr scanner
    maybeStyle <- case style of
        Nothing -> return nullPtr
        Just jStyle -> do
            let jStyle' = unsafeManagedPtrCastPtr jStyle
            return jStyle'
    color <- callocBoxedBytes 12 :: IO (Ptr Gdk.Color)
    result <- gtk_rc_parse_color_full scanner' maybeStyle color
    color' <- (wrapBoxed Gdk.Color) color
    touchManagedPtr scanner
    whenJust style touchManagedPtr
    return (result, color')

-- function gtk_rc_parse_priority
-- Args : [Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TInterface "Gtk" "PathPriorityType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TInterface "Gtk" "PathPriorityType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_parse_priority" gtk_rc_parse_priority :: 
    Ptr GLib.Scanner ->                     -- scanner : TInterface "GLib" "Scanner"
    CUInt ->                                -- priority : TInterface "Gtk" "PathPriorityType"
    IO Word32

{-# DEPRECATED rcParsePriority ["(Since version 3.0)","Use #GtkCssProvider instead"]#-}
rcParsePriority ::
    (MonadIO m) =>
    GLib.Scanner ->                         -- scanner
    PathPriorityType ->                     -- priority
    m Word32
rcParsePriority scanner priority = liftIO $ do
    let scanner' = unsafeManagedPtrGetPtr scanner
    let priority' = (fromIntegral . fromEnum) priority
    result <- gtk_rc_parse_priority scanner' priority'
    touchManagedPtr scanner
    return result

-- function gtk_rc_parse_state
-- Args : [Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "scanner", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_parse_state" gtk_rc_parse_state :: 
    Ptr GLib.Scanner ->                     -- scanner : TInterface "GLib" "Scanner"
    Ptr CUInt ->                            -- state : TInterface "Gtk" "StateType"
    IO Word32

{-# DEPRECATED rcParseState ["(Since version 3.0)","Use #GtkCssProvider instead"]#-}
rcParseState ::
    (MonadIO m) =>
    GLib.Scanner ->                         -- scanner
    m (Word32,StateType)
rcParseState scanner = liftIO $ do
    let scanner' = unsafeManagedPtrGetPtr scanner
    state <- allocMem :: IO (Ptr CUInt)
    result <- gtk_rc_parse_state scanner' state
    state' <- peek state
    let state'' = (toEnum . fromIntegral) state'
    touchManagedPtr scanner
    freeMem state
    return (result, state'')

-- function gtk_rc_parse_string
-- Args : [Arg {argName = "rc_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "rc_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_parse_string" gtk_rc_parse_string :: 
    CString ->                              -- rc_string : TBasicType TUTF8
    IO ()

{-# DEPRECATED rcParseString ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcParseString ::
    (MonadIO m) =>
    T.Text ->                               -- rc_string
    m ()
rcParseString rc_string = liftIO $ do
    rc_string' <- textToCString rc_string
    gtk_rc_parse_string rc_string'
    freeMem rc_string'
    return ()

-- function gtk_rc_property_parse_border
-- Args : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gstring", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gstring", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_property_parse_border" gtk_rc_property_parse_border :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    Ptr GLib.String ->                      -- gstring : TInterface "GLib" "String"
    Ptr GValue ->                           -- property_value : TInterface "GObject" "Value"
    IO CInt


rcPropertyParseBorder ::
    (MonadIO m) =>
    GParamSpec ->                           -- pspec
    GLib.String ->                          -- gstring
    GValue ->                               -- property_value
    m Bool
rcPropertyParseBorder pspec gstring property_value = liftIO $ do
    let pspec' = unsafeManagedPtrGetPtr pspec
    let gstring' = unsafeManagedPtrGetPtr gstring
    let property_value' = unsafeManagedPtrGetPtr property_value
    result <- gtk_rc_property_parse_border pspec' gstring' property_value'
    let result' = (/= 0) result
    touchManagedPtr gstring
    touchManagedPtr property_value
    return result'

-- function gtk_rc_property_parse_color
-- Args : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gstring", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gstring", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_property_parse_color" gtk_rc_property_parse_color :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    Ptr GLib.String ->                      -- gstring : TInterface "GLib" "String"
    Ptr GValue ->                           -- property_value : TInterface "GObject" "Value"
    IO CInt


rcPropertyParseColor ::
    (MonadIO m) =>
    GParamSpec ->                           -- pspec
    GLib.String ->                          -- gstring
    GValue ->                               -- property_value
    m Bool
rcPropertyParseColor pspec gstring property_value = liftIO $ do
    let pspec' = unsafeManagedPtrGetPtr pspec
    let gstring' = unsafeManagedPtrGetPtr gstring
    let property_value' = unsafeManagedPtrGetPtr property_value
    result <- gtk_rc_property_parse_color pspec' gstring' property_value'
    let result' = (/= 0) result
    touchManagedPtr gstring
    touchManagedPtr property_value
    return result'

-- function gtk_rc_property_parse_enum
-- Args : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gstring", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gstring", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_property_parse_enum" gtk_rc_property_parse_enum :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    Ptr GLib.String ->                      -- gstring : TInterface "GLib" "String"
    Ptr GValue ->                           -- property_value : TInterface "GObject" "Value"
    IO CInt


rcPropertyParseEnum ::
    (MonadIO m) =>
    GParamSpec ->                           -- pspec
    GLib.String ->                          -- gstring
    GValue ->                               -- property_value
    m Bool
rcPropertyParseEnum pspec gstring property_value = liftIO $ do
    let pspec' = unsafeManagedPtrGetPtr pspec
    let gstring' = unsafeManagedPtrGetPtr gstring
    let property_value' = unsafeManagedPtrGetPtr property_value
    result <- gtk_rc_property_parse_enum pspec' gstring' property_value'
    let result' = (/= 0) result
    touchManagedPtr gstring
    touchManagedPtr property_value
    return result'

-- function gtk_rc_property_parse_flags
-- Args : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gstring", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gstring", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_property_parse_flags" gtk_rc_property_parse_flags :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    Ptr GLib.String ->                      -- gstring : TInterface "GLib" "String"
    Ptr GValue ->                           -- property_value : TInterface "GObject" "Value"
    IO CInt


rcPropertyParseFlags ::
    (MonadIO m) =>
    GParamSpec ->                           -- pspec
    GLib.String ->                          -- gstring
    GValue ->                               -- property_value
    m Bool
rcPropertyParseFlags pspec gstring property_value = liftIO $ do
    let pspec' = unsafeManagedPtrGetPtr pspec
    let gstring' = unsafeManagedPtrGetPtr gstring
    let property_value' = unsafeManagedPtrGetPtr property_value
    result <- gtk_rc_property_parse_flags pspec' gstring' property_value'
    let result' = (/= 0) result
    touchManagedPtr gstring
    touchManagedPtr property_value
    return result'

-- function gtk_rc_property_parse_requisition
-- Args : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gstring", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gstring", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_value", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_property_parse_requisition" gtk_rc_property_parse_requisition :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    Ptr GLib.String ->                      -- gstring : TInterface "GLib" "String"
    Ptr GValue ->                           -- property_value : TInterface "GObject" "Value"
    IO CInt


rcPropertyParseRequisition ::
    (MonadIO m) =>
    GParamSpec ->                           -- pspec
    GLib.String ->                          -- gstring
    GValue ->                               -- property_value
    m Bool
rcPropertyParseRequisition pspec gstring property_value = liftIO $ do
    let pspec' = unsafeManagedPtrGetPtr pspec
    let gstring' = unsafeManagedPtrGetPtr gstring
    let property_value' = unsafeManagedPtrGetPtr property_value
    result <- gtk_rc_property_parse_requisition pspec' gstring' property_value'
    let result' = (/= 0) result
    touchManagedPtr gstring
    touchManagedPtr property_value
    return result'

-- function gtk_rc_reparse_all
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_reparse_all" gtk_rc_reparse_all :: 
    IO CInt

{-# DEPRECATED rcReparseAll ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcReparseAll ::
    (MonadIO m) =>
    m Bool
rcReparseAll  = liftIO $ do
    result <- gtk_rc_reparse_all
    let result' = (/= 0) result
    return result'

-- function gtk_rc_reparse_all_for_settings
-- Args : [Arg {argName = "settings", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "force_load", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "settings", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "force_load", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_reparse_all_for_settings" gtk_rc_reparse_all_for_settings :: 
    Ptr Settings ->                         -- settings : TInterface "Gtk" "Settings"
    CInt ->                                 -- force_load : TBasicType TBoolean
    IO CInt

{-# DEPRECATED rcReparseAllForSettings ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcReparseAllForSettings ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- settings
    Bool ->                                 -- force_load
    m Bool
rcReparseAllForSettings settings force_load = liftIO $ do
    let settings' = unsafeManagedPtrCastPtr settings
    let force_load' = (fromIntegral . fromEnum) force_load
    result <- gtk_rc_reparse_all_for_settings settings' force_load'
    let result' = (/= 0) result
    touchManagedPtr settings
    return result'

-- function gtk_rc_reset_styles
-- Args : [Arg {argName = "settings", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "settings", argType = TInterface "Gtk" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_reset_styles" gtk_rc_reset_styles :: 
    Ptr Settings ->                         -- settings : TInterface "Gtk" "Settings"
    IO ()

{-# DEPRECATED rcResetStyles ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcResetStyles ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- settings
    m ()
rcResetStyles settings = liftIO $ do
    let settings' = unsafeManagedPtrCastPtr settings
    gtk_rc_reset_styles settings'
    touchManagedPtr settings
    return ()

-- function gtk_rc_set_default_files
-- Args : [Arg {argName = "filenames", argType = TCArray True (-1) (-1) (TBasicType TFileName), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "filenames", argType = TCArray True (-1) (-1) (TBasicType TFileName), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_set_default_files" gtk_rc_set_default_files :: 
    Ptr CString ->                          -- filenames : TCArray True (-1) (-1) (TBasicType TFileName)
    IO ()

{-# DEPRECATED rcSetDefaultFiles ["(Since version 3.0)","Use #GtkStyleContext with a custom #GtkStyleProvider instead"]#-}
rcSetDefaultFiles ::
    (MonadIO m) =>
    [[Char]] ->                             -- filenames
    m ()
rcSetDefaultFiles filenames = liftIO $ do
    filenames' <- packZeroTerminatedFileNameArray filenames
    gtk_rc_set_default_files filenames'
    mapZeroTerminatedCArray freeMem filenames'
    freeMem filenames'
    return ()

-- function gtk_recent_chooser_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_error_quark" gtk_recent_chooser_error_quark :: 
    IO Word32


recentChooserErrorQuark ::
    (MonadIO m) =>
    m Word32
recentChooserErrorQuark  = liftIO $ do
    result <- gtk_recent_chooser_error_quark
    return result

-- function gtk_recent_manager_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_manager_error_quark" gtk_recent_manager_error_quark :: 
    IO Word32


recentManagerErrorQuark ::
    (MonadIO m) =>
    m Word32
recentManagerErrorQuark  = liftIO $ do
    result <- gtk_recent_manager_error_quark
    return result

-- function gtk_render_activity
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_activity" gtk_render_activity :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    IO ()


renderActivity ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- width
    Double ->                               -- height
    m ()
renderActivity context cr x y width height = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let width' = realToFrac width
    let height' = realToFrac height
    gtk_render_activity context' cr' x' y' width' height'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_arrow
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "angle", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "angle", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_arrow" gtk_render_arrow :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- angle : TBasicType TDouble
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- size : TBasicType TDouble
    IO ()


renderArrow ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- angle
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- size
    m ()
renderArrow context cr angle x y size = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let angle' = realToFrac angle
    let x' = realToFrac x
    let y' = realToFrac y
    let size' = realToFrac size
    gtk_render_arrow context' cr' angle' x' y' size'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_background
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_background" gtk_render_background :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    IO ()


renderBackground ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- width
    Double ->                               -- height
    m ()
renderBackground context cr x y width height = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let width' = realToFrac width
    let height' = realToFrac height
    gtk_render_background context' cr' x' y' width' height'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_check
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_check" gtk_render_check :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    IO ()


renderCheck ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- width
    Double ->                               -- height
    m ()
renderCheck context cr x y width height = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let width' = realToFrac width
    let height' = realToFrac height
    gtk_render_check context' cr' x' y' width' height'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_expander
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_expander" gtk_render_expander :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    IO ()


renderExpander ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- width
    Double ->                               -- height
    m ()
renderExpander context cr x y width height = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let width' = realToFrac width
    let height' = realToFrac height
    gtk_render_expander context' cr' x' y' width' height'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_extension
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_extension" gtk_render_extension :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    CUInt ->                                -- gap_side : TInterface "Gtk" "PositionType"
    IO ()


renderExtension ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- width
    Double ->                               -- height
    PositionType ->                         -- gap_side
    m ()
renderExtension context cr x y width height gap_side = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let width' = realToFrac width
    let height' = realToFrac height
    let gap_side' = (fromIntegral . fromEnum) gap_side
    gtk_render_extension context' cr' x' y' width' height' gap_side'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_focus
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_focus" gtk_render_focus :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    IO ()


renderFocus ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- width
    Double ->                               -- height
    m ()
renderFocus context cr x y width height = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let width' = realToFrac width
    let height' = realToFrac height
    gtk_render_focus context' cr' x' y' width' height'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_frame
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_frame" gtk_render_frame :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    IO ()


renderFrame ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- width
    Double ->                               -- height
    m ()
renderFrame context cr x y width height = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let width' = realToFrac width
    let height' = realToFrac height
    gtk_render_frame context' cr' x' y' width' height'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_frame_gap
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xy0_gap", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xy1_gap", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "gap_side", argType = TInterface "Gtk" "PositionType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xy0_gap", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "xy1_gap", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_frame_gap" gtk_render_frame_gap :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    CUInt ->                                -- gap_side : TInterface "Gtk" "PositionType"
    CDouble ->                              -- xy0_gap : TBasicType TDouble
    CDouble ->                              -- xy1_gap : TBasicType TDouble
    IO ()


renderFrameGap ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- width
    Double ->                               -- height
    PositionType ->                         -- gap_side
    Double ->                               -- xy0_gap
    Double ->                               -- xy1_gap
    m ()
renderFrameGap context cr x y width height gap_side xy0_gap xy1_gap = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let width' = realToFrac width
    let height' = realToFrac height
    let gap_side' = (fromIntegral . fromEnum) gap_side
    let xy0_gap' = realToFrac xy0_gap
    let xy1_gap' = realToFrac xy1_gap
    gtk_render_frame_gap context' cr' x' y' width' height' gap_side' xy0_gap' xy1_gap'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_handle
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_handle" gtk_render_handle :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    IO ()


renderHandle ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- width
    Double ->                               -- height
    m ()
renderHandle context cr x y width height = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let width' = realToFrac width
    let height' = realToFrac height
    gtk_render_handle context' cr' x' y' width' height'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_icon
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_icon" gtk_render_icon :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    Ptr GdkPixbuf.Pixbuf ->                 -- pixbuf : TInterface "GdkPixbuf" "Pixbuf"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    IO ()


renderIcon ::
    (MonadIO m, StyleContextK a, GdkPixbuf.PixbufK b) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    b ->                                    -- pixbuf
    Double ->                               -- x
    Double ->                               -- y
    m ()
renderIcon context cr pixbuf x y = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let pixbuf' = unsafeManagedPtrCastPtr pixbuf
    let x' = realToFrac x
    let y' = realToFrac y
    gtk_render_icon context' cr' pixbuf' x' y'
    touchManagedPtr context
    touchManagedPtr cr
    touchManagedPtr pixbuf
    return ()

-- function gtk_render_icon_pixbuf
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "source", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "source", argType = TInterface "Gtk" "IconSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_icon_pixbuf" gtk_render_icon_pixbuf :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr IconSource ->                       -- source : TInterface "Gtk" "IconSource"
    Int32 ->                                -- size : TBasicType TInt32
    IO (Ptr GdkPixbuf.Pixbuf)

{-# DEPRECATED renderIconPixbuf ["(Since version 3.10)","Use gtk_icon_theme_load_icon() instead."]#-}
renderIconPixbuf ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    IconSource ->                           -- source
    Int32 ->                                -- size
    m GdkPixbuf.Pixbuf
renderIconPixbuf context source size = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let source' = unsafeManagedPtrGetPtr source
    result <- gtk_render_icon_pixbuf context' source' size
    checkUnexpectedReturnNULL "gtk_render_icon_pixbuf" result
    result' <- (wrapObject GdkPixbuf.Pixbuf) result
    touchManagedPtr context
    touchManagedPtr source
    return result'

-- function gtk_render_icon_surface
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "surface", argType = TInterface "cairo" "Surface", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "surface", argType = TInterface "cairo" "Surface", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_icon_surface" gtk_render_icon_surface :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    Ptr Cairo.Surface ->                    -- surface : TInterface "cairo" "Surface"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    IO ()


renderIconSurface ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Cairo.Surface ->                        -- surface
    Double ->                               -- x
    Double ->                               -- y
    m ()
renderIconSurface context cr surface x y = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let surface' = unsafeManagedPtrGetPtr surface
    let x' = realToFrac x
    let y' = realToFrac y
    gtk_render_icon_surface context' cr' surface' x' y'
    touchManagedPtr context
    touchManagedPtr cr
    touchManagedPtr surface
    return ()

-- function gtk_render_insertion_cursor
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Pango" "Direction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "direction", argType = TInterface "Pango" "Direction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_insertion_cursor" gtk_render_insertion_cursor :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    Ptr Pango.Layout ->                     -- layout : TInterface "Pango" "Layout"
    Int32 ->                                -- index : TBasicType TInt32
    CUInt ->                                -- direction : TInterface "Pango" "Direction"
    IO ()


renderInsertionCursor ::
    (MonadIO m, StyleContextK a, Pango.LayoutK b) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    b ->                                    -- layout
    Int32 ->                                -- index
    Pango.Direction ->                      -- direction
    m ()
renderInsertionCursor context cr x y layout index direction = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let layout' = unsafeManagedPtrCastPtr layout
    let direction' = (fromIntegral . fromEnum) direction
    gtk_render_insertion_cursor context' cr' x' y' layout' index direction'
    touchManagedPtr context
    touchManagedPtr cr
    touchManagedPtr layout
    return ()

-- function gtk_render_layout
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_layout" gtk_render_layout :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    Ptr Pango.Layout ->                     -- layout : TInterface "Pango" "Layout"
    IO ()


renderLayout ::
    (MonadIO m, StyleContextK a, Pango.LayoutK b) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    b ->                                    -- layout
    m ()
renderLayout context cr x y layout = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let layout' = unsafeManagedPtrCastPtr layout
    gtk_render_layout context' cr' x' y' layout'
    touchManagedPtr context
    touchManagedPtr cr
    touchManagedPtr layout
    return ()

-- function gtk_render_line
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y0", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y1", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_line" gtk_render_line :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x0 : TBasicType TDouble
    CDouble ->                              -- y0 : TBasicType TDouble
    CDouble ->                              -- x1 : TBasicType TDouble
    CDouble ->                              -- y1 : TBasicType TDouble
    IO ()


renderLine ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x0
    Double ->                               -- y0
    Double ->                               -- x1
    Double ->                               -- y1
    m ()
renderLine context cr x0 y0 x1 y1 = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x0' = realToFrac x0
    let y0' = realToFrac y0
    let x1' = realToFrac x1
    let y1' = realToFrac y1
    gtk_render_line context' cr' x0' y0' x1' y1'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_option
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_option" gtk_render_option :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    IO ()


renderOption ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- width
    Double ->                               -- height
    m ()
renderOption context cr x y width height = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let width' = realToFrac width
    let height' = realToFrac height
    gtk_render_option context' cr' x' y' width' height'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_render_slider
-- Args : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cr", argType = TInterface "cairo" "Context", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "orientation", argType = TInterface "Gtk" "Orientation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_render_slider" gtk_render_slider :: 
    Ptr StyleContext ->                     -- context : TInterface "Gtk" "StyleContext"
    Ptr Cairo.Context ->                    -- cr : TInterface "cairo" "Context"
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CDouble ->                              -- width : TBasicType TDouble
    CDouble ->                              -- height : TBasicType TDouble
    CUInt ->                                -- orientation : TInterface "Gtk" "Orientation"
    IO ()


renderSlider ::
    (MonadIO m, StyleContextK a) =>
    a ->                                    -- context
    Cairo.Context ->                        -- cr
    Double ->                               -- x
    Double ->                               -- y
    Double ->                               -- width
    Double ->                               -- height
    Orientation ->                          -- orientation
    m ()
renderSlider context cr x y width height orientation = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    let cr' = unsafeManagedPtrGetPtr cr
    let x' = realToFrac x
    let y' = realToFrac y
    let width' = realToFrac width
    let height' = realToFrac height
    let orientation' = (fromIntegral . fromEnum) orientation
    gtk_render_slider context' cr' x' y' width' height' orientation'
    touchManagedPtr context
    touchManagedPtr cr
    return ()

-- function gtk_rgb_to_hsv
-- Args : [Arg {argName = "r", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "g", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "b", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "h", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "s", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "v", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "r", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "g", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "b", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rgb_to_hsv" gtk_rgb_to_hsv :: 
    CDouble ->                              -- r : TBasicType TDouble
    CDouble ->                              -- g : TBasicType TDouble
    CDouble ->                              -- b : TBasicType TDouble
    Ptr CDouble ->                          -- h : TBasicType TDouble
    Ptr CDouble ->                          -- s : TBasicType TDouble
    Ptr CDouble ->                          -- v : TBasicType TDouble
    IO ()


rgbToHsv ::
    (MonadIO m) =>
    Double ->                               -- r
    Double ->                               -- g
    Double ->                               -- b
    m (Double,Double,Double)
rgbToHsv r g b = liftIO $ do
    let r' = realToFrac r
    let g' = realToFrac g
    let b' = realToFrac b
    h <- allocMem :: IO (Ptr CDouble)
    s <- allocMem :: IO (Ptr CDouble)
    v <- allocMem :: IO (Ptr CDouble)
    gtk_rgb_to_hsv r' g' b' h s v
    h' <- peek h
    let h'' = realToFrac h'
    s' <- peek s
    let s'' = realToFrac s'
    v' <- peek v
    let v'' = realToFrac v'
    freeMem h
    freeMem s
    freeMem v
    return (h'', s'', v'')

-- function gtk_selection_add_target
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_add_target" gtk_selection_add_target :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Atom ->                         -- selection : TInterface "Gdk" "Atom"
    Ptr Gdk.Atom ->                         -- target : TInterface "Gdk" "Atom"
    Word32 ->                               -- info : TBasicType TUInt32
    IO ()


selectionAddTarget ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    Gdk.Atom ->                             -- selection
    Gdk.Atom ->                             -- target
    Word32 ->                               -- info
    m ()
selectionAddTarget widget selection target info = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    let selection' = unsafeManagedPtrGetPtr selection
    let target' = unsafeManagedPtrGetPtr target
    gtk_selection_add_target widget' selection' target' info
    touchManagedPtr widget
    touchManagedPtr selection
    touchManagedPtr target
    return ()

-- function gtk_selection_add_targets
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ntargets", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "ntargets", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "targets", argType = TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_add_targets" gtk_selection_add_targets :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Atom ->                         -- selection : TInterface "Gdk" "Atom"
    Ptr TargetEntry ->                      -- targets : TCArray False (-1) 3 (TInterface "Gtk" "TargetEntry")
    Word32 ->                               -- ntargets : TBasicType TUInt32
    IO ()


selectionAddTargets ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    Gdk.Atom ->                             -- selection
    [TargetEntry] ->                        -- targets
    m ()
selectionAddTargets widget selection targets = liftIO $ do
    let ntargets = fromIntegral $ length targets
    let widget' = unsafeManagedPtrCastPtr widget
    let selection' = unsafeManagedPtrGetPtr selection
    let targets' = map unsafeManagedPtrGetPtr targets
    targets'' <- packBlockArray 16 targets'
    gtk_selection_add_targets widget' selection' targets'' ntargets
    touchManagedPtr widget
    touchManagedPtr selection
    mapM_ touchManagedPtr targets
    freeMem targets''
    return ()

-- function gtk_selection_clear_targets
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_clear_targets" gtk_selection_clear_targets :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Atom ->                         -- selection : TInterface "Gdk" "Atom"
    IO ()


selectionClearTargets ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    Gdk.Atom ->                             -- selection
    m ()
selectionClearTargets widget selection = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    let selection' = unsafeManagedPtrGetPtr selection
    gtk_selection_clear_targets widget' selection'
    touchManagedPtr widget
    touchManagedPtr selection
    return ()

-- function gtk_selection_convert
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "time_", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "time_", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_convert" gtk_selection_convert :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Atom ->                         -- selection : TInterface "Gdk" "Atom"
    Ptr Gdk.Atom ->                         -- target : TInterface "Gdk" "Atom"
    Word32 ->                               -- time_ : TBasicType TUInt32
    IO CInt


selectionConvert ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    Gdk.Atom ->                             -- selection
    Gdk.Atom ->                             -- target
    Word32 ->                               -- time_
    m Bool
selectionConvert widget selection target time_ = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    let selection' = unsafeManagedPtrGetPtr selection
    let target' = unsafeManagedPtrGetPtr target
    result <- gtk_selection_convert widget' selection' target' time_
    let result' = (/= 0) result
    touchManagedPtr widget
    touchManagedPtr selection
    touchManagedPtr target
    return result'

-- function gtk_selection_owner_set
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "time_", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "time_", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_owner_set" gtk_selection_owner_set :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Atom ->                         -- selection : TInterface "Gdk" "Atom"
    Word32 ->                               -- time_ : TBasicType TUInt32
    IO CInt


selectionOwnerSet ::
    (MonadIO m, WidgetK a) =>
    Maybe (a) ->                            -- widget
    Gdk.Atom ->                             -- selection
    Word32 ->                               -- time_
    m Bool
selectionOwnerSet widget selection time_ = liftIO $ do
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    let selection' = unsafeManagedPtrGetPtr selection
    result <- gtk_selection_owner_set maybeWidget selection' time_
    let result' = (/= 0) result
    whenJust widget touchManagedPtr
    touchManagedPtr selection
    return result'

-- function gtk_selection_owner_set_for_display
-- Args : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "time_", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection", argType = TInterface "Gdk" "Atom", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "time_", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_owner_set_for_display" gtk_selection_owner_set_for_display :: 
    Ptr Gdk.Display ->                      -- display : TInterface "Gdk" "Display"
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Ptr Gdk.Atom ->                         -- selection : TInterface "Gdk" "Atom"
    Word32 ->                               -- time_ : TBasicType TUInt32
    IO CInt


selectionOwnerSetForDisplay ::
    (MonadIO m, Gdk.DisplayK a, WidgetK b) =>
    a ->                                    -- display
    Maybe (b) ->                            -- widget
    Gdk.Atom ->                             -- selection
    Word32 ->                               -- time_
    m Bool
selectionOwnerSetForDisplay display widget selection time_ = liftIO $ do
    let display' = unsafeManagedPtrCastPtr display
    maybeWidget <- case widget of
        Nothing -> return nullPtr
        Just jWidget -> do
            let jWidget' = unsafeManagedPtrCastPtr jWidget
            return jWidget'
    let selection' = unsafeManagedPtrGetPtr selection
    result <- gtk_selection_owner_set_for_display display' maybeWidget selection' time_
    let result' = (/= 0) result
    touchManagedPtr display
    whenJust widget touchManagedPtr
    touchManagedPtr selection
    return result'

-- function gtk_selection_remove_all
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_selection_remove_all" gtk_selection_remove_all :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


selectionRemoveAll ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m ()
selectionRemoveAll widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_selection_remove_all widget'
    touchManagedPtr widget
    return ()

-- function gtk_set_debug_flags
-- Args : [Arg {argName = "flags", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "flags", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_set_debug_flags" gtk_set_debug_flags :: 
    Word32 ->                               -- flags : TBasicType TUInt32
    IO ()


setDebugFlags ::
    (MonadIO m) =>
    Word32 ->                               -- flags
    m ()
setDebugFlags flags = liftIO $ do
    gtk_set_debug_flags flags
    return ()

-- function gtk_show_uri
-- Args : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timestamp", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "screen", argType = TInterface "Gdk" "Screen", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "timestamp", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "gtk_show_uri" gtk_show_uri :: 
    Ptr Gdk.Screen ->                       -- screen : TInterface "Gdk" "Screen"
    CString ->                              -- uri : TBasicType TUTF8
    Word32 ->                               -- timestamp : TBasicType TUInt32
    Ptr (Ptr GError) ->                     -- error
    IO CInt


showUri ::
    (MonadIO m, Gdk.ScreenK a) =>
    Maybe (a) ->                            -- screen
    T.Text ->                               -- uri
    Word32 ->                               -- timestamp
    m ()
showUri screen uri timestamp = liftIO $ do
    maybeScreen <- case screen of
        Nothing -> return nullPtr
        Just jScreen -> do
            let jScreen' = unsafeManagedPtrCastPtr jScreen
            return jScreen'
    uri' <- textToCString uri
    onException (do
        _ <- propagateGError $ gtk_show_uri maybeScreen uri' timestamp
        whenJust screen touchManagedPtr
        freeMem uri'
        return ()
     ) (do
        freeMem uri'
     )

-- function gtk_stock_add
-- Args : [Arg {argName = "items", argType = TCArray False (-1) 1 (TInterface "Gtk" "StockItem"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_items", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_items", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "items", argType = TCArray False (-1) 1 (TInterface "Gtk" "StockItem"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stock_add" gtk_stock_add :: 
    Ptr StockItem ->                        -- items : TCArray False (-1) 1 (TInterface "Gtk" "StockItem")
    Word32 ->                               -- n_items : TBasicType TUInt32
    IO ()

{-# DEPRECATED stockAdd ["(Since version 3.10)"]#-}
stockAdd ::
    (MonadIO m) =>
    [StockItem] ->                          -- items
    m ()
stockAdd items = liftIO $ do
    let n_items = fromIntegral $ length items
    let items' = map unsafeManagedPtrGetPtr items
    items'' <- packBlockArray 32 items'
    gtk_stock_add items'' n_items
    mapM_ touchManagedPtr items
    freeMem items''
    return ()

-- function gtk_stock_add_static
-- Args : [Arg {argName = "items", argType = TCArray False (-1) 1 (TInterface "Gtk" "StockItem"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_items", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_items", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "items", argType = TCArray False (-1) 1 (TInterface "Gtk" "StockItem"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stock_add_static" gtk_stock_add_static :: 
    Ptr StockItem ->                        -- items : TCArray False (-1) 1 (TInterface "Gtk" "StockItem")
    Word32 ->                               -- n_items : TBasicType TUInt32
    IO ()

{-# DEPRECATED stockAddStatic ["(Since version 3.10)"]#-}
stockAddStatic ::
    (MonadIO m) =>
    [StockItem] ->                          -- items
    m ()
stockAddStatic items = liftIO $ do
    let n_items = fromIntegral $ length items
    let items' = map unsafeManagedPtrGetPtr items
    items'' <- packBlockArray 32 items'
    gtk_stock_add_static items'' n_items
    mapM_ touchManagedPtr items
    freeMem items''
    return ()

-- function gtk_stock_list_ids
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TGSList (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stock_list_ids" gtk_stock_list_ids :: 
    IO (Ptr (GSList CString))

{-# DEPRECATED stockListIds ["(Since version 3.10)"]#-}
stockListIds ::
    (MonadIO m) =>
    m [T.Text]
stockListIds  = liftIO $ do
    result <- gtk_stock_list_ids
    checkUnexpectedReturnNULL "gtk_stock_list_ids" result
    result' <- unpackGSList result
    result'' <- mapM cstringToText result'
    mapGSList freeMem result
    g_slist_free result
    return result''

-- function gtk_stock_lookup
-- Args : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "Gtk" "StockItem", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "stock_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stock_lookup" gtk_stock_lookup :: 
    CString ->                              -- stock_id : TBasicType TUTF8
    Ptr StockItem ->                        -- item : TInterface "Gtk" "StockItem"
    IO CInt

{-# DEPRECATED stockLookup ["(Since version 3.10)"]#-}
stockLookup ::
    (MonadIO m) =>
    T.Text ->                               -- stock_id
    m (Bool,StockItem)
stockLookup stock_id = liftIO $ do
    stock_id' <- textToCString stock_id
    item <- callocBytes 32 :: IO (Ptr StockItem)
    result <- gtk_stock_lookup stock_id' item
    let result' = (/= 0) result
    item' <- (wrapPtr StockItem) item
    freeMem stock_id'
    return (result', item')

-- function gtk_stock_set_translate_func
-- Args : [Arg {argName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TranslateFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TranslateFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_stock_set_translate_func" gtk_stock_set_translate_func :: 
    CString ->                              -- domain : TBasicType TUTF8
    FunPtr TranslateFuncC ->                -- func : TInterface "Gtk" "TranslateFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- notify : TInterface "GLib" "DestroyNotify"
    IO ()

{-# DEPRECATED stockSetTranslateFunc ["(Since version 3.10)"]#-}
stockSetTranslateFunc ::
    (MonadIO m) =>
    T.Text ->                               -- domain
    TranslateFunc ->                        -- func
    m ()
stockSetTranslateFunc domain func = liftIO $ do
    domain' <- textToCString domain
    func' <- mkTranslateFunc (translateFuncWrapper Nothing func)
    let data_ = castFunPtrToPtr func'
    let notify = safeFreeFunPtrPtr
    gtk_stock_set_translate_func domain' func' data_ notify
    freeMem domain'
    return ()

-- function gtk_target_table_free
-- Args : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gtk" "TargetEntry"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_table_free" gtk_target_table_free :: 
    Ptr TargetEntry ->                      -- targets : TCArray False (-1) 1 (TInterface "Gtk" "TargetEntry")
    Int32 ->                                -- n_targets : TBasicType TInt32
    IO ()


targetTableFree ::
    (MonadIO m) =>
    [TargetEntry] ->                        -- targets
    m ()
targetTableFree targets = liftIO $ do
    let n_targets = fromIntegral $ length targets
    let targets' = map unsafeManagedPtrGetPtr targets
    targets'' <- packBlockArray 16 targets'
    gtk_target_table_free targets'' n_targets
    mapM_ touchManagedPtr targets
    freeMem targets''
    return ()

-- function gtk_target_table_new_from_list
-- Args : [Arg {argName = "list", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "list", argType = TInterface "Gtk" "TargetList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 1 (TInterface "Gtk" "TargetEntry")
-- throws : False
-- Skip return : False

foreign import ccall "gtk_target_table_new_from_list" gtk_target_table_new_from_list :: 
    Ptr TargetList ->                       -- list : TInterface "Gtk" "TargetList"
    Ptr Int32 ->                            -- n_targets : TBasicType TInt32
    IO (Ptr TargetEntry)


targetTableNewFromList ::
    (MonadIO m) =>
    TargetList ->                           -- list
    m [TargetEntry]
targetTableNewFromList list = liftIO $ do
    let list' = unsafeManagedPtrGetPtr list
    n_targets <- allocMem :: IO (Ptr Int32)
    result <- gtk_target_table_new_from_list list' n_targets
    n_targets' <- peek n_targets
    checkUnexpectedReturnNULL "gtk_target_table_new_from_list" result
    result' <- (unpackBoxedArrayWithLength 16 n_targets') result
    result'' <- mapM (wrapBoxed TargetEntry) result'
    freeMem result
    touchManagedPtr list
    freeMem n_targets
    return result''

-- function gtk_targets_include_image
-- Args : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gdk" "Atom"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "writable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gdk" "Atom"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "writable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_targets_include_image" gtk_targets_include_image :: 
    Ptr (Ptr Gdk.Atom) ->                   -- targets : TCArray False (-1) 1 (TInterface "Gdk" "Atom")
    Int32 ->                                -- n_targets : TBasicType TInt32
    CInt ->                                 -- writable : TBasicType TBoolean
    IO CInt


targetsIncludeImage ::
    (MonadIO m) =>
    [Gdk.Atom] ->                           -- targets
    Bool ->                                 -- writable
    m Bool
targetsIncludeImage targets writable = liftIO $ do
    let n_targets = fromIntegral $ length targets
    let targets' = map unsafeManagedPtrGetPtr targets
    targets'' <- packPtrArray targets'
    let writable' = (fromIntegral . fromEnum) writable
    result <- gtk_targets_include_image targets'' n_targets writable'
    let result' = (/= 0) result
    mapM_ touchManagedPtr targets
    freeMem targets''
    return result'

-- function gtk_targets_include_rich_text
-- Args : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gdk" "Atom"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gdk" "Atom"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TInterface "Gtk" "TextBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_targets_include_rich_text" gtk_targets_include_rich_text :: 
    Ptr (Ptr Gdk.Atom) ->                   -- targets : TCArray False (-1) 1 (TInterface "Gdk" "Atom")
    Int32 ->                                -- n_targets : TBasicType TInt32
    Ptr TextBuffer ->                       -- buffer : TInterface "Gtk" "TextBuffer"
    IO CInt


targetsIncludeRichText ::
    (MonadIO m, TextBufferK a) =>
    [Gdk.Atom] ->                           -- targets
    a ->                                    -- buffer
    m Bool
targetsIncludeRichText targets buffer = liftIO $ do
    let n_targets = fromIntegral $ length targets
    let targets' = map unsafeManagedPtrGetPtr targets
    targets'' <- packPtrArray targets'
    let buffer' = unsafeManagedPtrCastPtr buffer
    result <- gtk_targets_include_rich_text targets'' n_targets buffer'
    let result' = (/= 0) result
    mapM_ touchManagedPtr targets
    touchManagedPtr buffer
    freeMem targets''
    return result'

-- function gtk_targets_include_text
-- Args : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gdk" "Atom"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gdk" "Atom"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_targets_include_text" gtk_targets_include_text :: 
    Ptr (Ptr Gdk.Atom) ->                   -- targets : TCArray False (-1) 1 (TInterface "Gdk" "Atom")
    Int32 ->                                -- n_targets : TBasicType TInt32
    IO CInt


targetsIncludeText ::
    (MonadIO m) =>
    [Gdk.Atom] ->                           -- targets
    m Bool
targetsIncludeText targets = liftIO $ do
    let n_targets = fromIntegral $ length targets
    let targets' = map unsafeManagedPtrGetPtr targets
    targets'' <- packPtrArray targets'
    result <- gtk_targets_include_text targets'' n_targets
    let result' = (/= 0) result
    mapM_ touchManagedPtr targets
    freeMem targets''
    return result'

-- function gtk_targets_include_uri
-- Args : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gdk" "Atom"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Gdk" "Atom"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_targets_include_uri" gtk_targets_include_uri :: 
    Ptr (Ptr Gdk.Atom) ->                   -- targets : TCArray False (-1) 1 (TInterface "Gdk" "Atom")
    Int32 ->                                -- n_targets : TBasicType TInt32
    IO CInt


targetsIncludeUri ::
    (MonadIO m) =>
    [Gdk.Atom] ->                           -- targets
    m Bool
targetsIncludeUri targets = liftIO $ do
    let n_targets = fromIntegral $ length targets
    let targets' = map unsafeManagedPtrGetPtr targets
    targets'' <- packPtrArray targets'
    result <- gtk_targets_include_uri targets'' n_targets
    let result' = (/= 0) result
    mapM_ touchManagedPtr targets
    freeMem targets''
    return result'

-- function gtk_test_create_simple_window
-- Args : [Arg {argName = "window_title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dialog_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "window_title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dialog_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_create_simple_window" gtk_test_create_simple_window :: 
    CString ->                              -- window_title : TBasicType TUTF8
    CString ->                              -- dialog_text : TBasicType TUTF8
    IO (Ptr Widget)


testCreateSimpleWindow ::
    (MonadIO m) =>
    T.Text ->                               -- window_title
    T.Text ->                               -- dialog_text
    m Widget
testCreateSimpleWindow window_title dialog_text = liftIO $ do
    window_title' <- textToCString window_title
    dialog_text' <- textToCString dialog_text
    result <- gtk_test_create_simple_window window_title' dialog_text'
    checkUnexpectedReturnNULL "gtk_test_create_simple_window" result
    result' <- (newObject Widget) result
    freeMem window_title'
    freeMem dialog_text'
    return result'

-- function gtk_test_find_label
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_find_label" gtk_test_find_label :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- label_pattern : TBasicType TUTF8
    IO (Ptr Widget)


testFindLabel ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    T.Text ->                               -- label_pattern
    m Widget
testFindLabel widget label_pattern = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    label_pattern' <- textToCString label_pattern
    result <- gtk_test_find_label widget' label_pattern'
    checkUnexpectedReturnNULL "gtk_test_find_label" result
    result' <- (newObject Widget) result
    touchManagedPtr widget
    freeMem label_pattern'
    return result'

-- function gtk_test_find_sibling
-- Args : [Arg {argName = "base_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "base_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_find_sibling" gtk_test_find_sibling :: 
    Ptr Widget ->                           -- base_widget : TInterface "Gtk" "Widget"
    CGType ->                               -- widget_type : TBasicType TGType
    IO (Ptr Widget)


testFindSibling ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- base_widget
    GType ->                                -- widget_type
    m Widget
testFindSibling base_widget widget_type = liftIO $ do
    let base_widget' = unsafeManagedPtrCastPtr base_widget
    let widget_type' = gtypeToCGType widget_type
    result <- gtk_test_find_sibling base_widget' widget_type'
    checkUnexpectedReturnNULL "gtk_test_find_sibling" result
    result' <- (newObject Widget) result
    touchManagedPtr base_widget
    return result'

-- function gtk_test_find_widget
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label_pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "widget_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_find_widget" gtk_test_find_widget :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- label_pattern : TBasicType TUTF8
    CGType ->                               -- widget_type : TBasicType TGType
    IO (Ptr Widget)


testFindWidget ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    T.Text ->                               -- label_pattern
    GType ->                                -- widget_type
    m Widget
testFindWidget widget label_pattern widget_type = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    label_pattern' <- textToCString label_pattern
    let widget_type' = gtypeToCGType widget_type
    result <- gtk_test_find_widget widget' label_pattern' widget_type'
    checkUnexpectedReturnNULL "gtk_test_find_widget" result
    result' <- (newObject Widget) result
    touchManagedPtr widget
    freeMem label_pattern'
    return result'

-- function gtk_test_list_all_types
-- Args : [Arg {argName = "n_types", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : []
-- returnType : TCArray True (-1) 0 (TBasicType TGType)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_list_all_types" gtk_test_list_all_types :: 
    Ptr Word32 ->                           -- n_types : TBasicType TUInt32
    IO (Ptr CGType)


testListAllTypes ::
    (MonadIO m) =>
    m ([GType],Word32)
testListAllTypes  = liftIO $ do
    n_types <- allocMem :: IO (Ptr Word32)
    result <- gtk_test_list_all_types n_types
    checkUnexpectedReturnNULL "gtk_test_list_all_types" result
    result' <- (unpackMapZeroTerminatedStorableArray GType) result
    n_types' <- peek n_types
    freeMem n_types
    return (result', n_types')

-- function gtk_test_register_all_types
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_register_all_types" gtk_test_register_all_types :: 
    IO ()


testRegisterAllTypes ::
    (MonadIO m) =>
    m ()
testRegisterAllTypes  = liftIO $ do
    gtk_test_register_all_types
    return ()

-- function gtk_test_slider_get_value
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TDouble
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_slider_get_value" gtk_test_slider_get_value :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO CDouble


testSliderGetValue ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m Double
testSliderGetValue widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_test_slider_get_value widget'
    let result' = realToFrac result
    touchManagedPtr widget
    return result'

-- function gtk_test_slider_set_perc
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "percentage", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "percentage", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_slider_set_perc" gtk_test_slider_set_perc :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CDouble ->                              -- percentage : TBasicType TDouble
    IO ()


testSliderSetPerc ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    Double ->                               -- percentage
    m ()
testSliderSetPerc widget percentage = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    let percentage' = realToFrac percentage
    gtk_test_slider_set_perc widget' percentage'
    touchManagedPtr widget
    return ()

-- function gtk_test_spin_button_click
-- Args : [Arg {argName = "spinner", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upwards", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "spinner", argType = TInterface "Gtk" "SpinButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upwards", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_spin_button_click" gtk_test_spin_button_click :: 
    Ptr SpinButton ->                       -- spinner : TInterface "Gtk" "SpinButton"
    Word32 ->                               -- button : TBasicType TUInt32
    CInt ->                                 -- upwards : TBasicType TBoolean
    IO CInt


testSpinButtonClick ::
    (MonadIO m, SpinButtonK a) =>
    a ->                                    -- spinner
    Word32 ->                               -- button
    Bool ->                                 -- upwards
    m Bool
testSpinButtonClick spinner button upwards = liftIO $ do
    let spinner' = unsafeManagedPtrCastPtr spinner
    let upwards' = (fromIntegral . fromEnum) upwards
    result <- gtk_test_spin_button_click spinner' button upwards'
    let result' = (/= 0) result
    touchManagedPtr spinner
    return result'

-- function gtk_test_text_get
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_text_get" gtk_test_text_get :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO CString


testTextGet ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m T.Text
testTextGet widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    result <- gtk_test_text_get widget'
    checkUnexpectedReturnNULL "gtk_test_text_get" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr widget
    return result'

-- function gtk_test_text_set
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_text_set" gtk_test_text_set :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    CString ->                              -- string : TBasicType TUTF8
    IO ()


testTextSet ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    T.Text ->                               -- string
    m ()
testTextSet widget string = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    string' <- textToCString string
    gtk_test_text_set widget' string'
    touchManagedPtr widget
    freeMem string'
    return ()

-- function gtk_test_widget_click
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "button", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_widget_click" gtk_test_widget_click :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Word32 ->                               -- button : TBasicType TUInt32
    CUInt ->                                -- modifiers : TInterface "Gdk" "ModifierType"
    IO CInt


testWidgetClick ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    Word32 ->                               -- button
    [Gdk.ModifierType] ->                   -- modifiers
    m Bool
testWidgetClick widget button modifiers = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    let modifiers' = gflagsToWord modifiers
    result <- gtk_test_widget_click widget' button modifiers'
    let result' = (/= 0) result
    touchManagedPtr widget
    return result'

-- function gtk_test_widget_send_key
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "keyval", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "modifiers", argType = TInterface "Gdk" "ModifierType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_widget_send_key" gtk_test_widget_send_key :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    Word32 ->                               -- keyval : TBasicType TUInt32
    CUInt ->                                -- modifiers : TInterface "Gdk" "ModifierType"
    IO CInt


testWidgetSendKey ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    Word32 ->                               -- keyval
    [Gdk.ModifierType] ->                   -- modifiers
    m Bool
testWidgetSendKey widget keyval modifiers = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    let modifiers' = gflagsToWord modifiers
    result <- gtk_test_widget_send_key widget' keyval modifiers'
    let result' = (/= 0) result
    touchManagedPtr widget
    return result'

-- function gtk_test_widget_wait_for_draw
-- Args : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_test_widget_wait_for_draw" gtk_test_widget_wait_for_draw :: 
    Ptr Widget ->                           -- widget : TInterface "Gtk" "Widget"
    IO ()


testWidgetWaitForDraw ::
    (MonadIO m, WidgetK a) =>
    a ->                                    -- widget
    m ()
testWidgetWaitForDraw widget = liftIO $ do
    let widget' = unsafeManagedPtrCastPtr widget
    gtk_test_widget_wait_for_draw widget'
    touchManagedPtr widget
    return ()

-- function gtk_tree_get_row_drag_data
-- Args : [Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tree_model", argType = TInterface "Gtk" "TreeModel", direction = DirectionOut, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionOut, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_get_row_drag_data" gtk_tree_get_row_drag_data :: 
    Ptr SelectionData ->                    -- selection_data : TInterface "Gtk" "SelectionData"
    Ptr (Ptr TreeModel) ->                  -- tree_model : TInterface "Gtk" "TreeModel"
    Ptr (Ptr TreePath) ->                   -- path : TInterface "Gtk" "TreePath"
    IO CInt


treeGetRowDragData ::
    (MonadIO m) =>
    SelectionData ->                        -- selection_data
    m (Bool,(Maybe TreeModel),(Maybe TreePath))
treeGetRowDragData selection_data = liftIO $ do
    let selection_data' = unsafeManagedPtrGetPtr selection_data
    tree_model <- allocMem :: IO (Ptr (Ptr TreeModel))
    path <- allocMem :: IO (Ptr (Ptr TreePath))
    result <- gtk_tree_get_row_drag_data selection_data' tree_model path
    let result' = (/= 0) result
    tree_model' <- peek tree_model
    maybeTree_model' <- convertIfNonNull tree_model' $ \tree_model'' -> do
        tree_model''' <- (newObject TreeModel) tree_model''
        return tree_model'''
    path' <- peek path
    maybePath' <- convertIfNonNull path' $ \path'' -> do
        path''' <- (wrapBoxed TreePath) path''
        return path'''
    touchManagedPtr selection_data
    freeMem tree_model
    freeMem path
    return (result', maybeTree_model', maybePath')

-- function gtk_tree_row_reference_deleted
-- Args : [Arg {argName = "proxy", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "proxy", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_row_reference_deleted" gtk_tree_row_reference_deleted :: 
    Ptr GObject.Object ->                   -- proxy : TInterface "GObject" "Object"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


treeRowReferenceDeleted ::
    (MonadIO m, GObject.ObjectK a) =>
    a ->                                    -- proxy
    TreePath ->                             -- path
    m ()
treeRowReferenceDeleted proxy path = liftIO $ do
    let proxy' = unsafeManagedPtrCastPtr proxy
    let path' = unsafeManagedPtrGetPtr path
    gtk_tree_row_reference_deleted proxy' path'
    touchManagedPtr proxy
    touchManagedPtr path
    return ()

-- function gtk_tree_row_reference_inserted
-- Args : [Arg {argName = "proxy", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "proxy", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_row_reference_inserted" gtk_tree_row_reference_inserted :: 
    Ptr GObject.Object ->                   -- proxy : TInterface "GObject" "Object"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO ()


treeRowReferenceInserted ::
    (MonadIO m, GObject.ObjectK a) =>
    a ->                                    -- proxy
    TreePath ->                             -- path
    m ()
treeRowReferenceInserted proxy path = liftIO $ do
    let proxy' = unsafeManagedPtrCastPtr proxy
    let path' = unsafeManagedPtrGetPtr path
    gtk_tree_row_reference_inserted proxy' path'
    touchManagedPtr proxy
    touchManagedPtr path
    return ()

-- function gtk_tree_set_row_drag_data
-- Args : [Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tree_model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "tree_model", argType = TInterface "Gtk" "TreeModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_set_row_drag_data" gtk_tree_set_row_drag_data :: 
    Ptr SelectionData ->                    -- selection_data : TInterface "Gtk" "SelectionData"
    Ptr TreeModel ->                        -- tree_model : TInterface "Gtk" "TreeModel"
    Ptr TreePath ->                         -- path : TInterface "Gtk" "TreePath"
    IO CInt


treeSetRowDragData ::
    (MonadIO m, TreeModelK a) =>
    SelectionData ->                        -- selection_data
    a ->                                    -- tree_model
    TreePath ->                             -- path
    m Bool
treeSetRowDragData selection_data tree_model path = liftIO $ do
    let selection_data' = unsafeManagedPtrGetPtr selection_data
    let tree_model' = unsafeManagedPtrCastPtr tree_model
    let path' = unsafeManagedPtrGetPtr path
    result <- gtk_tree_set_row_drag_data selection_data' tree_model' path'
    let result' = (/= 0) result
    touchManagedPtr selection_data
    touchManagedPtr tree_model
    touchManagedPtr path
    return result'

-- function gtk_true
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_true" gtk_true :: 
    IO CInt


true ::
    (MonadIO m) =>
    m Bool
true  = liftIO $ do
    result <- gtk_true
    let result' = (/= 0) result
    return result'