| Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.GtkSource.Objects.SearchContext
Contents
Description
- newtype SearchContext = SearchContext (ManagedPtr SearchContext)
- class GObject o => IsSearchContext o
- toSearchContext :: IsSearchContext o => o -> IO SearchContext
- noSearchContext :: Maybe SearchContext
- data SearchContextBackwardMethodInfo
- searchContextBackward :: (MonadIO m, IsSearchContext a) => a -> TextIter -> m (Bool, TextIter, TextIter)
- data SearchContextBackwardAsyncMethodInfo
- searchContextBackwardAsync :: (MonadIO m, IsSearchContext a, IsCancellable b) => a -> TextIter -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data SearchContextBackwardFinishMethodInfo
- searchContextBackwardFinish :: (MonadIO m, IsSearchContext a, IsAsyncResult b) => a -> b -> m (TextIter, TextIter)
- data SearchContextForwardMethodInfo
- searchContextForward :: (MonadIO m, IsSearchContext a) => a -> TextIter -> m (Bool, TextIter, TextIter)
- data SearchContextForwardAsyncMethodInfo
- searchContextForwardAsync :: (MonadIO m, IsSearchContext a, IsCancellable b) => a -> TextIter -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data SearchContextForwardFinishMethodInfo
- searchContextForwardFinish :: (MonadIO m, IsSearchContext a, IsAsyncResult b) => a -> b -> m (TextIter, TextIter)
- data SearchContextGetBufferMethodInfo
- searchContextGetBuffer :: (MonadIO m, IsSearchContext a) => a -> m Buffer
- data SearchContextGetHighlightMethodInfo
- searchContextGetHighlight :: (MonadIO m, IsSearchContext a) => a -> m Bool
- data SearchContextGetMatchStyleMethodInfo
- searchContextGetMatchStyle :: (MonadIO m, IsSearchContext a) => a -> m Style
- data SearchContextGetOccurrencePositionMethodInfo
- searchContextGetOccurrencePosition :: (MonadIO m, IsSearchContext a) => a -> TextIter -> TextIter -> m Int32
- data SearchContextGetOccurrencesCountMethodInfo
- searchContextGetOccurrencesCount :: (MonadIO m, IsSearchContext a) => a -> m Int32
- data SearchContextGetRegexErrorMethodInfo
- searchContextGetRegexError :: (MonadIO m, IsSearchContext a) => a -> m (Maybe GError)
- data SearchContextGetSettingsMethodInfo
- searchContextGetSettings :: (MonadIO m, IsSearchContext a) => a -> m SearchSettings
- searchContextNew :: (MonadIO m, IsBuffer a, IsSearchSettings b) => a -> Maybe b -> m SearchContext
- data SearchContextReplaceMethodInfo
- searchContextReplace :: (MonadIO m, IsSearchContext a) => a -> TextIter -> TextIter -> Text -> Int32 -> m ()
- data SearchContextReplaceAllMethodInfo
- searchContextReplaceAll :: (MonadIO m, IsSearchContext a) => a -> Text -> Int32 -> m Word32
- data SearchContextSetHighlightMethodInfo
- searchContextSetHighlight :: (MonadIO m, IsSearchContext a) => a -> Bool -> m ()
- data SearchContextSetMatchStyleMethodInfo
- searchContextSetMatchStyle :: (MonadIO m, IsSearchContext a, IsStyle b) => a -> Maybe b -> m ()
- data SearchContextSetSettingsMethodInfo
- searchContextSetSettings :: (MonadIO m, IsSearchContext a, IsSearchSettings b) => a -> Maybe b -> m ()
- data SearchContextBufferPropertyInfo
- constructSearchContextBuffer :: (IsSearchContext o, IsBuffer a) => a -> IO (GValueConstruct o)
- getSearchContextBuffer :: (MonadIO m, IsSearchContext o) => o -> m Buffer
- searchContextBuffer :: AttrLabelProxy "buffer"
- data SearchContextHighlightPropertyInfo
- constructSearchContextHighlight :: IsSearchContext o => Bool -> IO (GValueConstruct o)
- getSearchContextHighlight :: (MonadIO m, IsSearchContext o) => o -> m Bool
- searchContextHighlight :: AttrLabelProxy "highlight"
- setSearchContextHighlight :: (MonadIO m, IsSearchContext o) => o -> Bool -> m ()
- data SearchContextMatchStylePropertyInfo
- clearSearchContextMatchStyle :: (MonadIO m, IsSearchContext o) => o -> m ()
- constructSearchContextMatchStyle :: (IsSearchContext o, IsStyle a) => a -> IO (GValueConstruct o)
- getSearchContextMatchStyle :: (MonadIO m, IsSearchContext o) => o -> m Style
- searchContextMatchStyle :: AttrLabelProxy "matchStyle"
- setSearchContextMatchStyle :: (MonadIO m, IsSearchContext o, IsStyle a) => o -> a -> m ()
- data SearchContextOccurrencesCountPropertyInfo
- getSearchContextOccurrencesCount :: (MonadIO m, IsSearchContext o) => o -> m Int32
- searchContextOccurrencesCount :: AttrLabelProxy "occurrencesCount"
- data SearchContextRegexErrorPropertyInfo
- getSearchContextRegexError :: (MonadIO m, IsSearchContext o) => o -> m (Ptr ())
- searchContextRegexError :: AttrLabelProxy "regexError"
- data SearchContextSettingsPropertyInfo
- clearSearchContextSettings :: (MonadIO m, IsSearchContext o) => o -> m ()
- constructSearchContextSettings :: (IsSearchContext o, IsSearchSettings a) => a -> IO (GValueConstruct o)
- getSearchContextSettings :: (MonadIO m, IsSearchContext o) => o -> m SearchSettings
- searchContextSettings :: AttrLabelProxy "settings"
- setSearchContextSettings :: (MonadIO m, IsSearchContext o, IsSearchSettings a) => o -> a -> m ()
Exported types
newtype SearchContext Source #
Constructors
| SearchContext (ManagedPtr SearchContext) |
Instances
| GObject SearchContext Source # | |
| IsObject SearchContext Source # | |
| IsSearchContext SearchContext Source # | |
| ((~) * info (ResolveSearchContextMethod t SearchContext), MethodInfo * info SearchContext p) => IsLabel t (SearchContext -> p) Source # | |
| ((~) * info (ResolveSearchContextMethod t SearchContext), MethodInfo * info SearchContext p) => IsLabelProxy t (SearchContext -> p) Source # | |
| HasAttributeList * SearchContext Source # | |
| type AttributeList SearchContext Source # | |
| type SignalList SearchContext Source # | |
class GObject o => IsSearchContext o Source #
Instances
toSearchContext :: IsSearchContext o => o -> IO SearchContext Source #
Methods
backward
data SearchContextBackwardMethodInfo Source #
Instances
| ((~) * signature (TextIter -> m (Bool, TextIter, TextIter)), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextBackwardMethodInfo a signature Source # | |
searchContextBackward Source #
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> TextIter |
|
| -> m (Bool, TextIter, TextIter) | Returns: whether a match was found. |
Synchronous backward search. It is recommended to use the asynchronous
functions instead, to not block the user interface. However, if you are sure
that the buffer is small, this function is more convenient to use.
Since: 3.10
backwardAsync
data SearchContextBackwardAsyncMethodInfo Source #
Instances
| ((~) * signature (TextIter -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsSearchContext a, IsCancellable b) => MethodInfo * SearchContextBackwardAsyncMethodInfo a signature Source # | |
searchContextBackwardAsync Source #
Arguments
| :: (MonadIO m, IsSearchContext a, IsCancellable b) | |
| => a |
|
| -> TextIter |
|
| -> Maybe b |
|
| -> Maybe AsyncReadyCallback |
|
| -> m () |
Asynchronous backward search. See the AsyncResult documentation to know
how to use this function.
If the operation is cancelled, the callback will only be called if
cancellable was not Nothing. searchContextBackwardAsync takes
ownership of cancellable, so you can unref it after calling this function.
Since: 3.10
backwardFinish
data SearchContextBackwardFinishMethodInfo Source #
Instances
| ((~) * signature (b -> m (TextIter, TextIter)), MonadIO m, IsSearchContext a, IsAsyncResult b) => MethodInfo * SearchContextBackwardFinishMethodInfo a signature Source # | |
searchContextBackwardFinish Source #
Arguments
| :: (MonadIO m, IsSearchContext a, IsAsyncResult b) | |
| => a |
|
| -> b |
|
| -> m (TextIter, TextIter) | (Can throw |
Finishes a backward search started with
searchContextBackwardAsync.
Since: 3.10
forward
data SearchContextForwardMethodInfo Source #
Instances
| ((~) * signature (TextIter -> m (Bool, TextIter, TextIter)), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextForwardMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> TextIter |
|
| -> m (Bool, TextIter, TextIter) | Returns: whether a match was found. |
Synchronous forward search. It is recommended to use the asynchronous
functions instead, to not block the user interface. However, if you are sure
that the buffer is small, this function is more convenient to use.
Since: 3.10
forwardAsync
data SearchContextForwardAsyncMethodInfo Source #
Instances
| ((~) * signature (TextIter -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsSearchContext a, IsCancellable b) => MethodInfo * SearchContextForwardAsyncMethodInfo a signature Source # | |
searchContextForwardAsync Source #
Arguments
| :: (MonadIO m, IsSearchContext a, IsCancellable b) | |
| => a |
|
| -> TextIter |
|
| -> Maybe b |
|
| -> Maybe AsyncReadyCallback |
|
| -> m () |
Asynchronous forward search. See the AsyncResult documentation to know
how to use this function.
If the operation is cancelled, the callback will only be called if
cancellable was not Nothing. searchContextForwardAsync takes
ownership of cancellable, so you can unref it after calling this function.
Since: 3.10
forwardFinish
data SearchContextForwardFinishMethodInfo Source #
Instances
| ((~) * signature (b -> m (TextIter, TextIter)), MonadIO m, IsSearchContext a, IsAsyncResult b) => MethodInfo * SearchContextForwardFinishMethodInfo a signature Source # | |
searchContextForwardFinish Source #
Arguments
| :: (MonadIO m, IsSearchContext a, IsAsyncResult b) | |
| => a |
|
| -> b |
|
| -> m (TextIter, TextIter) | (Can throw |
Finishes a forward search started with
searchContextForwardAsync.
Since: 3.10
getBuffer
data SearchContextGetBufferMethodInfo Source #
Instances
| ((~) * signature (m Buffer), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextGetBufferMethodInfo a signature Source # | |
searchContextGetBuffer Source #
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> m Buffer | Returns: the associated buffer. |
No description available in the introspection data.
Since: 3.10
getHighlight
data SearchContextGetHighlightMethodInfo Source #
Instances
| ((~) * signature (m Bool), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextGetHighlightMethodInfo a signature Source # | |
searchContextGetHighlight Source #
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> m Bool | Returns: whether to highlight the search occurrences. |
No description available in the introspection data.
Since: 3.10
getMatchStyle
data SearchContextGetMatchStyleMethodInfo Source #
Instances
| ((~) * signature (m Style), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextGetMatchStyleMethodInfo a signature Source # | |
searchContextGetMatchStyle Source #
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> m Style | Returns: the |
No description available in the introspection data.
Since: 3.16
getOccurrencePosition
data SearchContextGetOccurrencePositionMethodInfo Source #
Instances
| ((~) * signature (TextIter -> TextIter -> m Int32), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextGetOccurrencePositionMethodInfo a signature Source # | |
searchContextGetOccurrencePosition Source #
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> TextIter |
|
| -> TextIter |
|
| -> m Int32 | Returns: the position of the search occurrence. The first occurrence has the
position 1 (not 0). Returns 0 if |
Gets the position of a search occurrence. If the buffer is not already fully
scanned, the position may be unknown, and -1 is returned. If 0 is returned,
it means that this part of the buffer has already been scanned, and that
matchStart and matchEnd don't delimit an occurrence.
Since: 3.10
getOccurrencesCount
data SearchContextGetOccurrencesCountMethodInfo Source #
Instances
| ((~) * signature (m Int32), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextGetOccurrencesCountMethodInfo a signature Source # | |
searchContextGetOccurrencesCount Source #
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> m Int32 | Returns: the total number of search occurrences, or -1 if unknown. |
Gets the total number of search occurrences. If the buffer is not already fully scanned, the total number of occurrences is unknown, and -1 is returned.
Since: 3.10
getRegexError
data SearchContextGetRegexErrorMethodInfo Source #
Instances
| ((~) * signature (m (Maybe GError)), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextGetRegexErrorMethodInfo a signature Source # | |
searchContextGetRegexError Source #
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> m (Maybe GError) |
Regular expression patterns must follow certain rules. If
GI.GtkSource.Objects.SearchSettings.SearchSettings:search-text breaks a rule, the error can be retrieved
with this function. The error domain is G_REGEX_ERROR.
Free the return value with errorFree.
Since: 3.10
getSettings
data SearchContextGetSettingsMethodInfo Source #
Instances
| ((~) * signature (m SearchSettings), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextGetSettingsMethodInfo a signature Source # | |
searchContextGetSettings Source #
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> m SearchSettings | Returns: the search settings. |
No description available in the introspection data.
Since: 3.10
new
Arguments
| :: (MonadIO m, IsBuffer a, IsSearchSettings b) | |
| => a |
|
| -> Maybe b |
|
| -> m SearchContext | Returns: a new search context. |
Creates a new search context, associated with buffer, and customized with
settings. If settings is Nothing, a new SearchSettings object will
be created, that you can retrieve with
searchContextGetSettings.
Since: 3.10
replace
data SearchContextReplaceMethodInfo Source #
Instances
| ((~) * signature (TextIter -> TextIter -> Text -> Int32 -> m ()), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextReplaceMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> TextIter |
|
| -> TextIter |
|
| -> Text |
|
| -> Int32 |
|
| -> m () | (Can throw |
Replaces a search match by another text. If matchStart and matchEnd
doesn't correspond to a search match, False is returned.
For a regular expression replacement, you can check if replace is valid by
calling regexCheckReplacement. The replace text can contain
backreferences; read the regexReplace documentation for more details.
Since: 3.10
replaceAll
data SearchContextReplaceAllMethodInfo Source #
Instances
| ((~) * signature (Text -> Int32 -> m Word32), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextReplaceAllMethodInfo a signature Source # | |
searchContextReplaceAll Source #
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> Text |
|
| -> Int32 |
|
| -> m Word32 | Returns: the number of replaced matches. (Can throw |
Replaces all search matches by another text. It is a synchronous function, so it can block the user interface.
For a regular expression replacement, you can check if replace is valid by
calling regexCheckReplacement. The replace text can contain
backreferences; read the regexReplace documentation for more details.
Since: 3.10
setHighlight
data SearchContextSetHighlightMethodInfo Source #
Instances
| ((~) * signature (Bool -> m ()), MonadIO m, IsSearchContext a) => MethodInfo * SearchContextSetHighlightMethodInfo a signature Source # | |
searchContextSetHighlight Source #
Arguments
| :: (MonadIO m, IsSearchContext a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Enables or disables the search occurrences highlighting.
Since: 3.10
setMatchStyle
data SearchContextSetMatchStyleMethodInfo Source #
Instances
| ((~) * signature (Maybe b -> m ()), MonadIO m, IsSearchContext a, IsStyle b) => MethodInfo * SearchContextSetMatchStyleMethodInfo a signature Source # | |
searchContextSetMatchStyle Source #
Arguments
| :: (MonadIO m, IsSearchContext a, IsStyle b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Set the style to apply on search matches. If matchStyle is Nothing, default
theme's scheme 'match-style' will be used.
To enable or disable the search highlighting, use
searchContextSetHighlight.
Since: 3.16
setSettings
data SearchContextSetSettingsMethodInfo Source #
Instances
| ((~) * signature (Maybe b -> m ()), MonadIO m, IsSearchContext a, IsSearchSettings b) => MethodInfo * SearchContextSetSettingsMethodInfo a signature Source # | |
searchContextSetSettings Source #
Arguments
| :: (MonadIO m, IsSearchContext a, IsSearchSettings b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Associate a SearchSettings with the search context. If settings is
Nothing, a new one will be created.
The search context holds a reference to settings.
Since: 3.10
Properties
buffer
data SearchContextBufferPropertyInfo Source #
Instances
constructSearchContextBuffer :: (IsSearchContext o, IsBuffer a) => a -> IO (GValueConstruct o) Source #
getSearchContextBuffer :: (MonadIO m, IsSearchContext o) => o -> m Buffer Source #
searchContextBuffer :: AttrLabelProxy "buffer" Source #
highlight
data SearchContextHighlightPropertyInfo Source #
Instances
constructSearchContextHighlight :: IsSearchContext o => Bool -> IO (GValueConstruct o) Source #
getSearchContextHighlight :: (MonadIO m, IsSearchContext o) => o -> m Bool Source #
searchContextHighlight :: AttrLabelProxy "highlight" Source #
setSearchContextHighlight :: (MonadIO m, IsSearchContext o) => o -> Bool -> m () Source #
matchStyle
data SearchContextMatchStylePropertyInfo Source #
Instances
clearSearchContextMatchStyle :: (MonadIO m, IsSearchContext o) => o -> m () Source #
constructSearchContextMatchStyle :: (IsSearchContext o, IsStyle a) => a -> IO (GValueConstruct o) Source #
getSearchContextMatchStyle :: (MonadIO m, IsSearchContext o) => o -> m Style Source #
searchContextMatchStyle :: AttrLabelProxy "matchStyle" Source #
setSearchContextMatchStyle :: (MonadIO m, IsSearchContext o, IsStyle a) => o -> a -> m () Source #
occurrencesCount
data SearchContextOccurrencesCountPropertyInfo Source #
Instances
getSearchContextOccurrencesCount :: (MonadIO m, IsSearchContext o) => o -> m Int32 Source #
searchContextOccurrencesCount :: AttrLabelProxy "occurrencesCount" Source #
regexError
data SearchContextRegexErrorPropertyInfo Source #
Instances
getSearchContextRegexError :: (MonadIO m, IsSearchContext o) => o -> m (Ptr ()) Source #
searchContextRegexError :: AttrLabelProxy "regexError" Source #
settings
data SearchContextSettingsPropertyInfo Source #
Instances
clearSearchContextSettings :: (MonadIO m, IsSearchContext o) => o -> m () Source #
constructSearchContextSettings :: (IsSearchContext o, IsSearchSettings a) => a -> IO (GValueConstruct o) Source #
getSearchContextSettings :: (MonadIO m, IsSearchContext o) => o -> m SearchSettings Source #
searchContextSettings :: AttrLabelProxy "settings" Source #
setSearchContextSettings :: (MonadIO m, IsSearchContext o, IsSearchSettings a) => o -> a -> m () Source #