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

module GI.GtkSource.Objects.SearchSettings
    ( 

-- * Exported types
    SearchSettings(..)                      ,
    IsSearchSettings                        ,
    toSearchSettings                        ,
    noSearchSettings                        ,


 -- * Methods
-- ** getAtWordBoundaries #method:getAtWordBoundaries#
    SearchSettingsGetAtWordBoundariesMethodInfo,
    searchSettingsGetAtWordBoundaries       ,


-- ** getCaseSensitive #method:getCaseSensitive#
    SearchSettingsGetCaseSensitiveMethodInfo,
    searchSettingsGetCaseSensitive          ,


-- ** getRegexEnabled #method:getRegexEnabled#
    SearchSettingsGetRegexEnabledMethodInfo ,
    searchSettingsGetRegexEnabled           ,


-- ** getSearchText #method:getSearchText#
    SearchSettingsGetSearchTextMethodInfo   ,
    searchSettingsGetSearchText             ,


-- ** getWrapAround #method:getWrapAround#
    SearchSettingsGetWrapAroundMethodInfo   ,
    searchSettingsGetWrapAround             ,


-- ** new #method:new#
    searchSettingsNew                       ,


-- ** setAtWordBoundaries #method:setAtWordBoundaries#
    SearchSettingsSetAtWordBoundariesMethodInfo,
    searchSettingsSetAtWordBoundaries       ,


-- ** setCaseSensitive #method:setCaseSensitive#
    SearchSettingsSetCaseSensitiveMethodInfo,
    searchSettingsSetCaseSensitive          ,


-- ** setRegexEnabled #method:setRegexEnabled#
    SearchSettingsSetRegexEnabledMethodInfo ,
    searchSettingsSetRegexEnabled           ,


-- ** setSearchText #method:setSearchText#
    SearchSettingsSetSearchTextMethodInfo   ,
    searchSettingsSetSearchText             ,


-- ** setWrapAround #method:setWrapAround#
    SearchSettingsSetWrapAroundMethodInfo   ,
    searchSettingsSetWrapAround             ,




 -- * Properties
-- ** atWordBoundaries #attr:atWordBoundaries#
    SearchSettingsAtWordBoundariesPropertyInfo,
    constructSearchSettingsAtWordBoundaries ,
    getSearchSettingsAtWordBoundaries       ,
    searchSettingsAtWordBoundaries          ,
    setSearchSettingsAtWordBoundaries       ,


-- ** caseSensitive #attr:caseSensitive#
    SearchSettingsCaseSensitivePropertyInfo ,
    constructSearchSettingsCaseSensitive    ,
    getSearchSettingsCaseSensitive          ,
    searchSettingsCaseSensitive             ,
    setSearchSettingsCaseSensitive          ,


-- ** regexEnabled #attr:regexEnabled#
    SearchSettingsRegexEnabledPropertyInfo  ,
    constructSearchSettingsRegexEnabled     ,
    getSearchSettingsRegexEnabled           ,
    searchSettingsRegexEnabled              ,
    setSearchSettingsRegexEnabled           ,


-- ** searchText #attr:searchText#
    SearchSettingsSearchTextPropertyInfo    ,
    clearSearchSettingsSearchText           ,
    constructSearchSettingsSearchText       ,
    getSearchSettingsSearchText             ,
    searchSettingsSearchText                ,
    setSearchSettingsSearchText             ,


-- ** wrapAround #attr:wrapAround#
    SearchSettingsWrapAroundPropertyInfo    ,
    constructSearchSettingsWrapAround       ,
    getSearchSettingsWrapAround             ,
    searchSettingsWrapAround                ,
    setSearchSettingsWrapAround             ,




    ) where

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

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

import qualified GI.GObject.Objects.Object as GObject.Object

newtype SearchSettings = SearchSettings (ManagedPtr SearchSettings)
foreign import ccall "gtk_source_search_settings_get_type"
    c_gtk_source_search_settings_get_type :: IO GType

instance GObject SearchSettings where
    gobjectType _ = c_gtk_source_search_settings_get_type
    

class GObject o => IsSearchSettings o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError SearchSettings a) =>
    IsSearchSettings a
#endif
instance IsSearchSettings SearchSettings
instance GObject.Object.IsObject SearchSettings

toSearchSettings :: IsSearchSettings o => o -> IO SearchSettings
toSearchSettings = unsafeCastTo SearchSettings

noSearchSettings :: Maybe SearchSettings
noSearchSettings = Nothing

type family ResolveSearchSettingsMethod (t :: Symbol) (o :: *) :: * where
    ResolveSearchSettingsMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveSearchSettingsMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveSearchSettingsMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveSearchSettingsMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveSearchSettingsMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveSearchSettingsMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveSearchSettingsMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveSearchSettingsMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveSearchSettingsMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveSearchSettingsMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveSearchSettingsMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveSearchSettingsMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveSearchSettingsMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveSearchSettingsMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveSearchSettingsMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveSearchSettingsMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveSearchSettingsMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveSearchSettingsMethod "getAtWordBoundaries" o = SearchSettingsGetAtWordBoundariesMethodInfo
    ResolveSearchSettingsMethod "getCaseSensitive" o = SearchSettingsGetCaseSensitiveMethodInfo
    ResolveSearchSettingsMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveSearchSettingsMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveSearchSettingsMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveSearchSettingsMethod "getRegexEnabled" o = SearchSettingsGetRegexEnabledMethodInfo
    ResolveSearchSettingsMethod "getSearchText" o = SearchSettingsGetSearchTextMethodInfo
    ResolveSearchSettingsMethod "getWrapAround" o = SearchSettingsGetWrapAroundMethodInfo
    ResolveSearchSettingsMethod "setAtWordBoundaries" o = SearchSettingsSetAtWordBoundariesMethodInfo
    ResolveSearchSettingsMethod "setCaseSensitive" o = SearchSettingsSetCaseSensitiveMethodInfo
    ResolveSearchSettingsMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveSearchSettingsMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveSearchSettingsMethod "setRegexEnabled" o = SearchSettingsSetRegexEnabledMethodInfo
    ResolveSearchSettingsMethod "setSearchText" o = SearchSettingsSetSearchTextMethodInfo
    ResolveSearchSettingsMethod "setWrapAround" o = SearchSettingsSetWrapAroundMethodInfo
    ResolveSearchSettingsMethod l o = O.MethodResolutionFailed l o

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

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

-- VVV Prop "at-word-boundaries"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]
   -- Nullable: (Just False,Just False)

getSearchSettingsAtWordBoundaries :: (MonadIO m, IsSearchSettings o) => o -> m Bool
getSearchSettingsAtWordBoundaries obj = liftIO $ getObjectPropertyBool obj "at-word-boundaries"

setSearchSettingsAtWordBoundaries :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m ()
setSearchSettingsAtWordBoundaries obj val = liftIO $ setObjectPropertyBool obj "at-word-boundaries" val

constructSearchSettingsAtWordBoundaries :: (IsSearchSettings o) => Bool -> IO (GValueConstruct o)
constructSearchSettingsAtWordBoundaries val = constructObjectPropertyBool "at-word-boundaries" val

data SearchSettingsAtWordBoundariesPropertyInfo
instance AttrInfo SearchSettingsAtWordBoundariesPropertyInfo where
    type AttrAllowedOps SearchSettingsAtWordBoundariesPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint SearchSettingsAtWordBoundariesPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint SearchSettingsAtWordBoundariesPropertyInfo = IsSearchSettings
    type AttrGetType SearchSettingsAtWordBoundariesPropertyInfo = Bool
    type AttrLabel SearchSettingsAtWordBoundariesPropertyInfo = "at-word-boundaries"
    type AttrOrigin SearchSettingsAtWordBoundariesPropertyInfo = SearchSettings
    attrGet _ = getSearchSettingsAtWordBoundaries
    attrSet _ = setSearchSettingsAtWordBoundaries
    attrConstruct _ = constructSearchSettingsAtWordBoundaries
    attrClear _ = undefined

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

getSearchSettingsCaseSensitive :: (MonadIO m, IsSearchSettings o) => o -> m Bool
getSearchSettingsCaseSensitive obj = liftIO $ getObjectPropertyBool obj "case-sensitive"

setSearchSettingsCaseSensitive :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m ()
setSearchSettingsCaseSensitive obj val = liftIO $ setObjectPropertyBool obj "case-sensitive" val

constructSearchSettingsCaseSensitive :: (IsSearchSettings o) => Bool -> IO (GValueConstruct o)
constructSearchSettingsCaseSensitive val = constructObjectPropertyBool "case-sensitive" val

data SearchSettingsCaseSensitivePropertyInfo
instance AttrInfo SearchSettingsCaseSensitivePropertyInfo where
    type AttrAllowedOps SearchSettingsCaseSensitivePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint SearchSettingsCaseSensitivePropertyInfo = (~) Bool
    type AttrBaseTypeConstraint SearchSettingsCaseSensitivePropertyInfo = IsSearchSettings
    type AttrGetType SearchSettingsCaseSensitivePropertyInfo = Bool
    type AttrLabel SearchSettingsCaseSensitivePropertyInfo = "case-sensitive"
    type AttrOrigin SearchSettingsCaseSensitivePropertyInfo = SearchSettings
    attrGet _ = getSearchSettingsCaseSensitive
    attrSet _ = setSearchSettingsCaseSensitive
    attrConstruct _ = constructSearchSettingsCaseSensitive
    attrClear _ = undefined

-- VVV Prop "regex-enabled"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]
   -- Nullable: (Just False,Just False)

getSearchSettingsRegexEnabled :: (MonadIO m, IsSearchSettings o) => o -> m Bool
getSearchSettingsRegexEnabled obj = liftIO $ getObjectPropertyBool obj "regex-enabled"

setSearchSettingsRegexEnabled :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m ()
setSearchSettingsRegexEnabled obj val = liftIO $ setObjectPropertyBool obj "regex-enabled" val

constructSearchSettingsRegexEnabled :: (IsSearchSettings o) => Bool -> IO (GValueConstruct o)
constructSearchSettingsRegexEnabled val = constructObjectPropertyBool "regex-enabled" val

data SearchSettingsRegexEnabledPropertyInfo
instance AttrInfo SearchSettingsRegexEnabledPropertyInfo where
    type AttrAllowedOps SearchSettingsRegexEnabledPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint SearchSettingsRegexEnabledPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint SearchSettingsRegexEnabledPropertyInfo = IsSearchSettings
    type AttrGetType SearchSettingsRegexEnabledPropertyInfo = Bool
    type AttrLabel SearchSettingsRegexEnabledPropertyInfo = "regex-enabled"
    type AttrOrigin SearchSettingsRegexEnabledPropertyInfo = SearchSettings
    attrGet _ = getSearchSettingsRegexEnabled
    attrSet _ = setSearchSettingsRegexEnabled
    attrConstruct _ = constructSearchSettingsRegexEnabled
    attrClear _ = undefined

-- VVV Prop "search-text"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]
   -- Nullable: (Just True,Just True)

getSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> m (Maybe T.Text)
getSearchSettingsSearchText obj = liftIO $ getObjectPropertyString obj "search-text"

setSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> T.Text -> m ()
setSearchSettingsSearchText obj val = liftIO $ setObjectPropertyString obj "search-text" (Just val)

constructSearchSettingsSearchText :: (IsSearchSettings o) => T.Text -> IO (GValueConstruct o)
constructSearchSettingsSearchText val = constructObjectPropertyString "search-text" (Just val)

clearSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> m ()
clearSearchSettingsSearchText obj = liftIO $ setObjectPropertyString obj "search-text" (Nothing :: Maybe T.Text)

data SearchSettingsSearchTextPropertyInfo
instance AttrInfo SearchSettingsSearchTextPropertyInfo where
    type AttrAllowedOps SearchSettingsSearchTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint SearchSettingsSearchTextPropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint SearchSettingsSearchTextPropertyInfo = IsSearchSettings
    type AttrGetType SearchSettingsSearchTextPropertyInfo = (Maybe T.Text)
    type AttrLabel SearchSettingsSearchTextPropertyInfo = "search-text"
    type AttrOrigin SearchSettingsSearchTextPropertyInfo = SearchSettings
    attrGet _ = getSearchSettingsSearchText
    attrSet _ = setSearchSettingsSearchText
    attrConstruct _ = constructSearchSettingsSearchText
    attrClear _ = clearSearchSettingsSearchText

-- VVV Prop "wrap-around"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]
   -- Nullable: (Just False,Just False)

getSearchSettingsWrapAround :: (MonadIO m, IsSearchSettings o) => o -> m Bool
getSearchSettingsWrapAround obj = liftIO $ getObjectPropertyBool obj "wrap-around"

setSearchSettingsWrapAround :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m ()
setSearchSettingsWrapAround obj val = liftIO $ setObjectPropertyBool obj "wrap-around" val

constructSearchSettingsWrapAround :: (IsSearchSettings o) => Bool -> IO (GValueConstruct o)
constructSearchSettingsWrapAround val = constructObjectPropertyBool "wrap-around" val

data SearchSettingsWrapAroundPropertyInfo
instance AttrInfo SearchSettingsWrapAroundPropertyInfo where
    type AttrAllowedOps SearchSettingsWrapAroundPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint SearchSettingsWrapAroundPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint SearchSettingsWrapAroundPropertyInfo = IsSearchSettings
    type AttrGetType SearchSettingsWrapAroundPropertyInfo = Bool
    type AttrLabel SearchSettingsWrapAroundPropertyInfo = "wrap-around"
    type AttrOrigin SearchSettingsWrapAroundPropertyInfo = SearchSettings
    attrGet _ = getSearchSettingsWrapAround
    attrSet _ = setSearchSettingsWrapAround
    attrConstruct _ = constructSearchSettingsWrapAround
    attrClear _ = undefined

instance O.HasAttributeList SearchSettings
type instance O.AttributeList SearchSettings = SearchSettingsAttributeList
type SearchSettingsAttributeList = ('[ '("atWordBoundaries", SearchSettingsAtWordBoundariesPropertyInfo), '("caseSensitive", SearchSettingsCaseSensitivePropertyInfo), '("regexEnabled", SearchSettingsRegexEnabledPropertyInfo), '("searchText", SearchSettingsSearchTextPropertyInfo), '("wrapAround", SearchSettingsWrapAroundPropertyInfo)] :: [(Symbol, *)])

searchSettingsAtWordBoundaries :: AttrLabelProxy "atWordBoundaries"
searchSettingsAtWordBoundaries = AttrLabelProxy

searchSettingsCaseSensitive :: AttrLabelProxy "caseSensitive"
searchSettingsCaseSensitive = AttrLabelProxy

searchSettingsRegexEnabled :: AttrLabelProxy "regexEnabled"
searchSettingsRegexEnabled = AttrLabelProxy

searchSettingsSearchText :: AttrLabelProxy "searchText"
searchSettingsSearchText = AttrLabelProxy

searchSettingsWrapAround :: AttrLabelProxy "wrapAround"
searchSettingsWrapAround = AttrLabelProxy

type instance O.SignalList SearchSettings = SearchSettingsSignalList
type SearchSettingsSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method SearchSettings::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GtkSource", name = "SearchSettings"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_search_settings_new" gtk_source_search_settings_new :: 
    IO (Ptr SearchSettings)

{- |
Creates a new search settings object.

@since 3.10
-}
searchSettingsNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m SearchSettings
    {- ^ __Returns:__ a new search settings object. -}
searchSettingsNew  = liftIO $ do
    result <- gtk_source_search_settings_new
    checkUnexpectedReturnNULL "searchSettingsNew" result
    result' <- (wrapObject SearchSettings) result
    return result'

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

foreign import ccall "gtk_source_search_settings_get_at_word_boundaries" gtk_source_search_settings_get_at_word_boundaries :: 
    Ptr SearchSettings ->                   -- settings : TInterface (Name {namespace = "GtkSource", name = "SearchSettings"})
    IO CInt

{- |
/No description available in the introspection data./

@since 3.10
-}
searchSettingsGetAtWordBoundaries ::
    (B.CallStack.HasCallStack, MonadIO m, IsSearchSettings a) =>
    a
    {- ^ /@settings@/: a 'GI.GtkSource.Objects.SearchSettings.SearchSettings'. -}
    -> m Bool
    {- ^ __Returns:__ whether to search at word boundaries. -}
searchSettingsGetAtWordBoundaries settings = liftIO $ do
    settings' <- unsafeManagedPtrCastPtr settings
    result <- gtk_source_search_settings_get_at_word_boundaries settings'
    let result' = (/= 0) result
    touchManagedPtr settings
    return result'

data SearchSettingsGetAtWordBoundariesMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsGetAtWordBoundariesMethodInfo a signature where
    overloadedMethod _ = searchSettingsGetAtWordBoundaries

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

foreign import ccall "gtk_source_search_settings_get_case_sensitive" gtk_source_search_settings_get_case_sensitive :: 
    Ptr SearchSettings ->                   -- settings : TInterface (Name {namespace = "GtkSource", name = "SearchSettings"})
    IO CInt

{- |
/No description available in the introspection data./

@since 3.10
-}
searchSettingsGetCaseSensitive ::
    (B.CallStack.HasCallStack, MonadIO m, IsSearchSettings a) =>
    a
    {- ^ /@settings@/: a 'GI.GtkSource.Objects.SearchSettings.SearchSettings'. -}
    -> m Bool
    {- ^ __Returns:__ whether the search is case sensitive. -}
searchSettingsGetCaseSensitive settings = liftIO $ do
    settings' <- unsafeManagedPtrCastPtr settings
    result <- gtk_source_search_settings_get_case_sensitive settings'
    let result' = (/= 0) result
    touchManagedPtr settings
    return result'

data SearchSettingsGetCaseSensitiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsGetCaseSensitiveMethodInfo a signature where
    overloadedMethod _ = searchSettingsGetCaseSensitive

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

foreign import ccall "gtk_source_search_settings_get_regex_enabled" gtk_source_search_settings_get_regex_enabled :: 
    Ptr SearchSettings ->                   -- settings : TInterface (Name {namespace = "GtkSource", name = "SearchSettings"})
    IO CInt

{- |
/No description available in the introspection data./

@since 3.10
-}
searchSettingsGetRegexEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsSearchSettings a) =>
    a
    {- ^ /@settings@/: a 'GI.GtkSource.Objects.SearchSettings.SearchSettings'. -}
    -> m Bool
    {- ^ __Returns:__ whether to search by regular expressions. -}
searchSettingsGetRegexEnabled settings = liftIO $ do
    settings' <- unsafeManagedPtrCastPtr settings
    result <- gtk_source_search_settings_get_regex_enabled settings'
    let result' = (/= 0) result
    touchManagedPtr settings
    return result'

data SearchSettingsGetRegexEnabledMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsGetRegexEnabledMethodInfo a signature where
    overloadedMethod _ = searchSettingsGetRegexEnabled

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

foreign import ccall "gtk_source_search_settings_get_search_text" gtk_source_search_settings_get_search_text :: 
    Ptr SearchSettings ->                   -- settings : TInterface (Name {namespace = "GtkSource", name = "SearchSettings"})
    IO CString

{- |
Gets the text to search. The return value must not be freed.

You may be interested to call 'GI.GtkSource.Functions.utilsEscapeSearchText' after
this function.

@since 3.10
-}
searchSettingsGetSearchText ::
    (B.CallStack.HasCallStack, MonadIO m, IsSearchSettings a) =>
    a
    {- ^ /@settings@/: a 'GI.GtkSource.Objects.SearchSettings.SearchSettings'. -}
    -> m (Maybe T.Text)
    {- ^ __Returns:__ the text to search, or 'Nothing' if the search is disabled. -}
searchSettingsGetSearchText settings = liftIO $ do
    settings' <- unsafeManagedPtrCastPtr settings
    result <- gtk_source_search_settings_get_search_text settings'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- cstringToText result'
        return result''
    touchManagedPtr settings
    return maybeResult

data SearchSettingsGetSearchTextMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsGetSearchTextMethodInfo a signature where
    overloadedMethod _ = searchSettingsGetSearchText

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

foreign import ccall "gtk_source_search_settings_get_wrap_around" gtk_source_search_settings_get_wrap_around :: 
    Ptr SearchSettings ->                   -- settings : TInterface (Name {namespace = "GtkSource", name = "SearchSettings"})
    IO CInt

{- |
/No description available in the introspection data./

@since 3.10
-}
searchSettingsGetWrapAround ::
    (B.CallStack.HasCallStack, MonadIO m, IsSearchSettings a) =>
    a
    {- ^ /@settings@/: a 'GI.GtkSource.Objects.SearchSettings.SearchSettings'. -}
    -> m Bool
    {- ^ __Returns:__ whether to wrap around the search. -}
searchSettingsGetWrapAround settings = liftIO $ do
    settings' <- unsafeManagedPtrCastPtr settings
    result <- gtk_source_search_settings_get_wrap_around settings'
    let result' = (/= 0) result
    touchManagedPtr settings
    return result'

data SearchSettingsGetWrapAroundMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsGetWrapAroundMethodInfo a signature where
    overloadedMethod _ = searchSettingsGetWrapAround

-- method SearchSettings::set_at_word_boundaries
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "settings", argType = TInterface (Name {namespace = "GtkSource", name = "SearchSettings"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceSearchSettings.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "at_word_boundaries", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the setting.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_search_settings_set_at_word_boundaries" gtk_source_search_settings_set_at_word_boundaries :: 
    Ptr SearchSettings ->                   -- settings : TInterface (Name {namespace = "GtkSource", name = "SearchSettings"})
    CInt ->                                 -- at_word_boundaries : TBasicType TBoolean
    IO ()

{- |
Change whether the search is done at word boundaries. If /@atWordBoundaries@/
is 'True', a search match must start and end a word. The match can span
multiple words. See also 'GI.Gtk.Structs.TextIter.textIterStartsWord' and
'GI.Gtk.Structs.TextIter.textIterEndsWord'.

@since 3.10
-}
searchSettingsSetAtWordBoundaries ::
    (B.CallStack.HasCallStack, MonadIO m, IsSearchSettings a) =>
    a
    {- ^ /@settings@/: a 'GI.GtkSource.Objects.SearchSettings.SearchSettings'. -}
    -> Bool
    {- ^ /@atWordBoundaries@/: the setting. -}
    -> m ()
searchSettingsSetAtWordBoundaries settings atWordBoundaries = liftIO $ do
    settings' <- unsafeManagedPtrCastPtr settings
    let atWordBoundaries' = (fromIntegral . fromEnum) atWordBoundaries
    gtk_source_search_settings_set_at_word_boundaries settings' atWordBoundaries'
    touchManagedPtr settings
    return ()

data SearchSettingsSetAtWordBoundariesMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsSetAtWordBoundariesMethodInfo a signature where
    overloadedMethod _ = searchSettingsSetAtWordBoundaries

-- method SearchSettings::set_case_sensitive
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "settings", argType = TInterface (Name {namespace = "GtkSource", name = "SearchSettings"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceSearchSettings.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "case_sensitive", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the setting.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_search_settings_set_case_sensitive" gtk_source_search_settings_set_case_sensitive :: 
    Ptr SearchSettings ->                   -- settings : TInterface (Name {namespace = "GtkSource", name = "SearchSettings"})
    CInt ->                                 -- case_sensitive : TBasicType TBoolean
    IO ()

{- |
Enables or disables the case sensitivity for the search.

@since 3.10
-}
searchSettingsSetCaseSensitive ::
    (B.CallStack.HasCallStack, MonadIO m, IsSearchSettings a) =>
    a
    {- ^ /@settings@/: a 'GI.GtkSource.Objects.SearchSettings.SearchSettings'. -}
    -> Bool
    {- ^ /@caseSensitive@/: the setting. -}
    -> m ()
searchSettingsSetCaseSensitive settings caseSensitive = liftIO $ do
    settings' <- unsafeManagedPtrCastPtr settings
    let caseSensitive' = (fromIntegral . fromEnum) caseSensitive
    gtk_source_search_settings_set_case_sensitive settings' caseSensitive'
    touchManagedPtr settings
    return ()

data SearchSettingsSetCaseSensitiveMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsSetCaseSensitiveMethodInfo a signature where
    overloadedMethod _ = searchSettingsSetCaseSensitive

-- method SearchSettings::set_regex_enabled
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "settings", argType = TInterface (Name {namespace = "GtkSource", name = "SearchSettings"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceSearchSettings.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "regex_enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the setting.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_search_settings_set_regex_enabled" gtk_source_search_settings_set_regex_enabled :: 
    Ptr SearchSettings ->                   -- settings : TInterface (Name {namespace = "GtkSource", name = "SearchSettings"})
    CInt ->                                 -- regex_enabled : TBasicType TBoolean
    IO ()

{- |
Enables or disables whether to search by regular expressions.
If enabled, the 'GI.GtkSource.Objects.SearchSettings.SearchSettings':@/search-text/@ property contains the
pattern of the regular expression.

'GI.GtkSource.Objects.SearchContext.SearchContext' uses 'GI.GLib.Structs.Regex.Regex' when regex search is enabled. See the
<https://developer.gnome.org/glib/stable/glib-regex-syntax.html Regular expression syntax>
page in the GLib reference manual.

@since 3.10
-}
searchSettingsSetRegexEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsSearchSettings a) =>
    a
    {- ^ /@settings@/: a 'GI.GtkSource.Objects.SearchSettings.SearchSettings'. -}
    -> Bool
    {- ^ /@regexEnabled@/: the setting. -}
    -> m ()
searchSettingsSetRegexEnabled settings regexEnabled = liftIO $ do
    settings' <- unsafeManagedPtrCastPtr settings
    let regexEnabled' = (fromIntegral . fromEnum) regexEnabled
    gtk_source_search_settings_set_regex_enabled settings' regexEnabled'
    touchManagedPtr settings
    return ()

data SearchSettingsSetRegexEnabledMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsSetRegexEnabledMethodInfo a signature where
    overloadedMethod _ = searchSettingsSetRegexEnabled

-- method SearchSettings::set_search_text
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "settings", argType = TInterface (Name {namespace = "GtkSource", name = "SearchSettings"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceSearchSettings.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "search_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the nul-terminated text to search, or %NULL to disable the search.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_search_settings_set_search_text" gtk_source_search_settings_set_search_text :: 
    Ptr SearchSettings ->                   -- settings : TInterface (Name {namespace = "GtkSource", name = "SearchSettings"})
    CString ->                              -- search_text : TBasicType TUTF8
    IO ()

{- |
Sets the text to search. If /@text@/ is 'Nothing' or is empty, the search will be
disabled. A copy of /@text@/ will be made, so you can safely free /@text@/ after
a call to this function.

You may be interested to call 'GI.GtkSource.Functions.utilsUnescapeSearchText' before
this function.

@since 3.10
-}
searchSettingsSetSearchText ::
    (B.CallStack.HasCallStack, MonadIO m, IsSearchSettings a) =>
    a
    {- ^ /@settings@/: a 'GI.GtkSource.Objects.SearchSettings.SearchSettings'. -}
    -> Maybe (T.Text)
    {- ^ /@searchText@/: the nul-terminated text to search, or 'Nothing' to disable the search. -}
    -> m ()
searchSettingsSetSearchText settings searchText = liftIO $ do
    settings' <- unsafeManagedPtrCastPtr settings
    maybeSearchText <- case searchText of
        Nothing -> return nullPtr
        Just jSearchText -> do
            jSearchText' <- textToCString jSearchText
            return jSearchText'
    gtk_source_search_settings_set_search_text settings' maybeSearchText
    touchManagedPtr settings
    freeMem maybeSearchText
    return ()

data SearchSettingsSetSearchTextMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsSetSearchTextMethodInfo a signature where
    overloadedMethod _ = searchSettingsSetSearchText

-- method SearchSettings::set_wrap_around
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "settings", argType = TInterface (Name {namespace = "GtkSource", name = "SearchSettings"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceSearchSettings.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "wrap_around", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the setting.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_search_settings_set_wrap_around" gtk_source_search_settings_set_wrap_around :: 
    Ptr SearchSettings ->                   -- settings : TInterface (Name {namespace = "GtkSource", name = "SearchSettings"})
    CInt ->                                 -- wrap_around : TBasicType TBoolean
    IO ()

{- |
Enables or disables the wrap around search. If /@wrapAround@/ is 'True', the
forward search continues at the beginning of the buffer if no search
occurrences are found. Similarly, the backward search continues to search at
the end of the buffer.

@since 3.10
-}
searchSettingsSetWrapAround ::
    (B.CallStack.HasCallStack, MonadIO m, IsSearchSettings a) =>
    a
    {- ^ /@settings@/: a 'GI.GtkSource.Objects.SearchSettings.SearchSettings'. -}
    -> Bool
    {- ^ /@wrapAround@/: the setting. -}
    -> m ()
searchSettingsSetWrapAround settings wrapAround = liftIO $ do
    settings' <- unsafeManagedPtrCastPtr settings
    let wrapAround' = (fromIntegral . fromEnum) wrapAround
    gtk_source_search_settings_set_wrap_around settings' wrapAround'
    touchManagedPtr settings
    return ()

data SearchSettingsSetWrapAroundMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsSetWrapAroundMethodInfo a signature where
    overloadedMethod _ = searchSettingsSetWrapAround