{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Collected information about visible lines.
-- 
-- The @GtkSourceGutterLines@ object is used to collect information about
-- visible lines.
-- 
-- Use this from your [signal/@gutterRenderer@/[queryData](#g:signal:queryData)] to collect the
-- necessary information on visible lines. Doing so reduces the number of
-- passes through the text btree allowing GtkSourceView to reach more
-- frames-per-second while performing kinetic scrolling.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.GtkSource.Objects.GutterLines
    ( 

-- * Exported types
    GutterLines(..)                         ,
    IsGutterLines                           ,
    toGutterLines                           ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [addClass]("GI.GtkSource.Objects.GutterLines#g:method:addClass"), [addQclass]("GI.GtkSource.Objects.GutterLines#g:method:addQclass"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [hasAnyClass]("GI.GtkSource.Objects.GutterLines#g:method:hasAnyClass"), [hasClass]("GI.GtkSource.Objects.GutterLines#g:method:hasClass"), [hasQclass]("GI.GtkSource.Objects.GutterLines#g:method:hasQclass"), [isCursor]("GI.GtkSource.Objects.GutterLines#g:method:isCursor"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isPrelit]("GI.GtkSource.Objects.GutterLines#g:method:isPrelit"), [isSelected]("GI.GtkSource.Objects.GutterLines#g:method:isSelected"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [removeClass]("GI.GtkSource.Objects.GutterLines#g:method:removeClass"), [removeQclass]("GI.GtkSource.Objects.GutterLines#g:method:removeQclass"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getBuffer]("GI.GtkSource.Objects.GutterLines#g:method:getBuffer"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getFirst]("GI.GtkSource.Objects.GutterLines#g:method:getFirst"), [getIterAtLine]("GI.GtkSource.Objects.GutterLines#g:method:getIterAtLine"), [getLast]("GI.GtkSource.Objects.GutterLines#g:method:getLast"), [getLineYrange]("GI.GtkSource.Objects.GutterLines#g:method:getLineYrange"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getView]("GI.GtkSource.Objects.GutterLines#g:method:getView").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveGutterLinesMethod                ,
#endif

-- ** addClass #method:addClass#

#if defined(ENABLE_OVERLOADING)
    GutterLinesAddClassMethodInfo           ,
#endif
    gutterLinesAddClass                     ,


-- ** addQclass #method:addQclass#

#if defined(ENABLE_OVERLOADING)
    GutterLinesAddQclassMethodInfo          ,
#endif
    gutterLinesAddQclass                    ,


-- ** getBuffer #method:getBuffer#

#if defined(ENABLE_OVERLOADING)
    GutterLinesGetBufferMethodInfo          ,
#endif
    gutterLinesGetBuffer                    ,


-- ** getFirst #method:getFirst#

#if defined(ENABLE_OVERLOADING)
    GutterLinesGetFirstMethodInfo           ,
#endif
    gutterLinesGetFirst                     ,


-- ** getIterAtLine #method:getIterAtLine#

#if defined(ENABLE_OVERLOADING)
    GutterLinesGetIterAtLineMethodInfo      ,
#endif
    gutterLinesGetIterAtLine                ,


-- ** getLast #method:getLast#

#if defined(ENABLE_OVERLOADING)
    GutterLinesGetLastMethodInfo            ,
#endif
    gutterLinesGetLast                      ,


-- ** getLineYrange #method:getLineYrange#

#if defined(ENABLE_OVERLOADING)
    GutterLinesGetLineYrangeMethodInfo      ,
#endif
    gutterLinesGetLineYrange                ,


-- ** getView #method:getView#

#if defined(ENABLE_OVERLOADING)
    GutterLinesGetViewMethodInfo            ,
#endif
    gutterLinesGetView                      ,


-- ** hasAnyClass #method:hasAnyClass#

#if defined(ENABLE_OVERLOADING)
    GutterLinesHasAnyClassMethodInfo        ,
#endif
    gutterLinesHasAnyClass                  ,


-- ** hasClass #method:hasClass#

#if defined(ENABLE_OVERLOADING)
    GutterLinesHasClassMethodInfo           ,
#endif
    gutterLinesHasClass                     ,


-- ** hasQclass #method:hasQclass#

#if defined(ENABLE_OVERLOADING)
    GutterLinesHasQclassMethodInfo          ,
#endif
    gutterLinesHasQclass                    ,


-- ** isCursor #method:isCursor#

#if defined(ENABLE_OVERLOADING)
    GutterLinesIsCursorMethodInfo           ,
#endif
    gutterLinesIsCursor                     ,


-- ** isPrelit #method:isPrelit#

#if defined(ENABLE_OVERLOADING)
    GutterLinesIsPrelitMethodInfo           ,
#endif
    gutterLinesIsPrelit                     ,


-- ** isSelected #method:isSelected#

#if defined(ENABLE_OVERLOADING)
    GutterLinesIsSelectedMethodInfo         ,
#endif
    gutterLinesIsSelected                   ,


-- ** removeClass #method:removeClass#

#if defined(ENABLE_OVERLOADING)
    GutterLinesRemoveClassMethodInfo        ,
#endif
    gutterLinesRemoveClass                  ,


-- ** removeQclass #method:removeQclass#

#if defined(ENABLE_OVERLOADING)
    GutterLinesRemoveQclassMethodInfo       ,
#endif
    gutterLinesRemoveQclass                 ,




    ) where

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

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Objects.TextBuffer as Gtk.TextBuffer
import qualified GI.Gtk.Objects.TextView as Gtk.TextView
import qualified GI.Gtk.Structs.TextIter as Gtk.TextIter
import {-# SOURCE #-} qualified GI.GtkSource.Enums as GtkSource.Enums

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

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

foreign import ccall "gtk_source_gutter_lines_get_type"
    c_gtk_source_gutter_lines_get_type :: IO B.Types.GType

instance B.Types.TypedObject GutterLines where
    glibType :: IO GType
glibType = IO GType
c_gtk_source_gutter_lines_get_type

instance B.Types.GObject GutterLines

-- | Type class for types which can be safely cast to `GutterLines`, for instance with `toGutterLines`.
class (SP.GObject o, O.IsDescendantOf GutterLines o) => IsGutterLines o
instance (SP.GObject o, O.IsDescendantOf GutterLines o) => IsGutterLines o

instance O.HasParentTypes GutterLines
type instance O.ParentTypes GutterLines = '[GObject.Object.Object]

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

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

#if defined(ENABLE_OVERLOADING)
type family ResolveGutterLinesMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveGutterLinesMethod "addClass" o = GutterLinesAddClassMethodInfo
    ResolveGutterLinesMethod "addQclass" o = GutterLinesAddQclassMethodInfo
    ResolveGutterLinesMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveGutterLinesMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveGutterLinesMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveGutterLinesMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveGutterLinesMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveGutterLinesMethod "hasAnyClass" o = GutterLinesHasAnyClassMethodInfo
    ResolveGutterLinesMethod "hasClass" o = GutterLinesHasClassMethodInfo
    ResolveGutterLinesMethod "hasQclass" o = GutterLinesHasQclassMethodInfo
    ResolveGutterLinesMethod "isCursor" o = GutterLinesIsCursorMethodInfo
    ResolveGutterLinesMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveGutterLinesMethod "isPrelit" o = GutterLinesIsPrelitMethodInfo
    ResolveGutterLinesMethod "isSelected" o = GutterLinesIsSelectedMethodInfo
    ResolveGutterLinesMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveGutterLinesMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveGutterLinesMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveGutterLinesMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveGutterLinesMethod "removeClass" o = GutterLinesRemoveClassMethodInfo
    ResolveGutterLinesMethod "removeQclass" o = GutterLinesRemoveQclassMethodInfo
    ResolveGutterLinesMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveGutterLinesMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveGutterLinesMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveGutterLinesMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveGutterLinesMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveGutterLinesMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveGutterLinesMethod "getBuffer" o = GutterLinesGetBufferMethodInfo
    ResolveGutterLinesMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveGutterLinesMethod "getFirst" o = GutterLinesGetFirstMethodInfo
    ResolveGutterLinesMethod "getIterAtLine" o = GutterLinesGetIterAtLineMethodInfo
    ResolveGutterLinesMethod "getLast" o = GutterLinesGetLastMethodInfo
    ResolveGutterLinesMethod "getLineYrange" o = GutterLinesGetLineYrangeMethodInfo
    ResolveGutterLinesMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveGutterLinesMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveGutterLinesMethod "getView" o = GutterLinesGetViewMethodInfo
    ResolveGutterLinesMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveGutterLinesMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveGutterLinesMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveGutterLinesMethod l o = O.MethodResolutionFailed l o

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

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

#endif

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

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList GutterLines
type instance O.AttributeList GutterLines = GutterLinesAttributeList
type GutterLinesAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList GutterLines = GutterLinesSignalList
type GutterLinesSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

#endif

-- method GutterLines::add_class
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a line number starting from zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a class name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_add_class" gtk_source_gutter_lines_add_class :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Word32 ->                               -- line : TBasicType TUInt
    CString ->                              -- name : TBasicType TUTF8
    IO ()

-- | Adds the class /@name@/ to /@line@/.
-- 
-- /@name@/ will be converted to a [alias/@gLib@/.Quark] as part of this process. A
-- faster version of this function is available via
-- [method/@gutterLines@/.add_qclass] for situations where the [alias/@gLib@/.Quark] is
-- known ahead of time.
gutterLinesAddClass ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: a line number starting from zero
    -> T.Text
    -- ^ /@name@/: a class name
    -> m ()
gutterLinesAddClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> Text -> m ()
gutterLinesAddClass a
lines Word32
line Text
name = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr GutterLines -> Word32 -> CString -> IO ()
gtk_source_gutter_lines_add_class Ptr GutterLines
lines' Word32
line CString
name'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data GutterLinesAddClassMethodInfo
instance (signature ~ (Word32 -> T.Text -> m ()), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesAddClassMethodInfo a signature where
    overloadedMethod = gutterLinesAddClass

instance O.OverloadedMethodInfo GutterLinesAddClassMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesAddClass",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesAddClass"
        })


#endif

-- method GutterLines::add_qclass
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a line number starting from zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "qname"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a class name as a #GQuark"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_add_qclass" gtk_source_gutter_lines_add_qclass :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Word32 ->                               -- line : TBasicType TUInt
    Word32 ->                               -- qname : TBasicType TUInt32
    IO ()

-- | Adds the class denoted by /@qname@/ to /@line@/.
-- 
-- You may check if a line has /@qname@/ by calling
-- [method/@gutterLines@/.has_qclass].
-- 
-- You can remove /@qname@/ by calling
-- [method/@gutterLines@/.remove_qclass].
gutterLinesAddQclass ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: a line number starting from zero
    -> Word32
    -- ^ /@qname@/: a class name as a @/GQuark/@
    -> m ()
gutterLinesAddQclass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> Word32 -> m ()
gutterLinesAddQclass a
lines Word32
line Word32
qname = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    Ptr GutterLines -> Word32 -> Word32 -> IO ()
gtk_source_gutter_lines_add_qclass Ptr GutterLines
lines' Word32
line Word32
qname
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data GutterLinesAddQclassMethodInfo
instance (signature ~ (Word32 -> Word32 -> m ()), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesAddQclassMethodInfo a signature where
    overloadedMethod = gutterLinesAddQclass

instance O.OverloadedMethodInfo GutterLinesAddQclassMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesAddQclass",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesAddQclass"
        })


#endif

-- method GutterLines::get_buffer
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "TextBuffer" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_get_buffer" gtk_source_gutter_lines_get_buffer :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    IO (Ptr Gtk.TextBuffer.TextBuffer)

-- | Gets the t'GI.Gtk.Objects.TextBuffer.TextBuffer' that the @GtkSourceGutterLines@ represents.
gutterLinesGetBuffer ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> m Gtk.TextBuffer.TextBuffer
    -- ^ __Returns:__ a t'GI.Gtk.Objects.TextBuffer.TextBuffer'
gutterLinesGetBuffer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> m TextBuffer
gutterLinesGetBuffer a
lines = IO TextBuffer -> m TextBuffer
forall a. IO a -> m a
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 GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    Ptr TextBuffer
result <- Ptr GutterLines -> IO (Ptr TextBuffer)
gtk_source_gutter_lines_get_buffer Ptr GutterLines
lines'
    Text -> Ptr TextBuffer -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"gutterLinesGetBuffer" 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
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    TextBuffer -> IO TextBuffer
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return TextBuffer
result'

#if defined(ENABLE_OVERLOADING)
data GutterLinesGetBufferMethodInfo
instance (signature ~ (m Gtk.TextBuffer.TextBuffer), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesGetBufferMethodInfo a signature where
    overloadedMethod = gutterLinesGetBuffer

instance O.OverloadedMethodInfo GutterLinesGetBufferMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesGetBuffer",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesGetBuffer"
        })


#endif

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

foreign import ccall "gtk_source_gutter_lines_get_first" gtk_source_gutter_lines_get_first :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    IO Word32

-- | Gets the line number (starting from 0) for the first line that is
-- user visible.
gutterLinesGetFirst ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> m Word32
    -- ^ __Returns:__ a line number starting from 0
gutterLinesGetFirst :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> m Word32
gutterLinesGetFirst a
lines = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    Word32
result <- Ptr GutterLines -> IO Word32
gtk_source_gutter_lines_get_first Ptr GutterLines
lines'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data GutterLinesGetFirstMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesGetFirstMethodInfo a signature where
    overloadedMethod = gutterLinesGetFirst

instance O.OverloadedMethodInfo GutterLinesGetFirstMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesGetFirst",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesGetFirst"
        })


#endif

-- method GutterLines::get_iter_at_line
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TextIter" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a location for a #GtkTextIter"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the line number" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_get_iter_at_line" gtk_source_gutter_lines_get_iter_at_line :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Ptr Gtk.TextIter.TextIter ->            -- iter : TInterface (Name {namespace = "Gtk", name = "TextIter"})
    Word32 ->                               -- line : TBasicType TUInt
    IO ()

-- | Gets a t'GI.Gtk.Structs.TextIter.TextIter' for the current buffer at /@line@/
gutterLinesGetIterAtLine ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: the line number
    -> m (Gtk.TextIter.TextIter)
gutterLinesGetIterAtLine :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> m TextIter
gutterLinesGetIterAtLine a
lines Word32
line = IO TextIter -> m TextIter
forall a. IO a -> m a
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 GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    Ptr TextIter
iter <- Int -> IO (Ptr TextIter)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
80 :: IO (Ptr Gtk.TextIter.TextIter)
    Ptr GutterLines -> Ptr TextIter -> Word32 -> IO ()
gtk_source_gutter_lines_get_iter_at_line Ptr GutterLines
lines' Ptr TextIter
iter Word32
line
    TextIter
iter' <- ((ManagedPtr TextIter -> TextIter) -> Ptr TextIter -> IO TextIter
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TextIter -> TextIter
Gtk.TextIter.TextIter) Ptr TextIter
iter
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    TextIter -> IO TextIter
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return TextIter
iter'

#if defined(ENABLE_OVERLOADING)
data GutterLinesGetIterAtLineMethodInfo
instance (signature ~ (Word32 -> m (Gtk.TextIter.TextIter)), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesGetIterAtLineMethodInfo a signature where
    overloadedMethod = gutterLinesGetIterAtLine

instance O.OverloadedMethodInfo GutterLinesGetIterAtLineMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesGetIterAtLine",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesGetIterAtLine"
        })


#endif

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

foreign import ccall "gtk_source_gutter_lines_get_last" gtk_source_gutter_lines_get_last :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    IO Word32

-- | Gets the line number (starting from 0) for the last line that is
-- user visible.
gutterLinesGetLast ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> m Word32
    -- ^ __Returns:__ a line number starting from 0
gutterLinesGetLast :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> m Word32
gutterLinesGetLast a
lines = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    Word32
result <- Ptr GutterLines -> IO Word32
gtk_source_gutter_lines_get_last Ptr GutterLines
lines'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data GutterLinesGetLastMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesGetLastMethodInfo a signature where
    overloadedMethod = gutterLinesGetLast

instance O.OverloadedMethodInfo GutterLinesGetLastMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesGetLast",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesGetLast"
        })


#endif

-- method GutterLines::get_line_yrange
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a line number starting from zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "mode"
--           , argType =
--               TInterface
--                 Name
--                   { namespace = "GtkSource" , name = "GutterRendererAlignmentMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterRendererAlignmentMode"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a location for the Y position in widget coordinates"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the line height based on @mode"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_get_line_yrange" gtk_source_gutter_lines_get_line_yrange :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Word32 ->                               -- line : TBasicType TUInt
    CUInt ->                                -- mode : TInterface (Name {namespace = "GtkSource", name = "GutterRendererAlignmentMode"})
    Ptr Int32 ->                            -- y : TBasicType TInt
    Ptr Int32 ->                            -- height : TBasicType TInt
    IO ()

-- | Gets the Y range for a line based on /@mode@/.
-- 
-- The value for /@y@/ is relative to the renderers widget coordinates.
gutterLinesGetLineYrange ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: a line number starting from zero
    -> GtkSource.Enums.GutterRendererAlignmentMode
    -- ^ /@mode@/: a t'GI.GtkSource.Enums.GutterRendererAlignmentMode'
    -> m ((Int32, Int32))
gutterLinesGetLineYrange :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> GutterRendererAlignmentMode -> m (Int32, Int32)
gutterLinesGetLineYrange a
lines Word32
line GutterRendererAlignmentMode
mode = IO (Int32, Int32) -> m (Int32, Int32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (GutterRendererAlignmentMode -> Int)
-> GutterRendererAlignmentMode
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. GutterRendererAlignmentMode -> Int
forall a. Enum a => a -> Int
fromEnum) GutterRendererAlignmentMode
mode
    Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
height <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr GutterLines
-> Word32 -> CUInt -> Ptr Int32 -> Ptr Int32 -> IO ()
gtk_source_gutter_lines_get_line_yrange Ptr GutterLines
lines' Word32
line CUInt
mode' Ptr Int32
y Ptr Int32
height
    Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
    Int32
height' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
height
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
height
    (Int32, Int32) -> IO (Int32, Int32)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
y', Int32
height')

#if defined(ENABLE_OVERLOADING)
data GutterLinesGetLineYrangeMethodInfo
instance (signature ~ (Word32 -> GtkSource.Enums.GutterRendererAlignmentMode -> m ((Int32, Int32))), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesGetLineYrangeMethodInfo a signature where
    overloadedMethod = gutterLinesGetLineYrange

instance O.OverloadedMethodInfo GutterLinesGetLineYrangeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesGetLineYrange",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesGetLineYrange"
        })


#endif

-- method GutterLines::get_view
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "TextView" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_get_view" gtk_source_gutter_lines_get_view :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    IO (Ptr Gtk.TextView.TextView)

-- | Gets the t'GI.Gtk.Objects.TextView.TextView' that the @GtkSourceGutterLines@ represents.
gutterLinesGetView ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> m Gtk.TextView.TextView
    -- ^ __Returns:__ a t'GI.Gtk.Objects.TextView.TextView'
gutterLinesGetView :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> m TextView
gutterLinesGetView a
lines = IO TextView -> m TextView
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextView -> m TextView) -> IO TextView -> m TextView
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    Ptr TextView
result <- Ptr GutterLines -> IO (Ptr TextView)
gtk_source_gutter_lines_get_view Ptr GutterLines
lines'
    Text -> Ptr TextView -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"gutterLinesGetView" Ptr TextView
result
    TextView
result' <- ((ManagedPtr TextView -> TextView) -> Ptr TextView -> IO TextView
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextView -> TextView
Gtk.TextView.TextView) Ptr TextView
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    TextView -> IO TextView
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return TextView
result'

#if defined(ENABLE_OVERLOADING)
data GutterLinesGetViewMethodInfo
instance (signature ~ (m Gtk.TextView.TextView), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesGetViewMethodInfo a signature where
    overloadedMethod = gutterLinesGetView

instance O.OverloadedMethodInfo GutterLinesGetViewMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesGetView",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesGetView"
        })


#endif

-- method GutterLines::has_any_class
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a line contained within @lines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_has_any_class" gtk_source_gutter_lines_has_any_class :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Word32 ->                               -- line : TBasicType TUInt
    IO CInt

-- | Checks to see if the line has any GQuark classes set. This can be
-- used to help renderer implementations avoid work if nothing has
-- been set on the class.
-- 
-- /Since: 5.6/
gutterLinesHasAnyClass ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: a line contained within /@lines@/
    -> m Bool
    -- ^ __Returns:__ 'P.True' if any quark was set for the line
gutterLinesHasAnyClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> m Bool
gutterLinesHasAnyClass a
lines Word32
line = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    CInt
result <- Ptr GutterLines -> Word32 -> IO CInt
gtk_source_gutter_lines_has_any_class Ptr GutterLines
lines' Word32
line
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data GutterLinesHasAnyClassMethodInfo
instance (signature ~ (Word32 -> m Bool), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesHasAnyClassMethodInfo a signature where
    overloadedMethod = gutterLinesHasAnyClass

instance O.OverloadedMethodInfo GutterLinesHasAnyClassMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesHasAnyClass",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesHasAnyClass"
        })


#endif

-- method GutterLines::has_class
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a line number starting from zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a class name that may be converted, to a #GQuark"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_has_class" gtk_source_gutter_lines_has_class :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Word32 ->                               -- line : TBasicType TUInt
    CString ->                              -- name : TBasicType TUTF8
    IO CInt

-- | Checks to see if [method/@gutterLines@/.add_class] was called with
-- the /@name@/ for /@line@/.
-- 
-- A faster version of this function is provided via
-- [method/@gutterLines@/.has_qclass] for situations where the quark
-- is known ahead of time.
gutterLinesHasClass ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: a line number starting from zero
    -> T.Text
    -- ^ /@name@/: a class name that may be converted, to a @/GQuark/@
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@line@/ contains /@name@/
gutterLinesHasClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> Text -> m Bool
gutterLinesHasClass a
lines Word32
line Text
name = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    CString
name' <- Text -> IO CString
textToCString Text
name
    CInt
result <- Ptr GutterLines -> Word32 -> CString -> IO CInt
gtk_source_gutter_lines_has_class Ptr GutterLines
lines' Word32
line CString
name'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data GutterLinesHasClassMethodInfo
instance (signature ~ (Word32 -> T.Text -> m Bool), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesHasClassMethodInfo a signature where
    overloadedMethod = gutterLinesHasClass

instance O.OverloadedMethodInfo GutterLinesHasClassMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesHasClass",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesHasClass"
        })


#endif

-- method GutterLines::has_qclass
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a line number starting from zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "qname"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GQuark containing the class name"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_has_qclass" gtk_source_gutter_lines_has_qclass :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Word32 ->                               -- line : TBasicType TUInt
    Word32 ->                               -- qname : TBasicType TUInt32
    IO CInt

-- | Checks to see if [method/@gutterLines@/.add_qclass] was called with
-- the quark denoted by /@qname@/ for /@line@/.
gutterLinesHasQclass ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: a line number starting from zero
    -> Word32
    -- ^ /@qname@/: a @/GQuark/@ containing the class name
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@line@/ contains /@qname@/
gutterLinesHasQclass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> Word32 -> m Bool
gutterLinesHasQclass a
lines Word32
line Word32
qname = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    CInt
result <- Ptr GutterLines -> Word32 -> Word32 -> IO CInt
gtk_source_gutter_lines_has_qclass Ptr GutterLines
lines' Word32
line Word32
qname
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data GutterLinesHasQclassMethodInfo
instance (signature ~ (Word32 -> Word32 -> m Bool), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesHasQclassMethodInfo a signature where
    overloadedMethod = gutterLinesHasQclass

instance O.OverloadedMethodInfo GutterLinesHasQclassMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesHasQclass",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesHasQclass"
        })


#endif

-- method GutterLines::is_cursor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a line number starting from zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_is_cursor" gtk_source_gutter_lines_is_cursor :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Word32 ->                               -- line : TBasicType TUInt
    IO CInt

-- | Checks to see if /@line@/ contains the insertion cursor.
gutterLinesIsCursor ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: a line number starting from zero
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the insertion cursor is on /@line@/
gutterLinesIsCursor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> m Bool
gutterLinesIsCursor a
lines Word32
line = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    CInt
result <- Ptr GutterLines -> Word32 -> IO CInt
gtk_source_gutter_lines_is_cursor Ptr GutterLines
lines' Word32
line
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data GutterLinesIsCursorMethodInfo
instance (signature ~ (Word32 -> m Bool), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesIsCursorMethodInfo a signature where
    overloadedMethod = gutterLinesIsCursor

instance O.OverloadedMethodInfo GutterLinesIsCursorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesIsCursor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesIsCursor"
        })


#endif

-- method GutterLines::is_prelit
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a line number starting from zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_is_prelit" gtk_source_gutter_lines_is_prelit :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Word32 ->                               -- line : TBasicType TUInt
    IO CInt

-- | Checks to see if /@line@/ is marked as prelit. Generally, this means
-- the mouse pointer is over the line within the gutter.
gutterLinesIsPrelit ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: a line number starting from zero
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the line is prelit
gutterLinesIsPrelit :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> m Bool
gutterLinesIsPrelit a
lines Word32
line = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    CInt
result <- Ptr GutterLines -> Word32 -> IO CInt
gtk_source_gutter_lines_is_prelit Ptr GutterLines
lines' Word32
line
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data GutterLinesIsPrelitMethodInfo
instance (signature ~ (Word32 -> m Bool), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesIsPrelitMethodInfo a signature where
    overloadedMethod = gutterLinesIsPrelit

instance O.OverloadedMethodInfo GutterLinesIsPrelitMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesIsPrelit",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesIsPrelit"
        })


#endif

-- method GutterLines::is_selected
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a line number starting from zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_is_selected" gtk_source_gutter_lines_is_selected :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Word32 ->                               -- line : TBasicType TUInt
    IO CInt

-- | Checks to see if the view had a selection and if that selection overlaps
-- /@line@/ in some way.
gutterLinesIsSelected ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: a line number starting from zero
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the line contains a selection
gutterLinesIsSelected :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> m Bool
gutterLinesIsSelected a
lines Word32
line = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    CInt
result <- Ptr GutterLines -> Word32 -> IO CInt
gtk_source_gutter_lines_is_selected Ptr GutterLines
lines' Word32
line
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data GutterLinesIsSelectedMethodInfo
instance (signature ~ (Word32 -> m Bool), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesIsSelectedMethodInfo a signature where
    overloadedMethod = gutterLinesIsSelected

instance O.OverloadedMethodInfo GutterLinesIsSelectedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesIsSelected",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesIsSelected"
        })


#endif

-- method GutterLines::remove_class
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a line number starting from zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a class name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_remove_class" gtk_source_gutter_lines_remove_class :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Word32 ->                               -- line : TBasicType TUInt
    CString ->                              -- name : TBasicType TUTF8
    IO ()

-- | Removes the class matching /@name@/ from /@line@/.
-- 
-- A faster version of this function is available via
-- [method/@gutterLines@/.remove_qclass] for situations where the
-- @/GQuark/@ is known ahead of time.
gutterLinesRemoveClass ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: a line number starting from zero
    -> T.Text
    -- ^ /@name@/: a class name
    -> m ()
gutterLinesRemoveClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> Text -> m ()
gutterLinesRemoveClass a
lines Word32
line Text
name = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr GutterLines -> Word32 -> CString -> IO ()
gtk_source_gutter_lines_remove_class Ptr GutterLines
lines' Word32
line CString
name'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data GutterLinesRemoveClassMethodInfo
instance (signature ~ (Word32 -> T.Text -> m ()), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesRemoveClassMethodInfo a signature where
    overloadedMethod = gutterLinesRemoveClass

instance O.OverloadedMethodInfo GutterLinesRemoveClassMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesRemoveClass",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesRemoveClass"
        })


#endif

-- method GutterLines::remove_qclass
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "lines"
--           , argType =
--               TInterface Name { namespace = "GtkSource" , name = "GutterLines" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceGutterLines"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a line number starting from zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "qname"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GQuark to remove from @line"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_gutter_lines_remove_qclass" gtk_source_gutter_lines_remove_qclass :: 
    Ptr GutterLines ->                      -- lines : TInterface (Name {namespace = "GtkSource", name = "GutterLines"})
    Word32 ->                               -- line : TBasicType TUInt
    Word32 ->                               -- qname : TBasicType TUInt32
    IO ()

-- | Reverses a call to [method/@gutterLines@/.add_qclass] by removing
-- the [alias/@gLib@/.Quark] matching /@qname@/.
gutterLinesRemoveQclass ::
    (B.CallStack.HasCallStack, MonadIO m, IsGutterLines a) =>
    a
    -- ^ /@lines@/: a t'GI.GtkSource.Objects.GutterLines.GutterLines'
    -> Word32
    -- ^ /@line@/: a line number starting from zero
    -> Word32
    -- ^ /@qname@/: a @/GQuark/@ to remove from /@line@/
    -> m ()
gutterLinesRemoveQclass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsGutterLines a) =>
a -> Word32 -> Word32 -> m ()
gutterLinesRemoveQclass a
lines Word32
line Word32
qname = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr GutterLines
lines' <- a -> IO (Ptr GutterLines)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
lines
    Ptr GutterLines -> Word32 -> Word32 -> IO ()
gtk_source_gutter_lines_remove_qclass Ptr GutterLines
lines' Word32
line Word32
qname
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
lines
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data GutterLinesRemoveQclassMethodInfo
instance (signature ~ (Word32 -> Word32 -> m ()), MonadIO m, IsGutterLines a) => O.OverloadedMethod GutterLinesRemoveQclassMethodInfo a signature where
    overloadedMethod = gutterLinesRemoveQclass

instance O.OverloadedMethodInfo GutterLinesRemoveQclassMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GtkSource.Objects.GutterLines.gutterLinesRemoveQclass",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtksource-5.0.0/docs/GI-GtkSource-Objects-GutterLines.html#v:gutterLinesRemoveQclass"
        })


#endif