{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Structs.TextIter
(
TextIter(..) ,
newZeroTextIter ,
noTextIter ,
#if defined(ENABLE_OVERLOADING)
ResolveTextIterMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TextIterAssignMethodInfo ,
#endif
textIterAssign ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardCharMethodInfo ,
#endif
textIterBackwardChar ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardCharsMethodInfo ,
#endif
textIterBackwardChars ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardCursorPositionMethodInfo,
#endif
textIterBackwardCursorPosition ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardCursorPositionsMethodInfo,
#endif
textIterBackwardCursorPositions ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardFindCharMethodInfo ,
#endif
textIterBackwardFindChar ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardLineMethodInfo ,
#endif
textIterBackwardLine ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardLinesMethodInfo ,
#endif
textIterBackwardLines ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardSearchMethodInfo ,
#endif
textIterBackwardSearch ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardSentenceStartMethodInfo ,
#endif
textIterBackwardSentenceStart ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardSentenceStartsMethodInfo,
#endif
textIterBackwardSentenceStarts ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardToTagToggleMethodInfo ,
#endif
textIterBackwardToTagToggle ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardVisibleCursorPositionMethodInfo,
#endif
textIterBackwardVisibleCursorPosition ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardVisibleCursorPositionsMethodInfo,
#endif
textIterBackwardVisibleCursorPositions ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardVisibleLineMethodInfo ,
#endif
textIterBackwardVisibleLine ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardVisibleLinesMethodInfo ,
#endif
textIterBackwardVisibleLines ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardVisibleWordStartMethodInfo,
#endif
textIterBackwardVisibleWordStart ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardVisibleWordStartsMethodInfo,
#endif
textIterBackwardVisibleWordStarts ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardWordStartMethodInfo ,
#endif
textIterBackwardWordStart ,
#if defined(ENABLE_OVERLOADING)
TextIterBackwardWordStartsMethodInfo ,
#endif
textIterBackwardWordStarts ,
#if defined(ENABLE_OVERLOADING)
TextIterBeginsTagMethodInfo ,
#endif
textIterBeginsTag ,
#if defined(ENABLE_OVERLOADING)
TextIterCanInsertMethodInfo ,
#endif
textIterCanInsert ,
#if defined(ENABLE_OVERLOADING)
TextIterCompareMethodInfo ,
#endif
textIterCompare ,
#if defined(ENABLE_OVERLOADING)
TextIterCopyMethodInfo ,
#endif
textIterCopy ,
#if defined(ENABLE_OVERLOADING)
TextIterEditableMethodInfo ,
#endif
textIterEditable ,
#if defined(ENABLE_OVERLOADING)
TextIterEndsLineMethodInfo ,
#endif
textIterEndsLine ,
#if defined(ENABLE_OVERLOADING)
TextIterEndsSentenceMethodInfo ,
#endif
textIterEndsSentence ,
#if defined(ENABLE_OVERLOADING)
TextIterEndsTagMethodInfo ,
#endif
textIterEndsTag ,
#if defined(ENABLE_OVERLOADING)
TextIterEndsWordMethodInfo ,
#endif
textIterEndsWord ,
#if defined(ENABLE_OVERLOADING)
TextIterEqualMethodInfo ,
#endif
textIterEqual ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardCharMethodInfo ,
#endif
textIterForwardChar ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardCharsMethodInfo ,
#endif
textIterForwardChars ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardCursorPositionMethodInfo ,
#endif
textIterForwardCursorPosition ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardCursorPositionsMethodInfo,
#endif
textIterForwardCursorPositions ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardFindCharMethodInfo ,
#endif
textIterForwardFindChar ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardLineMethodInfo ,
#endif
textIterForwardLine ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardLinesMethodInfo ,
#endif
textIterForwardLines ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardSearchMethodInfo ,
#endif
textIterForwardSearch ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardSentenceEndMethodInfo ,
#endif
textIterForwardSentenceEnd ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardSentenceEndsMethodInfo ,
#endif
textIterForwardSentenceEnds ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardToEndMethodInfo ,
#endif
textIterForwardToEnd ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardToLineEndMethodInfo ,
#endif
textIterForwardToLineEnd ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardToTagToggleMethodInfo ,
#endif
textIterForwardToTagToggle ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardVisibleCursorPositionMethodInfo,
#endif
textIterForwardVisibleCursorPosition ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardVisibleCursorPositionsMethodInfo,
#endif
textIterForwardVisibleCursorPositions ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardVisibleLineMethodInfo ,
#endif
textIterForwardVisibleLine ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardVisibleLinesMethodInfo ,
#endif
textIterForwardVisibleLines ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardVisibleWordEndMethodInfo ,
#endif
textIterForwardVisibleWordEnd ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardVisibleWordEndsMethodInfo,
#endif
textIterForwardVisibleWordEnds ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardWordEndMethodInfo ,
#endif
textIterForwardWordEnd ,
#if defined(ENABLE_OVERLOADING)
TextIterForwardWordEndsMethodInfo ,
#endif
textIterForwardWordEnds ,
#if defined(ENABLE_OVERLOADING)
TextIterFreeMethodInfo ,
#endif
textIterFree ,
#if defined(ENABLE_OVERLOADING)
TextIterGetAttributesMethodInfo ,
#endif
textIterGetAttributes ,
#if defined(ENABLE_OVERLOADING)
TextIterGetBufferMethodInfo ,
#endif
textIterGetBuffer ,
#if defined(ENABLE_OVERLOADING)
TextIterGetBytesInLineMethodInfo ,
#endif
textIterGetBytesInLine ,
#if defined(ENABLE_OVERLOADING)
TextIterGetCharMethodInfo ,
#endif
textIterGetChar ,
#if defined(ENABLE_OVERLOADING)
TextIterGetCharsInLineMethodInfo ,
#endif
textIterGetCharsInLine ,
#if defined(ENABLE_OVERLOADING)
TextIterGetChildAnchorMethodInfo ,
#endif
textIterGetChildAnchor ,
#if defined(ENABLE_OVERLOADING)
TextIterGetLanguageMethodInfo ,
#endif
textIterGetLanguage ,
#if defined(ENABLE_OVERLOADING)
TextIterGetLineMethodInfo ,
#endif
textIterGetLine ,
#if defined(ENABLE_OVERLOADING)
TextIterGetLineIndexMethodInfo ,
#endif
textIterGetLineIndex ,
#if defined(ENABLE_OVERLOADING)
TextIterGetLineOffsetMethodInfo ,
#endif
textIterGetLineOffset ,
#if defined(ENABLE_OVERLOADING)
TextIterGetMarksMethodInfo ,
#endif
textIterGetMarks ,
#if defined(ENABLE_OVERLOADING)
TextIterGetOffsetMethodInfo ,
#endif
textIterGetOffset ,
#if defined(ENABLE_OVERLOADING)
TextIterGetPixbufMethodInfo ,
#endif
textIterGetPixbuf ,
#if defined(ENABLE_OVERLOADING)
TextIterGetSliceMethodInfo ,
#endif
textIterGetSlice ,
#if defined(ENABLE_OVERLOADING)
TextIterGetTagsMethodInfo ,
#endif
textIterGetTags ,
#if defined(ENABLE_OVERLOADING)
TextIterGetTextMethodInfo ,
#endif
textIterGetText ,
#if defined(ENABLE_OVERLOADING)
TextIterGetToggledTagsMethodInfo ,
#endif
textIterGetToggledTags ,
#if defined(ENABLE_OVERLOADING)
TextIterGetVisibleLineIndexMethodInfo ,
#endif
textIterGetVisibleLineIndex ,
#if defined(ENABLE_OVERLOADING)
TextIterGetVisibleLineOffsetMethodInfo ,
#endif
textIterGetVisibleLineOffset ,
#if defined(ENABLE_OVERLOADING)
TextIterGetVisibleSliceMethodInfo ,
#endif
textIterGetVisibleSlice ,
#if defined(ENABLE_OVERLOADING)
TextIterGetVisibleTextMethodInfo ,
#endif
textIterGetVisibleText ,
#if defined(ENABLE_OVERLOADING)
TextIterHasTagMethodInfo ,
#endif
textIterHasTag ,
#if defined(ENABLE_OVERLOADING)
TextIterInRangeMethodInfo ,
#endif
textIterInRange ,
#if defined(ENABLE_OVERLOADING)
TextIterInsideSentenceMethodInfo ,
#endif
textIterInsideSentence ,
#if defined(ENABLE_OVERLOADING)
TextIterInsideWordMethodInfo ,
#endif
textIterInsideWord ,
#if defined(ENABLE_OVERLOADING)
TextIterIsCursorPositionMethodInfo ,
#endif
textIterIsCursorPosition ,
#if defined(ENABLE_OVERLOADING)
TextIterIsEndMethodInfo ,
#endif
textIterIsEnd ,
#if defined(ENABLE_OVERLOADING)
TextIterIsStartMethodInfo ,
#endif
textIterIsStart ,
#if defined(ENABLE_OVERLOADING)
TextIterOrderMethodInfo ,
#endif
textIterOrder ,
#if defined(ENABLE_OVERLOADING)
TextIterSetLineMethodInfo ,
#endif
textIterSetLine ,
#if defined(ENABLE_OVERLOADING)
TextIterSetLineIndexMethodInfo ,
#endif
textIterSetLineIndex ,
#if defined(ENABLE_OVERLOADING)
TextIterSetLineOffsetMethodInfo ,
#endif
textIterSetLineOffset ,
#if defined(ENABLE_OVERLOADING)
TextIterSetOffsetMethodInfo ,
#endif
textIterSetOffset ,
#if defined(ENABLE_OVERLOADING)
TextIterSetVisibleLineIndexMethodInfo ,
#endif
textIterSetVisibleLineIndex ,
#if defined(ENABLE_OVERLOADING)
TextIterSetVisibleLineOffsetMethodInfo ,
#endif
textIterSetVisibleLineOffset ,
#if defined(ENABLE_OVERLOADING)
TextIterStartsLineMethodInfo ,
#endif
textIterStartsLine ,
#if defined(ENABLE_OVERLOADING)
TextIterStartsSentenceMethodInfo ,
#endif
textIterStartsSentence ,
#if defined(ENABLE_OVERLOADING)
TextIterStartsTagMethodInfo ,
#endif
textIterStartsTag ,
#if defined(ENABLE_OVERLOADING)
TextIterStartsWordMethodInfo ,
#endif
textIterStartsWord ,
#if defined(ENABLE_OVERLOADING)
TextIterTogglesTagMethodInfo ,
#endif
textIterTogglesTag ,
) 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.GI.Base.Signals as B.Signals
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.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextBuffer as Gtk.TextBuffer
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextChildAnchor as Gtk.TextChildAnchor
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextMark as Gtk.TextMark
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextTag as Gtk.TextTag
import {-# SOURCE #-} qualified GI.Gtk.Structs.TextAttributes as Gtk.TextAttributes
import qualified GI.Pango.Structs.Language as Pango.Language
newtype TextIter = TextIter (ManagedPtr TextIter)
deriving (TextIter -> TextIter -> Bool
(TextIter -> TextIter -> Bool)
-> (TextIter -> TextIter -> Bool) -> Eq TextIter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TextIter -> TextIter -> Bool
$c/= :: TextIter -> TextIter -> Bool
== :: TextIter -> TextIter -> Bool
$c== :: TextIter -> TextIter -> Bool
Eq)
foreign import ccall "gtk_text_iter_get_type" c_gtk_text_iter_get_type ::
IO GType
instance BoxedObject TextIter where
boxedType :: TextIter -> IO GType
boxedType _ = IO GType
c_gtk_text_iter_get_type
instance B.GValue.IsGValue TextIter where
toGValue :: TextIter -> IO GValue
toGValue o :: TextIter
o = do
GType
gtype <- IO GType
c_gtk_text_iter_get_type
TextIter -> (Ptr TextIter -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TextIter
o (GType
-> (GValue -> Ptr TextIter -> IO ()) -> Ptr TextIter -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr TextIter -> IO ()
forall a. GValue -> Ptr a -> IO ()
B.GValue.set_boxed)
fromGValue :: GValue -> IO TextIter
fromGValue gv :: GValue
gv = do
Ptr TextIter
ptr <- GValue -> IO (Ptr TextIter)
forall b. GValue -> IO (Ptr b)
B.GValue.get_boxed GValue
gv :: IO (Ptr TextIter)
(ManagedPtr TextIter -> TextIter) -> Ptr TextIter -> IO TextIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr TextIter -> TextIter
TextIter Ptr TextIter
ptr
newZeroTextIter :: MonadIO m => m TextIter
newZeroTextIter :: m TextIter
newZeroTextIter = IO TextIter -> m TextIter
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextIter -> m TextIter) -> IO TextIter -> m TextIter
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr TextIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 80 IO (Ptr TextIter) -> (Ptr TextIter -> IO TextIter) -> IO TextIter
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr TextIter -> TextIter) -> Ptr TextIter -> IO TextIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TextIter -> TextIter
TextIter
instance tag ~ 'AttrSet => Constructible TextIter tag where
new :: (ManagedPtr TextIter -> TextIter)
-> [AttrOp TextIter tag] -> m TextIter
new _ attrs :: [AttrOp TextIter tag]
attrs = do
TextIter
o <- m TextIter
forall (m :: * -> *). MonadIO m => m TextIter
newZeroTextIter
TextIter -> [AttrOp TextIter 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set TextIter
o [AttrOp TextIter tag]
[AttrOp TextIter 'AttrSet]
attrs
TextIter -> m TextIter
forall (m :: * -> *) a. Monad m => a -> m a
return TextIter
o
noTextIter :: Maybe TextIter
noTextIter :: Maybe TextIter
noTextIter = Maybe TextIter
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TextIter
type instance O.AttributeList TextIter = TextIterAttributeList
type TextIterAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_text_iter_assign" gtk_text_iter_assign ::
Ptr TextIter ->
Ptr TextIter ->
IO ()
textIterAssign ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> TextIter
-> m ()
textIterAssign :: TextIter -> TextIter -> m ()
textIterAssign iter :: TextIter
iter other :: TextIter
other = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextIter
other' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
other
Ptr TextIter -> Ptr TextIter -> IO ()
gtk_text_iter_assign Ptr TextIter
iter' Ptr TextIter
other'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
other
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextIterAssignMethodInfo
instance (signature ~ (TextIter -> m ()), MonadIO m) => O.MethodInfo TextIterAssignMethodInfo TextIter signature where
overloadedMethod = textIterAssign
#endif
foreign import ccall "gtk_text_iter_backward_char" gtk_text_iter_backward_char ::
Ptr TextIter ->
IO CInt
textIterBackwardChar ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterBackwardChar :: TextIter -> m Bool
textIterBackwardChar iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_backward_char Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardCharMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterBackwardCharMethodInfo TextIter signature where
overloadedMethod = textIterBackwardChar
#endif
foreign import ccall "gtk_text_iter_backward_chars" gtk_text_iter_backward_chars ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterBackwardChars ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterBackwardChars :: TextIter -> Int32 -> m Bool
textIterBackwardChars iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_backward_chars Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardCharsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterBackwardCharsMethodInfo TextIter signature where
overloadedMethod = textIterBackwardChars
#endif
foreign import ccall "gtk_text_iter_backward_cursor_position" gtk_text_iter_backward_cursor_position ::
Ptr TextIter ->
IO CInt
textIterBackwardCursorPosition ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterBackwardCursorPosition :: TextIter -> m Bool
textIterBackwardCursorPosition iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_backward_cursor_position Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardCursorPositionMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterBackwardCursorPositionMethodInfo TextIter signature where
overloadedMethod = textIterBackwardCursorPosition
#endif
foreign import ccall "gtk_text_iter_backward_cursor_positions" gtk_text_iter_backward_cursor_positions ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterBackwardCursorPositions ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterBackwardCursorPositions :: TextIter -> Int32 -> m Bool
textIterBackwardCursorPositions iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_backward_cursor_positions Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardCursorPositionsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterBackwardCursorPositionsMethodInfo TextIter signature where
overloadedMethod = textIterBackwardCursorPositions
#endif
foreign import ccall "gtk_text_iter_backward_find_char" gtk_text_iter_backward_find_char ::
Ptr TextIter ->
FunPtr Gtk.Callbacks.C_TextCharPredicate ->
Ptr () ->
Ptr TextIter ->
IO CInt
textIterBackwardFindChar ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Gtk.Callbacks.TextCharPredicate
-> Maybe (TextIter)
-> m Bool
textIterBackwardFindChar :: TextIter -> TextCharPredicate -> Maybe TextIter -> m Bool
textIterBackwardFindChar iter :: TextIter
iter pred :: TextCharPredicate
pred limit :: Maybe TextIter
limit = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
FunPtr C_TextCharPredicate
pred' <- C_TextCharPredicate -> IO (FunPtr C_TextCharPredicate)
Gtk.Callbacks.mk_TextCharPredicate (Maybe (Ptr (FunPtr C_TextCharPredicate))
-> TextCharPredicate_WithClosures -> C_TextCharPredicate
Gtk.Callbacks.wrap_TextCharPredicate Maybe (Ptr (FunPtr C_TextCharPredicate))
forall a. Maybe a
Nothing (TextCharPredicate -> TextCharPredicate_WithClosures
Gtk.Callbacks.drop_closures_TextCharPredicate TextCharPredicate
pred))
Ptr TextIter
maybeLimit <- case Maybe TextIter
limit of
Nothing -> Ptr TextIter -> IO (Ptr TextIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextIter
forall a. Ptr a
nullPtr
Just jLimit :: TextIter
jLimit -> do
Ptr TextIter
jLimit' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
jLimit
Ptr TextIter -> IO (Ptr TextIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextIter
jLimit'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
CInt
result <- Ptr TextIter
-> FunPtr C_TextCharPredicate -> Ptr () -> Ptr TextIter -> IO CInt
gtk_text_iter_backward_find_char Ptr TextIter
iter' FunPtr C_TextCharPredicate
pred' Ptr ()
forall a. Ptr a
userData Ptr TextIter
maybeLimit
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_TextCharPredicate -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TextCharPredicate
pred'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Maybe TextIter -> (TextIter -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TextIter
limit TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardFindCharMethodInfo
instance (signature ~ (Gtk.Callbacks.TextCharPredicate -> Maybe (TextIter) -> m Bool), MonadIO m) => O.MethodInfo TextIterBackwardFindCharMethodInfo TextIter signature where
overloadedMethod = textIterBackwardFindChar
#endif
foreign import ccall "gtk_text_iter_backward_line" gtk_text_iter_backward_line ::
Ptr TextIter ->
IO CInt
textIterBackwardLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterBackwardLine :: TextIter -> m Bool
textIterBackwardLine iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_backward_line Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardLineMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterBackwardLineMethodInfo TextIter signature where
overloadedMethod = textIterBackwardLine
#endif
foreign import ccall "gtk_text_iter_backward_lines" gtk_text_iter_backward_lines ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterBackwardLines ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterBackwardLines :: TextIter -> Int32 -> m Bool
textIterBackwardLines iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_backward_lines Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardLinesMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterBackwardLinesMethodInfo TextIter signature where
overloadedMethod = textIterBackwardLines
#endif
foreign import ccall "gtk_text_iter_backward_search" gtk_text_iter_backward_search ::
Ptr TextIter ->
CString ->
CUInt ->
Ptr TextIter ->
Ptr TextIter ->
Ptr TextIter ->
IO CInt
textIterBackwardSearch ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> T.Text
-> [Gtk.Flags.TextSearchFlags]
-> Maybe (TextIter)
-> m ((Bool, TextIter, TextIter))
textIterBackwardSearch :: TextIter
-> Text
-> [TextSearchFlags]
-> Maybe TextIter
-> m (Bool, TextIter, TextIter)
textIterBackwardSearch iter :: TextIter
iter str :: Text
str flags :: [TextSearchFlags]
flags limit :: Maybe TextIter
limit = IO (Bool, TextIter, TextIter) -> m (Bool, TextIter, TextIter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TextIter, TextIter) -> m (Bool, TextIter, TextIter))
-> IO (Bool, TextIter, TextIter) -> m (Bool, TextIter, TextIter)
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CString
str' <- Text -> IO CString
textToCString Text
str
let flags' :: CUInt
flags' = [TextSearchFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [TextSearchFlags]
flags
Ptr TextIter
matchStart <- Int -> IO (Ptr TextIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 80 :: IO (Ptr TextIter)
Ptr TextIter
matchEnd <- Int -> IO (Ptr TextIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 80 :: IO (Ptr TextIter)
Ptr TextIter
maybeLimit <- case Maybe TextIter
limit of
Nothing -> Ptr TextIter -> IO (Ptr TextIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextIter
forall a. Ptr a
nullPtr
Just jLimit :: TextIter
jLimit -> do
Ptr TextIter
jLimit' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
jLimit
Ptr TextIter -> IO (Ptr TextIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextIter
jLimit'
CInt
result <- Ptr TextIter
-> CString
-> CUInt
-> Ptr TextIter
-> Ptr TextIter
-> Ptr TextIter
-> IO CInt
gtk_text_iter_backward_search Ptr TextIter
iter' CString
str' CUInt
flags' Ptr TextIter
matchStart Ptr TextIter
matchEnd Ptr TextIter
maybeLimit
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter
matchStart' <- ((ManagedPtr TextIter -> TextIter) -> Ptr TextIter -> IO TextIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TextIter -> TextIter
TextIter) Ptr TextIter
matchStart
TextIter
matchEnd' <- ((ManagedPtr TextIter -> TextIter) -> Ptr TextIter -> IO TextIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TextIter -> TextIter
TextIter) Ptr TextIter
matchEnd
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Maybe TextIter -> (TextIter -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TextIter
limit TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
str'
(Bool, TextIter, TextIter) -> IO (Bool, TextIter, TextIter)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', TextIter
matchStart', TextIter
matchEnd')
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardSearchMethodInfo
instance (signature ~ (T.Text -> [Gtk.Flags.TextSearchFlags] -> Maybe (TextIter) -> m ((Bool, TextIter, TextIter))), MonadIO m) => O.MethodInfo TextIterBackwardSearchMethodInfo TextIter signature where
overloadedMethod = textIterBackwardSearch
#endif
foreign import ccall "gtk_text_iter_backward_sentence_start" gtk_text_iter_backward_sentence_start ::
Ptr TextIter ->
IO CInt
textIterBackwardSentenceStart ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterBackwardSentenceStart :: TextIter -> m Bool
textIterBackwardSentenceStart iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_backward_sentence_start Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardSentenceStartMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterBackwardSentenceStartMethodInfo TextIter signature where
overloadedMethod = textIterBackwardSentenceStart
#endif
foreign import ccall "gtk_text_iter_backward_sentence_starts" gtk_text_iter_backward_sentence_starts ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterBackwardSentenceStarts ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterBackwardSentenceStarts :: TextIter -> Int32 -> m Bool
textIterBackwardSentenceStarts iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_backward_sentence_starts Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardSentenceStartsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterBackwardSentenceStartsMethodInfo TextIter signature where
overloadedMethod = textIterBackwardSentenceStarts
#endif
foreign import ccall "gtk_text_iter_backward_to_tag_toggle" gtk_text_iter_backward_to_tag_toggle ::
Ptr TextIter ->
Ptr Gtk.TextTag.TextTag ->
IO CInt
textIterBackwardToTagToggle ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.TextTag.IsTextTag a) =>
TextIter
-> Maybe (a)
-> m Bool
textIterBackwardToTagToggle :: TextIter -> Maybe a -> m Bool
textIterBackwardToTagToggle iter :: TextIter
iter tag :: Maybe a
tag = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextTag
maybeTag <- case Maybe a
tag of
Nothing -> Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
forall a. Ptr a
nullPtr
Just jTag :: a
jTag -> do
Ptr TextTag
jTag' <- a -> IO (Ptr TextTag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jTag
Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
jTag'
CInt
result <- Ptr TextIter -> Ptr TextTag -> IO CInt
gtk_text_iter_backward_to_tag_toggle Ptr TextIter
iter' Ptr TextTag
maybeTag
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
tag a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardToTagToggleMethodInfo
instance (signature ~ (Maybe (a) -> m Bool), MonadIO m, Gtk.TextTag.IsTextTag a) => O.MethodInfo TextIterBackwardToTagToggleMethodInfo TextIter signature where
overloadedMethod = textIterBackwardToTagToggle
#endif
foreign import ccall "gtk_text_iter_backward_visible_cursor_position" gtk_text_iter_backward_visible_cursor_position ::
Ptr TextIter ->
IO CInt
textIterBackwardVisibleCursorPosition ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterBackwardVisibleCursorPosition :: TextIter -> m Bool
textIterBackwardVisibleCursorPosition iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_backward_visible_cursor_position Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardVisibleCursorPositionMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterBackwardVisibleCursorPositionMethodInfo TextIter signature where
overloadedMethod = textIterBackwardVisibleCursorPosition
#endif
foreign import ccall "gtk_text_iter_backward_visible_cursor_positions" gtk_text_iter_backward_visible_cursor_positions ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterBackwardVisibleCursorPositions ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterBackwardVisibleCursorPositions :: TextIter -> Int32 -> m Bool
textIterBackwardVisibleCursorPositions iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_backward_visible_cursor_positions Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardVisibleCursorPositionsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterBackwardVisibleCursorPositionsMethodInfo TextIter signature where
overloadedMethod = textIterBackwardVisibleCursorPositions
#endif
foreign import ccall "gtk_text_iter_backward_visible_line" gtk_text_iter_backward_visible_line ::
Ptr TextIter ->
IO CInt
textIterBackwardVisibleLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterBackwardVisibleLine :: TextIter -> m Bool
textIterBackwardVisibleLine iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_backward_visible_line Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardVisibleLineMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterBackwardVisibleLineMethodInfo TextIter signature where
overloadedMethod = textIterBackwardVisibleLine
#endif
foreign import ccall "gtk_text_iter_backward_visible_lines" gtk_text_iter_backward_visible_lines ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterBackwardVisibleLines ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterBackwardVisibleLines :: TextIter -> Int32 -> m Bool
textIterBackwardVisibleLines iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_backward_visible_lines Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardVisibleLinesMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterBackwardVisibleLinesMethodInfo TextIter signature where
overloadedMethod = textIterBackwardVisibleLines
#endif
foreign import ccall "gtk_text_iter_backward_visible_word_start" gtk_text_iter_backward_visible_word_start ::
Ptr TextIter ->
IO CInt
textIterBackwardVisibleWordStart ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterBackwardVisibleWordStart :: TextIter -> m Bool
textIterBackwardVisibleWordStart iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_backward_visible_word_start Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardVisibleWordStartMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterBackwardVisibleWordStartMethodInfo TextIter signature where
overloadedMethod = textIterBackwardVisibleWordStart
#endif
foreign import ccall "gtk_text_iter_backward_visible_word_starts" gtk_text_iter_backward_visible_word_starts ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterBackwardVisibleWordStarts ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterBackwardVisibleWordStarts :: TextIter -> Int32 -> m Bool
textIterBackwardVisibleWordStarts iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_backward_visible_word_starts Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardVisibleWordStartsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterBackwardVisibleWordStartsMethodInfo TextIter signature where
overloadedMethod = textIterBackwardVisibleWordStarts
#endif
foreign import ccall "gtk_text_iter_backward_word_start" gtk_text_iter_backward_word_start ::
Ptr TextIter ->
IO CInt
textIterBackwardWordStart ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterBackwardWordStart :: TextIter -> m Bool
textIterBackwardWordStart iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_backward_word_start Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardWordStartMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterBackwardWordStartMethodInfo TextIter signature where
overloadedMethod = textIterBackwardWordStart
#endif
foreign import ccall "gtk_text_iter_backward_word_starts" gtk_text_iter_backward_word_starts ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterBackwardWordStarts ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterBackwardWordStarts :: TextIter -> Int32 -> m Bool
textIterBackwardWordStarts iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_backward_word_starts Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBackwardWordStartsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterBackwardWordStartsMethodInfo TextIter signature where
overloadedMethod = textIterBackwardWordStarts
#endif
foreign import ccall "gtk_text_iter_begins_tag" gtk_text_iter_begins_tag ::
Ptr TextIter ->
Ptr Gtk.TextTag.TextTag ->
IO CInt
{-# DEPRECATED textIterBeginsTag ["(Since version 3.20)","Use 'GI.Gtk.Structs.TextIter.textIterStartsTag' instead."] #-}
textIterBeginsTag ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.TextTag.IsTextTag a) =>
TextIter
-> Maybe (a)
-> m Bool
textIterBeginsTag :: TextIter -> Maybe a -> m Bool
textIterBeginsTag iter :: TextIter
iter tag :: Maybe a
tag = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextTag
maybeTag <- case Maybe a
tag of
Nothing -> Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
forall a. Ptr a
nullPtr
Just jTag :: a
jTag -> do
Ptr TextTag
jTag' <- a -> IO (Ptr TextTag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jTag
Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
jTag'
CInt
result <- Ptr TextIter -> Ptr TextTag -> IO CInt
gtk_text_iter_begins_tag Ptr TextIter
iter' Ptr TextTag
maybeTag
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
tag a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterBeginsTagMethodInfo
instance (signature ~ (Maybe (a) -> m Bool), MonadIO m, Gtk.TextTag.IsTextTag a) => O.MethodInfo TextIterBeginsTagMethodInfo TextIter signature where
overloadedMethod = textIterBeginsTag
#endif
foreign import ccall "gtk_text_iter_can_insert" gtk_text_iter_can_insert ::
Ptr TextIter ->
CInt ->
IO CInt
textIterCanInsert ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Bool
-> m Bool
textIterCanInsert :: TextIter -> Bool -> m Bool
textIterCanInsert iter :: TextIter
iter defaultEditability :: Bool
defaultEditability = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
let defaultEditability' :: CInt
defaultEditability' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
defaultEditability
CInt
result <- Ptr TextIter -> CInt -> IO CInt
gtk_text_iter_can_insert Ptr TextIter
iter' CInt
defaultEditability'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterCanInsertMethodInfo
instance (signature ~ (Bool -> m Bool), MonadIO m) => O.MethodInfo TextIterCanInsertMethodInfo TextIter signature where
overloadedMethod = textIterCanInsert
#endif
foreign import ccall "gtk_text_iter_compare" gtk_text_iter_compare ::
Ptr TextIter ->
Ptr TextIter ->
IO Int32
textIterCompare ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> TextIter
-> m Int32
textIterCompare :: TextIter -> TextIter -> m Int32
textIterCompare lhs :: TextIter
lhs rhs :: TextIter
rhs = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
lhs' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
lhs
Ptr TextIter
rhs' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
rhs
Int32
result <- Ptr TextIter -> Ptr TextIter -> IO Int32
gtk_text_iter_compare Ptr TextIter
lhs' Ptr TextIter
rhs'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
lhs
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
rhs
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TextIterCompareMethodInfo
instance (signature ~ (TextIter -> m Int32), MonadIO m) => O.MethodInfo TextIterCompareMethodInfo TextIter signature where
overloadedMethod = textIterCompare
#endif
foreign import ccall "gtk_text_iter_copy" gtk_text_iter_copy ::
Ptr TextIter ->
IO (Ptr TextIter)
textIterCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m TextIter
textIterCopy :: TextIter -> m TextIter
textIterCopy iter :: TextIter
iter = IO TextIter -> m TextIter
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextIter -> m TextIter) -> IO TextIter -> m TextIter
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextIter
result <- Ptr TextIter -> IO (Ptr TextIter)
gtk_text_iter_copy Ptr TextIter
iter'
Text -> Ptr TextIter -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "textIterCopy" Ptr TextIter
result
TextIter
result' <- ((ManagedPtr TextIter -> TextIter) -> Ptr TextIter -> IO TextIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TextIter -> TextIter
TextIter) Ptr TextIter
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
TextIter -> IO TextIter
forall (m :: * -> *) a. Monad m => a -> m a
return TextIter
result'
#if defined(ENABLE_OVERLOADING)
data TextIterCopyMethodInfo
instance (signature ~ (m TextIter), MonadIO m) => O.MethodInfo TextIterCopyMethodInfo TextIter signature where
overloadedMethod = textIterCopy
#endif
foreign import ccall "gtk_text_iter_editable" gtk_text_iter_editable ::
Ptr TextIter ->
CInt ->
IO CInt
textIterEditable ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Bool
-> m Bool
textIterEditable :: TextIter -> Bool -> m Bool
textIterEditable iter :: TextIter
iter defaultSetting :: Bool
defaultSetting = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
let defaultSetting' :: CInt
defaultSetting' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
defaultSetting
CInt
result <- Ptr TextIter -> CInt -> IO CInt
gtk_text_iter_editable Ptr TextIter
iter' CInt
defaultSetting'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterEditableMethodInfo
instance (signature ~ (Bool -> m Bool), MonadIO m) => O.MethodInfo TextIterEditableMethodInfo TextIter signature where
overloadedMethod = textIterEditable
#endif
foreign import ccall "gtk_text_iter_ends_line" gtk_text_iter_ends_line ::
Ptr TextIter ->
IO CInt
textIterEndsLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterEndsLine :: TextIter -> m Bool
textIterEndsLine iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_ends_line Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterEndsLineMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterEndsLineMethodInfo TextIter signature where
overloadedMethod = textIterEndsLine
#endif
foreign import ccall "gtk_text_iter_ends_sentence" gtk_text_iter_ends_sentence ::
Ptr TextIter ->
IO CInt
textIterEndsSentence ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterEndsSentence :: TextIter -> m Bool
textIterEndsSentence iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_ends_sentence Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterEndsSentenceMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterEndsSentenceMethodInfo TextIter signature where
overloadedMethod = textIterEndsSentence
#endif
foreign import ccall "gtk_text_iter_ends_tag" gtk_text_iter_ends_tag ::
Ptr TextIter ->
Ptr Gtk.TextTag.TextTag ->
IO CInt
textIterEndsTag ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.TextTag.IsTextTag a) =>
TextIter
-> Maybe (a)
-> m Bool
textIterEndsTag :: TextIter -> Maybe a -> m Bool
textIterEndsTag iter :: TextIter
iter tag :: Maybe a
tag = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextTag
maybeTag <- case Maybe a
tag of
Nothing -> Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
forall a. Ptr a
nullPtr
Just jTag :: a
jTag -> do
Ptr TextTag
jTag' <- a -> IO (Ptr TextTag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jTag
Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
jTag'
CInt
result <- Ptr TextIter -> Ptr TextTag -> IO CInt
gtk_text_iter_ends_tag Ptr TextIter
iter' Ptr TextTag
maybeTag
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
tag a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterEndsTagMethodInfo
instance (signature ~ (Maybe (a) -> m Bool), MonadIO m, Gtk.TextTag.IsTextTag a) => O.MethodInfo TextIterEndsTagMethodInfo TextIter signature where
overloadedMethod = textIterEndsTag
#endif
foreign import ccall "gtk_text_iter_ends_word" gtk_text_iter_ends_word ::
Ptr TextIter ->
IO CInt
textIterEndsWord ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterEndsWord :: TextIter -> m Bool
textIterEndsWord iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_ends_word Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterEndsWordMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterEndsWordMethodInfo TextIter signature where
overloadedMethod = textIterEndsWord
#endif
foreign import ccall "gtk_text_iter_equal" gtk_text_iter_equal ::
Ptr TextIter ->
Ptr TextIter ->
IO CInt
textIterEqual ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> TextIter
-> m Bool
textIterEqual :: TextIter -> TextIter -> m Bool
textIterEqual lhs :: TextIter
lhs rhs :: TextIter
rhs = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
lhs' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
lhs
Ptr TextIter
rhs' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
rhs
CInt
result <- Ptr TextIter -> Ptr TextIter -> IO CInt
gtk_text_iter_equal Ptr TextIter
lhs' Ptr TextIter
rhs'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
lhs
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
rhs
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterEqualMethodInfo
instance (signature ~ (TextIter -> m Bool), MonadIO m) => O.MethodInfo TextIterEqualMethodInfo TextIter signature where
overloadedMethod = textIterEqual
#endif
foreign import ccall "gtk_text_iter_forward_char" gtk_text_iter_forward_char ::
Ptr TextIter ->
IO CInt
textIterForwardChar ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterForwardChar :: TextIter -> m Bool
textIterForwardChar iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_forward_char Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardCharMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterForwardCharMethodInfo TextIter signature where
overloadedMethod = textIterForwardChar
#endif
foreign import ccall "gtk_text_iter_forward_chars" gtk_text_iter_forward_chars ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterForwardChars ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterForwardChars :: TextIter -> Int32 -> m Bool
textIterForwardChars iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_forward_chars Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardCharsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterForwardCharsMethodInfo TextIter signature where
overloadedMethod = textIterForwardChars
#endif
foreign import ccall "gtk_text_iter_forward_cursor_position" gtk_text_iter_forward_cursor_position ::
Ptr TextIter ->
IO CInt
textIterForwardCursorPosition ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterForwardCursorPosition :: TextIter -> m Bool
textIterForwardCursorPosition iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_forward_cursor_position Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardCursorPositionMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterForwardCursorPositionMethodInfo TextIter signature where
overloadedMethod = textIterForwardCursorPosition
#endif
foreign import ccall "gtk_text_iter_forward_cursor_positions" gtk_text_iter_forward_cursor_positions ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterForwardCursorPositions ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterForwardCursorPositions :: TextIter -> Int32 -> m Bool
textIterForwardCursorPositions iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_forward_cursor_positions Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardCursorPositionsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterForwardCursorPositionsMethodInfo TextIter signature where
overloadedMethod = textIterForwardCursorPositions
#endif
foreign import ccall "gtk_text_iter_forward_find_char" gtk_text_iter_forward_find_char ::
Ptr TextIter ->
FunPtr Gtk.Callbacks.C_TextCharPredicate ->
Ptr () ->
Ptr TextIter ->
IO CInt
textIterForwardFindChar ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Gtk.Callbacks.TextCharPredicate
-> Maybe (TextIter)
-> m Bool
textIterForwardFindChar :: TextIter -> TextCharPredicate -> Maybe TextIter -> m Bool
textIterForwardFindChar iter :: TextIter
iter pred :: TextCharPredicate
pred limit :: Maybe TextIter
limit = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
FunPtr C_TextCharPredicate
pred' <- C_TextCharPredicate -> IO (FunPtr C_TextCharPredicate)
Gtk.Callbacks.mk_TextCharPredicate (Maybe (Ptr (FunPtr C_TextCharPredicate))
-> TextCharPredicate_WithClosures -> C_TextCharPredicate
Gtk.Callbacks.wrap_TextCharPredicate Maybe (Ptr (FunPtr C_TextCharPredicate))
forall a. Maybe a
Nothing (TextCharPredicate -> TextCharPredicate_WithClosures
Gtk.Callbacks.drop_closures_TextCharPredicate TextCharPredicate
pred))
Ptr TextIter
maybeLimit <- case Maybe TextIter
limit of
Nothing -> Ptr TextIter -> IO (Ptr TextIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextIter
forall a. Ptr a
nullPtr
Just jLimit :: TextIter
jLimit -> do
Ptr TextIter
jLimit' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
jLimit
Ptr TextIter -> IO (Ptr TextIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextIter
jLimit'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
CInt
result <- Ptr TextIter
-> FunPtr C_TextCharPredicate -> Ptr () -> Ptr TextIter -> IO CInt
gtk_text_iter_forward_find_char Ptr TextIter
iter' FunPtr C_TextCharPredicate
pred' Ptr ()
forall a. Ptr a
userData Ptr TextIter
maybeLimit
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_TextCharPredicate -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TextCharPredicate
pred'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Maybe TextIter -> (TextIter -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TextIter
limit TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardFindCharMethodInfo
instance (signature ~ (Gtk.Callbacks.TextCharPredicate -> Maybe (TextIter) -> m Bool), MonadIO m) => O.MethodInfo TextIterForwardFindCharMethodInfo TextIter signature where
overloadedMethod = textIterForwardFindChar
#endif
foreign import ccall "gtk_text_iter_forward_line" gtk_text_iter_forward_line ::
Ptr TextIter ->
IO CInt
textIterForwardLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterForwardLine :: TextIter -> m Bool
textIterForwardLine iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_forward_line Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardLineMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterForwardLineMethodInfo TextIter signature where
overloadedMethod = textIterForwardLine
#endif
foreign import ccall "gtk_text_iter_forward_lines" gtk_text_iter_forward_lines ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterForwardLines ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterForwardLines :: TextIter -> Int32 -> m Bool
textIterForwardLines iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_forward_lines Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardLinesMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterForwardLinesMethodInfo TextIter signature where
overloadedMethod = textIterForwardLines
#endif
foreign import ccall "gtk_text_iter_forward_search" gtk_text_iter_forward_search ::
Ptr TextIter ->
CString ->
CUInt ->
Ptr TextIter ->
Ptr TextIter ->
Ptr TextIter ->
IO CInt
textIterForwardSearch ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> T.Text
-> [Gtk.Flags.TextSearchFlags]
-> Maybe (TextIter)
-> m ((Bool, TextIter, TextIter))
textIterForwardSearch :: TextIter
-> Text
-> [TextSearchFlags]
-> Maybe TextIter
-> m (Bool, TextIter, TextIter)
textIterForwardSearch iter :: TextIter
iter str :: Text
str flags :: [TextSearchFlags]
flags limit :: Maybe TextIter
limit = IO (Bool, TextIter, TextIter) -> m (Bool, TextIter, TextIter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TextIter, TextIter) -> m (Bool, TextIter, TextIter))
-> IO (Bool, TextIter, TextIter) -> m (Bool, TextIter, TextIter)
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CString
str' <- Text -> IO CString
textToCString Text
str
let flags' :: CUInt
flags' = [TextSearchFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [TextSearchFlags]
flags
Ptr TextIter
matchStart <- Int -> IO (Ptr TextIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 80 :: IO (Ptr TextIter)
Ptr TextIter
matchEnd <- Int -> IO (Ptr TextIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 80 :: IO (Ptr TextIter)
Ptr TextIter
maybeLimit <- case Maybe TextIter
limit of
Nothing -> Ptr TextIter -> IO (Ptr TextIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextIter
forall a. Ptr a
nullPtr
Just jLimit :: TextIter
jLimit -> do
Ptr TextIter
jLimit' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
jLimit
Ptr TextIter -> IO (Ptr TextIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextIter
jLimit'
CInt
result <- Ptr TextIter
-> CString
-> CUInt
-> Ptr TextIter
-> Ptr TextIter
-> Ptr TextIter
-> IO CInt
gtk_text_iter_forward_search Ptr TextIter
iter' CString
str' CUInt
flags' Ptr TextIter
matchStart Ptr TextIter
matchEnd Ptr TextIter
maybeLimit
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter
matchStart' <- ((ManagedPtr TextIter -> TextIter) -> Ptr TextIter -> IO TextIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TextIter -> TextIter
TextIter) Ptr TextIter
matchStart
TextIter
matchEnd' <- ((ManagedPtr TextIter -> TextIter) -> Ptr TextIter -> IO TextIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TextIter -> TextIter
TextIter) Ptr TextIter
matchEnd
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Maybe TextIter -> (TextIter -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TextIter
limit TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
str'
(Bool, TextIter, TextIter) -> IO (Bool, TextIter, TextIter)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', TextIter
matchStart', TextIter
matchEnd')
#if defined(ENABLE_OVERLOADING)
data TextIterForwardSearchMethodInfo
instance (signature ~ (T.Text -> [Gtk.Flags.TextSearchFlags] -> Maybe (TextIter) -> m ((Bool, TextIter, TextIter))), MonadIO m) => O.MethodInfo TextIterForwardSearchMethodInfo TextIter signature where
overloadedMethod = textIterForwardSearch
#endif
foreign import ccall "gtk_text_iter_forward_sentence_end" gtk_text_iter_forward_sentence_end ::
Ptr TextIter ->
IO CInt
textIterForwardSentenceEnd ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterForwardSentenceEnd :: TextIter -> m Bool
textIterForwardSentenceEnd iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_forward_sentence_end Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardSentenceEndMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterForwardSentenceEndMethodInfo TextIter signature where
overloadedMethod = textIterForwardSentenceEnd
#endif
foreign import ccall "gtk_text_iter_forward_sentence_ends" gtk_text_iter_forward_sentence_ends ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterForwardSentenceEnds ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterForwardSentenceEnds :: TextIter -> Int32 -> m Bool
textIterForwardSentenceEnds iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_forward_sentence_ends Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardSentenceEndsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterForwardSentenceEndsMethodInfo TextIter signature where
overloadedMethod = textIterForwardSentenceEnds
#endif
foreign import ccall "gtk_text_iter_forward_to_end" gtk_text_iter_forward_to_end ::
Ptr TextIter ->
IO ()
textIterForwardToEnd ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m ()
textIterForwardToEnd :: TextIter -> m ()
textIterForwardToEnd iter :: TextIter
iter = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextIter -> IO ()
gtk_text_iter_forward_to_end Ptr TextIter
iter'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextIterForwardToEndMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo TextIterForwardToEndMethodInfo TextIter signature where
overloadedMethod = textIterForwardToEnd
#endif
foreign import ccall "gtk_text_iter_forward_to_line_end" gtk_text_iter_forward_to_line_end ::
Ptr TextIter ->
IO CInt
textIterForwardToLineEnd ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterForwardToLineEnd :: TextIter -> m Bool
textIterForwardToLineEnd iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_forward_to_line_end Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardToLineEndMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterForwardToLineEndMethodInfo TextIter signature where
overloadedMethod = textIterForwardToLineEnd
#endif
foreign import ccall "gtk_text_iter_forward_to_tag_toggle" gtk_text_iter_forward_to_tag_toggle ::
Ptr TextIter ->
Ptr Gtk.TextTag.TextTag ->
IO CInt
textIterForwardToTagToggle ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.TextTag.IsTextTag a) =>
TextIter
-> Maybe (a)
-> m Bool
textIterForwardToTagToggle :: TextIter -> Maybe a -> m Bool
textIterForwardToTagToggle iter :: TextIter
iter tag :: Maybe a
tag = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextTag
maybeTag <- case Maybe a
tag of
Nothing -> Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
forall a. Ptr a
nullPtr
Just jTag :: a
jTag -> do
Ptr TextTag
jTag' <- a -> IO (Ptr TextTag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jTag
Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
jTag'
CInt
result <- Ptr TextIter -> Ptr TextTag -> IO CInt
gtk_text_iter_forward_to_tag_toggle Ptr TextIter
iter' Ptr TextTag
maybeTag
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
tag a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardToTagToggleMethodInfo
instance (signature ~ (Maybe (a) -> m Bool), MonadIO m, Gtk.TextTag.IsTextTag a) => O.MethodInfo TextIterForwardToTagToggleMethodInfo TextIter signature where
overloadedMethod = textIterForwardToTagToggle
#endif
foreign import ccall "gtk_text_iter_forward_visible_cursor_position" gtk_text_iter_forward_visible_cursor_position ::
Ptr TextIter ->
IO CInt
textIterForwardVisibleCursorPosition ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterForwardVisibleCursorPosition :: TextIter -> m Bool
textIterForwardVisibleCursorPosition iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_forward_visible_cursor_position Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardVisibleCursorPositionMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterForwardVisibleCursorPositionMethodInfo TextIter signature where
overloadedMethod = textIterForwardVisibleCursorPosition
#endif
foreign import ccall "gtk_text_iter_forward_visible_cursor_positions" gtk_text_iter_forward_visible_cursor_positions ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterForwardVisibleCursorPositions ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterForwardVisibleCursorPositions :: TextIter -> Int32 -> m Bool
textIterForwardVisibleCursorPositions iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_forward_visible_cursor_positions Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardVisibleCursorPositionsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterForwardVisibleCursorPositionsMethodInfo TextIter signature where
overloadedMethod = textIterForwardVisibleCursorPositions
#endif
foreign import ccall "gtk_text_iter_forward_visible_line" gtk_text_iter_forward_visible_line ::
Ptr TextIter ->
IO CInt
textIterForwardVisibleLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterForwardVisibleLine :: TextIter -> m Bool
textIterForwardVisibleLine iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_forward_visible_line Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardVisibleLineMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterForwardVisibleLineMethodInfo TextIter signature where
overloadedMethod = textIterForwardVisibleLine
#endif
foreign import ccall "gtk_text_iter_forward_visible_lines" gtk_text_iter_forward_visible_lines ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterForwardVisibleLines ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterForwardVisibleLines :: TextIter -> Int32 -> m Bool
textIterForwardVisibleLines iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_forward_visible_lines Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardVisibleLinesMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterForwardVisibleLinesMethodInfo TextIter signature where
overloadedMethod = textIterForwardVisibleLines
#endif
foreign import ccall "gtk_text_iter_forward_visible_word_end" gtk_text_iter_forward_visible_word_end ::
Ptr TextIter ->
IO CInt
textIterForwardVisibleWordEnd ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterForwardVisibleWordEnd :: TextIter -> m Bool
textIterForwardVisibleWordEnd iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_forward_visible_word_end Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardVisibleWordEndMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterForwardVisibleWordEndMethodInfo TextIter signature where
overloadedMethod = textIterForwardVisibleWordEnd
#endif
foreign import ccall "gtk_text_iter_forward_visible_word_ends" gtk_text_iter_forward_visible_word_ends ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterForwardVisibleWordEnds ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterForwardVisibleWordEnds :: TextIter -> Int32 -> m Bool
textIterForwardVisibleWordEnds iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_forward_visible_word_ends Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardVisibleWordEndsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterForwardVisibleWordEndsMethodInfo TextIter signature where
overloadedMethod = textIterForwardVisibleWordEnds
#endif
foreign import ccall "gtk_text_iter_forward_word_end" gtk_text_iter_forward_word_end ::
Ptr TextIter ->
IO CInt
textIterForwardWordEnd ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterForwardWordEnd :: TextIter -> m Bool
textIterForwardWordEnd iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_forward_word_end Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardWordEndMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterForwardWordEndMethodInfo TextIter signature where
overloadedMethod = textIterForwardWordEnd
#endif
foreign import ccall "gtk_text_iter_forward_word_ends" gtk_text_iter_forward_word_ends ::
Ptr TextIter ->
Int32 ->
IO CInt
textIterForwardWordEnds ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m Bool
textIterForwardWordEnds :: TextIter -> Int32 -> m Bool
textIterForwardWordEnds iter :: TextIter
iter count :: Int32
count = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> Int32 -> IO CInt
gtk_text_iter_forward_word_ends Ptr TextIter
iter' Int32
count
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterForwardWordEndsMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.MethodInfo TextIterForwardWordEndsMethodInfo TextIter signature where
overloadedMethod = textIterForwardWordEnds
#endif
foreign import ccall "gtk_text_iter_free" gtk_text_iter_free ::
Ptr TextIter ->
IO ()
textIterFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m ()
textIterFree :: TextIter -> m ()
textIterFree iter :: TextIter
iter = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextIter -> IO ()
gtk_text_iter_free Ptr TextIter
iter'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextIterFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo TextIterFreeMethodInfo TextIter signature where
overloadedMethod = textIterFree
#endif
foreign import ccall "gtk_text_iter_get_attributes" gtk_text_iter_get_attributes ::
Ptr TextIter ->
Ptr Gtk.TextAttributes.TextAttributes ->
IO CInt
textIterGetAttributes ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m ((Bool, Gtk.TextAttributes.TextAttributes))
textIterGetAttributes :: TextIter -> m (Bool, TextAttributes)
textIterGetAttributes iter :: TextIter
iter = IO (Bool, TextAttributes) -> m (Bool, TextAttributes)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TextAttributes) -> m (Bool, TextAttributes))
-> IO (Bool, TextAttributes) -> m (Bool, TextAttributes)
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextAttributes
values <- Int -> IO (Ptr TextAttributes)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 168 :: IO (Ptr Gtk.TextAttributes.TextAttributes)
CInt
result <- Ptr TextIter -> Ptr TextAttributes -> IO CInt
gtk_text_iter_get_attributes Ptr TextIter
iter' Ptr TextAttributes
values
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextAttributes
values' <- ((ManagedPtr TextAttributes -> TextAttributes)
-> Ptr TextAttributes -> IO TextAttributes
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TextAttributes -> TextAttributes
Gtk.TextAttributes.TextAttributes) Ptr TextAttributes
values
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
(Bool, TextAttributes) -> IO (Bool, TextAttributes)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', TextAttributes
values')
#if defined(ENABLE_OVERLOADING)
data TextIterGetAttributesMethodInfo
instance (signature ~ (m ((Bool, Gtk.TextAttributes.TextAttributes))), MonadIO m) => O.MethodInfo TextIterGetAttributesMethodInfo TextIter signature where
overloadedMethod = textIterGetAttributes
#endif
foreign import ccall "gtk_text_iter_get_buffer" gtk_text_iter_get_buffer ::
Ptr TextIter ->
IO (Ptr Gtk.TextBuffer.TextBuffer)
textIterGetBuffer ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Gtk.TextBuffer.TextBuffer
textIterGetBuffer :: TextIter -> m TextBuffer
textIterGetBuffer iter :: TextIter
iter = IO TextBuffer -> m TextBuffer
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextBuffer -> m TextBuffer) -> IO TextBuffer -> m TextBuffer
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextBuffer
result <- Ptr TextIter -> IO (Ptr TextBuffer)
gtk_text_iter_get_buffer Ptr TextIter
iter'
Text -> Ptr TextBuffer -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "textIterGetBuffer" Ptr TextBuffer
result
TextBuffer
result' <- ((ManagedPtr TextBuffer -> TextBuffer)
-> Ptr TextBuffer -> IO TextBuffer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextBuffer -> TextBuffer
Gtk.TextBuffer.TextBuffer) Ptr TextBuffer
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
TextBuffer -> IO TextBuffer
forall (m :: * -> *) a. Monad m => a -> m a
return TextBuffer
result'
#if defined(ENABLE_OVERLOADING)
data TextIterGetBufferMethodInfo
instance (signature ~ (m Gtk.TextBuffer.TextBuffer), MonadIO m) => O.MethodInfo TextIterGetBufferMethodInfo TextIter signature where
overloadedMethod = textIterGetBuffer
#endif
foreign import ccall "gtk_text_iter_get_bytes_in_line" gtk_text_iter_get_bytes_in_line ::
Ptr TextIter ->
IO Int32
textIterGetBytesInLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Int32
textIterGetBytesInLine :: TextIter -> m Int32
textIterGetBytesInLine iter :: TextIter
iter = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Int32
result <- Ptr TextIter -> IO Int32
gtk_text_iter_get_bytes_in_line Ptr TextIter
iter'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TextIterGetBytesInLineMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo TextIterGetBytesInLineMethodInfo TextIter signature where
overloadedMethod = textIterGetBytesInLine
#endif
foreign import ccall "gtk_text_iter_get_char" gtk_text_iter_get_char ::
Ptr TextIter ->
IO CInt
textIterGetChar ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Char
textIterGetChar :: TextIter -> m Char
textIterGetChar iter :: TextIter
iter = IO Char -> m Char
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Char -> m Char) -> IO Char -> m Char
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_get_char Ptr TextIter
iter'
let result' :: Char
result' = (Int -> Char
chr (Int -> Char) -> (CInt -> Int) -> CInt -> Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Char -> IO Char
forall (m :: * -> *) a. Monad m => a -> m a
return Char
result'
#if defined(ENABLE_OVERLOADING)
data TextIterGetCharMethodInfo
instance (signature ~ (m Char), MonadIO m) => O.MethodInfo TextIterGetCharMethodInfo TextIter signature where
overloadedMethod = textIterGetChar
#endif
foreign import ccall "gtk_text_iter_get_chars_in_line" gtk_text_iter_get_chars_in_line ::
Ptr TextIter ->
IO Int32
textIterGetCharsInLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Int32
textIterGetCharsInLine :: TextIter -> m Int32
textIterGetCharsInLine iter :: TextIter
iter = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Int32
result <- Ptr TextIter -> IO Int32
gtk_text_iter_get_chars_in_line Ptr TextIter
iter'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TextIterGetCharsInLineMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo TextIterGetCharsInLineMethodInfo TextIter signature where
overloadedMethod = textIterGetCharsInLine
#endif
foreign import ccall "gtk_text_iter_get_child_anchor" gtk_text_iter_get_child_anchor ::
Ptr TextIter ->
IO (Ptr Gtk.TextChildAnchor.TextChildAnchor)
textIterGetChildAnchor ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Gtk.TextChildAnchor.TextChildAnchor
textIterGetChildAnchor :: TextIter -> m TextChildAnchor
textIterGetChildAnchor iter :: TextIter
iter = IO TextChildAnchor -> m TextChildAnchor
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextChildAnchor -> m TextChildAnchor)
-> IO TextChildAnchor -> m TextChildAnchor
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextChildAnchor
result <- Ptr TextIter -> IO (Ptr TextChildAnchor)
gtk_text_iter_get_child_anchor Ptr TextIter
iter'
Text -> Ptr TextChildAnchor -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "textIterGetChildAnchor" Ptr TextChildAnchor
result
TextChildAnchor
result' <- ((ManagedPtr TextChildAnchor -> TextChildAnchor)
-> Ptr TextChildAnchor -> IO TextChildAnchor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextChildAnchor -> TextChildAnchor
Gtk.TextChildAnchor.TextChildAnchor) Ptr TextChildAnchor
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
TextChildAnchor -> IO TextChildAnchor
forall (m :: * -> *) a. Monad m => a -> m a
return TextChildAnchor
result'
#if defined(ENABLE_OVERLOADING)
data TextIterGetChildAnchorMethodInfo
instance (signature ~ (m Gtk.TextChildAnchor.TextChildAnchor), MonadIO m) => O.MethodInfo TextIterGetChildAnchorMethodInfo TextIter signature where
overloadedMethod = textIterGetChildAnchor
#endif
foreign import ccall "gtk_text_iter_get_language" gtk_text_iter_get_language ::
Ptr TextIter ->
IO (Ptr Pango.Language.Language)
textIterGetLanguage ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Pango.Language.Language
textIterGetLanguage :: TextIter -> m Language
textIterGetLanguage iter :: TextIter
iter = IO Language -> m Language
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Language -> m Language) -> IO Language -> m Language
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr Language
result <- Ptr TextIter -> IO (Ptr Language)
gtk_text_iter_get_language Ptr TextIter
iter'
Text -> Ptr Language -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "textIterGetLanguage" Ptr Language
result
Language
result' <- ((ManagedPtr Language -> Language) -> Ptr Language -> IO Language
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Language -> Language
Pango.Language.Language) Ptr Language
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Language -> IO Language
forall (m :: * -> *) a. Monad m => a -> m a
return Language
result'
#if defined(ENABLE_OVERLOADING)
data TextIterGetLanguageMethodInfo
instance (signature ~ (m Pango.Language.Language), MonadIO m) => O.MethodInfo TextIterGetLanguageMethodInfo TextIter signature where
overloadedMethod = textIterGetLanguage
#endif
foreign import ccall "gtk_text_iter_get_line" gtk_text_iter_get_line ::
Ptr TextIter ->
IO Int32
textIterGetLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Int32
textIterGetLine :: TextIter -> m Int32
textIterGetLine iter :: TextIter
iter = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Int32
result <- Ptr TextIter -> IO Int32
gtk_text_iter_get_line Ptr TextIter
iter'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TextIterGetLineMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo TextIterGetLineMethodInfo TextIter signature where
overloadedMethod = textIterGetLine
#endif
foreign import ccall "gtk_text_iter_get_line_index" gtk_text_iter_get_line_index ::
Ptr TextIter ->
IO Int32
textIterGetLineIndex ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Int32
textIterGetLineIndex :: TextIter -> m Int32
textIterGetLineIndex iter :: TextIter
iter = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Int32
result <- Ptr TextIter -> IO Int32
gtk_text_iter_get_line_index Ptr TextIter
iter'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TextIterGetLineIndexMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo TextIterGetLineIndexMethodInfo TextIter signature where
overloadedMethod = textIterGetLineIndex
#endif
foreign import ccall "gtk_text_iter_get_line_offset" gtk_text_iter_get_line_offset ::
Ptr TextIter ->
IO Int32
textIterGetLineOffset ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Int32
textIterGetLineOffset :: TextIter -> m Int32
textIterGetLineOffset iter :: TextIter
iter = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Int32
result <- Ptr TextIter -> IO Int32
gtk_text_iter_get_line_offset Ptr TextIter
iter'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TextIterGetLineOffsetMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo TextIterGetLineOffsetMethodInfo TextIter signature where
overloadedMethod = textIterGetLineOffset
#endif
foreign import ccall "gtk_text_iter_get_marks" gtk_text_iter_get_marks ::
Ptr TextIter ->
IO (Ptr (GSList (Ptr Gtk.TextMark.TextMark)))
textIterGetMarks ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m [Gtk.TextMark.TextMark]
textIterGetMarks :: TextIter -> m [TextMark]
textIterGetMarks iter :: TextIter
iter = IO [TextMark] -> m [TextMark]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [TextMark] -> m [TextMark]) -> IO [TextMark] -> m [TextMark]
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr (GSList (Ptr TextMark))
result <- Ptr TextIter -> IO (Ptr (GSList (Ptr TextMark)))
gtk_text_iter_get_marks Ptr TextIter
iter'
[Ptr TextMark]
result' <- Ptr (GSList (Ptr TextMark)) -> IO [Ptr TextMark]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList (Ptr TextMark))
result
[TextMark]
result'' <- (Ptr TextMark -> IO TextMark) -> [Ptr TextMark] -> IO [TextMark]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr TextMark -> TextMark) -> Ptr TextMark -> IO TextMark
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextMark -> TextMark
Gtk.TextMark.TextMark) [Ptr TextMark]
result'
Ptr (GSList (Ptr TextMark)) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList (Ptr TextMark))
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
[TextMark] -> IO [TextMark]
forall (m :: * -> *) a. Monad m => a -> m a
return [TextMark]
result''
#if defined(ENABLE_OVERLOADING)
data TextIterGetMarksMethodInfo
instance (signature ~ (m [Gtk.TextMark.TextMark]), MonadIO m) => O.MethodInfo TextIterGetMarksMethodInfo TextIter signature where
overloadedMethod = textIterGetMarks
#endif
foreign import ccall "gtk_text_iter_get_offset" gtk_text_iter_get_offset ::
Ptr TextIter ->
IO Int32
textIterGetOffset ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Int32
textIterGetOffset :: TextIter -> m Int32
textIterGetOffset iter :: TextIter
iter = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Int32
result <- Ptr TextIter -> IO Int32
gtk_text_iter_get_offset Ptr TextIter
iter'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TextIterGetOffsetMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo TextIterGetOffsetMethodInfo TextIter signature where
overloadedMethod = textIterGetOffset
#endif
foreign import ccall "gtk_text_iter_get_pixbuf" gtk_text_iter_get_pixbuf ::
Ptr TextIter ->
IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)
textIterGetPixbuf ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m GdkPixbuf.Pixbuf.Pixbuf
textIterGetPixbuf :: TextIter -> m Pixbuf
textIterGetPixbuf iter :: TextIter
iter = IO Pixbuf -> m Pixbuf
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Pixbuf -> m Pixbuf) -> IO Pixbuf -> m Pixbuf
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr Pixbuf
result <- Ptr TextIter -> IO (Ptr Pixbuf)
gtk_text_iter_get_pixbuf Ptr TextIter
iter'
Text -> Ptr Pixbuf -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "textIterGetPixbuf" Ptr Pixbuf
result
Pixbuf
result' <- ((ManagedPtr Pixbuf -> Pixbuf) -> Ptr Pixbuf -> IO Pixbuf
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf) Ptr Pixbuf
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Pixbuf -> IO Pixbuf
forall (m :: * -> *) a. Monad m => a -> m a
return Pixbuf
result'
#if defined(ENABLE_OVERLOADING)
data TextIterGetPixbufMethodInfo
instance (signature ~ (m GdkPixbuf.Pixbuf.Pixbuf), MonadIO m) => O.MethodInfo TextIterGetPixbufMethodInfo TextIter signature where
overloadedMethod = textIterGetPixbuf
#endif
foreign import ccall "gtk_text_iter_get_slice" gtk_text_iter_get_slice ::
Ptr TextIter ->
Ptr TextIter ->
IO CString
textIterGetSlice ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> TextIter
-> m T.Text
textIterGetSlice :: TextIter -> TextIter -> m Text
textIterGetSlice start :: TextIter
start end :: TextIter
end = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
start' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
start
Ptr TextIter
end' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
end
CString
result <- Ptr TextIter -> Ptr TextIter -> IO CString
gtk_text_iter_get_slice Ptr TextIter
start' Ptr TextIter
end'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "textIterGetSlice" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
start
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
end
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data TextIterGetSliceMethodInfo
instance (signature ~ (TextIter -> m T.Text), MonadIO m) => O.MethodInfo TextIterGetSliceMethodInfo TextIter signature where
overloadedMethod = textIterGetSlice
#endif
foreign import ccall "gtk_text_iter_get_tags" gtk_text_iter_get_tags ::
Ptr TextIter ->
IO (Ptr (GSList (Ptr Gtk.TextTag.TextTag)))
textIterGetTags ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m [Gtk.TextTag.TextTag]
textIterGetTags :: TextIter -> m [TextTag]
textIterGetTags iter :: TextIter
iter = IO [TextTag] -> m [TextTag]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [TextTag] -> m [TextTag]) -> IO [TextTag] -> m [TextTag]
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr (GSList (Ptr TextTag))
result <- Ptr TextIter -> IO (Ptr (GSList (Ptr TextTag)))
gtk_text_iter_get_tags Ptr TextIter
iter'
[Ptr TextTag]
result' <- Ptr (GSList (Ptr TextTag)) -> IO [Ptr TextTag]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList (Ptr TextTag))
result
[TextTag]
result'' <- (Ptr TextTag -> IO TextTag) -> [Ptr TextTag] -> IO [TextTag]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr TextTag -> TextTag) -> Ptr TextTag -> IO TextTag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextTag -> TextTag
Gtk.TextTag.TextTag) [Ptr TextTag]
result'
Ptr (GSList (Ptr TextTag)) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList (Ptr TextTag))
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
[TextTag] -> IO [TextTag]
forall (m :: * -> *) a. Monad m => a -> m a
return [TextTag]
result''
#if defined(ENABLE_OVERLOADING)
data TextIterGetTagsMethodInfo
instance (signature ~ (m [Gtk.TextTag.TextTag]), MonadIO m) => O.MethodInfo TextIterGetTagsMethodInfo TextIter signature where
overloadedMethod = textIterGetTags
#endif
foreign import ccall "gtk_text_iter_get_text" gtk_text_iter_get_text ::
Ptr TextIter ->
Ptr TextIter ->
IO CString
textIterGetText ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> TextIter
-> m T.Text
textIterGetText :: TextIter -> TextIter -> m Text
textIterGetText start :: TextIter
start end :: TextIter
end = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
start' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
start
Ptr TextIter
end' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
end
CString
result <- Ptr TextIter -> Ptr TextIter -> IO CString
gtk_text_iter_get_text Ptr TextIter
start' Ptr TextIter
end'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "textIterGetText" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
start
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
end
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data TextIterGetTextMethodInfo
instance (signature ~ (TextIter -> m T.Text), MonadIO m) => O.MethodInfo TextIterGetTextMethodInfo TextIter signature where
overloadedMethod = textIterGetText
#endif
foreign import ccall "gtk_text_iter_get_toggled_tags" gtk_text_iter_get_toggled_tags ::
Ptr TextIter ->
CInt ->
IO (Ptr (GSList (Ptr Gtk.TextTag.TextTag)))
textIterGetToggledTags ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Bool
-> m [Gtk.TextTag.TextTag]
textIterGetToggledTags :: TextIter -> Bool -> m [TextTag]
textIterGetToggledTags iter :: TextIter
iter toggledOn :: Bool
toggledOn = IO [TextTag] -> m [TextTag]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [TextTag] -> m [TextTag]) -> IO [TextTag] -> m [TextTag]
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
let toggledOn' :: CInt
toggledOn' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
toggledOn
Ptr (GSList (Ptr TextTag))
result <- Ptr TextIter -> CInt -> IO (Ptr (GSList (Ptr TextTag)))
gtk_text_iter_get_toggled_tags Ptr TextIter
iter' CInt
toggledOn'
[Ptr TextTag]
result' <- Ptr (GSList (Ptr TextTag)) -> IO [Ptr TextTag]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList (Ptr TextTag))
result
[TextTag]
result'' <- (Ptr TextTag -> IO TextTag) -> [Ptr TextTag] -> IO [TextTag]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr TextTag -> TextTag) -> Ptr TextTag -> IO TextTag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextTag -> TextTag
Gtk.TextTag.TextTag) [Ptr TextTag]
result'
Ptr (GSList (Ptr TextTag)) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList (Ptr TextTag))
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
[TextTag] -> IO [TextTag]
forall (m :: * -> *) a. Monad m => a -> m a
return [TextTag]
result''
#if defined(ENABLE_OVERLOADING)
data TextIterGetToggledTagsMethodInfo
instance (signature ~ (Bool -> m [Gtk.TextTag.TextTag]), MonadIO m) => O.MethodInfo TextIterGetToggledTagsMethodInfo TextIter signature where
overloadedMethod = textIterGetToggledTags
#endif
foreign import ccall "gtk_text_iter_get_visible_line_index" gtk_text_iter_get_visible_line_index ::
Ptr TextIter ->
IO Int32
textIterGetVisibleLineIndex ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Int32
textIterGetVisibleLineIndex :: TextIter -> m Int32
textIterGetVisibleLineIndex iter :: TextIter
iter = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Int32
result <- Ptr TextIter -> IO Int32
gtk_text_iter_get_visible_line_index Ptr TextIter
iter'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TextIterGetVisibleLineIndexMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo TextIterGetVisibleLineIndexMethodInfo TextIter signature where
overloadedMethod = textIterGetVisibleLineIndex
#endif
foreign import ccall "gtk_text_iter_get_visible_line_offset" gtk_text_iter_get_visible_line_offset ::
Ptr TextIter ->
IO Int32
textIterGetVisibleLineOffset ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Int32
textIterGetVisibleLineOffset :: TextIter -> m Int32
textIterGetVisibleLineOffset iter :: TextIter
iter = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Int32
result <- Ptr TextIter -> IO Int32
gtk_text_iter_get_visible_line_offset Ptr TextIter
iter'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TextIterGetVisibleLineOffsetMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo TextIterGetVisibleLineOffsetMethodInfo TextIter signature where
overloadedMethod = textIterGetVisibleLineOffset
#endif
foreign import ccall "gtk_text_iter_get_visible_slice" gtk_text_iter_get_visible_slice ::
Ptr TextIter ->
Ptr TextIter ->
IO CString
textIterGetVisibleSlice ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> TextIter
-> m T.Text
textIterGetVisibleSlice :: TextIter -> TextIter -> m Text
textIterGetVisibleSlice start :: TextIter
start end :: TextIter
end = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
start' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
start
Ptr TextIter
end' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
end
CString
result <- Ptr TextIter -> Ptr TextIter -> IO CString
gtk_text_iter_get_visible_slice Ptr TextIter
start' Ptr TextIter
end'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "textIterGetVisibleSlice" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
start
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
end
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data TextIterGetVisibleSliceMethodInfo
instance (signature ~ (TextIter -> m T.Text), MonadIO m) => O.MethodInfo TextIterGetVisibleSliceMethodInfo TextIter signature where
overloadedMethod = textIterGetVisibleSlice
#endif
foreign import ccall "gtk_text_iter_get_visible_text" gtk_text_iter_get_visible_text ::
Ptr TextIter ->
Ptr TextIter ->
IO CString
textIterGetVisibleText ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> TextIter
-> m T.Text
textIterGetVisibleText :: TextIter -> TextIter -> m Text
textIterGetVisibleText start :: TextIter
start end :: TextIter
end = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
start' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
start
Ptr TextIter
end' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
end
CString
result <- Ptr TextIter -> Ptr TextIter -> IO CString
gtk_text_iter_get_visible_text Ptr TextIter
start' Ptr TextIter
end'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "textIterGetVisibleText" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
start
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
end
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data TextIterGetVisibleTextMethodInfo
instance (signature ~ (TextIter -> m T.Text), MonadIO m) => O.MethodInfo TextIterGetVisibleTextMethodInfo TextIter signature where
overloadedMethod = textIterGetVisibleText
#endif
foreign import ccall "gtk_text_iter_has_tag" gtk_text_iter_has_tag ::
Ptr TextIter ->
Ptr Gtk.TextTag.TextTag ->
IO CInt
textIterHasTag ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.TextTag.IsTextTag a) =>
TextIter
-> a
-> m Bool
textIterHasTag :: TextIter -> a -> m Bool
textIterHasTag iter :: TextIter
iter tag :: a
tag = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextTag
tag' <- a -> IO (Ptr TextTag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
tag
CInt
result <- Ptr TextIter -> Ptr TextTag -> IO CInt
gtk_text_iter_has_tag Ptr TextIter
iter' Ptr TextTag
tag'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
tag
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterHasTagMethodInfo
instance (signature ~ (a -> m Bool), MonadIO m, Gtk.TextTag.IsTextTag a) => O.MethodInfo TextIterHasTagMethodInfo TextIter signature where
overloadedMethod = textIterHasTag
#endif
foreign import ccall "gtk_text_iter_in_range" gtk_text_iter_in_range ::
Ptr TextIter ->
Ptr TextIter ->
Ptr TextIter ->
IO CInt
textIterInRange ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> TextIter
-> TextIter
-> m Bool
textIterInRange :: TextIter -> TextIter -> TextIter -> m Bool
textIterInRange iter :: TextIter
iter start :: TextIter
start end :: TextIter
end = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextIter
start' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
start
Ptr TextIter
end' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
end
CInt
result <- Ptr TextIter -> Ptr TextIter -> Ptr TextIter -> IO CInt
gtk_text_iter_in_range Ptr TextIter
iter' Ptr TextIter
start' Ptr TextIter
end'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
start
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
end
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterInRangeMethodInfo
instance (signature ~ (TextIter -> TextIter -> m Bool), MonadIO m) => O.MethodInfo TextIterInRangeMethodInfo TextIter signature where
overloadedMethod = textIterInRange
#endif
foreign import ccall "gtk_text_iter_inside_sentence" gtk_text_iter_inside_sentence ::
Ptr TextIter ->
IO CInt
textIterInsideSentence ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterInsideSentence :: TextIter -> m Bool
textIterInsideSentence iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_inside_sentence Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterInsideSentenceMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterInsideSentenceMethodInfo TextIter signature where
overloadedMethod = textIterInsideSentence
#endif
foreign import ccall "gtk_text_iter_inside_word" gtk_text_iter_inside_word ::
Ptr TextIter ->
IO CInt
textIterInsideWord ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterInsideWord :: TextIter -> m Bool
textIterInsideWord iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_inside_word Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterInsideWordMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterInsideWordMethodInfo TextIter signature where
overloadedMethod = textIterInsideWord
#endif
foreign import ccall "gtk_text_iter_is_cursor_position" gtk_text_iter_is_cursor_position ::
Ptr TextIter ->
IO CInt
textIterIsCursorPosition ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterIsCursorPosition :: TextIter -> m Bool
textIterIsCursorPosition iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_is_cursor_position Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterIsCursorPositionMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterIsCursorPositionMethodInfo TextIter signature where
overloadedMethod = textIterIsCursorPosition
#endif
foreign import ccall "gtk_text_iter_is_end" gtk_text_iter_is_end ::
Ptr TextIter ->
IO CInt
textIterIsEnd ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterIsEnd :: TextIter -> m Bool
textIterIsEnd iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_is_end Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterIsEndMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterIsEndMethodInfo TextIter signature where
overloadedMethod = textIterIsEnd
#endif
foreign import ccall "gtk_text_iter_is_start" gtk_text_iter_is_start ::
Ptr TextIter ->
IO CInt
textIterIsStart ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterIsStart :: TextIter -> m Bool
textIterIsStart iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_is_start Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterIsStartMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterIsStartMethodInfo TextIter signature where
overloadedMethod = textIterIsStart
#endif
foreign import ccall "gtk_text_iter_order" gtk_text_iter_order ::
Ptr TextIter ->
Ptr TextIter ->
IO ()
textIterOrder ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> TextIter
-> m ()
textIterOrder :: TextIter -> TextIter -> m ()
textIterOrder first :: TextIter
first second :: TextIter
second = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
first' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
first
Ptr TextIter
second' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
second
Ptr TextIter -> Ptr TextIter -> IO ()
gtk_text_iter_order Ptr TextIter
first' Ptr TextIter
second'
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
first
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
second
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextIterOrderMethodInfo
instance (signature ~ (TextIter -> m ()), MonadIO m) => O.MethodInfo TextIterOrderMethodInfo TextIter signature where
overloadedMethod = textIterOrder
#endif
foreign import ccall "gtk_text_iter_set_line" gtk_text_iter_set_line ::
Ptr TextIter ->
Int32 ->
IO ()
textIterSetLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m ()
textIterSetLine :: TextIter -> Int32 -> m ()
textIterSetLine iter :: TextIter
iter lineNumber :: Int32
lineNumber = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextIter -> Int32 -> IO ()
gtk_text_iter_set_line Ptr TextIter
iter' Int32
lineNumber
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextIterSetLineMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m) => O.MethodInfo TextIterSetLineMethodInfo TextIter signature where
overloadedMethod = textIterSetLine
#endif
foreign import ccall "gtk_text_iter_set_line_index" gtk_text_iter_set_line_index ::
Ptr TextIter ->
Int32 ->
IO ()
textIterSetLineIndex ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m ()
textIterSetLineIndex :: TextIter -> Int32 -> m ()
textIterSetLineIndex iter :: TextIter
iter byteOnLine :: Int32
byteOnLine = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextIter -> Int32 -> IO ()
gtk_text_iter_set_line_index Ptr TextIter
iter' Int32
byteOnLine
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextIterSetLineIndexMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m) => O.MethodInfo TextIterSetLineIndexMethodInfo TextIter signature where
overloadedMethod = textIterSetLineIndex
#endif
foreign import ccall "gtk_text_iter_set_line_offset" gtk_text_iter_set_line_offset ::
Ptr TextIter ->
Int32 ->
IO ()
textIterSetLineOffset ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m ()
textIterSetLineOffset :: TextIter -> Int32 -> m ()
textIterSetLineOffset iter :: TextIter
iter charOnLine :: Int32
charOnLine = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextIter -> Int32 -> IO ()
gtk_text_iter_set_line_offset Ptr TextIter
iter' Int32
charOnLine
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextIterSetLineOffsetMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m) => O.MethodInfo TextIterSetLineOffsetMethodInfo TextIter signature where
overloadedMethod = textIterSetLineOffset
#endif
foreign import ccall "gtk_text_iter_set_offset" gtk_text_iter_set_offset ::
Ptr TextIter ->
Int32 ->
IO ()
textIterSetOffset ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m ()
textIterSetOffset :: TextIter -> Int32 -> m ()
textIterSetOffset iter :: TextIter
iter charOffset :: Int32
charOffset = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextIter -> Int32 -> IO ()
gtk_text_iter_set_offset Ptr TextIter
iter' Int32
charOffset
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextIterSetOffsetMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m) => O.MethodInfo TextIterSetOffsetMethodInfo TextIter signature where
overloadedMethod = textIterSetOffset
#endif
foreign import ccall "gtk_text_iter_set_visible_line_index" gtk_text_iter_set_visible_line_index ::
Ptr TextIter ->
Int32 ->
IO ()
textIterSetVisibleLineIndex ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m ()
textIterSetVisibleLineIndex :: TextIter -> Int32 -> m ()
textIterSetVisibleLineIndex iter :: TextIter
iter byteOnLine :: Int32
byteOnLine = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextIter -> Int32 -> IO ()
gtk_text_iter_set_visible_line_index Ptr TextIter
iter' Int32
byteOnLine
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextIterSetVisibleLineIndexMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m) => O.MethodInfo TextIterSetVisibleLineIndexMethodInfo TextIter signature where
overloadedMethod = textIterSetVisibleLineIndex
#endif
foreign import ccall "gtk_text_iter_set_visible_line_offset" gtk_text_iter_set_visible_line_offset ::
Ptr TextIter ->
Int32 ->
IO ()
textIterSetVisibleLineOffset ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> Int32
-> m ()
textIterSetVisibleLineOffset :: TextIter -> Int32 -> m ()
textIterSetVisibleLineOffset iter :: TextIter
iter charOnLine :: Int32
charOnLine = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextIter -> Int32 -> IO ()
gtk_text_iter_set_visible_line_offset Ptr TextIter
iter' Int32
charOnLine
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextIterSetVisibleLineOffsetMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m) => O.MethodInfo TextIterSetVisibleLineOffsetMethodInfo TextIter signature where
overloadedMethod = textIterSetVisibleLineOffset
#endif
foreign import ccall "gtk_text_iter_starts_line" gtk_text_iter_starts_line ::
Ptr TextIter ->
IO CInt
textIterStartsLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterStartsLine :: TextIter -> m Bool
textIterStartsLine iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_starts_line Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterStartsLineMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterStartsLineMethodInfo TextIter signature where
overloadedMethod = textIterStartsLine
#endif
foreign import ccall "gtk_text_iter_starts_sentence" gtk_text_iter_starts_sentence ::
Ptr TextIter ->
IO CInt
textIterStartsSentence ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterStartsSentence :: TextIter -> m Bool
textIterStartsSentence iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_starts_sentence Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterStartsSentenceMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterStartsSentenceMethodInfo TextIter signature where
overloadedMethod = textIterStartsSentence
#endif
foreign import ccall "gtk_text_iter_starts_tag" gtk_text_iter_starts_tag ::
Ptr TextIter ->
Ptr Gtk.TextTag.TextTag ->
IO CInt
textIterStartsTag ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.TextTag.IsTextTag a) =>
TextIter
-> Maybe (a)
-> m Bool
textIterStartsTag :: TextIter -> Maybe a -> m Bool
textIterStartsTag iter :: TextIter
iter tag :: Maybe a
tag = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextTag
maybeTag <- case Maybe a
tag of
Nothing -> Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
forall a. Ptr a
nullPtr
Just jTag :: a
jTag -> do
Ptr TextTag
jTag' <- a -> IO (Ptr TextTag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jTag
Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
jTag'
CInt
result <- Ptr TextIter -> Ptr TextTag -> IO CInt
gtk_text_iter_starts_tag Ptr TextIter
iter' Ptr TextTag
maybeTag
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
tag a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterStartsTagMethodInfo
instance (signature ~ (Maybe (a) -> m Bool), MonadIO m, Gtk.TextTag.IsTextTag a) => O.MethodInfo TextIterStartsTagMethodInfo TextIter signature where
overloadedMethod = textIterStartsTag
#endif
foreign import ccall "gtk_text_iter_starts_word" gtk_text_iter_starts_word ::
Ptr TextIter ->
IO CInt
textIterStartsWord ::
(B.CallStack.HasCallStack, MonadIO m) =>
TextIter
-> m Bool
textIterStartsWord :: TextIter -> m Bool
textIterStartsWord iter :: TextIter
iter = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
CInt
result <- Ptr TextIter -> IO CInt
gtk_text_iter_starts_word Ptr TextIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterStartsWordMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TextIterStartsWordMethodInfo TextIter signature where
overloadedMethod = textIterStartsWord
#endif
foreign import ccall "gtk_text_iter_toggles_tag" gtk_text_iter_toggles_tag ::
Ptr TextIter ->
Ptr Gtk.TextTag.TextTag ->
IO CInt
textIterTogglesTag ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.TextTag.IsTextTag a) =>
TextIter
-> Maybe (a)
-> m Bool
textIterTogglesTag :: TextIter -> Maybe a -> m Bool
textIterTogglesTag iter :: TextIter
iter tag :: Maybe a
tag = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TextIter
iter' <- TextIter -> IO (Ptr TextIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TextIter
iter
Ptr TextTag
maybeTag <- case Maybe a
tag of
Nothing -> Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
forall a. Ptr a
nullPtr
Just jTag :: a
jTag -> do
Ptr TextTag
jTag' <- a -> IO (Ptr TextTag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jTag
Ptr TextTag -> IO (Ptr TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TextTag
jTag'
CInt
result <- Ptr TextIter -> Ptr TextTag -> IO CInt
gtk_text_iter_toggles_tag Ptr TextIter
iter' Ptr TextTag
maybeTag
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TextIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TextIter
iter
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
tag a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextIterTogglesTagMethodInfo
instance (signature ~ (Maybe (a) -> m Bool), MonadIO m, Gtk.TextTag.IsTextTag a) => O.MethodInfo TextIterTogglesTagMethodInfo TextIter signature where
overloadedMethod = textIterTogglesTag
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveTextIterMethod (t :: Symbol) (o :: *) :: * where
ResolveTextIterMethod "assign" o = TextIterAssignMethodInfo
ResolveTextIterMethod "backwardChar" o = TextIterBackwardCharMethodInfo
ResolveTextIterMethod "backwardChars" o = TextIterBackwardCharsMethodInfo
ResolveTextIterMethod "backwardCursorPosition" o = TextIterBackwardCursorPositionMethodInfo
ResolveTextIterMethod "backwardCursorPositions" o = TextIterBackwardCursorPositionsMethodInfo
ResolveTextIterMethod "backwardFindChar" o = TextIterBackwardFindCharMethodInfo
ResolveTextIterMethod "backwardLine" o = TextIterBackwardLineMethodInfo
ResolveTextIterMethod "backwardLines" o = TextIterBackwardLinesMethodInfo
ResolveTextIterMethod "backwardSearch" o = TextIterBackwardSearchMethodInfo
ResolveTextIterMethod "backwardSentenceStart" o = TextIterBackwardSentenceStartMethodInfo
ResolveTextIterMethod "backwardSentenceStarts" o = TextIterBackwardSentenceStartsMethodInfo
ResolveTextIterMethod "backwardToTagToggle" o = TextIterBackwardToTagToggleMethodInfo
ResolveTextIterMethod "backwardVisibleCursorPosition" o = TextIterBackwardVisibleCursorPositionMethodInfo
ResolveTextIterMethod "backwardVisibleCursorPositions" o = TextIterBackwardVisibleCursorPositionsMethodInfo
ResolveTextIterMethod "backwardVisibleLine" o = TextIterBackwardVisibleLineMethodInfo
ResolveTextIterMethod "backwardVisibleLines" o = TextIterBackwardVisibleLinesMethodInfo
ResolveTextIterMethod "backwardVisibleWordStart" o = TextIterBackwardVisibleWordStartMethodInfo
ResolveTextIterMethod "backwardVisibleWordStarts" o = TextIterBackwardVisibleWordStartsMethodInfo
ResolveTextIterMethod "backwardWordStart" o = TextIterBackwardWordStartMethodInfo
ResolveTextIterMethod "backwardWordStarts" o = TextIterBackwardWordStartsMethodInfo
ResolveTextIterMethod "beginsTag" o = TextIterBeginsTagMethodInfo
ResolveTextIterMethod "canInsert" o = TextIterCanInsertMethodInfo
ResolveTextIterMethod "compare" o = TextIterCompareMethodInfo
ResolveTextIterMethod "copy" o = TextIterCopyMethodInfo
ResolveTextIterMethod "editable" o = TextIterEditableMethodInfo
ResolveTextIterMethod "endsLine" o = TextIterEndsLineMethodInfo
ResolveTextIterMethod "endsSentence" o = TextIterEndsSentenceMethodInfo
ResolveTextIterMethod "endsTag" o = TextIterEndsTagMethodInfo
ResolveTextIterMethod "endsWord" o = TextIterEndsWordMethodInfo
ResolveTextIterMethod "equal" o = TextIterEqualMethodInfo
ResolveTextIterMethod "forwardChar" o = TextIterForwardCharMethodInfo
ResolveTextIterMethod "forwardChars" o = TextIterForwardCharsMethodInfo
ResolveTextIterMethod "forwardCursorPosition" o = TextIterForwardCursorPositionMethodInfo
ResolveTextIterMethod "forwardCursorPositions" o = TextIterForwardCursorPositionsMethodInfo
ResolveTextIterMethod "forwardFindChar" o = TextIterForwardFindCharMethodInfo
ResolveTextIterMethod "forwardLine" o = TextIterForwardLineMethodInfo
ResolveTextIterMethod "forwardLines" o = TextIterForwardLinesMethodInfo
ResolveTextIterMethod "forwardSearch" o = TextIterForwardSearchMethodInfo
ResolveTextIterMethod "forwardSentenceEnd" o = TextIterForwardSentenceEndMethodInfo
ResolveTextIterMethod "forwardSentenceEnds" o = TextIterForwardSentenceEndsMethodInfo
ResolveTextIterMethod "forwardToEnd" o = TextIterForwardToEndMethodInfo
ResolveTextIterMethod "forwardToLineEnd" o = TextIterForwardToLineEndMethodInfo
ResolveTextIterMethod "forwardToTagToggle" o = TextIterForwardToTagToggleMethodInfo
ResolveTextIterMethod "forwardVisibleCursorPosition" o = TextIterForwardVisibleCursorPositionMethodInfo
ResolveTextIterMethod "forwardVisibleCursorPositions" o = TextIterForwardVisibleCursorPositionsMethodInfo
ResolveTextIterMethod "forwardVisibleLine" o = TextIterForwardVisibleLineMethodInfo
ResolveTextIterMethod "forwardVisibleLines" o = TextIterForwardVisibleLinesMethodInfo
ResolveTextIterMethod "forwardVisibleWordEnd" o = TextIterForwardVisibleWordEndMethodInfo
ResolveTextIterMethod "forwardVisibleWordEnds" o = TextIterForwardVisibleWordEndsMethodInfo
ResolveTextIterMethod "forwardWordEnd" o = TextIterForwardWordEndMethodInfo
ResolveTextIterMethod "forwardWordEnds" o = TextIterForwardWordEndsMethodInfo
ResolveTextIterMethod "free" o = TextIterFreeMethodInfo
ResolveTextIterMethod "hasTag" o = TextIterHasTagMethodInfo
ResolveTextIterMethod "inRange" o = TextIterInRangeMethodInfo
ResolveTextIterMethod "insideSentence" o = TextIterInsideSentenceMethodInfo
ResolveTextIterMethod "insideWord" o = TextIterInsideWordMethodInfo
ResolveTextIterMethod "isCursorPosition" o = TextIterIsCursorPositionMethodInfo
ResolveTextIterMethod "isEnd" o = TextIterIsEndMethodInfo
ResolveTextIterMethod "isStart" o = TextIterIsStartMethodInfo
ResolveTextIterMethod "order" o = TextIterOrderMethodInfo
ResolveTextIterMethod "startsLine" o = TextIterStartsLineMethodInfo
ResolveTextIterMethod "startsSentence" o = TextIterStartsSentenceMethodInfo
ResolveTextIterMethod "startsTag" o = TextIterStartsTagMethodInfo
ResolveTextIterMethod "startsWord" o = TextIterStartsWordMethodInfo
ResolveTextIterMethod "togglesTag" o = TextIterTogglesTagMethodInfo
ResolveTextIterMethod "getAttributes" o = TextIterGetAttributesMethodInfo
ResolveTextIterMethod "getBuffer" o = TextIterGetBufferMethodInfo
ResolveTextIterMethod "getBytesInLine" o = TextIterGetBytesInLineMethodInfo
ResolveTextIterMethod "getChar" o = TextIterGetCharMethodInfo
ResolveTextIterMethod "getCharsInLine" o = TextIterGetCharsInLineMethodInfo
ResolveTextIterMethod "getChildAnchor" o = TextIterGetChildAnchorMethodInfo
ResolveTextIterMethod "getLanguage" o = TextIterGetLanguageMethodInfo
ResolveTextIterMethod "getLine" o = TextIterGetLineMethodInfo
ResolveTextIterMethod "getLineIndex" o = TextIterGetLineIndexMethodInfo
ResolveTextIterMethod "getLineOffset" o = TextIterGetLineOffsetMethodInfo
ResolveTextIterMethod "getMarks" o = TextIterGetMarksMethodInfo
ResolveTextIterMethod "getOffset" o = TextIterGetOffsetMethodInfo
ResolveTextIterMethod "getPixbuf" o = TextIterGetPixbufMethodInfo
ResolveTextIterMethod "getSlice" o = TextIterGetSliceMethodInfo
ResolveTextIterMethod "getTags" o = TextIterGetTagsMethodInfo
ResolveTextIterMethod "getText" o = TextIterGetTextMethodInfo
ResolveTextIterMethod "getToggledTags" o = TextIterGetToggledTagsMethodInfo
ResolveTextIterMethod "getVisibleLineIndex" o = TextIterGetVisibleLineIndexMethodInfo
ResolveTextIterMethod "getVisibleLineOffset" o = TextIterGetVisibleLineOffsetMethodInfo
ResolveTextIterMethod "getVisibleSlice" o = TextIterGetVisibleSliceMethodInfo
ResolveTextIterMethod "getVisibleText" o = TextIterGetVisibleTextMethodInfo
ResolveTextIterMethod "setLine" o = TextIterSetLineMethodInfo
ResolveTextIterMethod "setLineIndex" o = TextIterSetLineIndexMethodInfo
ResolveTextIterMethod "setLineOffset" o = TextIterSetLineOffsetMethodInfo
ResolveTextIterMethod "setOffset" o = TextIterSetOffsetMethodInfo
ResolveTextIterMethod "setVisibleLineIndex" o = TextIterSetVisibleLineIndexMethodInfo
ResolveTextIterMethod "setVisibleLineOffset" o = TextIterSetVisibleLineOffsetMethodInfo
ResolveTextIterMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTextIterMethod t TextIter, O.MethodInfo info TextIter p) => OL.IsLabel t (TextIter -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif