-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

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

module GI.Dazzle.Functions
    ( 

 -- * Methods


-- ** cairoRegionCreateFromClipExtents #method:cairoRegionCreateFromClipExtents#

    cairoRegionCreateFromClipExtents        ,


-- ** cairoRoundedRectangle #method:cairoRoundedRectangle#

    cairoRoundedRectangle                   ,


-- ** cancellableChain #method:cancellableChain#

    cancellableChain                        ,


-- ** dndGetUriList #method:dndGetUriList#

    dndGetUriList                           ,


-- ** fileManagerShow #method:fileManagerShow#

    fileManagerShow                         ,


-- ** frameSourceAddFull #method:frameSourceAddFull#

    frameSourceAddFull                      ,


-- ** fuzzyHighlight #method:fuzzyHighlight#

    fuzzyHighlight                          ,


-- ** gDateTimeFormatForDisplay #method:gDateTimeFormatForDisplay#

    gDateTimeFormatForDisplay               ,


-- ** gTimeSpanToLabel #method:gTimeSpanToLabel#

    gTimeSpanToLabel                        ,


-- ** gTimeSpanToLabelMapping #method:gTimeSpanToLabelMapping#

    gTimeSpanToLabelMapping                 ,


-- ** gVariantHash #method:gVariantHash#

    gVariantHash                            ,


-- ** getCurrentCpuCall #method:getCurrentCpuCall#

    getCurrentCpuCall                       ,


-- ** gtkListStoreInsertSorted #method:gtkListStoreInsertSorted#

    gtkListStoreInsertSorted                ,


-- ** gtkTextBufferRemoveTag #method:gtkTextBufferRemoveTag#

    gtkTextBufferRemoveTag                  ,


-- ** gtkWidgetAction #method:gtkWidgetAction#

    gtkWidgetAction                         ,


-- ** gtkWidgetActionWithString #method:gtkWidgetActionWithString#

    gtkWidgetActionWithString               ,


-- ** gtkWidgetAddStyleClass #method:gtkWidgetAddStyleClass#

    gtkWidgetAddStyleClass                  ,


-- ** gtkWidgetFindChildTyped #method:gtkWidgetFindChildTyped#

    gtkWidgetFindChildTyped                 ,


-- ** gtkWidgetGetRelative #method:gtkWidgetGetRelative#

    gtkWidgetGetRelative                    ,


-- ** gtkWidgetHideWithFade #method:gtkWidgetHideWithFade#

    gtkWidgetHideWithFade                   ,


-- ** gtkWidgetIsAncestorOrRelative #method:gtkWidgetIsAncestorOrRelative#

    gtkWidgetIsAncestorOrRelative           ,


-- ** gtkWidgetMuxActionGroups #method:gtkWidgetMuxActionGroups#

    gtkWidgetMuxActionGroups                ,


-- ** gtkWidgetRemoveStyleClass #method:gtkWidgetRemoveStyleClass#

    gtkWidgetRemoveStyleClass               ,


-- ** gtkWidgetShowWithFade #method:gtkWidgetShowWithFade#

    gtkWidgetShowWithFade                   ,


-- ** levenshtein #method:levenshtein#

    levenshtein                             ,


-- ** overlayAddChild #method:overlayAddChild#

    overlayAddChild                         ,


-- ** pangoFontDescriptionToCss #method:pangoFontDescriptionToCss#

    pangoFontDescriptionToCss               ,


-- ** rgbaShade #method:rgbaShade#

    rgbaShade                               ,


-- ** shortcutChordTableGetType #method:shortcutChordTableGetType#

    shortcutChordTableGetType               ,




    ) where

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

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)
import qualified GI.Atk.Interfaces.ImplementorIface as Atk.ImplementorIface
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.Region as Cairo.Region
import {-# SOURCE #-} qualified GI.Dazzle.Interfaces.Dock as Dazzle.Dock
import {-# SOURCE #-} qualified GI.Dazzle.Interfaces.DockItem as Dazzle.DockItem
import {-# SOURCE #-} qualified GI.Dazzle.Objects.Bin as Dazzle.Bin
import {-# SOURCE #-} qualified GI.Dazzle.Objects.DockManager as Dazzle.DockManager
import {-# SOURCE #-} qualified GI.Dazzle.Objects.DockOverlay as Dazzle.DockOverlay
import {-# SOURCE #-} qualified GI.Dazzle.Objects.DockOverlayEdge as Dazzle.DockOverlayEdge
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.DateTime as GLib.DateTime
import qualified GI.GObject.Objects.Binding as GObject.Binding
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gtk.Enums as Gtk.Enums
import qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import qualified GI.Gtk.Objects.Adjustment as Gtk.Adjustment
import qualified GI.Gtk.Objects.Bin as Gtk.Bin
import qualified GI.Gtk.Objects.Container as Gtk.Container
import qualified GI.Gtk.Objects.EventBox as Gtk.EventBox
import qualified GI.Gtk.Objects.ListStore as Gtk.ListStore
import qualified GI.Gtk.Objects.TextBuffer as Gtk.TextBuffer
import qualified GI.Gtk.Objects.TextTag as Gtk.TextTag
import qualified GI.Gtk.Objects.Widget as Gtk.Widget
import qualified GI.Gtk.Structs.SelectionData as Gtk.SelectionData
import qualified GI.Gtk.Structs.TextIter as Gtk.TextIter
import qualified GI.Gtk.Structs.TreeIter as Gtk.TreeIter
import qualified GI.Pango.Structs.FontDescription as Pango.FontDescription

#else
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.Region as Cairo.Region
import {-# SOURCE #-} qualified GI.Dazzle.Objects.DockOverlay as Dazzle.DockOverlay
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.DateTime as GLib.DateTime
import qualified GI.GObject.Objects.Binding as GObject.Binding
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gtk.Objects.ListStore as Gtk.ListStore
import qualified GI.Gtk.Objects.TextBuffer as Gtk.TextBuffer
import qualified GI.Gtk.Objects.TextTag as Gtk.TextTag
import qualified GI.Gtk.Objects.Widget as Gtk.Widget
import qualified GI.Gtk.Structs.SelectionData as Gtk.SelectionData
import qualified GI.Gtk.Structs.TextIter as Gtk.TextIter
import qualified GI.Gtk.Structs.TreeIter as Gtk.TreeIter
import qualified GI.Pango.Structs.FontDescription as Pango.FontDescription

#endif

-- function shortcut_chord_table_get_type
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TGType)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_shortcut_chord_table_get_type" dzl_shortcut_chord_table_get_type :: 
    IO CGType

-- | /No description available in the introspection data./
shortcutChordTableGetType ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m GType
shortcutChordTableGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType
shortcutChordTableGetType  = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
    CGType
result <- IO CGType
dzl_shortcut_chord_table_get_type
    let result' :: GType
result' = CGType -> GType
GType CGType
result
    GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'


-- function rgba_shade
-- Args: [ Arg
--           { argCName = "rgba"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkRGBA to shade"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dst"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the resulting shade"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "k"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the factor by which to shade the input color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dzl_rgba_shade" dzl_rgba_shade :: 
    Ptr Gdk.RGBA.RGBA ->                    -- rgba : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    Ptr Gdk.RGBA.RGBA ->                    -- dst : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    CDouble ->                              -- k : TBasicType TDouble
    IO ()

-- | Creates a shade of the color /@rgba@/ by multiplying its saturation and lightness by /@k@/.
-- 
-- Values of /@k@/ greater than 1 will make the color brighter, while values less than 1 will make it
-- darker. The alpha value will remain the same.
rgbaShade ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gdk.RGBA.RGBA
    -- ^ /@rgba@/: a t'GI.Gdk.Structs.RGBA.RGBA' to shade
    -> Double
    -- ^ /@k@/: the factor by which to shade the input color
    -> m (Gdk.RGBA.RGBA)
rgbaShade :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
RGBA -> Double -> m RGBA
rgbaShade RGBA
rgba Double
k = IO RGBA -> m RGBA
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RGBA -> m RGBA) -> IO RGBA -> m RGBA
forall a b. (a -> b) -> a -> b
$ do
    Ptr RGBA
rgba' <- RGBA -> IO (Ptr RGBA)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RGBA
rgba
    Ptr RGBA
dst <- Int -> IO (Ptr RGBA)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
32 :: IO (Ptr Gdk.RGBA.RGBA)
    let k' :: CDouble
k' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
k
    Ptr RGBA -> Ptr RGBA -> CDouble -> IO ()
dzl_rgba_shade Ptr RGBA
rgba' Ptr RGBA
dst CDouble
k'
    RGBA
dst' <- ((ManagedPtr RGBA -> RGBA) -> Ptr RGBA -> IO RGBA
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr RGBA -> RGBA
Gdk.RGBA.RGBA) Ptr RGBA
dst
    RGBA -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RGBA
rgba
    RGBA -> IO RGBA
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return RGBA
dst'


-- function pango_font_description_to_css
-- Args: [ Arg
--           { argCName = "font_desc"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "FontDescription" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_pango_font_description_to_css" dzl_pango_font_description_to_css :: 
    Ptr Pango.FontDescription.FontDescription -> -- font_desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})
    IO CString

-- | This function will generate CSS suitable for Gtk\'s CSS engine
-- based on the properties of the t'GI.Pango.Structs.FontDescription.FontDescription'.
pangoFontDescriptionToCss ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Pango.FontDescription.FontDescription
    -> m T.Text
    -- ^ __Returns:__ A newly allocated string containing the
    --    CSS describing the font description.
pangoFontDescriptionToCss :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FontDescription -> m Text
pangoFontDescriptionToCss FontDescription
fontDesc = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontDescription
fontDesc' <- FontDescription -> IO (Ptr FontDescription)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
fontDesc
    CString
result <- Ptr FontDescription -> IO CString
dzl_pango_font_description_to_css Ptr FontDescription
fontDesc'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"pangoFontDescriptionToCss" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
    FontDescription -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FontDescription
fontDesc
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'


-- function overlay_add_child
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Dazzle" , name = "DockOverlay" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "type"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dzl_overlay_add_child" dzl_overlay_add_child :: 
    Ptr Dazzle.DockOverlay.DockOverlay ->   -- self : TInterface (Name {namespace = "Dazzle", name = "DockOverlay"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- type : TBasicType TUTF8
    IO ()

-- | /No description available in the introspection data./
overlayAddChild ::
    (B.CallStack.HasCallStack, MonadIO m, Dazzle.DockOverlay.IsDockOverlay a, Gtk.Widget.IsWidget b) =>
    a
    -> b
    -> T.Text
    -> m ()
overlayAddChild :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDockOverlay a, IsWidget b) =>
a -> b -> Text -> m ()
overlayAddChild a
self b
child Text
type_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr DockOverlay
self' <- a -> IO (Ptr DockOverlay)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    CString
type_' <- Text -> IO CString
textToCString Text
type_
    Ptr DockOverlay -> Ptr Widget -> CString -> IO ()
dzl_overlay_add_child Ptr DockOverlay
self' Ptr Widget
child' CString
type_'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
type_'
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function levenshtein
-- Args: [ Arg
--           { argCName = "needle"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "haystack"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_levenshtein" dzl_levenshtein :: 
    CString ->                              -- needle : TBasicType TUTF8
    CString ->                              -- haystack : TBasicType TUTF8
    IO Int32

-- | /No description available in the introspection data./
levenshtein ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -> T.Text
    -> m Int32
levenshtein :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> Text -> m Int32
levenshtein Text
needle Text
haystack = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    CString
needle' <- Text -> IO CString
textToCString Text
needle
    CString
haystack' <- Text -> IO CString
textToCString Text
haystack
    Int32
result <- CString -> CString -> IO Int32
dzl_levenshtein CString
needle' CString
haystack'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
needle'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
haystack'
    Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- function gtk_widget_show_with_fade
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_widget_show_with_fade" dzl_gtk_widget_show_with_fade :: 
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | /No description available in the introspection data./
gtkWidgetShowWithFade ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    a
    -> m ()
gtkWidgetShowWithFade :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
gtkWidgetShowWithFade a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
dzl_gtk_widget_show_with_fade Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function gtk_widget_remove_style_class
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "class_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_widget_remove_style_class" dzl_gtk_widget_remove_style_class :: 
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- class_name : TBasicType TUTF8
    IO ()

-- | /No description available in the introspection data./
gtkWidgetRemoveStyleClass ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    a
    -> T.Text
    -> m ()
gtkWidgetRemoveStyleClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> m ()
gtkWidgetRemoveStyleClass a
widget Text
className = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
className' <- Text -> IO CString
textToCString Text
className
    Ptr Widget -> CString -> IO ()
dzl_gtk_widget_remove_style_class Ptr Widget
widget' CString
className'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
className'
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function gtk_widget_mux_action_groups
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "from_widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkWidget containing the groups to copy"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "mux_key"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a unique key to represent the muxing"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_widget_mux_action_groups" dzl_gtk_widget_mux_action_groups :: 
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.Widget.Widget ->                -- from_widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- mux_key : TBasicType TUTF8
    IO ()

-- | This function will find all of the actions on /@fromWidget@/ in various
-- groups and add them to /@widget@/. As this just copies the action groups
-- over, note that it does not allow for muxing items within the same
-- group.
-- 
-- You should specify a key for /@muxKey@/ so that if the same mux key is
-- seen again, the previous muxings will be removed.
gtkWidgetMuxActionGroups ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@fromWidget@/: A t'GI.Gtk.Objects.Widget.Widget' containing the groups to copy
    -> Maybe (T.Text)
    -- ^ /@muxKey@/: a unique key to represent the muxing
    -> m ()
gtkWidgetMuxActionGroups :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> Maybe Text -> m ()
gtkWidgetMuxActionGroups a
widget b
fromWidget Maybe Text
muxKey = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
fromWidget' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
fromWidget
    CString
maybeMuxKey <- case Maybe Text
muxKey of
        Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jMuxKey -> do
            CString
jMuxKey' <- Text -> IO CString
textToCString Text
jMuxKey
            CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jMuxKey'
    Ptr Widget -> Ptr Widget -> CString -> IO ()
dzl_gtk_widget_mux_action_groups Ptr Widget
widget' Ptr Widget
fromWidget' CString
maybeMuxKey
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
fromWidget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMuxKey
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function gtk_widget_is_ancestor_or_relative
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ancestor"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that might be an ancestor"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_widget_is_ancestor_or_relative" dzl_gtk_widget_is_ancestor_or_relative :: 
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.Widget.Widget ->                -- ancestor : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | This function is like 'GI.Gtk.Objects.Widget.widgetIsAncestor' except that it checks
-- various relative widgets that are not in the direct hierarchy of
-- widgets. That includes [Menu:attachWidget]("GI.Gtk.Objects.Menu#g:attr:attachWidget"),
-- [Popover:relativeTo]("GI.Gtk.Objects.Popover#g:attr:relativeTo"), and [Window:transientFor]("GI.Gtk.Objects.Window#g:attr:transientFor").
-- 
-- /Since: 3.26/
gtkWidgetIsAncestorOrRelative ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@ancestor@/: a t'GI.Gtk.Objects.Widget.Widget' that might be an ancestor
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@ancestor@/ is an ancestor or relative for /@widget@/.
gtkWidgetIsAncestorOrRelative :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> m Bool
gtkWidgetIsAncestorOrRelative a
widget b
ancestor = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
ancestor' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
ancestor
    CInt
result <- Ptr Widget -> Ptr Widget -> IO CInt
dzl_gtk_widget_is_ancestor_or_relative Ptr Widget
widget' Ptr Widget
ancestor'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
ancestor
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'


-- function gtk_widget_hide_with_fade
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_widget_hide_with_fade" dzl_gtk_widget_hide_with_fade :: 
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | /No description available in the introspection data./
gtkWidgetHideWithFade ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    a
    -> m ()
gtkWidgetHideWithFade :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
gtkWidgetHideWithFade a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
dzl_gtk_widget_hide_with_fade Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function gtk_widget_get_relative
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "relative_type"
--           , argType = TBasicType TGType
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the type of widget to locate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_widget_get_relative" dzl_gtk_widget_get_relative :: 
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CGType ->                               -- relative_type : TBasicType TGType
    IO (Ptr Gtk.Widget.Widget)

-- | This is similar to 'GI.Gtk.Objects.Widget.widgetGetAncestor', but looks for relatives
-- via properties such as [Popover:relativeTo]("GI.Gtk.Objects.Popover#g:attr:relativeTo") and others.
gtkWidgetGetRelative ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> GType
    -- ^ /@relativeType@/: the type of widget to locate
    -> m (Maybe Gtk.Widget.Widget)
    -- ^ __Returns:__ A t'GI.Gtk.Objects.Widget.Widget' or 'P.Nothing'.
gtkWidgetGetRelative :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> GType -> m (Maybe Widget)
gtkWidgetGetRelative a
widget GType
relativeType = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let relativeType' :: CGType
relativeType' = GType -> CGType
gtypeToCGType GType
relativeType
    Ptr Widget
result <- Ptr Widget -> CGType -> IO (Ptr Widget)
dzl_gtk_widget_get_relative Ptr Widget
widget' CGType
relativeType'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result'
        Widget -> IO Widget
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Widget -> IO (Maybe Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult


-- function gtk_widget_find_child_typed
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "type"
--           , argType = TBasicType TGType
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_widget_find_child_typed" dzl_gtk_widget_find_child_typed :: 
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CGType ->                               -- type : TBasicType TGType
    IO (Ptr Gtk.Widget.Widget)

-- | Tries to locate a widget in a hierarchy given it\'s t'GType'.
-- 
-- There is not an efficient implementation of this method, so use it
-- only when the hierarchy of widgets is small.
gtkWidgetFindChildTyped ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    a
    -> GType
    -> m (Maybe Gtk.Widget.Widget)
    -- ^ __Returns:__ A widget or 'P.Nothing'
gtkWidgetFindChildTyped :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> GType -> m (Maybe Widget)
gtkWidgetFindChildTyped a
widget GType
type_ = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let type_' :: CGType
type_' = GType -> CGType
gtypeToCGType GType
type_
    Ptr Widget
result <- Ptr Widget -> CGType -> IO (Ptr Widget)
dzl_gtk_widget_find_child_typed Ptr Widget
widget' CGType
type_'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result'
        Widget -> IO Widget
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Widget -> IO (Maybe Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult


-- function gtk_widget_add_style_class
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "class_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_widget_add_style_class" dzl_gtk_widget_add_style_class :: 
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- class_name : TBasicType TUTF8
    IO ()

-- | /No description available in the introspection data./
gtkWidgetAddStyleClass ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    a
    -> T.Text
    -> m ()
gtkWidgetAddStyleClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> m ()
gtkWidgetAddStyleClass a
widget Text
className = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
className' <- Text -> IO CString
textToCString Text
className
    Ptr Widget -> CString -> IO ()
dzl_gtk_widget_add_style_class Ptr Widget
widget' CString
className'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
className'
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function gtk_widget_action_with_string
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "group"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "param"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_widget_action_with_string" dzl_gtk_widget_action_with_string :: 
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- group : TBasicType TUTF8
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- param : TBasicType TUTF8
    IO CInt

-- | /No description available in the introspection data./
gtkWidgetActionWithString ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    a
    -> T.Text
    -> T.Text
    -> T.Text
    -> m Bool
gtkWidgetActionWithString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> Text -> Text -> m Bool
gtkWidgetActionWithString a
widget Text
group Text
name Text
param = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
group' <- Text -> IO CString
textToCString Text
group
    CString
name' <- Text -> IO CString
textToCString Text
name
    CString
param' <- Text -> IO CString
textToCString Text
param
    CInt
result <- Ptr Widget -> CString -> CString -> CString -> IO CInt
dzl_gtk_widget_action_with_string Ptr Widget
widget' CString
group' CString
name' CString
param'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
group'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
param'
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'


-- function gtk_widget_action
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "group"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "param"
--           , argType = TVariant
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_widget_action" dzl_gtk_widget_action :: 
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- group : TBasicType TUTF8
    CString ->                              -- name : TBasicType TUTF8
    Ptr GVariant ->                         -- param : TVariant
    IO CInt

-- | /No description available in the introspection data./
gtkWidgetAction ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    a
    -> T.Text
    -> T.Text
    -> GVariant
    -> m Bool
gtkWidgetAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> Text -> GVariant -> m Bool
gtkWidgetAction a
widget Text
group Text
name GVariant
param = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
group' <- Text -> IO CString
textToCString Text
group
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr GVariant
param' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
param
    CInt
result <- Ptr Widget -> CString -> CString -> Ptr GVariant -> IO CInt
dzl_gtk_widget_action Ptr Widget
widget' CString
group' CString
name' Ptr GVariant
param'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
param
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
group'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'


-- function gtk_text_buffer_remove_tag
-- Args: [ Arg
--           { argCName = "buffer"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TextBuffer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "tag"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TextTag" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TextIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "end"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TextIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimal_damage"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_text_buffer_remove_tag" dzl_gtk_text_buffer_remove_tag :: 
    Ptr Gtk.TextBuffer.TextBuffer ->        -- buffer : TInterface (Name {namespace = "Gtk", name = "TextBuffer"})
    Ptr Gtk.TextTag.TextTag ->              -- tag : TInterface (Name {namespace = "Gtk", name = "TextTag"})
    Ptr Gtk.TextIter.TextIter ->            -- start : TInterface (Name {namespace = "Gtk", name = "TextIter"})
    Ptr Gtk.TextIter.TextIter ->            -- end : TInterface (Name {namespace = "Gtk", name = "TextIter"})
    CInt ->                                 -- minimal_damage : TBasicType TBoolean
    IO ()

-- | Like 'GI.Gtk.Objects.TextBuffer.textBufferRemoveTag' but allows specifying that the tags
-- should be removed one at a time to avoid over-damaging the views
-- displaying /@buffer@/.
gtkTextBufferRemoveTag ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TextBuffer.IsTextBuffer a, Gtk.TextTag.IsTextTag b) =>
    a
    -> b
    -> Gtk.TextIter.TextIter
    -> Gtk.TextIter.TextIter
    -> Bool
    -> m ()
gtkTextBufferRemoveTag :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextBuffer a, IsTextTag b) =>
a -> b -> TextIter -> TextIter -> Bool -> m ()
gtkTextBufferRemoveTag a
buffer b
tag TextIter
start TextIter
end Bool
minimalDamage = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TextBuffer
buffer' <- a -> IO (Ptr TextBuffer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
buffer
    Ptr TextTag
tag' <- b -> IO (Ptr TextTag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
tag
    Ptr TextIter
start' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
start
    Ptr TextIter
end' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
end
    let minimalDamage' :: CInt
minimalDamage' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
minimalDamage
    Ptr TextBuffer
-> Ptr TextTag -> Ptr TextIter -> Ptr TextIter -> CInt -> IO ()
dzl_gtk_text_buffer_remove_tag Ptr TextBuffer
buffer' Ptr TextTag
tag' Ptr TextIter
start' Ptr TextIter
end' CInt
minimalDamage'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
buffer
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
tag
    TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
start
    TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
end
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function gtk_list_store_insert_sorted
-- Args: [ Arg
--           { argCName = "store"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "ListStore" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkListStore" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A location for a #GtkTextIter"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "key"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A key to compare to when binary searching"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "compare_column"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the column containing the data to compare"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "compare_func"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "CompareDataFunc" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A callback to compare"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeCall
--           , argClosure = 5
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "compare_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "data for @compare_func"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dzl_gtk_list_store_insert_sorted" dzl_gtk_list_store_insert_sorted :: 
    Ptr Gtk.ListStore.ListStore ->          -- store : TInterface (Name {namespace = "Gtk", name = "ListStore"})
    Ptr Gtk.TreeIter.TreeIter ->            -- iter : TInterface (Name {namespace = "Gtk", name = "TreeIter"})
    Ptr () ->                               -- key : TBasicType TPtr
    Word32 ->                               -- compare_column : TBasicType TUInt
    FunPtr GLib.Callbacks.C_CompareDataFunc -> -- compare_func : TInterface (Name {namespace = "GLib", name = "CompareDataFunc"})
    Ptr () ->                               -- compare_data : TBasicType TPtr
    IO ()

-- | This function will binary search the contents of /@store@/ looking for the
-- location to insert a new row.
-- 
-- /@compareColumn@/ must be the index of a column that is a @/G_TYPE_POINTER/@,
-- @/G_TYPE_BOXED/@ or @/G_TYPE_OBJECT/@ based column.
-- 
-- /@compareFunc@/ will be called with /@key@/ as the first parameter and the
-- value from the t'GI.Gtk.Objects.ListStore.ListStore' row as the second parameter. The third and
-- final parameter is /@compareData@/.
-- 
-- /Since: 3.26/
gtkListStoreInsertSorted ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.ListStore.IsListStore a) =>
    a
    -- ^ /@store@/: A t'GI.Gtk.Objects.ListStore.ListStore'
    -> Ptr ()
    -- ^ /@key@/: A key to compare to when binary searching
    -> Word32
    -- ^ /@compareColumn@/: the column containing the data to compare
    -> GLib.Callbacks.CompareDataFunc
    -- ^ /@compareFunc@/: A callback to compare
    -> m (Gtk.TreeIter.TreeIter)
gtkListStoreInsertSorted :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListStore a) =>
a -> Ptr () -> Word32 -> CompareDataFunc -> m TreeIter
gtkListStoreInsertSorted a
store Ptr ()
key Word32
compareColumn CompareDataFunc
compareFunc = IO TreeIter -> m TreeIter
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreeIter -> m TreeIter) -> IO TreeIter -> m TreeIter
forall a b. (a -> b) -> a -> b
$ do
    Ptr ListStore
store' <- a -> IO (Ptr ListStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
    Ptr TreeIter
iter <- Int -> IO (Ptr TreeIter)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
32 :: IO (Ptr Gtk.TreeIter.TreeIter)
    FunPtr C_CompareDataFunc
compareFunc' <- C_CompareDataFunc -> IO (FunPtr C_CompareDataFunc)
GLib.Callbacks.mk_CompareDataFunc (Maybe (Ptr (FunPtr C_CompareDataFunc))
-> C_CompareDataFunc -> C_CompareDataFunc
GLib.Callbacks.wrap_CompareDataFunc Maybe (Ptr (FunPtr C_CompareDataFunc))
forall a. Maybe a
Nothing (CompareDataFunc -> C_CompareDataFunc
GLib.Callbacks.drop_closures_CompareDataFunc CompareDataFunc
compareFunc))
    let compareData :: Ptr a
compareData = Ptr a
forall a. Ptr a
nullPtr
    Ptr ListStore
-> Ptr TreeIter
-> Ptr ()
-> Word32
-> FunPtr C_CompareDataFunc
-> Ptr ()
-> IO ()
dzl_gtk_list_store_insert_sorted Ptr ListStore
store' Ptr TreeIter
iter Ptr ()
key Word32
compareColumn FunPtr C_CompareDataFunc
compareFunc' Ptr ()
forall a. Ptr a
compareData
    TreeIter
iter' <- ((ManagedPtr TreeIter -> TreeIter) -> Ptr TreeIter -> IO TreeIter
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter) Ptr TreeIter
iter
    Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_CompareDataFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_CompareDataFunc
compareFunc'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
    TreeIter -> IO TreeIter
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return TreeIter
iter'


-- function get_current_cpu_call
-- Args: []
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_get_current_cpu_call" dzl_get_current_cpu_call :: 
    IO Word32

-- | /No description available in the introspection data./
getCurrentCpuCall ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Word32
getCurrentCpuCall :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Word32
getCurrentCpuCall  = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Word32
result <- IO Word32
dzl_get_current_cpu_call
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function g_variant_hash
-- Args: [ Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_g_variant_hash" dzl_g_variant_hash :: 
    Ptr () ->                               -- data : TBasicType TPtr
    IO Word32

-- | /No description available in the introspection data./
gVariantHash ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -> m Word32
gVariantHash :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Ptr () -> m Word32
gVariantHash Ptr ()
data_ = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Word32
result <- Ptr () -> IO Word32
dzl_g_variant_hash Ptr ()
data_
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function g_time_span_to_label_mapping
-- Args: [ Arg
--           { argCName = "binding"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Binding" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "from_value"
--           , argType = TGValue
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "to_value"
--           , argType = TGValue
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_g_time_span_to_label_mapping" dzl_g_time_span_to_label_mapping :: 
    Ptr GObject.Binding.Binding ->          -- binding : TInterface (Name {namespace = "GObject", name = "Binding"})
    Ptr GValue ->                           -- from_value : TGValue
    Ptr GValue ->                           -- to_value : TGValue
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO CInt

-- | A t'GI.GObject.Callbacks.BindingTransformFunc' to transform a time span into a string label using
-- 'GI.Dazzle.Functions.gTimeSpanToLabel'.
gTimeSpanToLabelMapping ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Binding.IsBinding a) =>
    a
    -> GValue
    -> GValue
    -> Ptr ()
    -> m Bool
gTimeSpanToLabelMapping :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBinding a) =>
a -> GValue -> GValue -> Ptr () -> m Bool
gTimeSpanToLabelMapping a
binding GValue
fromValue GValue
toValue Ptr ()
userData = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Binding
binding' <- a -> IO (Ptr Binding)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
binding
    Ptr GValue
fromValue' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
fromValue
    Ptr GValue
toValue' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
toValue
    CInt
result <- Ptr Binding -> Ptr GValue -> Ptr GValue -> Ptr () -> IO CInt
dzl_g_time_span_to_label_mapping Ptr Binding
binding' Ptr GValue
fromValue' Ptr GValue
toValue' Ptr ()
userData
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
binding
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
fromValue
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
toValue
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'


-- function g_time_span_to_label
-- Args: [ Arg
--           { argCName = "span"
--           , argType = TBasicType TInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the span of time" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_g_time_span_to_label" dzl_g_time_span_to_label :: 
    Int64 ->                                -- span : TBasicType TInt64
    IO CString

-- | Creates a string describing the time span in hours, minutes, and seconds.
-- For example, a time span of three and a half minutes would be \"3:30\".
-- 2 days, 3 hours, 6 minutes, and 20 seconds would be \"51:06:20\".
gTimeSpanToLabel ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int64
    -- ^ /@span@/: the span of time
    -> m T.Text
    -- ^ __Returns:__ A newly allocated string describing the time span.
gTimeSpanToLabel :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Int64 -> m Text
gTimeSpanToLabel Int64
span = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    CString
result <- Int64 -> IO CString
dzl_g_time_span_to_label Int64
span
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"gTimeSpanToLabel" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'


-- function g_date_time_format_for_display
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DateTime" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GDateTime" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_g_date_time_format_for_display" dzl_g_date_time_format_for_display :: 
    Ptr GLib.DateTime.DateTime ->           -- self : TInterface (Name {namespace = "GLib", name = "DateTime"})
    IO CString

-- | Helper function to create a human-friendly string describing approximately
-- how long ago a t'GI.GLib.Structs.DateTime.DateTime' is.
gDateTimeFormatForDisplay ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GLib.DateTime.DateTime
    -- ^ /@self@/: A t'GI.GLib.Structs.DateTime.DateTime'
    -> m T.Text
    -- ^ __Returns:__ A newly allocated string describing the
    --   date and time imprecisely such as \"Yesterday\".
gDateTimeFormatForDisplay :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
DateTime -> m Text
gDateTimeFormatForDisplay DateTime
self = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr DateTime
self' <- DateTime -> IO (Ptr DateTime)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DateTime
self
    CString
result <- Ptr DateTime -> IO CString
dzl_g_date_time_format_for_display Ptr DateTime
self'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"gDateTimeFormatForDisplay" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
    DateTime -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr DateTime
self
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'


-- function fuzzy_highlight
-- Args: [ Arg
--           { argCName = "str"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "query"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "case_sensitive"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_fuzzy_highlight" dzl_fuzzy_highlight :: 
    CString ->                              -- str : TBasicType TUTF8
    CString ->                              -- query : TBasicType TUTF8
    CInt ->                                 -- case_sensitive : TBasicType TBoolean
    IO CString

-- | /No description available in the introspection data./
fuzzyHighlight ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -> T.Text
    -> Bool
    -> m T.Text
fuzzyHighlight :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> Text -> Bool -> m Text
fuzzyHighlight Text
str Text
query Bool
caseSensitive = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    CString
str' <- Text -> IO CString
textToCString Text
str
    CString
query' <- Text -> IO CString
textToCString Text
query
    let caseSensitive' :: CInt
caseSensitive' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
caseSensitive
    CString
result <- CString -> CString -> CInt -> IO CString
dzl_fuzzy_highlight CString
str' CString
query' CInt
caseSensitive'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fuzzyHighlight" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
str'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
query'
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'


-- function frame_source_add_full
-- Args: [ Arg
--           { argCName = "priority"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "frames_per_sec"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "SourceFunc" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 3
--           , argDestroy = 4
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "notify"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "dzl_frame_source_add_full" dzl_frame_source_add_full :: 
    Int32 ->                                -- priority : TBasicType TInt
    Word32 ->                               -- frames_per_sec : TBasicType TUInt
    FunPtr GLib.Callbacks.C_SourceFunc ->   -- callback : TInterface (Name {namespace = "GLib", name = "SourceFunc"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- notify : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    IO Word32

-- | /No description available in the introspection data./
frameSourceAddFull ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Int32
    -> Word32
    -> GLib.Callbacks.SourceFunc
    -> m Word32
frameSourceAddFull :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Int32 -> Word32 -> IO Bool -> m Word32
frameSourceAddFull Int32
priority Word32
framesPerSec IO Bool
callback = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    FunPtr (Ptr () -> IO CInt)
callback' <- (Ptr () -> IO CInt) -> IO (FunPtr (Ptr () -> IO CInt))
GLib.Callbacks.mk_SourceFunc (Maybe (Ptr (FunPtr (Ptr () -> IO CInt)))
-> SourceFunc_WithClosures -> Ptr () -> IO CInt
GLib.Callbacks.wrap_SourceFunc Maybe (Ptr (FunPtr (Ptr () -> IO CInt)))
forall a. Maybe a
Nothing (IO Bool -> SourceFunc_WithClosures
GLib.Callbacks.drop_closures_SourceFunc IO Bool
callback))
    let userData :: Ptr ()
userData = FunPtr (Ptr () -> IO CInt) -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr (Ptr () -> IO CInt)
callback'
    let notify :: FunPtr (Ptr a -> IO ())
notify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
    Word32
result <- Int32
-> Word32
-> FunPtr (Ptr () -> IO CInt)
-> Ptr ()
-> FunPtr (Ptr () -> IO ())
-> IO Word32
dzl_frame_source_add_full Int32
priority Word32
framesPerSec FunPtr (Ptr () -> IO CInt)
callback' Ptr ()
userData FunPtr (Ptr () -> IO ())
forall a. FunPtr (Ptr a -> IO ())
notify
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result


-- function frame_source_add
-- XXX Could not generate function frame_source_add

{-  Bad introspection data: ScopeTypeNotified without destructor! Callable
      { returnType = Just (TBasicType TUInt)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just "A source id that can be removed with g_source_remove()."
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "frames_per_sec"
              , argType = TBasicType TUInt
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "Target frames per second."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "callback"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "SourceFunc" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "A #GSourceFunc to execute."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeNotified
              , argClosure = 2
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "User data for @callback."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Creates a new frame source that will execute when the timeout interval\nfor the source has elapsed. The timing will try to synchronize based\non the end time of the animation."
            , sinceVersion = Nothing
            }
      , callableResolvable = Just True
      }
-}

-- function file_manager_show
-- Args: [ Arg
--           { argCName = "file"
--           , argType = TInterface Name { namespace = "Gio" , name = "File" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "dzl_file_manager_show" dzl_file_manager_show :: 
    Ptr Gio.File.File ->                    -- file : TInterface (Name {namespace = "Gio", name = "File"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | /No description available in the introspection data./
fileManagerShow ::
    (B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
    a
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
fileManagerShow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFile a) =>
a -> m ()
fileManagerShow a
file = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr File
file' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
file
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr File -> Ptr (Ptr GError) -> IO CInt
dzl_file_manager_show Ptr File
file'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
file
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )


-- function dnd_get_uri_list
-- Args: [ Arg
--           { argCName = "selection_data"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "SelectionData" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkSelectionData from drag_data_received"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TCArray True (-1) (-1) (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "dzl_dnd_get_uri_list" dzl_dnd_get_uri_list :: 
    Ptr Gtk.SelectionData.SelectionData ->  -- selection_data : TInterface (Name {namespace = "Gtk", name = "SelectionData"})
    IO (Ptr CString)

{-# DEPRECATED dndGetUriList ["Use 'GI.Gtk.Structs.SelectionData.selectionDataGetUris' instead; it is exactly the same."] #-}
-- | Create a list of valid uri\'s from a uri-list drop.
dndGetUriList ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gtk.SelectionData.SelectionData
    -- ^ /@selectionData@/: the t'GI.Gtk.Structs.SelectionData.SelectionData' from drag_data_received
    -> m [T.Text]
    -- ^ __Returns:__ a string array which will hold the uris or
    --   'P.Nothing' if there were no valid uris. g_strfreev should be used when
    --   the string array is no longer used
dndGetUriList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
SelectionData -> m [Text]
dndGetUriList SelectionData
selectionData = IO [Text] -> m [Text]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr SelectionData
selectionData' <- SelectionData -> IO (Ptr SelectionData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SelectionData
selectionData
    Ptr CString
result <- Ptr SelectionData -> IO (Ptr CString)
dzl_dnd_get_uri_list Ptr SelectionData
selectionData'
    Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dndGetUriList" Ptr CString
result
    [Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
    (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
    SelectionData -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SelectionData
selectionData
    [Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'


-- function cancellable_chain
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "other"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gio" , name = "Cancellable" })
-- throws : False
-- Skip return : False

foreign import ccall "dzl_cancellable_chain" dzl_cancellable_chain :: 
    Ptr Gio.Cancellable.Cancellable ->      -- self : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr Gio.Cancellable.Cancellable ->      -- other : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    IO (Ptr Gio.Cancellable.Cancellable)

-- | If both /@self@/ and /@other@/ are not 'P.Nothing', then the cancellation of
-- /@other@/ will be propagated to /@self@/ if /@other@/ is cancelled.
-- 
-- If /@self@/ and /@other@/ are the same, /@self@/ is returned and no additional
-- chaining will occur.
-- 
-- If /@self@/ and /@other@/ are 'P.Nothing', then 'P.Nothing' is returned.
-- If /@self@/ is non-'P.Nothing', it will be returned.
-- If /@self@/ is 'P.Nothing' and /@other@/ is non-'P.Nothing', other will be
-- returned. This is useful to succinctly chain cancellables like:
-- 
-- >
-- >cancellable = dzl_cancellable_chain (cancellable, self->cancellable);
-- 
-- 
-- /Since: 3.28/
cancellableChain ::
    (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a, Gio.Cancellable.IsCancellable b) =>
    Maybe (a)
    -- ^ /@self@/: a t'GI.Gio.Objects.Cancellable.Cancellable' or 'P.Nothing'
    -> Maybe (b)
    -- ^ /@other@/: a t'GI.Gio.Objects.Cancellable.Cancellable' or 'P.Nothing'
    -> m (Maybe Gio.Cancellable.Cancellable)
    -- ^ __Returns:__ a t'GI.Gio.Objects.Cancellable.Cancellable' or 'P.Nothing'
cancellableChain :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsCancellable a, IsCancellable b) =>
Maybe a -> Maybe b -> m (Maybe Cancellable)
cancellableChain Maybe a
self Maybe b
other = IO (Maybe Cancellable) -> m (Maybe Cancellable)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Cancellable) -> m (Maybe Cancellable))
-> IO (Maybe Cancellable) -> m (Maybe Cancellable)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Cancellable
maybeSelf <- case Maybe a
self of
        Maybe a
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just a
jSelf -> do
            Ptr Cancellable
jSelf' <- a -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jSelf
            Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jSelf'
    Ptr Cancellable
maybeOther <- case Maybe b
other of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just b
jOther -> do
            Ptr Cancellable
jOther' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jOther
            Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jOther'
    Ptr Cancellable
result <- Ptr Cancellable -> Ptr Cancellable -> IO (Ptr Cancellable)
dzl_cancellable_chain Ptr Cancellable
maybeSelf Ptr Cancellable
maybeOther
    Maybe Cancellable
maybeResult <- Ptr Cancellable
-> (Ptr Cancellable -> IO Cancellable) -> IO (Maybe Cancellable)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Cancellable
result ((Ptr Cancellable -> IO Cancellable) -> IO (Maybe Cancellable))
-> (Ptr Cancellable -> IO Cancellable) -> IO (Maybe Cancellable)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
result' -> do
        Cancellable
result'' <- ((ManagedPtr Cancellable -> Cancellable)
-> Ptr Cancellable -> IO Cancellable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Cancellable -> Cancellable
Gio.Cancellable.Cancellable) Ptr Cancellable
result'
        Cancellable -> IO Cancellable
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Cancellable
result''
    Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
self a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
other b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    Maybe Cancellable -> IO (Maybe Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Cancellable
maybeResult


-- function cairo_rounded_rectangle
-- Args: [ Arg
--           { argCName = "cr"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Context" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a cairo context" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rect"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkRectangle to draw"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x_radius"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the radius of the corners on the X axis"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y_radius"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the radius of the corners on the Y axis"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dzl_cairo_rounded_rectangle" dzl_cairo_rounded_rectangle :: 
    Ptr Cairo.Context.Context ->            -- cr : TInterface (Name {namespace = "cairo", name = "Context"})
    Ptr Gdk.Rectangle.Rectangle ->          -- rect : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    Int32 ->                                -- x_radius : TBasicType TInt
    Int32 ->                                -- y_radius : TBasicType TInt
    IO ()

-- | Adds a rounded rectangle to /@cr@/\'s current path.
cairoRoundedRectangle ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cairo.Context.Context
    -- ^ /@cr@/: a cairo context
    -> Gdk.Rectangle.Rectangle
    -- ^ /@rect@/: a t'GI.Gdk.Structs.Rectangle.Rectangle' to draw
    -> Int32
    -- ^ /@xRadius@/: the radius of the corners on the X axis
    -> Int32
    -- ^ /@yRadius@/: the radius of the corners on the Y axis
    -> m ()
cairoRoundedRectangle :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Context -> Rectangle -> Int32 -> Int32 -> m ()
cairoRoundedRectangle Context
cr Rectangle
rect Int32
xRadius Int32
yRadius = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Context
cr' <- Context -> IO (Ptr Context)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Context
cr
    Ptr Rectangle
rect' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
rect
    Ptr Context -> Ptr Rectangle -> Int32 -> Int32 -> IO ()
dzl_cairo_rounded_rectangle Ptr Context
cr' Ptr Rectangle
rect' Int32
xRadius Int32
yRadius
    Context -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Context
cr
    Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
rect
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()


-- function cairo_region_create_from_clip_extents
-- Args: [ Arg
--           { argCName = "cr"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Context" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "cairo" , name = "Region" })
-- throws : False
-- Skip return : False

foreign import ccall "dzl_cairo_region_create_from_clip_extents" dzl_cairo_region_create_from_clip_extents :: 
    Ptr Cairo.Context.Context ->            -- cr : TInterface (Name {namespace = "cairo", name = "Context"})
    IO (Ptr Cairo.Region.Region)

-- | /@cr@/ a cairo context
-- Creates a region from the extents of the context\'s current clip area.
cairoRegionCreateFromClipExtents ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Cairo.Context.Context
    -> m Cairo.Region.Region
    -- ^ __Returns:__ A @/CairoRegion/@.
cairoRegionCreateFromClipExtents :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Context -> m Region
cairoRegionCreateFromClipExtents Context
cr = IO Region -> m Region
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Region -> m Region) -> IO Region -> m Region
forall a b. (a -> b) -> a -> b
$ do
    Ptr Context
cr' <- Context -> IO (Ptr Context)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Context
cr
    Ptr Region
result <- Ptr Context -> IO (Ptr Region)
dzl_cairo_region_create_from_clip_extents Ptr Context
cr'
    Text -> Ptr Region -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"cairoRegionCreateFromClipExtents" Ptr Region
result
    Region
result' <- ((ManagedPtr Region -> Region) -> Ptr Region -> IO Region
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Region -> Region
Cairo.Region.Region) Ptr Region
result
    Context -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Context
cr
    Region -> IO Region
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Region
result'