{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) /No description available in the introspection data./ -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.GtkSource.Objects.SearchSettings ( -- * Exported types SearchSettings(..) , IsSearchSettings , toSearchSettings , noSearchSettings , -- * Methods -- ** getAtWordBoundaries #method:getAtWordBoundaries# #if ENABLE_OVERLOADING SearchSettingsGetAtWordBoundariesMethodInfo, #endif searchSettingsGetAtWordBoundaries , -- ** getCaseSensitive #method:getCaseSensitive# #if ENABLE_OVERLOADING SearchSettingsGetCaseSensitiveMethodInfo, #endif searchSettingsGetCaseSensitive , -- ** getRegexEnabled #method:getRegexEnabled# #if ENABLE_OVERLOADING SearchSettingsGetRegexEnabledMethodInfo , #endif searchSettingsGetRegexEnabled , -- ** getSearchText #method:getSearchText# #if ENABLE_OVERLOADING SearchSettingsGetSearchTextMethodInfo , #endif searchSettingsGetSearchText , -- ** getWrapAround #method:getWrapAround# #if ENABLE_OVERLOADING SearchSettingsGetWrapAroundMethodInfo , #endif searchSettingsGetWrapAround , -- ** new #method:new# searchSettingsNew , -- ** setAtWordBoundaries #method:setAtWordBoundaries# #if ENABLE_OVERLOADING SearchSettingsSetAtWordBoundariesMethodInfo, #endif searchSettingsSetAtWordBoundaries , -- ** setCaseSensitive #method:setCaseSensitive# #if ENABLE_OVERLOADING SearchSettingsSetCaseSensitiveMethodInfo, #endif searchSettingsSetCaseSensitive , -- ** setRegexEnabled #method:setRegexEnabled# #if ENABLE_OVERLOADING SearchSettingsSetRegexEnabledMethodInfo , #endif searchSettingsSetRegexEnabled , -- ** setSearchText #method:setSearchText# #if ENABLE_OVERLOADING SearchSettingsSetSearchTextMethodInfo , #endif searchSettingsSetSearchText , -- ** setWrapAround #method:setWrapAround# #if ENABLE_OVERLOADING SearchSettingsSetWrapAroundMethodInfo , #endif searchSettingsSetWrapAround , -- * Properties -- ** atWordBoundaries #attr:atWordBoundaries# {- | If 'True', a search match must start and end a word. The match can span multiple words. /Since: 3.10/ -} #if ENABLE_OVERLOADING SearchSettingsAtWordBoundariesPropertyInfo, #endif constructSearchSettingsAtWordBoundaries , getSearchSettingsAtWordBoundaries , #if ENABLE_OVERLOADING searchSettingsAtWordBoundaries , #endif setSearchSettingsAtWordBoundaries , -- ** caseSensitive #attr:caseSensitive# {- | Whether the search is case sensitive. /Since: 3.10/ -} #if ENABLE_OVERLOADING SearchSettingsCaseSensitivePropertyInfo , #endif constructSearchSettingsCaseSensitive , getSearchSettingsCaseSensitive , #if ENABLE_OVERLOADING searchSettingsCaseSensitive , #endif setSearchSettingsCaseSensitive , -- ** regexEnabled #attr:regexEnabled# {- | Search by regular expressions with 'GI.GtkSource.Objects.SearchSettings.SearchSettings':@/search-text/@ as the pattern. /Since: 3.10/ -} #if ENABLE_OVERLOADING SearchSettingsRegexEnabledPropertyInfo , #endif constructSearchSettingsRegexEnabled , getSearchSettingsRegexEnabled , #if ENABLE_OVERLOADING searchSettingsRegexEnabled , #endif setSearchSettingsRegexEnabled , -- ** searchText #attr:searchText# {- | A search string, or 'Nothing' if the search is disabled. If the regular expression search is enabled, 'GI.GtkSource.Objects.SearchSettings.SearchSettings':@/search-text/@ is the pattern. /Since: 3.10/ -} #if ENABLE_OVERLOADING SearchSettingsSearchTextPropertyInfo , #endif clearSearchSettingsSearchText , constructSearchSettingsSearchText , getSearchSettingsSearchText , #if ENABLE_OVERLOADING searchSettingsSearchText , #endif setSearchSettingsSearchText , -- ** wrapAround #attr:wrapAround# {- | For a forward search, continue at the beginning of the buffer if no search occurrence is found. For a backward search, continue at the end of the buffer. /Since: 3.10/ -} #if ENABLE_OVERLOADING SearchSettingsWrapAroundPropertyInfo , #endif constructSearchSettingsWrapAround , getSearchSettingsWrapAround , #if ENABLE_OVERLOADING searchSettingsWrapAround , #endif 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.GClosure as B.GClosure import qualified Data.GI.Base.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GValue as B.GValue import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack import qualified Data.GI.Base.Properties as B.Properties 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 GHC.OverloadedLabels as OL import qualified GI.GObject.Objects.Object as GObject.Object -- | Memory-managed wrapper type. 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 -- | Type class for types which can be safely cast to `SearchSettings`, for instance with `toSearchSettings`. class (GObject o, O.IsDescendantOf SearchSettings o) => IsSearchSettings o instance (GObject o, O.IsDescendantOf SearchSettings o) => IsSearchSettings o instance O.HasParentTypes SearchSettings type instance O.ParentTypes SearchSettings = '[GObject.Object.Object] -- | Cast to `SearchSettings`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`. toSearchSettings :: (MonadIO m, IsSearchSettings o) => o -> m SearchSettings toSearchSettings = liftIO . unsafeCastTo SearchSettings -- | A convenience alias for `Nothing` :: `Maybe` `SearchSettings`. noSearchSettings :: Maybe SearchSettings noSearchSettings = Nothing #if ENABLE_OVERLOADING 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 "getv" o = GObject.Object.ObjectGetvMethodInfo 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 "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) => OL.IsLabel t (SearchSettings -> p) where #if MIN_VERSION_base(4,10,0) fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #else fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #endif #endif -- VVV Prop "at-word-boundaries" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] -- Nullable: (Just False,Just False) {- | Get the value of the “@at-word-boundaries@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' searchSettings #atWordBoundaries @ -} getSearchSettingsAtWordBoundaries :: (MonadIO m, IsSearchSettings o) => o -> m Bool getSearchSettingsAtWordBoundaries obj = liftIO $ B.Properties.getObjectPropertyBool obj "at-word-boundaries" {- | Set the value of the “@at-word-boundaries@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' searchSettings [ #atWordBoundaries 'Data.GI.Base.Attributes.:=' value ] @ -} setSearchSettingsAtWordBoundaries :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m () setSearchSettingsAtWordBoundaries obj val = liftIO $ B.Properties.setObjectPropertyBool obj "at-word-boundaries" val {- | Construct a `GValueConstruct` with valid value for the “@at-word-boundaries@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructSearchSettingsAtWordBoundaries :: (IsSearchSettings o) => Bool -> IO (GValueConstruct o) constructSearchSettingsAtWordBoundaries val = B.Properties.constructObjectPropertyBool "at-word-boundaries" val #if ENABLE_OVERLOADING 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 #endif -- VVV Prop "case-sensitive" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] -- Nullable: (Just False,Just False) {- | Get the value of the “@case-sensitive@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' searchSettings #caseSensitive @ -} getSearchSettingsCaseSensitive :: (MonadIO m, IsSearchSettings o) => o -> m Bool getSearchSettingsCaseSensitive obj = liftIO $ B.Properties.getObjectPropertyBool obj "case-sensitive" {- | Set the value of the “@case-sensitive@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' searchSettings [ #caseSensitive 'Data.GI.Base.Attributes.:=' value ] @ -} setSearchSettingsCaseSensitive :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m () setSearchSettingsCaseSensitive obj val = liftIO $ B.Properties.setObjectPropertyBool obj "case-sensitive" val {- | Construct a `GValueConstruct` with valid value for the “@case-sensitive@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructSearchSettingsCaseSensitive :: (IsSearchSettings o) => Bool -> IO (GValueConstruct o) constructSearchSettingsCaseSensitive val = B.Properties.constructObjectPropertyBool "case-sensitive" val #if ENABLE_OVERLOADING 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 #endif -- VVV Prop "regex-enabled" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] -- Nullable: (Just False,Just False) {- | Get the value of the “@regex-enabled@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' searchSettings #regexEnabled @ -} getSearchSettingsRegexEnabled :: (MonadIO m, IsSearchSettings o) => o -> m Bool getSearchSettingsRegexEnabled obj = liftIO $ B.Properties.getObjectPropertyBool obj "regex-enabled" {- | Set the value of the “@regex-enabled@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' searchSettings [ #regexEnabled 'Data.GI.Base.Attributes.:=' value ] @ -} setSearchSettingsRegexEnabled :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m () setSearchSettingsRegexEnabled obj val = liftIO $ B.Properties.setObjectPropertyBool obj "regex-enabled" val {- | Construct a `GValueConstruct` with valid value for the “@regex-enabled@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructSearchSettingsRegexEnabled :: (IsSearchSettings o) => Bool -> IO (GValueConstruct o) constructSearchSettingsRegexEnabled val = B.Properties.constructObjectPropertyBool "regex-enabled" val #if ENABLE_OVERLOADING 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 #endif -- VVV Prop "search-text" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] -- Nullable: (Just True,Just True) {- | Get the value of the “@search-text@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' searchSettings #searchText @ -} getSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> m (Maybe T.Text) getSearchSettingsSearchText obj = liftIO $ B.Properties.getObjectPropertyString obj "search-text" {- | Set the value of the “@search-text@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' searchSettings [ #searchText 'Data.GI.Base.Attributes.:=' value ] @ -} setSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> T.Text -> m () setSearchSettingsSearchText obj val = liftIO $ B.Properties.setObjectPropertyString obj "search-text" (Just val) {- | Construct a `GValueConstruct` with valid value for the “@search-text@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructSearchSettingsSearchText :: (IsSearchSettings o) => T.Text -> IO (GValueConstruct o) constructSearchSettingsSearchText val = B.Properties.constructObjectPropertyString "search-text" (Just val) {- | Set the value of the “@search-text@” property to `Nothing`. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.clear' #searchText @ -} clearSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> m () clearSearchSettingsSearchText obj = liftIO $ B.Properties.setObjectPropertyString obj "search-text" (Nothing :: Maybe T.Text) #if ENABLE_OVERLOADING 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 #endif -- VVV Prop "wrap-around" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] -- Nullable: (Just False,Just False) {- | Get the value of the “@wrap-around@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' searchSettings #wrapAround @ -} getSearchSettingsWrapAround :: (MonadIO m, IsSearchSettings o) => o -> m Bool getSearchSettingsWrapAround obj = liftIO $ B.Properties.getObjectPropertyBool obj "wrap-around" {- | Set the value of the “@wrap-around@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' searchSettings [ #wrapAround 'Data.GI.Base.Attributes.:=' value ] @ -} setSearchSettingsWrapAround :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m () setSearchSettingsWrapAround obj val = liftIO $ B.Properties.setObjectPropertyBool obj "wrap-around" val {- | Construct a `GValueConstruct` with valid value for the “@wrap-around@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructSearchSettingsWrapAround :: (IsSearchSettings o) => Bool -> IO (GValueConstruct o) constructSearchSettingsWrapAround val = B.Properties.constructObjectPropertyBool "wrap-around" val #if ENABLE_OVERLOADING 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 #endif #if ENABLE_OVERLOADING instance O.HasAttributeList SearchSettings type instance O.AttributeList SearchSettings = SearchSettingsAttributeList type SearchSettingsAttributeList = ('[ '("atWordBoundaries", SearchSettingsAtWordBoundariesPropertyInfo), '("caseSensitive", SearchSettingsCaseSensitivePropertyInfo), '("regexEnabled", SearchSettingsRegexEnabledPropertyInfo), '("searchText", SearchSettingsSearchTextPropertyInfo), '("wrapAround", SearchSettingsWrapAroundPropertyInfo)] :: [(Symbol, *)]) #endif #if ENABLE_OVERLOADING 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 #endif #if ENABLE_OVERLOADING type instance O.SignalList SearchSettings = SearchSettingsSignalList type SearchSettingsSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)]) #endif -- 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' #if ENABLE_OVERLOADING #endif -- 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' #if ENABLE_OVERLOADING data SearchSettingsGetAtWordBoundariesMethodInfo instance (signature ~ (m Bool), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsGetAtWordBoundariesMethodInfo a signature where overloadedMethod _ = searchSettingsGetAtWordBoundaries #endif -- 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' #if ENABLE_OVERLOADING data SearchSettingsGetCaseSensitiveMethodInfo instance (signature ~ (m Bool), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsGetCaseSensitiveMethodInfo a signature where overloadedMethod _ = searchSettingsGetCaseSensitive #endif -- 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' #if ENABLE_OVERLOADING data SearchSettingsGetRegexEnabledMethodInfo instance (signature ~ (m Bool), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsGetRegexEnabledMethodInfo a signature where overloadedMethod _ = searchSettingsGetRegexEnabled #endif -- 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 #if ENABLE_OVERLOADING data SearchSettingsGetSearchTextMethodInfo instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsGetSearchTextMethodInfo a signature where overloadedMethod _ = searchSettingsGetSearchText #endif -- 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' #if ENABLE_OVERLOADING data SearchSettingsGetWrapAroundMethodInfo instance (signature ~ (m Bool), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsGetWrapAroundMethodInfo a signature where overloadedMethod _ = searchSettingsGetWrapAround #endif -- 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 () #if ENABLE_OVERLOADING data SearchSettingsSetAtWordBoundariesMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsSetAtWordBoundariesMethodInfo a signature where overloadedMethod _ = searchSettingsSetAtWordBoundaries #endif -- 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 () #if ENABLE_OVERLOADING data SearchSettingsSetCaseSensitiveMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsSetCaseSensitiveMethodInfo a signature where overloadedMethod _ = searchSettingsSetCaseSensitive #endif -- 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 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 () #if ENABLE_OVERLOADING data SearchSettingsSetRegexEnabledMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsSetRegexEnabledMethodInfo a signature where overloadedMethod _ = searchSettingsSetRegexEnabled #endif -- 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 /@searchText@/ is 'Nothing' or is empty, the search will be disabled. A copy of /@searchText@/ will be made, so you can safely free /@searchText@/ 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 () #if ENABLE_OVERLOADING data SearchSettingsSetSearchTextMethodInfo instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsSetSearchTextMethodInfo a signature where overloadedMethod _ = searchSettingsSetSearchText #endif -- 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 () #if ENABLE_OVERLOADING data SearchSettingsSetWrapAroundMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsSearchSettings a) => O.MethodInfo SearchSettingsSetWrapAroundMethodInfo a signature where overloadedMethod _ = searchSettingsSetWrapAround #endif