#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Structs.CssSection
(
CssSection(..) ,
noCssSection ,
#if ENABLE_OVERLOADING
CssSectionGetEndLineMethodInfo ,
#endif
cssSectionGetEndLine ,
#if ENABLE_OVERLOADING
CssSectionGetEndPositionMethodInfo ,
#endif
cssSectionGetEndPosition ,
#if ENABLE_OVERLOADING
CssSectionGetFileMethodInfo ,
#endif
cssSectionGetFile ,
#if ENABLE_OVERLOADING
CssSectionGetParentMethodInfo ,
#endif
cssSectionGetParent ,
#if ENABLE_OVERLOADING
CssSectionGetSectionTypeMethodInfo ,
#endif
cssSectionGetSectionType ,
#if ENABLE_OVERLOADING
CssSectionGetStartLineMethodInfo ,
#endif
cssSectionGetStartLine ,
#if ENABLE_OVERLOADING
CssSectionGetStartPositionMethodInfo ,
#endif
cssSectionGetStartPosition ,
#if ENABLE_OVERLOADING
CssSectionRefMethodInfo ,
#endif
cssSectionRef ,
#if ENABLE_OVERLOADING
CssSectionUnrefMethodInfo ,
#endif
cssSectionUnref ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GI.Gio.Interfaces.File as Gio.File
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
newtype CssSection = CssSection (ManagedPtr CssSection)
foreign import ccall "gtk_css_section_get_type" c_gtk_css_section_get_type ::
IO GType
instance BoxedObject CssSection where
boxedType _ = c_gtk_css_section_get_type
noCssSection :: Maybe CssSection
noCssSection = Nothing
#if ENABLE_OVERLOADING
instance O.HasAttributeList CssSection
type instance O.AttributeList CssSection = CssSectionAttributeList
type CssSectionAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_css_section_get_end_line" gtk_css_section_get_end_line ::
Ptr CssSection ->
IO Word32
cssSectionGetEndLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
CssSection
-> m Word32
cssSectionGetEndLine section = liftIO $ do
section' <- unsafeManagedPtrGetPtr section
result <- gtk_css_section_get_end_line section'
touchManagedPtr section
return result
#if ENABLE_OVERLOADING
data CssSectionGetEndLineMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo CssSectionGetEndLineMethodInfo CssSection signature where
overloadedMethod _ = cssSectionGetEndLine
#endif
foreign import ccall "gtk_css_section_get_end_position" gtk_css_section_get_end_position ::
Ptr CssSection ->
IO Word32
cssSectionGetEndPosition ::
(B.CallStack.HasCallStack, MonadIO m) =>
CssSection
-> m Word32
cssSectionGetEndPosition section = liftIO $ do
section' <- unsafeManagedPtrGetPtr section
result <- gtk_css_section_get_end_position section'
touchManagedPtr section
return result
#if ENABLE_OVERLOADING
data CssSectionGetEndPositionMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo CssSectionGetEndPositionMethodInfo CssSection signature where
overloadedMethod _ = cssSectionGetEndPosition
#endif
foreign import ccall "gtk_css_section_get_file" gtk_css_section_get_file ::
Ptr CssSection ->
IO (Ptr Gio.File.File)
cssSectionGetFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
CssSection
-> m Gio.File.File
cssSectionGetFile section = liftIO $ do
section' <- unsafeManagedPtrGetPtr section
result <- gtk_css_section_get_file section'
checkUnexpectedReturnNULL "cssSectionGetFile" result
result' <- (newObject Gio.File.File) result
touchManagedPtr section
return result'
#if ENABLE_OVERLOADING
data CssSectionGetFileMethodInfo
instance (signature ~ (m Gio.File.File), MonadIO m) => O.MethodInfo CssSectionGetFileMethodInfo CssSection signature where
overloadedMethod _ = cssSectionGetFile
#endif
foreign import ccall "gtk_css_section_get_parent" gtk_css_section_get_parent ::
Ptr CssSection ->
IO (Ptr CssSection)
cssSectionGetParent ::
(B.CallStack.HasCallStack, MonadIO m) =>
CssSection
-> m (Maybe CssSection)
cssSectionGetParent section = liftIO $ do
section' <- unsafeManagedPtrGetPtr section
result <- gtk_css_section_get_parent section'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newBoxed CssSection) result'
return result''
touchManagedPtr section
return maybeResult
#if ENABLE_OVERLOADING
data CssSectionGetParentMethodInfo
instance (signature ~ (m (Maybe CssSection)), MonadIO m) => O.MethodInfo CssSectionGetParentMethodInfo CssSection signature where
overloadedMethod _ = cssSectionGetParent
#endif
foreign import ccall "gtk_css_section_get_section_type" gtk_css_section_get_section_type ::
Ptr CssSection ->
IO CUInt
cssSectionGetSectionType ::
(B.CallStack.HasCallStack, MonadIO m) =>
CssSection
-> m Gtk.Enums.CssSectionType
cssSectionGetSectionType section = liftIO $ do
section' <- unsafeManagedPtrGetPtr section
result <- gtk_css_section_get_section_type section'
let result' = (toEnum . fromIntegral) result
touchManagedPtr section
return result'
#if ENABLE_OVERLOADING
data CssSectionGetSectionTypeMethodInfo
instance (signature ~ (m Gtk.Enums.CssSectionType), MonadIO m) => O.MethodInfo CssSectionGetSectionTypeMethodInfo CssSection signature where
overloadedMethod _ = cssSectionGetSectionType
#endif
foreign import ccall "gtk_css_section_get_start_line" gtk_css_section_get_start_line ::
Ptr CssSection ->
IO Word32
cssSectionGetStartLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
CssSection
-> m Word32
cssSectionGetStartLine section = liftIO $ do
section' <- unsafeManagedPtrGetPtr section
result <- gtk_css_section_get_start_line section'
touchManagedPtr section
return result
#if ENABLE_OVERLOADING
data CssSectionGetStartLineMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo CssSectionGetStartLineMethodInfo CssSection signature where
overloadedMethod _ = cssSectionGetStartLine
#endif
foreign import ccall "gtk_css_section_get_start_position" gtk_css_section_get_start_position ::
Ptr CssSection ->
IO Word32
cssSectionGetStartPosition ::
(B.CallStack.HasCallStack, MonadIO m) =>
CssSection
-> m Word32
cssSectionGetStartPosition section = liftIO $ do
section' <- unsafeManagedPtrGetPtr section
result <- gtk_css_section_get_start_position section'
touchManagedPtr section
return result
#if ENABLE_OVERLOADING
data CssSectionGetStartPositionMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo CssSectionGetStartPositionMethodInfo CssSection signature where
overloadedMethod _ = cssSectionGetStartPosition
#endif
foreign import ccall "gtk_css_section_ref" gtk_css_section_ref ::
Ptr CssSection ->
IO (Ptr CssSection)
cssSectionRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
CssSection
-> m CssSection
cssSectionRef section = liftIO $ do
section' <- unsafeManagedPtrGetPtr section
result <- gtk_css_section_ref section'
checkUnexpectedReturnNULL "cssSectionRef" result
result' <- (wrapBoxed CssSection) result
touchManagedPtr section
return result'
#if ENABLE_OVERLOADING
data CssSectionRefMethodInfo
instance (signature ~ (m CssSection), MonadIO m) => O.MethodInfo CssSectionRefMethodInfo CssSection signature where
overloadedMethod _ = cssSectionRef
#endif
foreign import ccall "gtk_css_section_unref" gtk_css_section_unref ::
Ptr CssSection ->
IO ()
cssSectionUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
CssSection
-> m ()
cssSectionUnref section = liftIO $ do
section' <- unsafeManagedPtrGetPtr section
gtk_css_section_unref section'
touchManagedPtr section
return ()
#if ENABLE_OVERLOADING
data CssSectionUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo CssSectionUnrefMethodInfo CssSection signature where
overloadedMethod _ = cssSectionUnref
#endif
#if ENABLE_OVERLOADING
type family ResolveCssSectionMethod (t :: Symbol) (o :: *) :: * where
ResolveCssSectionMethod "ref" o = CssSectionRefMethodInfo
ResolveCssSectionMethod "unref" o = CssSectionUnrefMethodInfo
ResolveCssSectionMethod "getEndLine" o = CssSectionGetEndLineMethodInfo
ResolveCssSectionMethod "getEndPosition" o = CssSectionGetEndPositionMethodInfo
ResolveCssSectionMethod "getFile" o = CssSectionGetFileMethodInfo
ResolveCssSectionMethod "getParent" o = CssSectionGetParentMethodInfo
ResolveCssSectionMethod "getSectionType" o = CssSectionGetSectionTypeMethodInfo
ResolveCssSectionMethod "getStartLine" o = CssSectionGetStartLineMethodInfo
ResolveCssSectionMethod "getStartPosition" o = CssSectionGetStartPositionMethodInfo
ResolveCssSectionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveCssSectionMethod t CssSection, O.MethodInfo info CssSection p) => O.IsLabelProxy t (CssSection -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveCssSectionMethod t CssSection, O.MethodInfo info CssSection p) => O.IsLabel t (CssSection -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#endif