    {-# LANGUAGE TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- Sorts items by comparing strings.
    --
    -- To obtain the strings to compare, this sorter evaluates a
    -- t'GI.Gtk.Objects.Expression.Expression'.
    --
    -- It does the comparison in a linguistically correct way using the
    -- current locale by normalizing Unicode strings and possibly case-folding
    -- them before performing the comparison.

    #if !defined(__HADDOCK_VERSION__)
    #define ENABLE_OVERLOADING
    #endif

    module GI.Gtk.Objects.StringSorter
        (

    -- * Exported types
        StringSorter(..)                        ,
        IsStringSorter                          ,
        toStringSorter                          ,

     -- * Methods
    -- |
    --
    --  === __Click to display all available methods, including inherited ones__
    -- ==== Methods
    -- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [changed]("GI.Gtk.Objects.Sorter#g:method:changed"), [compare]("GI.Gtk.Objects.Sorter#g:method:compare"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
    --
    -- ==== Getters
    -- [getCollation]("GI.Gtk.Objects.StringSorter#g:method:getCollation"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getExpression]("GI.Gtk.Objects.StringSorter#g:method:getExpression"), [getIgnoreCase]("GI.Gtk.Objects.StringSorter#g:method:getIgnoreCase"), [getOrder]("GI.Gtk.Objects.Sorter#g:method:getOrder"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
    --
    -- ==== Setters
    -- [setCollation]("GI.Gtk.Objects.StringSorter#g:method:setCollation"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setExpression]("GI.Gtk.Objects.StringSorter#g:method:setExpression"), [setIgnoreCase]("GI.Gtk.Objects.StringSorter#g:method:setIgnoreCase"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

    #if defined(ENABLE_OVERLOADING)
        ResolveStringSorterMethod               ,
    #endif

    -- ** getCollation #method:getCollation#

    #if defined(ENABLE_OVERLOADING)
        StringSorterGetCollationMethodInfo      ,
    #endif
        stringSorterGetCollation                ,

    -- ** getExpression #method:getExpression#

    #if defined(ENABLE_OVERLOADING)
        StringSorterGetExpressionMethodInfo     ,
    #endif
        stringSorterGetExpression               ,

    -- ** getIgnoreCase #method:getIgnoreCase#

    #if defined(ENABLE_OVERLOADING)
        StringSorterGetIgnoreCaseMethodInfo     ,
    #endif
        stringSorterGetIgnoreCase               ,

    -- ** new #method:new#

        stringSorterNew                         ,

    -- ** setCollation #method:setCollation#

    #if defined(ENABLE_OVERLOADING)
        StringSorterSetCollationMethodInfo      ,
    #endif
        stringSorterSetCollation                ,

    -- ** setExpression #method:setExpression#

    #if defined(ENABLE_OVERLOADING)
        StringSorterSetExpressionMethodInfo     ,
    #endif
        stringSorterSetExpression               ,

    -- ** setIgnoreCase #method:setIgnoreCase#

    #if defined(ENABLE_OVERLOADING)
        StringSorterSetIgnoreCaseMethodInfo     ,
    #endif
        stringSorterSetIgnoreCase               ,

     -- * Properties

    -- ** collation #attr:collation#
    -- | The collation method to use for sorting.
    --
    -- The @GTK_COLLATION_NONE@ value is useful when the expression already
    -- returns collation keys, or strings that need to be compared byte-by-byte.
    --
    -- The default value, @GTK_COLLATION_UNICODE@, compares strings according
    -- to the <https://www.unicode.org/reports/tr10/ Unicode collation algorithm>.
    --
    -- /Since: 4.10/

    #if defined(ENABLE_OVERLOADING)
        StringSorterCollationPropertyInfo       ,
    #endif
        constructStringSorterCollation          ,
        getStringSorterCollation                ,
        setStringSorterCollation                ,
    #if defined(ENABLE_OVERLOADING)
        stringSorterCollation                   ,
    #endif

    -- ** expression #attr:expression#
    -- | The expression to evaluate on item to get a string to compare with.

    #if defined(ENABLE_OVERLOADING)
        StringSorterExpressionPropertyInfo      ,
    #endif
        clearStringSorterExpression             ,
        constructStringSorterExpression         ,
        getStringSorterExpression               ,
        setStringSorterExpression               ,
    #if defined(ENABLE_OVERLOADING)
        stringSorterExpression                  ,
    #endif

    -- ** ignoreCase #attr:ignoreCase#
    -- | If sorting is case sensitive.

    #if defined(ENABLE_OVERLOADING)
        StringSorterIgnoreCasePropertyInfo      ,
    #endif
        constructStringSorterIgnoreCase         ,
        getStringSorterIgnoreCase               ,
        setStringSorterIgnoreCase               ,
    #if defined(ENABLE_OVERLOADING)
        stringSorterIgnoreCase                  ,
    #endif

        ) 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.GLib.Callbacks as GLib.Callbacks
    import qualified GI.GObject.Objects.Object as GObject.Object
    import qualified GI.Gtk.Callbacks as Gtk.Callbacks
    import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
    import {-# SOURCE #-} qualified GI.Gtk.Objects.Expression as Gtk.Expression
    import {-# SOURCE #-} qualified GI.Gtk.Objects.Sorter as Gtk.Sorter
    import {-# SOURCE #-} qualified GI.Gtk.Structs.ExpressionWatch as Gtk.ExpressionWatch

    #else
    import qualified GI.GObject.Objects.Object as GObject.Object
    import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
    import {-# SOURCE #-} qualified GI.Gtk.Objects.Expression as Gtk.Expression
    import {-# SOURCE #-} qualified GI.Gtk.Objects.Sorter as Gtk.Sorter

    #endif

    -- | Memory-managed wrapper type.
    newtype StringSorter = StringSorter (SP.ManagedPtr StringSorter)
        deriving (StringSorter -> StringSorter -> Bool
    (StringSorter -> StringSorter -> Bool)
    -> (StringSorter -> StringSorter -> Bool) -> Eq StringSorter
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: StringSorter -> StringSorter -> Bool
    == :: StringSorter -> StringSorter -> Bool
    $c/= :: StringSorter -> StringSorter -> Bool
    /= :: StringSorter -> StringSorter -> Bool
    Eq)

    instance SP.ManagedPtrNewtype StringSorter where
        toManagedPtr :: StringSorter -> ManagedPtr StringSorter
    toManagedPtr (StringSorter ManagedPtr StringSorter
    p) = ManagedPtr StringSorter
    p

    foreign import ccall "gtk_string_sorter_get_type"
        c_gtk_string_sorter_get_type :: IO B.Types.GType

    instance B.Types.TypedObject StringSorter where
        glibType :: IO GType
    glibType = IO GType
    c_gtk_string_sorter_get_type

    instance B.Types.GObject StringSorter

    -- | Type class for types which can be safely cast to t'StringSorter', for instance with `toStringSorter`.
    class (SP.GObject o, O.IsDescendantOf StringSorter o) => IsStringSorter o
    instance (SP.GObject o, O.IsDescendantOf StringSorter o) => IsStringSorter o

    instance O.HasParentTypes StringSorter
    type instance O.ParentTypes StringSorter = '[Gtk.Sorter.Sorter, GObject.Object.Object]

    -- | Cast to t'StringSorter', for types for which this is known to be safe. For general casts, use 'Data.GI.Base.ManagedPtr.castTo'.
    toStringSorter :: (MIO.MonadIO m, IsStringSorter o) => o -> m StringSorter
    toStringSorter :: forall (m :: * -> *) o.
    (MonadIO m, IsStringSorter o) =>
    o -> m StringSorter
    toStringSorter = IO StringSorter -> m StringSorter
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO StringSorter -> m StringSorter)
    -> (o -> IO StringSorter) -> o -> m StringSorter
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ManagedPtr StringSorter -> StringSorter) -> o -> IO StringSorter
    forall o o'.
    (HasCallStack, ManagedPtrNewtype o, TypedObject o,
     ManagedPtrNewtype o', TypedObject o') =>
    (ManagedPtr o' -> o') -> o -> IO o'
    B.ManagedPtr.unsafeCastTo ManagedPtr StringSorter -> StringSorter
    StringSorter

    -- | Convert t'StringSorter' to and from t'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
    instance B.GValue.IsGValue (Maybe StringSorter) where
        gvalueGType_ :: IO GType
    gvalueGType_ = IO GType
    c_gtk_string_sorter_get_type
        gvalueSet_ :: Ptr GValue -> Maybe StringSorter -> IO ()
    gvalueSet_ Ptr GValue
    gv Maybe StringSorter
    P.Nothing = Ptr GValue -> Ptr StringSorter -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv (Ptr StringSorter
    forall a. Ptr a
    FP.nullPtr :: FP.Ptr StringSorter)
        gvalueSet_ Ptr GValue
    gv (P.Just StringSorter
    obj) = StringSorter -> (Ptr StringSorter -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    B.ManagedPtr.withManagedPtr StringSorter
    obj (Ptr GValue -> Ptr StringSorter -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv)
        gvalueGet_ :: Ptr GValue -> IO (Maybe StringSorter)
    gvalueGet_ Ptr GValue
    gv = do
            ptr <- Ptr GValue -> IO (Ptr StringSorter)
    forall a. GObject a => Ptr GValue -> IO (Ptr a)
    B.GValue.get_object Ptr GValue
    gv :: IO (FP.Ptr StringSorter)
            if ptr /= FP.nullPtr
            then P.Just <$> B.ManagedPtr.newObject StringSorter ptr
            else return P.Nothing

    #if defined(ENABLE_OVERLOADING)
    type family ResolveStringSorterMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolveStringSorterMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
        ResolveStringSorterMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
        ResolveStringSorterMethod "changed" o = Gtk.Sorter.SorterChangedMethodInfo
        ResolveStringSorterMethod "compare" o = Gtk.Sorter.SorterCompareMethodInfo
        ResolveStringSorterMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
        ResolveStringSorterMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
        ResolveStringSorterMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
        ResolveStringSorterMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
        ResolveStringSorterMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
        ResolveStringSorterMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
        ResolveStringSorterMethod "ref" o = GObject.Object.ObjectRefMethodInfo
        ResolveStringSorterMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
        ResolveStringSorterMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
        ResolveStringSorterMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
        ResolveStringSorterMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
        ResolveStringSorterMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
        ResolveStringSorterMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
        ResolveStringSorterMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
        ResolveStringSorterMethod "getCollation" o = StringSorterGetCollationMethodInfo
        ResolveStringSorterMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
        ResolveStringSorterMethod "getExpression" o = StringSorterGetExpressionMethodInfo
        ResolveStringSorterMethod "getIgnoreCase" o = StringSorterGetIgnoreCaseMethodInfo
        ResolveStringSorterMethod "getOrder" o = Gtk.Sorter.SorterGetOrderMethodInfo
        ResolveStringSorterMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
        ResolveStringSorterMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
        ResolveStringSorterMethod "setCollation" o = StringSorterSetCollationMethodInfo
        ResolveStringSorterMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
        ResolveStringSorterMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
        ResolveStringSorterMethod "setExpression" o = StringSorterSetExpressionMethodInfo
        ResolveStringSorterMethod "setIgnoreCase" o = StringSorterSetIgnoreCaseMethodInfo
        ResolveStringSorterMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
        ResolveStringSorterMethod l o = O.MethodResolutionFailed l o

    instance (info ~ ResolveStringSorterMethod t StringSorter, O.OverloadedMethod info StringSorter p) => OL.IsLabel t (StringSorter -> p) where
    #if MIN_VERSION_base(4,10,0)
        fromLabel = O.overloadedMethod @info
    #else
        fromLabel _ = O.overloadedMethod @info
    #endif

    #if MIN_VERSION_base(4,13,0)
    instance (info ~ ResolveStringSorterMethod t StringSorter, O.OverloadedMethod info StringSorter p, R.HasField t StringSorter p) => R.HasField t StringSorter p where
        getField = O.overloadedMethod @info

    #endif

    instance (info ~ ResolveStringSorterMethod t StringSorter, O.OverloadedMethodInfo info StringSorter) => OL.IsLabel t (O.MethodProxy info StringSorter) where
    #if MIN_VERSION_base(4,10,0)
        fromLabel = O.MethodProxy
    #else
        fromLabel _ = O.MethodProxy
    #endif

    #endif

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

    -- | Get the value of the “@collation@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' stringSorter #collation
    -- @
    getStringSorterCollation :: (MonadIO m, IsStringSorter o) => o -> m Gtk.Enums.Collation
    getStringSorterCollation :: forall (m :: * -> *) o.
    (MonadIO m, IsStringSorter o) =>
    o -> m Collation
    getStringSorterCollation o
    obj = IO Collation -> m Collation
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO Collation -> m Collation) -> IO Collation -> m Collation
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO Collation
    forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
    B.Properties.getObjectPropertyEnum o
    obj String
    "collation"

    -- | Set the value of the “@collation@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' stringSorter [ #collation 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setStringSorterCollation :: (MonadIO m, IsStringSorter o) => o -> Gtk.Enums.Collation -> m ()
    setStringSorterCollation :: forall (m :: * -> *) o.
    (MonadIO m, IsStringSorter o) =>
    o -> Collation -> m ()
    setStringSorterCollation o
    obj Collation
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        o -> String -> Collation -> IO ()
    forall a b.
    (GObject a, Enum b, BoxedEnum b) =>
    a -> String -> b -> IO ()
    B.Properties.setObjectPropertyEnum o
    obj String
    "collation" Collation
    val

    -- | Construct a t'GValueConstruct' with valid value for the “@collation@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructStringSorterCollation :: (IsStringSorter o, MIO.MonadIO m) => Gtk.Enums.Collation -> m (GValueConstruct o)
    constructStringSorterCollation :: forall o (m :: * -> *).
    (IsStringSorter o, MonadIO m) =>
    Collation -> m (GValueConstruct o)
    constructStringSorterCollation Collation
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Collation -> IO (GValueConstruct o)
    forall a o.
    (Enum a, BoxedEnum a) =>
    String -> a -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyEnum String
    "collation" Collation
    val

    #if defined(ENABLE_OVERLOADING)
    data StringSorterCollationPropertyInfo
    instance AttrInfo StringSorterCollationPropertyInfo where
        type AttrAllowedOps StringSorterCollationPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
        type AttrBaseTypeConstraint StringSorterCollationPropertyInfo = IsStringSorter
        type AttrSetTypeConstraint StringSorterCollationPropertyInfo = (~) Gtk.Enums.Collation
        type AttrTransferTypeConstraint StringSorterCollationPropertyInfo = (~) Gtk.Enums.Collation
        type AttrTransferType StringSorterCollationPropertyInfo = Gtk.Enums.Collation
        type AttrGetType StringSorterCollationPropertyInfo = Gtk.Enums.Collation
        type AttrLabel StringSorterCollationPropertyInfo = "collation"
        type AttrOrigin StringSorterCollationPropertyInfo = StringSorter
        attrGet = getStringSorterCollation
        attrSet = setStringSorterCollation
        attrPut = setStringSorterCollation
        attrTransfer _ v = do
            return v
        attrConstruct = constructStringSorterCollation
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.StringSorter.collation"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-StringSorter.html#g:attr:collation"
            })
    #endif

    -- VVV Prop "expression"
       -- Type: TInterface (Name {namespace = "Gtk", name = "Expression"})
       -- Flags: [PropertyReadable,PropertyWritable]
       -- Nullable: (Just True,Just True)

    -- | Get the value of the “@expression@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' stringSorter #expression
    -- @
    getStringSorterExpression :: (MonadIO m, IsStringSorter o) => o -> m (Maybe Gtk.Expression.Expression)
    getStringSorterExpression :: forall (m :: * -> *) o.
    (MonadIO m, IsStringSorter o) =>
    o -> m (Maybe Expression)
    getStringSorterExpression o
    obj = IO (Maybe Expression) -> m (Maybe Expression)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (Maybe Expression) -> m (Maybe Expression))
    -> IO (Maybe Expression) -> m (Maybe Expression)
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO (Maybe Expression)
    forall a b. (GObject a, IsGValue b) => a -> String -> IO b
    B.Properties.getObjectPropertyIsGValueInstance o
    obj String
    "expression"

    -- | Set the value of the “@expression@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' stringSorter [ #expression 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setStringSorterExpression :: (MonadIO m, IsStringSorter o, Gtk.Expression.IsExpression a) => o -> a -> m ()
    setStringSorterExpression :: forall (m :: * -> *) o a.
    (MonadIO m, IsStringSorter o, IsExpression a) =>
    o -> a -> m ()
    setStringSorterExpression o
    obj a
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        val' <- a -> IO Expression
    forall (m :: * -> *) o.
    (MonadIO m, IsExpression o) =>
    o -> m Expression
    Gtk.Expression.toExpression a
    val
        B.Properties.setObjectPropertyIsGValueInstance obj "expression" (Just val')

    -- | Construct a t'GValueConstruct' with valid value for the “@expression@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructStringSorterExpression :: (IsStringSorter o, MIO.MonadIO m, Gtk.Expression.IsExpression a) => a -> m (GValueConstruct o)
    constructStringSorterExpression :: forall o (m :: * -> *) a.
    (IsStringSorter o, MonadIO m, IsExpression a) =>
    a -> m (GValueConstruct o)
    constructStringSorterExpression a
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        val' <- a -> IO Expression
    forall (m :: * -> *) o.
    (MonadIO m, IsExpression o) =>
    o -> m Expression
    Gtk.Expression.toExpression a
    val
        MIO.liftIO $ B.Properties.constructObjectPropertyIsGValueInstance "expression" (P.Just val')

    -- | Set the value of the “@expression@” property to `Nothing`.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.clear' #expression
    -- @
    clearStringSorterExpression :: (MonadIO m, IsStringSorter o) => o -> m ()
    clearStringSorterExpression :: forall (m :: * -> *) o. (MonadIO m, IsStringSorter o) => o -> m ()
    clearStringSorterExpression o
    obj = 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
    $ o -> String -> Maybe Expression -> IO ()
    forall a b. (GObject a, IsGValue b) => a -> String -> b -> IO ()
    B.Properties.setObjectPropertyIsGValueInstance o
    obj String
    "expression" (Maybe Expression
    forall a. Maybe a
    Nothing :: Maybe Gtk.Expression.Expression)

    #if defined(ENABLE_OVERLOADING)
    data StringSorterExpressionPropertyInfo
    instance AttrInfo StringSorterExpressionPropertyInfo where
        type AttrAllowedOps StringSorterExpressionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
        type AttrBaseTypeConstraint StringSorterExpressionPropertyInfo = IsStringSorter
        type AttrSetTypeConstraint StringSorterExpressionPropertyInfo = (~) Gtk.Expression.Expression
        type AttrTransferTypeConstraint StringSorterExpressionPropertyInfo = (~) Gtk.Expression.Expression
        type AttrTransferType StringSorterExpressionPropertyInfo = Gtk.Expression.Expression
        type AttrGetType StringSorterExpressionPropertyInfo = (Maybe Gtk.Expression.Expression)
        type AttrLabel StringSorterExpressionPropertyInfo = "expression"
        type AttrOrigin StringSorterExpressionPropertyInfo = StringSorter
        attrGet = getStringSorterExpression
        attrSet = setStringSorterExpression
        attrPut = undefined
        attrTransfer _ v = do
            return v
        attrConstruct = constructStringSorterExpression
        attrClear = clearStringSorterExpression
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.StringSorter.expression"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-StringSorter.html#g:attr:expression"
            })
    #endif

    -- VVV Prop "ignore-case"
       -- Type: TBasicType TBoolean
       -- Flags: [PropertyReadable,PropertyWritable]
       -- Nullable: (Just False,Just False)

    -- | Get the value of the “@ignore-case@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' stringSorter #ignoreCase
    -- @
    getStringSorterIgnoreCase :: (MonadIO m, IsStringSorter o) => o -> m Bool
    getStringSorterIgnoreCase :: forall (m :: * -> *) o.
    (MonadIO m, IsStringSorter o) =>
    o -> m Bool
    getStringSorterIgnoreCase o
    obj = IO Bool -> m Bool
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO Bool
    forall a. GObject a => a -> String -> IO Bool
    B.Properties.getObjectPropertyBool o
    obj String
    "ignore-case"

    -- | Set the value of the “@ignore-case@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.set' stringSorter [ #ignoreCase 'Data.GI.Base.Attributes.:=' value ]
    -- @
    setStringSorterIgnoreCase :: (MonadIO m, IsStringSorter o) => o -> Bool -> m ()
    setStringSorterIgnoreCase :: forall (m :: * -> *) o.
    (MonadIO m, IsStringSorter o) =>
    o -> Bool -> m ()
    setStringSorterIgnoreCase o
    obj Bool
    val = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        o -> String -> Bool -> IO ()
    forall a. GObject a => a -> String -> Bool -> IO ()
    B.Properties.setObjectPropertyBool o
    obj String
    "ignore-case" Bool
    val

    -- | Construct a t'GValueConstruct' with valid value for the “@ignore-case@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructStringSorterIgnoreCase :: (IsStringSorter o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
    constructStringSorterIgnoreCase :: forall o (m :: * -> *).
    (IsStringSorter o, MonadIO m) =>
    Bool -> m (GValueConstruct o)
    constructStringSorterIgnoreCase Bool
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Bool -> IO (GValueConstruct o)
    forall o. String -> Bool -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyBool String
    "ignore-case" Bool
    val

    #if defined(ENABLE_OVERLOADING)
    data StringSorterIgnoreCasePropertyInfo
    instance AttrInfo StringSorterIgnoreCasePropertyInfo where
        type AttrAllowedOps StringSorterIgnoreCasePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
        type AttrBaseTypeConstraint StringSorterIgnoreCasePropertyInfo = IsStringSorter
        type AttrSetTypeConstraint StringSorterIgnoreCasePropertyInfo = (~) Bool
        type AttrTransferTypeConstraint StringSorterIgnoreCasePropertyInfo = (~) Bool
        type AttrTransferType StringSorterIgnoreCasePropertyInfo = Bool
        type AttrGetType StringSorterIgnoreCasePropertyInfo = Bool
        type AttrLabel StringSorterIgnoreCasePropertyInfo = "ignore-case"
        type AttrOrigin StringSorterIgnoreCasePropertyInfo = StringSorter
        attrGet = getStringSorterIgnoreCase
        attrSet = setStringSorterIgnoreCase
        attrPut = setStringSorterIgnoreCase
        attrTransfer _ v = do
            return v
        attrConstruct = constructStringSorterIgnoreCase
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.StringSorter.ignoreCase"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-StringSorter.html#g:attr:ignoreCase"
            })
    #endif

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList StringSorter
    type instance O.AttributeList StringSorter = StringSorterAttributeList
    type StringSorterAttributeList = ('[ '("collation", StringSorterCollationPropertyInfo), '("expression", StringSorterExpressionPropertyInfo), '("ignoreCase", StringSorterIgnoreCasePropertyInfo)] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    stringSorterCollation :: AttrLabelProxy "collation"
    stringSorterCollation = AttrLabelProxy

    stringSorterExpression :: AttrLabelProxy "expression"
    stringSorterExpression = AttrLabelProxy

    stringSorterIgnoreCase :: AttrLabelProxy "ignoreCase"
    stringSorterIgnoreCase = AttrLabelProxy

    #endif

    #if defined(ENABLE_OVERLOADING)
    type instance O.SignalList StringSorter = StringSorterSignalList
    type StringSorterSignalList = ('[ '("changed", Gtk.Sorter.SorterChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

    #endif

    -- method StringSorter::new
    -- method type : Constructor
    -- Args: [ Arg
    --           { argCName = "expression"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "Expression" }
    --           , argCType = Just "GtkExpression*"
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The expression to evaluate"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferEverything
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just
    --               (TInterface Name { namespace = "Gtk" , name = "StringSorter" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_string_sorter_new" gtk_string_sorter_new ::
        Ptr Gtk.Expression.Expression ->        -- expression : TInterface (Name {namespace = "Gtk", name = "Expression"})
        IO (Ptr StringSorter)

    -- | Creates a new string sorter that compares items using the given
    -- /@expression@/.
    --
    -- Unless an expression is set on it, this sorter will always
    -- compare items as invalid.
    stringSorterNew ::
        (B.CallStack.HasCallStack, MonadIO m, Gtk.Expression.IsExpression a) =>
        Maybe (a)
        -- ^ /@expression@/: The expression to evaluate
        -> m StringSorter
        -- ^ __Returns:__ a new @GtkStringSorter@
    stringSorterNew :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsExpression a) =>
    Maybe a -> m StringSorter
    stringSorterNew Maybe a
    expression = IO StringSorter -> m StringSorter
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO StringSorter -> m StringSorter)
    -> IO StringSorter -> m StringSorter
    forall a b. (a -> b) -> a -> b
    $ do
        maybeExpression <- case Maybe a
    expression of
            Maybe a
    Nothing -> Ptr Expression -> IO (Ptr Expression)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr Expression
    forall a. Ptr a
    FP.nullPtr
            Just a
    jExpression -> do
                jExpression' <- a -> IO (Ptr Expression)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    B.ManagedPtr.disownManagedPtr a
    jExpression
                return jExpression'
        result <- gtk_string_sorter_new maybeExpression
        checkUnexpectedReturnNULL "stringSorterNew" result
        result' <- (wrapObject StringSorter) result
        whenJust expression touchManagedPtr
        return result'

    #if defined(ENABLE_OVERLOADING)
    #endif

    -- method StringSorter::get_collation
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "StringSorter" }
    --           , argCType = Just "GtkStringSorter*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a `GtkStringSorter`"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Collation" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_string_sorter_get_collation" gtk_string_sorter_get_collation ::
        Ptr StringSorter ->                     -- self : TInterface (Name {namespace = "Gtk", name = "StringSorter"})
        IO CUInt

    -- | Gets which collation method the sorter uses.
    --
    -- /Since: 4.10/
    stringSorterGetCollation ::
        (B.CallStack.HasCallStack, MonadIO m, IsStringSorter a) =>
        a
        -- ^ /@self@/: a @GtkStringSorter@
        -> m Gtk.Enums.Collation
        -- ^ __Returns:__ The collation method
    stringSorterGetCollation :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsStringSorter a) =>
    a -> m Collation
    stringSorterGetCollation a
    self = IO Collation -> m Collation
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Collation -> m Collation) -> IO Collation -> m Collation
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr StringSorter)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_string_sorter_get_collation self'
        let result' = (Int -> Collation
    forall a. Enum a => Int -> a
    toEnum (Int -> Collation) -> (CUInt -> Int) -> CUInt -> Collation
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . CUInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral) CUInt
    result
        touchManagedPtr self
        return result'

    #if defined(ENABLE_OVERLOADING)
    data StringSorterGetCollationMethodInfo
    instance (signature ~ (m Gtk.Enums.Collation), MonadIO m, IsStringSorter a) => O.OverloadedMethod StringSorterGetCollationMethodInfo a signature where
        overloadedMethod = stringSorterGetCollation

    instance O.OverloadedMethodInfo StringSorterGetCollationMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.StringSorter.stringSorterGetCollation",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-StringSorter.html#v:stringSorterGetCollation"
            })

    #endif

    -- method StringSorter::get_expression
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "StringSorter" }
    --           , argCType = Just "GtkStringSorter*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a `GtkStringSorter`"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Expression" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_string_sorter_get_expression" gtk_string_sorter_get_expression ::
        Ptr StringSorter ->                     -- self : TInterface (Name {namespace = "Gtk", name = "StringSorter"})
        IO (Ptr Gtk.Expression.Expression)

    -- | Gets the expression that is evaluated to obtain strings from items.
    stringSorterGetExpression ::
        (B.CallStack.HasCallStack, MonadIO m, IsStringSorter a) =>
        a
        -- ^ /@self@/: a @GtkStringSorter@
        -> m (Maybe Gtk.Expression.Expression)
        -- ^ __Returns:__ a @GtkExpression@
    stringSorterGetExpression :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsStringSorter a) =>
    a -> m (Maybe Expression)
    stringSorterGetExpression a
    self = IO (Maybe Expression) -> m (Maybe Expression)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Maybe Expression) -> m (Maybe Expression))
    -> IO (Maybe Expression) -> m (Maybe Expression)
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr StringSorter)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_string_sorter_get_expression self'
        maybeResult <- convertIfNonNull result $ \Ptr Expression
    result' -> do
            result'' <- ((ManagedPtr Expression -> Expression)
    -> Ptr Expression -> IO Expression
    forall a.
    (HasCallStack, BoxedPtr a) =>
    (ManagedPtr a -> a) -> Ptr a -> IO a
    newPtr ManagedPtr Expression -> Expression
    Gtk.Expression.Expression) Ptr Expression
    result'
            return result''
        touchManagedPtr self
        return maybeResult

    #if defined(ENABLE_OVERLOADING)
    data StringSorterGetExpressionMethodInfo
    instance (signature ~ (m (Maybe Gtk.Expression.Expression)), MonadIO m, IsStringSorter a) => O.OverloadedMethod StringSorterGetExpressionMethodInfo a signature where
        overloadedMethod = stringSorterGetExpression

    instance O.OverloadedMethodInfo StringSorterGetExpressionMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.StringSorter.stringSorterGetExpression",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-StringSorter.html#v:stringSorterGetExpression"
            })

    #endif

    -- method StringSorter::get_ignore_case
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "StringSorter" }
    --           , argCType = Just "GtkStringSorter*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a `GtkStringSorter`"
    --                 , 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 "gtk_string_sorter_get_ignore_case" gtk_string_sorter_get_ignore_case ::
        Ptr StringSorter ->                     -- self : TInterface (Name {namespace = "Gtk", name = "StringSorter"})
        IO CInt

    -- | Gets whether the sorter ignores case differences.
    stringSorterGetIgnoreCase ::
        (B.CallStack.HasCallStack, MonadIO m, IsStringSorter a) =>
        a
        -- ^ /@self@/: a @GtkStringSorter@
        -> m Bool
        -- ^ __Returns:__ 'P.True' if /@self@/ is ignoring case differences
    stringSorterGetIgnoreCase :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsStringSorter a) =>
    a -> m Bool
    stringSorterGetIgnoreCase a
    self = 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
        self' <- a -> IO (Ptr StringSorter)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_string_sorter_get_ignore_case self'
        let result' = (CInt -> CInt -> Bool
    forall a. Eq a => a -> a -> Bool
    /= CInt
    0) CInt
    result
        touchManagedPtr self
        return result'

    #if defined(ENABLE_OVERLOADING)
    data StringSorterGetIgnoreCaseMethodInfo
    instance (signature ~ (m Bool), MonadIO m, IsStringSorter a) => O.OverloadedMethod StringSorterGetIgnoreCaseMethodInfo a signature where
        overloadedMethod = stringSorterGetIgnoreCase

    instance O.OverloadedMethodInfo StringSorterGetIgnoreCaseMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.StringSorter.stringSorterGetIgnoreCase",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-StringSorter.html#v:stringSorterGetIgnoreCase"
            })

    #endif

    -- method StringSorter::set_collation
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "StringSorter" }
    --           , argCType = Just "GtkStringSorter*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a `GtkStringSorter`"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "collation"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "Collation" }
    --           , argCType = Just "GtkCollation"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the collation method"
    --                 , 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 "gtk_string_sorter_set_collation" gtk_string_sorter_set_collation ::
        Ptr StringSorter ->                     -- self : TInterface (Name {namespace = "Gtk", name = "StringSorter"})
        CUInt ->                                -- collation : TInterface (Name {namespace = "Gtk", name = "Collation"})
        IO ()

    -- | Sets the collation method to use for sorting.
    --
    -- /Since: 4.10/
    stringSorterSetCollation ::
        (B.CallStack.HasCallStack, MonadIO m, IsStringSorter a) =>
        a
        -- ^ /@self@/: a @GtkStringSorter@
        -> Gtk.Enums.Collation
        -- ^ /@collation@/: the collation method
        -> m ()
    stringSorterSetCollation :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsStringSorter a) =>
    a -> Collation -> m ()
    stringSorterSetCollation a
    self Collation
    collation = 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
        self' <- a -> IO (Ptr StringSorter)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        let collation' = (Int -> CUInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int -> CUInt) -> (Collation -> Int) -> Collation -> CUInt
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Collation -> Int
    forall a. Enum a => a -> Int
    fromEnum) Collation
    collation
        gtk_string_sorter_set_collation self' collation'
        touchManagedPtr self
        return ()

    #if defined(ENABLE_OVERLOADING)
    data StringSorterSetCollationMethodInfo
    instance (signature ~ (Gtk.Enums.Collation -> m ()), MonadIO m, IsStringSorter a) => O.OverloadedMethod StringSorterSetCollationMethodInfo a signature where
        overloadedMethod = stringSorterSetCollation

    instance O.OverloadedMethodInfo StringSorterSetCollationMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.StringSorter.stringSorterSetCollation",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-StringSorter.html#v:stringSorterSetCollation"
            })

    #endif

    -- method StringSorter::set_expression
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "StringSorter" }
    --           , argCType = Just "GtkStringSorter*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a `GtkStringSorter`"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "expression"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "Expression" }
    --           , argCType = Just "GtkExpression*"
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a `GtkExpression`" , 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 "gtk_string_sorter_set_expression" gtk_string_sorter_set_expression ::
        Ptr StringSorter ->                     -- self : TInterface (Name {namespace = "Gtk", name = "StringSorter"})
        Ptr Gtk.Expression.Expression ->        -- expression : TInterface (Name {namespace = "Gtk", name = "Expression"})
        IO ()

    -- | Sets the expression that is evaluated to obtain strings from items.
    --
    -- The expression must have the type @/G_TYPE_STRING/@.
    stringSorterSetExpression ::
        (B.CallStack.HasCallStack, MonadIO m, IsStringSorter a, Gtk.Expression.IsExpression b) =>
        a
        -- ^ /@self@/: a @GtkStringSorter@
        -> Maybe (b)
        -- ^ /@expression@/: a @GtkExpression@
        -> m ()
    stringSorterSetExpression :: forall (m :: * -> *) a b.
    (HasCallStack, MonadIO m, IsStringSorter a, IsExpression b) =>
    a -> Maybe b -> m ()
    stringSorterSetExpression a
    self Maybe b
    expression = 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
        self' <- a -> IO (Ptr StringSorter)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        maybeExpression <- case expression of
            Maybe b
    Nothing -> Ptr Expression -> IO (Ptr Expression)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr Expression
    forall a. Ptr a
    FP.nullPtr
            Just b
    jExpression -> do
                jExpression' <- b -> IO (Ptr Expression)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr b
    jExpression
                return jExpression'
        gtk_string_sorter_set_expression self' maybeExpression
        touchManagedPtr self
        whenJust expression touchManagedPtr
        return ()

    #if defined(ENABLE_OVERLOADING)
    data StringSorterSetExpressionMethodInfo
    instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsStringSorter a, Gtk.Expression.IsExpression b) => O.OverloadedMethod StringSorterSetExpressionMethodInfo a signature where
        overloadedMethod = stringSorterSetExpression

    instance O.OverloadedMethodInfo StringSorterSetExpressionMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.StringSorter.stringSorterSetExpression",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-StringSorter.html#v:stringSorterSetExpression"
            })

    #endif

    -- method StringSorter::set_ignore_case
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "StringSorter" }
    --           , argCType = Just "GtkStringSorter*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a `GtkStringSorter`"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "ignore_case"
    --           , argType = TBasicType TBoolean
    --           , argCType = Just "gboolean"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "%TRUE to ignore case differences"
    --                 , 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 "gtk_string_sorter_set_ignore_case" gtk_string_sorter_set_ignore_case ::
        Ptr StringSorter ->                     -- self : TInterface (Name {namespace = "Gtk", name = "StringSorter"})
        CInt ->                                 -- ignore_case : TBasicType TBoolean
        IO ()

    -- | Sets whether the sorter will ignore case differences.
    stringSorterSetIgnoreCase ::
        (B.CallStack.HasCallStack, MonadIO m, IsStringSorter a) =>
        a
        -- ^ /@self@/: a @GtkStringSorter@
        -> Bool
        -- ^ /@ignoreCase@/: 'P.True' to ignore case differences
        -> m ()
    stringSorterSetIgnoreCase :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsStringSorter a) =>
    a -> Bool -> m ()
    stringSorterSetIgnoreCase a
    self Bool
    ignoreCase = 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
        self' <- a -> IO (Ptr StringSorter)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        let ignoreCase' = (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
    ignoreCase
        gtk_string_sorter_set_ignore_case self' ignoreCase'
        touchManagedPtr self
        return ()

    #if defined(ENABLE_OVERLOADING)
    data StringSorterSetIgnoreCaseMethodInfo
    instance (signature ~ (Bool -> m ()), MonadIO m, IsStringSorter a) => O.OverloadedMethod StringSorterSetIgnoreCaseMethodInfo a signature where
        overloadedMethod = stringSorterSetIgnoreCase

    instance O.OverloadedMethodInfo StringSorterSetIgnoreCaseMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.StringSorter.stringSorterSetIgnoreCase",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-StringSorter.html#v:stringSorterSetIgnoreCase"
            })

    #endif