{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)

/No description available in the introspection data./
-}

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

module GI.GtkSource.Objects.StyleScheme
    (

-- * Exported types
    StyleScheme(..)                         ,
    IsStyleScheme                           ,
    toStyleScheme                           ,
    noStyleScheme                           ,


 -- * Methods
-- ** getAuthors #method:getAuthors#

#if ENABLE_OVERLOADING
    StyleSchemeGetAuthorsMethodInfo         ,
#endif
    styleSchemeGetAuthors                   ,


-- ** getDescription #method:getDescription#

#if ENABLE_OVERLOADING
    StyleSchemeGetDescriptionMethodInfo     ,
#endif
    styleSchemeGetDescription               ,


-- ** getFilename #method:getFilename#

#if ENABLE_OVERLOADING
    StyleSchemeGetFilenameMethodInfo        ,
#endif
    styleSchemeGetFilename                  ,


-- ** getId #method:getId#

#if ENABLE_OVERLOADING
    StyleSchemeGetIdMethodInfo              ,
#endif
    styleSchemeGetId                        ,


-- ** getName #method:getName#

#if ENABLE_OVERLOADING
    StyleSchemeGetNameMethodInfo            ,
#endif
    styleSchemeGetName                      ,


-- ** getStyle #method:getStyle#

#if ENABLE_OVERLOADING
    StyleSchemeGetStyleMethodInfo           ,
#endif
    styleSchemeGetStyle                     ,




 -- * Properties
-- ** description #attr:description#
{- | Style scheme description, a translatable string to present to the user.
-}
#if ENABLE_OVERLOADING
    StyleSchemeDescriptionPropertyInfo      ,
#endif
    getStyleSchemeDescription               ,
#if ENABLE_OVERLOADING
    styleSchemeDescription                  ,
#endif


-- ** filename #attr:filename#
{- | Style scheme filename or 'Nothing'.
-}
#if ENABLE_OVERLOADING
    StyleSchemeFilenamePropertyInfo         ,
#endif
    getStyleSchemeFilename                  ,
#if ENABLE_OVERLOADING
    styleSchemeFilename                     ,
#endif


-- ** id #attr:id#
{- | Style scheme id, a unique string used to identify the style scheme
in 'GI.GtkSource.Objects.StyleSchemeManager.StyleSchemeManager'.
-}
#if ENABLE_OVERLOADING
    StyleSchemeIdPropertyInfo               ,
#endif
    constructStyleSchemeId                  ,
    getStyleSchemeId                        ,
#if ENABLE_OVERLOADING
    styleSchemeId                           ,
#endif


-- ** name #attr:name#
{- | Style scheme name, a translatable string to present to the user.
-}
#if ENABLE_OVERLOADING
    StyleSchemeNamePropertyInfo             ,
#endif
    getStyleSchemeName                      ,
#if ENABLE_OVERLOADING
    styleSchemeName                         ,
#endif




    ) where

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

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.GtkSource.Objects.Style as GtkSource.Style

-- | Memory-managed wrapper type.
newtype StyleScheme = StyleScheme (ManagedPtr StyleScheme)
foreign import ccall "gtk_source_style_scheme_get_type"
    c_gtk_source_style_scheme_get_type :: IO GType

instance GObject StyleScheme where
    gobjectType = c_gtk_source_style_scheme_get_type


-- | Type class for types which can be safely cast to `StyleScheme`, for instance with `toStyleScheme`.
class (GObject o, O.IsDescendantOf StyleScheme o) => IsStyleScheme o
instance (GObject o, O.IsDescendantOf StyleScheme o) => IsStyleScheme o

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

-- | Cast to `StyleScheme`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toStyleScheme :: (MonadIO m, IsStyleScheme o) => o -> m StyleScheme
toStyleScheme = liftIO . unsafeCastTo StyleScheme

-- | A convenience alias for `Nothing` :: `Maybe` `StyleScheme`.
noStyleScheme :: Maybe StyleScheme
noStyleScheme = Nothing

#if ENABLE_OVERLOADING
type family ResolveStyleSchemeMethod (t :: Symbol) (o :: *) :: * where
    ResolveStyleSchemeMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveStyleSchemeMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveStyleSchemeMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveStyleSchemeMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveStyleSchemeMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveStyleSchemeMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveStyleSchemeMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveStyleSchemeMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveStyleSchemeMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveStyleSchemeMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveStyleSchemeMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveStyleSchemeMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveStyleSchemeMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveStyleSchemeMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveStyleSchemeMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveStyleSchemeMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveStyleSchemeMethod "getAuthors" o = StyleSchemeGetAuthorsMethodInfo
    ResolveStyleSchemeMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveStyleSchemeMethod "getDescription" o = StyleSchemeGetDescriptionMethodInfo
    ResolveStyleSchemeMethod "getFilename" o = StyleSchemeGetFilenameMethodInfo
    ResolveStyleSchemeMethod "getId" o = StyleSchemeGetIdMethodInfo
    ResolveStyleSchemeMethod "getName" o = StyleSchemeGetNameMethodInfo
    ResolveStyleSchemeMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveStyleSchemeMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveStyleSchemeMethod "getStyle" o = StyleSchemeGetStyleMethodInfo
    ResolveStyleSchemeMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveStyleSchemeMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveStyleSchemeMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveStyleSchemeMethod t StyleScheme, O.MethodInfo info StyleScheme p) => OL.IsLabel t (StyleScheme -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

#endif

-- VVV Prop "description"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just True,Nothing)

{- |
Get the value of the “@description@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' styleScheme #description
@
-}
getStyleSchemeDescription :: (MonadIO m, IsStyleScheme o) => o -> m (Maybe T.Text)
getStyleSchemeDescription obj = liftIO $ B.Properties.getObjectPropertyString obj "description"

#if ENABLE_OVERLOADING
data StyleSchemeDescriptionPropertyInfo
instance AttrInfo StyleSchemeDescriptionPropertyInfo where
    type AttrAllowedOps StyleSchemeDescriptionPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint StyleSchemeDescriptionPropertyInfo = (~) ()
    type AttrBaseTypeConstraint StyleSchemeDescriptionPropertyInfo = IsStyleScheme
    type AttrGetType StyleSchemeDescriptionPropertyInfo = (Maybe T.Text)
    type AttrLabel StyleSchemeDescriptionPropertyInfo = "description"
    type AttrOrigin StyleSchemeDescriptionPropertyInfo = StyleScheme
    attrGet _ = getStyleSchemeDescription
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined
#endif

-- VVV Prop "filename"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just True,Nothing)

{- |
Get the value of the “@filename@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' styleScheme #filename
@
-}
getStyleSchemeFilename :: (MonadIO m, IsStyleScheme o) => o -> m (Maybe T.Text)
getStyleSchemeFilename obj = liftIO $ B.Properties.getObjectPropertyString obj "filename"

#if ENABLE_OVERLOADING
data StyleSchemeFilenamePropertyInfo
instance AttrInfo StyleSchemeFilenamePropertyInfo where
    type AttrAllowedOps StyleSchemeFilenamePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint StyleSchemeFilenamePropertyInfo = (~) ()
    type AttrBaseTypeConstraint StyleSchemeFilenamePropertyInfo = IsStyleScheme
    type AttrGetType StyleSchemeFilenamePropertyInfo = (Maybe T.Text)
    type AttrLabel StyleSchemeFilenamePropertyInfo = "filename"
    type AttrOrigin StyleSchemeFilenamePropertyInfo = StyleScheme
    attrGet _ = getStyleSchemeFilename
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined
#endif

-- VVV Prop "id"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

{- |
Get the value of the “@id@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' styleScheme #id
@
-}
getStyleSchemeId :: (MonadIO m, IsStyleScheme o) => o -> m T.Text
getStyleSchemeId obj = liftIO $ checkUnexpectedNothing "getStyleSchemeId" $ B.Properties.getObjectPropertyString obj "id"

{- |
Construct a `GValueConstruct` with valid value for the “@id@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
-}
constructStyleSchemeId :: (IsStyleScheme o) => T.Text -> IO (GValueConstruct o)
constructStyleSchemeId val = B.Properties.constructObjectPropertyString "id" (Just val)

#if ENABLE_OVERLOADING
data StyleSchemeIdPropertyInfo
instance AttrInfo StyleSchemeIdPropertyInfo where
    type AttrAllowedOps StyleSchemeIdPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint StyleSchemeIdPropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint StyleSchemeIdPropertyInfo = IsStyleScheme
    type AttrGetType StyleSchemeIdPropertyInfo = T.Text
    type AttrLabel StyleSchemeIdPropertyInfo = "id"
    type AttrOrigin StyleSchemeIdPropertyInfo = StyleScheme
    attrGet _ = getStyleSchemeId
    attrSet _ = undefined
    attrConstruct _ = constructStyleSchemeId
    attrClear _ = undefined
#endif

-- VVV Prop "name"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

{- |
Get the value of the “@name@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' styleScheme #name
@
-}
getStyleSchemeName :: (MonadIO m, IsStyleScheme o) => o -> m T.Text
getStyleSchemeName obj = liftIO $ checkUnexpectedNothing "getStyleSchemeName" $ B.Properties.getObjectPropertyString obj "name"

#if ENABLE_OVERLOADING
data StyleSchemeNamePropertyInfo
instance AttrInfo StyleSchemeNamePropertyInfo where
    type AttrAllowedOps StyleSchemeNamePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint StyleSchemeNamePropertyInfo = (~) ()
    type AttrBaseTypeConstraint StyleSchemeNamePropertyInfo = IsStyleScheme
    type AttrGetType StyleSchemeNamePropertyInfo = T.Text
    type AttrLabel StyleSchemeNamePropertyInfo = "name"
    type AttrOrigin StyleSchemeNamePropertyInfo = StyleScheme
    attrGet _ = getStyleSchemeName
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined
#endif

#if ENABLE_OVERLOADING
instance O.HasAttributeList StyleScheme
type instance O.AttributeList StyleScheme = StyleSchemeAttributeList
type StyleSchemeAttributeList = ('[ '("description", StyleSchemeDescriptionPropertyInfo), '("filename", StyleSchemeFilenamePropertyInfo), '("id", StyleSchemeIdPropertyInfo), '("name", StyleSchemeNamePropertyInfo)] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
styleSchemeDescription :: AttrLabelProxy "description"
styleSchemeDescription = AttrLabelProxy

styleSchemeFilename :: AttrLabelProxy "filename"
styleSchemeFilename = AttrLabelProxy

styleSchemeId :: AttrLabelProxy "id"
styleSchemeId = AttrLabelProxy

styleSchemeName :: AttrLabelProxy "name"
styleSchemeName = AttrLabelProxy

#endif

#if ENABLE_OVERLOADING
type instance O.SignalList StyleScheme = StyleSchemeSignalList
type StyleSchemeSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method StyleScheme::get_authors
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "scheme", argType = TInterface (Name {namespace = "GtkSource", name = "StyleScheme"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceStyleScheme.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_style_scheme_get_authors" gtk_source_style_scheme_get_authors ::
    Ptr StyleScheme ->                      -- scheme : TInterface (Name {namespace = "GtkSource", name = "StyleScheme"})
    IO (Ptr CString)

{- |
/No description available in the introspection data./

/Since: 2.0/
-}
styleSchemeGetAuthors ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleScheme a) =>
    a
    {- ^ /@scheme@/: a 'GI.GtkSource.Objects.StyleScheme.StyleScheme'. -}
    -> m (Maybe [T.Text])
    {- ^ __Returns:__ a
'Nothing'-terminated array containing the /@scheme@/ authors or 'Nothing' if
no author is specified by the style scheme. -}
styleSchemeGetAuthors scheme = liftIO $ do
    scheme' <- unsafeManagedPtrCastPtr scheme
    result <- gtk_source_style_scheme_get_authors scheme'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- unpackZeroTerminatedUTF8CArray result'
        return result''
    touchManagedPtr scheme
    return maybeResult

#if ENABLE_OVERLOADING
data StyleSchemeGetAuthorsMethodInfo
instance (signature ~ (m (Maybe [T.Text])), MonadIO m, IsStyleScheme a) => O.MethodInfo StyleSchemeGetAuthorsMethodInfo a signature where
    overloadedMethod _ = styleSchemeGetAuthors

#endif

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

foreign import ccall "gtk_source_style_scheme_get_description" gtk_source_style_scheme_get_description ::
    Ptr StyleScheme ->                      -- scheme : TInterface (Name {namespace = "GtkSource", name = "StyleScheme"})
    IO CString

{- |
/No description available in the introspection data./

/Since: 2.0/
-}
styleSchemeGetDescription ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleScheme a) =>
    a
    {- ^ /@scheme@/: a 'GI.GtkSource.Objects.StyleScheme.StyleScheme'. -}
    -> m (Maybe T.Text)
    {- ^ __Returns:__ /@scheme@/ description (if defined), or 'Nothing'. -}
styleSchemeGetDescription scheme = liftIO $ do
    scheme' <- unsafeManagedPtrCastPtr scheme
    result <- gtk_source_style_scheme_get_description scheme'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- cstringToText result'
        return result''
    touchManagedPtr scheme
    return maybeResult

#if ENABLE_OVERLOADING
data StyleSchemeGetDescriptionMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsStyleScheme a) => O.MethodInfo StyleSchemeGetDescriptionMethodInfo a signature where
    overloadedMethod _ = styleSchemeGetDescription

#endif

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

foreign import ccall "gtk_source_style_scheme_get_filename" gtk_source_style_scheme_get_filename ::
    Ptr StyleScheme ->                      -- scheme : TInterface (Name {namespace = "GtkSource", name = "StyleScheme"})
    IO CString

{- |
/No description available in the introspection data./

/Since: 2.0/
-}
styleSchemeGetFilename ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleScheme a) =>
    a
    {- ^ /@scheme@/: a 'GI.GtkSource.Objects.StyleScheme.StyleScheme'. -}
    -> m (Maybe T.Text)
    {- ^ __Returns:__ /@scheme@/ file name if the scheme was created
parsing a style scheme file or 'Nothing' in the other cases. -}
styleSchemeGetFilename scheme = liftIO $ do
    scheme' <- unsafeManagedPtrCastPtr scheme
    result <- gtk_source_style_scheme_get_filename scheme'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- cstringToText result'
        return result''
    touchManagedPtr scheme
    return maybeResult

#if ENABLE_OVERLOADING
data StyleSchemeGetFilenameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsStyleScheme a) => O.MethodInfo StyleSchemeGetFilenameMethodInfo a signature where
    overloadedMethod _ = styleSchemeGetFilename

#endif

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

foreign import ccall "gtk_source_style_scheme_get_id" gtk_source_style_scheme_get_id ::
    Ptr StyleScheme ->                      -- scheme : TInterface (Name {namespace = "GtkSource", name = "StyleScheme"})
    IO CString

{- |
/No description available in the introspection data./

/Since: 2.0/
-}
styleSchemeGetId ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleScheme a) =>
    a
    {- ^ /@scheme@/: a 'GI.GtkSource.Objects.StyleScheme.StyleScheme'. -}
    -> m T.Text
    {- ^ __Returns:__ /@scheme@/ id. -}
styleSchemeGetId scheme = liftIO $ do
    scheme' <- unsafeManagedPtrCastPtr scheme
    result <- gtk_source_style_scheme_get_id scheme'
    checkUnexpectedReturnNULL "styleSchemeGetId" result
    result' <- cstringToText result
    touchManagedPtr scheme
    return result'

#if ENABLE_OVERLOADING
data StyleSchemeGetIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsStyleScheme a) => O.MethodInfo StyleSchemeGetIdMethodInfo a signature where
    overloadedMethod _ = styleSchemeGetId

#endif

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

foreign import ccall "gtk_source_style_scheme_get_name" gtk_source_style_scheme_get_name ::
    Ptr StyleScheme ->                      -- scheme : TInterface (Name {namespace = "GtkSource", name = "StyleScheme"})
    IO CString

{- |
/No description available in the introspection data./

/Since: 2.0/
-}
styleSchemeGetName ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleScheme a) =>
    a
    {- ^ /@scheme@/: a 'GI.GtkSource.Objects.StyleScheme.StyleScheme'. -}
    -> m T.Text
    {- ^ __Returns:__ /@scheme@/ name. -}
styleSchemeGetName scheme = liftIO $ do
    scheme' <- unsafeManagedPtrCastPtr scheme
    result <- gtk_source_style_scheme_get_name scheme'
    checkUnexpectedReturnNULL "styleSchemeGetName" result
    result' <- cstringToText result
    touchManagedPtr scheme
    return result'

#if ENABLE_OVERLOADING
data StyleSchemeGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsStyleScheme a) => O.MethodInfo StyleSchemeGetNameMethodInfo a signature where
    overloadedMethod _ = styleSchemeGetName

#endif

-- method StyleScheme::get_style
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "scheme", argType = TInterface (Name {namespace = "GtkSource", name = "StyleScheme"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceStyleScheme.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "style_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "id of the style to retrieve.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GtkSource", name = "Style"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_style_scheme_get_style" gtk_source_style_scheme_get_style ::
    Ptr StyleScheme ->                      -- scheme : TInterface (Name {namespace = "GtkSource", name = "StyleScheme"})
    CString ->                              -- style_id : TBasicType TUTF8
    IO (Ptr GtkSource.Style.Style)

{- |
/No description available in the introspection data./

/Since: 2.0/
-}
styleSchemeGetStyle ::
    (B.CallStack.HasCallStack, MonadIO m, IsStyleScheme a) =>
    a
    {- ^ /@scheme@/: a 'GI.GtkSource.Objects.StyleScheme.StyleScheme'. -}
    -> T.Text
    {- ^ /@styleId@/: id of the style to retrieve. -}
    -> m (Maybe GtkSource.Style.Style)
    {- ^ __Returns:__ style which corresponds to /@styleId@/ in
the /@scheme@/, or 'Nothing' when no style with this name found.  It is owned by
/@scheme@/ and may not be unref\'ed. -}
styleSchemeGetStyle scheme styleId = liftIO $ do
    scheme' <- unsafeManagedPtrCastPtr scheme
    styleId' <- textToCString styleId
    result <- gtk_source_style_scheme_get_style scheme' styleId'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (newObject GtkSource.Style.Style) result'
        return result''
    touchManagedPtr scheme
    freeMem styleId'
    return maybeResult

#if ENABLE_OVERLOADING
data StyleSchemeGetStyleMethodInfo
instance (signature ~ (T.Text -> m (Maybe GtkSource.Style.Style)), MonadIO m, IsStyleScheme a) => O.MethodInfo StyleSchemeGetStyleMethodInfo a signature where
    overloadedMethod _ = styleSchemeGetStyle

#endif