{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.GtkSource.Objects.MarkAttributes
    ( 

-- * Exported types
    MarkAttributes(..)                      ,
    IsMarkAttributes                        ,
    toMarkAttributes                        ,
    noMarkAttributes                        ,


 -- * Methods
-- ** getBackground #method:getBackground#
    MarkAttributesGetBackgroundMethodInfo   ,
    markAttributesGetBackground             ,


-- ** getGicon #method:getGicon#
    MarkAttributesGetGiconMethodInfo        ,
    markAttributesGetGicon                  ,


-- ** getIconName #method:getIconName#
    MarkAttributesGetIconNameMethodInfo     ,
    markAttributesGetIconName               ,


-- ** getPixbuf #method:getPixbuf#
    MarkAttributesGetPixbufMethodInfo       ,
    markAttributesGetPixbuf                 ,


-- ** getStockId #method:getStockId#
    MarkAttributesGetStockIdMethodInfo      ,
    markAttributesGetStockId                ,


-- ** getTooltipMarkup #method:getTooltipMarkup#
    MarkAttributesGetTooltipMarkupMethodInfo,
    markAttributesGetTooltipMarkup          ,


-- ** getTooltipText #method:getTooltipText#
    MarkAttributesGetTooltipTextMethodInfo  ,
    markAttributesGetTooltipText            ,


-- ** new #method:new#
    markAttributesNew                       ,


-- ** renderIcon #method:renderIcon#
    MarkAttributesRenderIconMethodInfo      ,
    markAttributesRenderIcon                ,


-- ** setBackground #method:setBackground#
    MarkAttributesSetBackgroundMethodInfo   ,
    markAttributesSetBackground             ,


-- ** setGicon #method:setGicon#
    MarkAttributesSetGiconMethodInfo        ,
    markAttributesSetGicon                  ,


-- ** setIconName #method:setIconName#
    MarkAttributesSetIconNameMethodInfo     ,
    markAttributesSetIconName               ,


-- ** setPixbuf #method:setPixbuf#
    MarkAttributesSetPixbufMethodInfo       ,
    markAttributesSetPixbuf                 ,


-- ** setStockId #method:setStockId#
    MarkAttributesSetStockIdMethodInfo      ,
    markAttributesSetStockId                ,




 -- * Properties
-- ** background #attr:background#
    MarkAttributesBackgroundPropertyInfo    ,
    constructMarkAttributesBackground       ,
    getMarkAttributesBackground             ,
    markAttributesBackground                ,
    setMarkAttributesBackground             ,


-- ** gicon #attr:gicon#
    MarkAttributesGiconPropertyInfo         ,
    constructMarkAttributesGicon            ,
    getMarkAttributesGicon                  ,
    markAttributesGicon                     ,
    setMarkAttributesGicon                  ,


-- ** iconName #attr:iconName#
    MarkAttributesIconNamePropertyInfo      ,
    constructMarkAttributesIconName         ,
    getMarkAttributesIconName               ,
    markAttributesIconName                  ,
    setMarkAttributesIconName               ,


-- ** pixbuf #attr:pixbuf#
    MarkAttributesPixbufPropertyInfo        ,
    constructMarkAttributesPixbuf           ,
    getMarkAttributesPixbuf                 ,
    markAttributesPixbuf                    ,
    setMarkAttributesPixbuf                 ,


-- ** stockId #attr:stockId#
    MarkAttributesStockIdPropertyInfo       ,
    constructMarkAttributesStockId          ,
    getMarkAttributesStockId                ,
    markAttributesStockId                   ,
    setMarkAttributesStockId                ,




 -- * Signals
-- ** queryTooltipMarkup #signal:queryTooltipMarkup#
    C_MarkAttributesQueryTooltipMarkupCallback,
    MarkAttributesQueryTooltipMarkupCallback,
    MarkAttributesQueryTooltipMarkupSignalInfo,
    afterMarkAttributesQueryTooltipMarkup   ,
    genClosure_MarkAttributesQueryTooltipMarkup,
    mk_MarkAttributesQueryTooltipMarkupCallback,
    noMarkAttributesQueryTooltipMarkupCallback,
    onMarkAttributesQueryTooltipMarkup      ,
    wrap_MarkAttributesQueryTooltipMarkupCallback,


-- ** queryTooltipText #signal:queryTooltipText#
    C_MarkAttributesQueryTooltipTextCallback,
    MarkAttributesQueryTooltipTextCallback  ,
    MarkAttributesQueryTooltipTextSignalInfo,
    afterMarkAttributesQueryTooltipText     ,
    genClosure_MarkAttributesQueryTooltipText,
    mk_MarkAttributesQueryTooltipTextCallback,
    noMarkAttributesQueryTooltipTextCallback,
    onMarkAttributesQueryTooltipText        ,
    wrap_MarkAttributesQueryTooltipTextCallback,




    ) 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.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.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gtk.Objects.Widget as Gtk.Widget
import {-# SOURCE #-} qualified GI.GtkSource.Objects.Mark as GtkSource.Mark

newtype MarkAttributes = MarkAttributes (ManagedPtr MarkAttributes)
foreign import ccall "gtk_source_mark_attributes_get_type"
    c_gtk_source_mark_attributes_get_type :: IO GType

instance GObject MarkAttributes where
    gobjectType _ = c_gtk_source_mark_attributes_get_type
    

class GObject o => IsMarkAttributes o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError MarkAttributes a) =>
    IsMarkAttributes a
#endif
instance IsMarkAttributes MarkAttributes
instance GObject.Object.IsObject MarkAttributes

toMarkAttributes :: IsMarkAttributes o => o -> IO MarkAttributes
toMarkAttributes = unsafeCastTo MarkAttributes

noMarkAttributes :: Maybe MarkAttributes
noMarkAttributes = Nothing

type family ResolveMarkAttributesMethod (t :: Symbol) (o :: *) :: * where
    ResolveMarkAttributesMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveMarkAttributesMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveMarkAttributesMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveMarkAttributesMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveMarkAttributesMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveMarkAttributesMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveMarkAttributesMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveMarkAttributesMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveMarkAttributesMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveMarkAttributesMethod "renderIcon" o = MarkAttributesRenderIconMethodInfo
    ResolveMarkAttributesMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveMarkAttributesMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveMarkAttributesMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveMarkAttributesMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveMarkAttributesMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveMarkAttributesMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveMarkAttributesMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveMarkAttributesMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveMarkAttributesMethod "getBackground" o = MarkAttributesGetBackgroundMethodInfo
    ResolveMarkAttributesMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveMarkAttributesMethod "getGicon" o = MarkAttributesGetGiconMethodInfo
    ResolveMarkAttributesMethod "getIconName" o = MarkAttributesGetIconNameMethodInfo
    ResolveMarkAttributesMethod "getPixbuf" o = MarkAttributesGetPixbufMethodInfo
    ResolveMarkAttributesMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveMarkAttributesMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveMarkAttributesMethod "getStockId" o = MarkAttributesGetStockIdMethodInfo
    ResolveMarkAttributesMethod "getTooltipMarkup" o = MarkAttributesGetTooltipMarkupMethodInfo
    ResolveMarkAttributesMethod "getTooltipText" o = MarkAttributesGetTooltipTextMethodInfo
    ResolveMarkAttributesMethod "setBackground" o = MarkAttributesSetBackgroundMethodInfo
    ResolveMarkAttributesMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveMarkAttributesMethod "setGicon" o = MarkAttributesSetGiconMethodInfo
    ResolveMarkAttributesMethod "setIconName" o = MarkAttributesSetIconNameMethodInfo
    ResolveMarkAttributesMethod "setPixbuf" o = MarkAttributesSetPixbufMethodInfo
    ResolveMarkAttributesMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveMarkAttributesMethod "setStockId" o = MarkAttributesSetStockIdMethodInfo
    ResolveMarkAttributesMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveMarkAttributesMethod t MarkAttributes, O.MethodInfo info MarkAttributes p) => O.IsLabelProxy t (MarkAttributes -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveMarkAttributesMethod t MarkAttributes, O.MethodInfo info MarkAttributes p) => O.IsLabel t (MarkAttributes -> p) where
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

-- signal MarkAttributes::query-tooltip-markup
type MarkAttributesQueryTooltipMarkupCallback =
    GtkSource.Mark.Mark ->
    IO T.Text

noMarkAttributesQueryTooltipMarkupCallback :: Maybe MarkAttributesQueryTooltipMarkupCallback
noMarkAttributesQueryTooltipMarkupCallback = Nothing

type C_MarkAttributesQueryTooltipMarkupCallback =
    Ptr () ->                               -- object
    Ptr GtkSource.Mark.Mark ->
    Ptr () ->                               -- user_data
    IO CString

foreign import ccall "wrapper"
    mk_MarkAttributesQueryTooltipMarkupCallback :: C_MarkAttributesQueryTooltipMarkupCallback -> IO (FunPtr C_MarkAttributesQueryTooltipMarkupCallback)

genClosure_MarkAttributesQueryTooltipMarkup :: MarkAttributesQueryTooltipMarkupCallback -> IO Closure
genClosure_MarkAttributesQueryTooltipMarkup cb = do
    let cb' = wrap_MarkAttributesQueryTooltipMarkupCallback cb
    mk_MarkAttributesQueryTooltipMarkupCallback cb' >>= newCClosure


wrap_MarkAttributesQueryTooltipMarkupCallback ::
    MarkAttributesQueryTooltipMarkupCallback ->
    Ptr () ->
    Ptr GtkSource.Mark.Mark ->
    Ptr () ->
    IO CString
wrap_MarkAttributesQueryTooltipMarkupCallback _cb _ mark _ = do
    mark' <- (newObject GtkSource.Mark.Mark) mark
    result <- _cb  mark'
    result' <- textToCString result
    return result'


onMarkAttributesQueryTooltipMarkup :: (IsMarkAttributes a, MonadIO m) => a -> MarkAttributesQueryTooltipMarkupCallback -> m SignalHandlerId
onMarkAttributesQueryTooltipMarkup obj cb = liftIO $ do
    let cb' = wrap_MarkAttributesQueryTooltipMarkupCallback cb
    cb'' <- mk_MarkAttributesQueryTooltipMarkupCallback cb'
    connectSignalFunPtr obj "query-tooltip-markup" cb'' SignalConnectBefore

afterMarkAttributesQueryTooltipMarkup :: (IsMarkAttributes a, MonadIO m) => a -> MarkAttributesQueryTooltipMarkupCallback -> m SignalHandlerId
afterMarkAttributesQueryTooltipMarkup obj cb = liftIO $ do
    let cb' = wrap_MarkAttributesQueryTooltipMarkupCallback cb
    cb'' <- mk_MarkAttributesQueryTooltipMarkupCallback cb'
    connectSignalFunPtr obj "query-tooltip-markup" cb'' SignalConnectAfter


-- signal MarkAttributes::query-tooltip-text
type MarkAttributesQueryTooltipTextCallback =
    GtkSource.Mark.Mark ->
    IO T.Text

noMarkAttributesQueryTooltipTextCallback :: Maybe MarkAttributesQueryTooltipTextCallback
noMarkAttributesQueryTooltipTextCallback = Nothing

type C_MarkAttributesQueryTooltipTextCallback =
    Ptr () ->                               -- object
    Ptr GtkSource.Mark.Mark ->
    Ptr () ->                               -- user_data
    IO CString

foreign import ccall "wrapper"
    mk_MarkAttributesQueryTooltipTextCallback :: C_MarkAttributesQueryTooltipTextCallback -> IO (FunPtr C_MarkAttributesQueryTooltipTextCallback)

genClosure_MarkAttributesQueryTooltipText :: MarkAttributesQueryTooltipTextCallback -> IO Closure
genClosure_MarkAttributesQueryTooltipText cb = do
    let cb' = wrap_MarkAttributesQueryTooltipTextCallback cb
    mk_MarkAttributesQueryTooltipTextCallback cb' >>= newCClosure


wrap_MarkAttributesQueryTooltipTextCallback ::
    MarkAttributesQueryTooltipTextCallback ->
    Ptr () ->
    Ptr GtkSource.Mark.Mark ->
    Ptr () ->
    IO CString
wrap_MarkAttributesQueryTooltipTextCallback _cb _ mark _ = do
    mark' <- (newObject GtkSource.Mark.Mark) mark
    result <- _cb  mark'
    result' <- textToCString result
    return result'


onMarkAttributesQueryTooltipText :: (IsMarkAttributes a, MonadIO m) => a -> MarkAttributesQueryTooltipTextCallback -> m SignalHandlerId
onMarkAttributesQueryTooltipText obj cb = liftIO $ do
    let cb' = wrap_MarkAttributesQueryTooltipTextCallback cb
    cb'' <- mk_MarkAttributesQueryTooltipTextCallback cb'
    connectSignalFunPtr obj "query-tooltip-text" cb'' SignalConnectBefore

afterMarkAttributesQueryTooltipText :: (IsMarkAttributes a, MonadIO m) => a -> MarkAttributesQueryTooltipTextCallback -> m SignalHandlerId
afterMarkAttributesQueryTooltipText obj cb = liftIO $ do
    let cb' = wrap_MarkAttributesQueryTooltipTextCallback cb
    cb'' <- mk_MarkAttributesQueryTooltipTextCallback cb'
    connectSignalFunPtr obj "query-tooltip-text" cb'' SignalConnectAfter


-- VVV Prop "background"
   -- Type: TInterface (Name {namespace = "Gdk", name = "RGBA"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Just False)

getMarkAttributesBackground :: (MonadIO m, IsMarkAttributes o) => o -> m (Maybe Gdk.RGBA.RGBA)
getMarkAttributesBackground obj = liftIO $ getObjectPropertyBoxed obj "background" Gdk.RGBA.RGBA

setMarkAttributesBackground :: (MonadIO m, IsMarkAttributes o) => o -> Gdk.RGBA.RGBA -> m ()
setMarkAttributesBackground obj val = liftIO $ setObjectPropertyBoxed obj "background" (Just val)

constructMarkAttributesBackground :: (IsMarkAttributes o) => Gdk.RGBA.RGBA -> IO (GValueConstruct o)
constructMarkAttributesBackground val = constructObjectPropertyBoxed "background" (Just val)

data MarkAttributesBackgroundPropertyInfo
instance AttrInfo MarkAttributesBackgroundPropertyInfo where
    type AttrAllowedOps MarkAttributesBackgroundPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint MarkAttributesBackgroundPropertyInfo = (~) Gdk.RGBA.RGBA
    type AttrBaseTypeConstraint MarkAttributesBackgroundPropertyInfo = IsMarkAttributes
    type AttrGetType MarkAttributesBackgroundPropertyInfo = (Maybe Gdk.RGBA.RGBA)
    type AttrLabel MarkAttributesBackgroundPropertyInfo = "background"
    type AttrOrigin MarkAttributesBackgroundPropertyInfo = MarkAttributes
    attrGet _ = getMarkAttributesBackground
    attrSet _ = setMarkAttributesBackground
    attrConstruct _ = constructMarkAttributesBackground
    attrClear _ = undefined

-- VVV Prop "gicon"
   -- Type: TInterface (Name {namespace = "Gio", name = "Icon"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

getMarkAttributesGicon :: (MonadIO m, IsMarkAttributes o) => o -> m Gio.Icon.Icon
getMarkAttributesGicon obj = liftIO $ checkUnexpectedNothing "getMarkAttributesGicon" $ getObjectPropertyObject obj "gicon" Gio.Icon.Icon

setMarkAttributesGicon :: (MonadIO m, IsMarkAttributes o, Gio.Icon.IsIcon a) => o -> a -> m ()
setMarkAttributesGicon obj val = liftIO $ setObjectPropertyObject obj "gicon" (Just val)

constructMarkAttributesGicon :: (IsMarkAttributes o, Gio.Icon.IsIcon a) => a -> IO (GValueConstruct o)
constructMarkAttributesGicon val = constructObjectPropertyObject "gicon" (Just val)

data MarkAttributesGiconPropertyInfo
instance AttrInfo MarkAttributesGiconPropertyInfo where
    type AttrAllowedOps MarkAttributesGiconPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint MarkAttributesGiconPropertyInfo = Gio.Icon.IsIcon
    type AttrBaseTypeConstraint MarkAttributesGiconPropertyInfo = IsMarkAttributes
    type AttrGetType MarkAttributesGiconPropertyInfo = Gio.Icon.Icon
    type AttrLabel MarkAttributesGiconPropertyInfo = "gicon"
    type AttrOrigin MarkAttributesGiconPropertyInfo = MarkAttributes
    attrGet _ = getMarkAttributesGicon
    attrSet _ = setMarkAttributesGicon
    attrConstruct _ = constructMarkAttributesGicon
    attrClear _ = undefined

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

getMarkAttributesIconName :: (MonadIO m, IsMarkAttributes o) => o -> m T.Text
getMarkAttributesIconName obj = liftIO $ checkUnexpectedNothing "getMarkAttributesIconName" $ getObjectPropertyString obj "icon-name"

setMarkAttributesIconName :: (MonadIO m, IsMarkAttributes o) => o -> T.Text -> m ()
setMarkAttributesIconName obj val = liftIO $ setObjectPropertyString obj "icon-name" (Just val)

constructMarkAttributesIconName :: (IsMarkAttributes o) => T.Text -> IO (GValueConstruct o)
constructMarkAttributesIconName val = constructObjectPropertyString "icon-name" (Just val)

data MarkAttributesIconNamePropertyInfo
instance AttrInfo MarkAttributesIconNamePropertyInfo where
    type AttrAllowedOps MarkAttributesIconNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint MarkAttributesIconNamePropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint MarkAttributesIconNamePropertyInfo = IsMarkAttributes
    type AttrGetType MarkAttributesIconNamePropertyInfo = T.Text
    type AttrLabel MarkAttributesIconNamePropertyInfo = "icon-name"
    type AttrOrigin MarkAttributesIconNamePropertyInfo = MarkAttributes
    attrGet _ = getMarkAttributesIconName
    attrSet _ = setMarkAttributesIconName
    attrConstruct _ = constructMarkAttributesIconName
    attrClear _ = undefined

-- VVV Prop "pixbuf"
   -- Type: TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

getMarkAttributesPixbuf :: (MonadIO m, IsMarkAttributes o) => o -> m GdkPixbuf.Pixbuf.Pixbuf
getMarkAttributesPixbuf obj = liftIO $ checkUnexpectedNothing "getMarkAttributesPixbuf" $ getObjectPropertyObject obj "pixbuf" GdkPixbuf.Pixbuf.Pixbuf

setMarkAttributesPixbuf :: (MonadIO m, IsMarkAttributes o, GdkPixbuf.Pixbuf.IsPixbuf a) => o -> a -> m ()
setMarkAttributesPixbuf obj val = liftIO $ setObjectPropertyObject obj "pixbuf" (Just val)

constructMarkAttributesPixbuf :: (IsMarkAttributes o, GdkPixbuf.Pixbuf.IsPixbuf a) => a -> IO (GValueConstruct o)
constructMarkAttributesPixbuf val = constructObjectPropertyObject "pixbuf" (Just val)

data MarkAttributesPixbufPropertyInfo
instance AttrInfo MarkAttributesPixbufPropertyInfo where
    type AttrAllowedOps MarkAttributesPixbufPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint MarkAttributesPixbufPropertyInfo = GdkPixbuf.Pixbuf.IsPixbuf
    type AttrBaseTypeConstraint MarkAttributesPixbufPropertyInfo = IsMarkAttributes
    type AttrGetType MarkAttributesPixbufPropertyInfo = GdkPixbuf.Pixbuf.Pixbuf
    type AttrLabel MarkAttributesPixbufPropertyInfo = "pixbuf"
    type AttrOrigin MarkAttributesPixbufPropertyInfo = MarkAttributes
    attrGet _ = getMarkAttributesPixbuf
    attrSet _ = setMarkAttributesPixbuf
    attrConstruct _ = constructMarkAttributesPixbuf
    attrClear _ = undefined

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

getMarkAttributesStockId :: (MonadIO m, IsMarkAttributes o) => o -> m T.Text
getMarkAttributesStockId obj = liftIO $ checkUnexpectedNothing "getMarkAttributesStockId" $ getObjectPropertyString obj "stock-id"

setMarkAttributesStockId :: (MonadIO m, IsMarkAttributes o) => o -> T.Text -> m ()
setMarkAttributesStockId obj val = liftIO $ setObjectPropertyString obj "stock-id" (Just val)

constructMarkAttributesStockId :: (IsMarkAttributes o) => T.Text -> IO (GValueConstruct o)
constructMarkAttributesStockId val = constructObjectPropertyString "stock-id" (Just val)

data MarkAttributesStockIdPropertyInfo
instance AttrInfo MarkAttributesStockIdPropertyInfo where
    type AttrAllowedOps MarkAttributesStockIdPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint MarkAttributesStockIdPropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint MarkAttributesStockIdPropertyInfo = IsMarkAttributes
    type AttrGetType MarkAttributesStockIdPropertyInfo = T.Text
    type AttrLabel MarkAttributesStockIdPropertyInfo = "stock-id"
    type AttrOrigin MarkAttributesStockIdPropertyInfo = MarkAttributes
    attrGet _ = getMarkAttributesStockId
    attrSet _ = setMarkAttributesStockId
    attrConstruct _ = constructMarkAttributesStockId
    attrClear _ = undefined

instance O.HasAttributeList MarkAttributes
type instance O.AttributeList MarkAttributes = MarkAttributesAttributeList
type MarkAttributesAttributeList = ('[ '("background", MarkAttributesBackgroundPropertyInfo), '("gicon", MarkAttributesGiconPropertyInfo), '("iconName", MarkAttributesIconNamePropertyInfo), '("pixbuf", MarkAttributesPixbufPropertyInfo), '("stockId", MarkAttributesStockIdPropertyInfo)] :: [(Symbol, *)])

markAttributesBackground :: AttrLabelProxy "background"
markAttributesBackground = AttrLabelProxy

markAttributesGicon :: AttrLabelProxy "gicon"
markAttributesGicon = AttrLabelProxy

markAttributesIconName :: AttrLabelProxy "iconName"
markAttributesIconName = AttrLabelProxy

markAttributesPixbuf :: AttrLabelProxy "pixbuf"
markAttributesPixbuf = AttrLabelProxy

markAttributesStockId :: AttrLabelProxy "stockId"
markAttributesStockId = AttrLabelProxy

data MarkAttributesQueryTooltipMarkupSignalInfo
instance SignalInfo MarkAttributesQueryTooltipMarkupSignalInfo where
    type HaskellCallbackType MarkAttributesQueryTooltipMarkupSignalInfo = MarkAttributesQueryTooltipMarkupCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_MarkAttributesQueryTooltipMarkupCallback cb
        cb'' <- mk_MarkAttributesQueryTooltipMarkupCallback cb'
        connectSignalFunPtr obj "query-tooltip-markup" cb'' connectMode

data MarkAttributesQueryTooltipTextSignalInfo
instance SignalInfo MarkAttributesQueryTooltipTextSignalInfo where
    type HaskellCallbackType MarkAttributesQueryTooltipTextSignalInfo = MarkAttributesQueryTooltipTextCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_MarkAttributesQueryTooltipTextCallback cb
        cb'' <- mk_MarkAttributesQueryTooltipTextCallback cb'
        connectSignalFunPtr obj "query-tooltip-text" cb'' connectMode

type instance O.SignalList MarkAttributes = MarkAttributesSignalList
type MarkAttributesSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("queryTooltipMarkup", MarkAttributesQueryTooltipMarkupSignalInfo), '("queryTooltipText", MarkAttributesQueryTooltipTextSignalInfo)] :: [(Symbol, *)])

-- method MarkAttributes::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_mark_attributes_new" gtk_source_mark_attributes_new :: 
    IO (Ptr MarkAttributes)

{- |
Creates a new source mark attributes.
-}
markAttributesNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m MarkAttributes
    {- ^ __Returns:__ a new source mark attributes. -}
markAttributesNew  = liftIO $ do
    result <- gtk_source_mark_attributes_new
    checkUnexpectedReturnNULL "markAttributesNew" result
    result' <- (wrapObject MarkAttributes) result
    return result'

-- method MarkAttributes::get_background
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "attributes", argType = TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMarkAttributes.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "background", argType = TInterface (Name {namespace = "Gdk", name = "RGBA"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkRGBA.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_mark_attributes_get_background" gtk_source_mark_attributes_get_background :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    Ptr Gdk.RGBA.RGBA ->                    -- background : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO CInt

{- |
Stores background color in /@background@/.
-}
markAttributesGetBackground ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> m (Bool,Gdk.RGBA.RGBA)
    {- ^ __Returns:__ whether background color for /@attributes@/ was set. -}
markAttributesGetBackground attributes = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    background <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA.RGBA)
    result <- gtk_source_mark_attributes_get_background attributes' background
    let result' = (/= 0) result
    background' <- (wrapBoxed Gdk.RGBA.RGBA) background
    touchManagedPtr attributes
    return (result', background')

data MarkAttributesGetBackgroundMethodInfo
instance (signature ~ (m (Bool,Gdk.RGBA.RGBA)), MonadIO m, IsMarkAttributes a) => O.MethodInfo MarkAttributesGetBackgroundMethodInfo a signature where
    overloadedMethod _ = markAttributesGetBackground

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

foreign import ccall "gtk_source_mark_attributes_get_gicon" gtk_source_mark_attributes_get_gicon :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    IO (Ptr Gio.Icon.Icon)

{- |
Gets a 'GI.Gio.Interfaces.Icon.Icon' to be used as a base for rendered icon. Note that the icon can
be 'Nothing' if it wasn\'t set earlier.
-}
markAttributesGetGicon ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> m Gio.Icon.Icon
    {- ^ __Returns:__ An icon. The icon belongs to /@attributes@/ and should
not be unreffed. -}
markAttributesGetGicon attributes = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    result <- gtk_source_mark_attributes_get_gicon attributes'
    checkUnexpectedReturnNULL "markAttributesGetGicon" result
    result' <- (newObject Gio.Icon.Icon) result
    touchManagedPtr attributes
    return result'

data MarkAttributesGetGiconMethodInfo
instance (signature ~ (m Gio.Icon.Icon), MonadIO m, IsMarkAttributes a) => O.MethodInfo MarkAttributesGetGiconMethodInfo a signature where
    overloadedMethod _ = markAttributesGetGicon

-- method MarkAttributes::get_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "attributes", argType = TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMarkAttributes.", 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_mark_attributes_get_icon_name" gtk_source_mark_attributes_get_icon_name :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    IO CString

{- |
Gets a name of an icon to be used as a base for rendered icon. Note that the
icon name can be 'Nothing' if it wasn\'t set earlier.
-}
markAttributesGetIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> m T.Text
    {- ^ __Returns:__ An icon name. The string belongs to /@attributes@/ and
should not be freed. -}
markAttributesGetIconName attributes = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    result <- gtk_source_mark_attributes_get_icon_name attributes'
    checkUnexpectedReturnNULL "markAttributesGetIconName" result
    result' <- cstringToText result
    touchManagedPtr attributes
    return result'

data MarkAttributesGetIconNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsMarkAttributes a) => O.MethodInfo MarkAttributesGetIconNameMethodInfo a signature where
    overloadedMethod _ = markAttributesGetIconName

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

foreign import ccall "gtk_source_mark_attributes_get_pixbuf" gtk_source_mark_attributes_get_pixbuf :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)

{- |
Gets a 'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf' to be used as a base for rendered icon. Note that the
pixbuf can be 'Nothing' if it wasn\'t set earlier.
-}
markAttributesGetPixbuf ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> m GdkPixbuf.Pixbuf.Pixbuf
    {- ^ __Returns:__ A pixbuf. The pixbuf belongs to /@attributes@/ and
should not be unreffed. -}
markAttributesGetPixbuf attributes = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    result <- gtk_source_mark_attributes_get_pixbuf attributes'
    checkUnexpectedReturnNULL "markAttributesGetPixbuf" result
    result' <- (newObject GdkPixbuf.Pixbuf.Pixbuf) result
    touchManagedPtr attributes
    return result'

data MarkAttributesGetPixbufMethodInfo
instance (signature ~ (m GdkPixbuf.Pixbuf.Pixbuf), MonadIO m, IsMarkAttributes a) => O.MethodInfo MarkAttributesGetPixbufMethodInfo a signature where
    overloadedMethod _ = markAttributesGetPixbuf

-- method MarkAttributes::get_stock_id
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "attributes", argType = TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMarkAttributes.", 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_mark_attributes_get_stock_id" gtk_source_mark_attributes_get_stock_id :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    IO CString

{-# DEPRECATED markAttributesGetStockId ["(Since version 3.10)","Don\\'t use this function."] #-}
{- |
Gets a stock id of an icon used by this attributes. Note that the stock id can
be 'Nothing' if it wasn\'t set earlier.
-}
markAttributesGetStockId ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> m T.Text
    {- ^ __Returns:__ Stock id. Returned string is owned by /@attributes@/ and
shouldn\'t be freed. -}
markAttributesGetStockId attributes = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    result <- gtk_source_mark_attributes_get_stock_id attributes'
    checkUnexpectedReturnNULL "markAttributesGetStockId" result
    result' <- cstringToText result
    touchManagedPtr attributes
    return result'

data MarkAttributesGetStockIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsMarkAttributes a) => O.MethodInfo MarkAttributesGetStockIdMethodInfo a signature where
    overloadedMethod _ = markAttributesGetStockId

-- method MarkAttributes::get_tooltip_markup
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "attributes", argType = TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMarkAttributes.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mark", argType = TInterface (Name {namespace = "GtkSource", name = "Mark"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMark.", 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_mark_attributes_get_tooltip_markup" gtk_source_mark_attributes_get_tooltip_markup :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    Ptr GtkSource.Mark.Mark ->              -- mark : TInterface (Name {namespace = "GtkSource", name = "Mark"})
    IO CString

{- |
Queries for a tooltip by emitting
a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'::@/query-tooltip-markup/@ signal. The tooltip may contain
a markup.
-}
markAttributesGetTooltipMarkup ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a, GtkSource.Mark.IsMark b) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> b
    {- ^ /@mark@/: a 'GI.GtkSource.Objects.Mark.Mark'. -}
    -> m T.Text
    {- ^ __Returns:__ A tooltip. The returned string should be freed by
using 'GI.GLib.Functions.free' when done with it. -}
markAttributesGetTooltipMarkup attributes mark = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    mark' <- unsafeManagedPtrCastPtr mark
    result <- gtk_source_mark_attributes_get_tooltip_markup attributes' mark'
    checkUnexpectedReturnNULL "markAttributesGetTooltipMarkup" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr attributes
    touchManagedPtr mark
    return result'

data MarkAttributesGetTooltipMarkupMethodInfo
instance (signature ~ (b -> m T.Text), MonadIO m, IsMarkAttributes a, GtkSource.Mark.IsMark b) => O.MethodInfo MarkAttributesGetTooltipMarkupMethodInfo a signature where
    overloadedMethod _ = markAttributesGetTooltipMarkup

-- method MarkAttributes::get_tooltip_text
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "attributes", argType = TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMarkAttributes.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mark", argType = TInterface (Name {namespace = "GtkSource", name = "Mark"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMark.", 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_mark_attributes_get_tooltip_text" gtk_source_mark_attributes_get_tooltip_text :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    Ptr GtkSource.Mark.Mark ->              -- mark : TInterface (Name {namespace = "GtkSource", name = "Mark"})
    IO CString

{- |
Queries for a tooltip by emitting
a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'::@/query-tooltip-text/@ signal. The tooltip is a plain
text.
-}
markAttributesGetTooltipText ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a, GtkSource.Mark.IsMark b) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> b
    {- ^ /@mark@/: a 'GI.GtkSource.Objects.Mark.Mark'. -}
    -> m T.Text
    {- ^ __Returns:__ A tooltip. The returned string should be freed by
using 'GI.GLib.Functions.free' when done with it. -}
markAttributesGetTooltipText attributes mark = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    mark' <- unsafeManagedPtrCastPtr mark
    result <- gtk_source_mark_attributes_get_tooltip_text attributes' mark'
    checkUnexpectedReturnNULL "markAttributesGetTooltipText" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr attributes
    touchManagedPtr mark
    return result'

data MarkAttributesGetTooltipTextMethodInfo
instance (signature ~ (b -> m T.Text), MonadIO m, IsMarkAttributes a, GtkSource.Mark.IsMark b) => O.MethodInfo MarkAttributesGetTooltipTextMethodInfo a signature where
    overloadedMethod _ = markAttributesGetTooltipText

-- method MarkAttributes::render_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "attributes", argType = TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMarkAttributes.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "widget of which style settings may be used.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "size", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "size of the rendered icon.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_mark_attributes_render_icon" gtk_source_mark_attributes_render_icon :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- size : TBasicType TInt
    IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)

{- |
Renders an icon of given size. The base of the icon is set by the last call
to one of: 'GI.GtkSource.Objects.MarkAttributes.markAttributesSetPixbuf',
'GI.GtkSource.Objects.MarkAttributes.markAttributesSetGicon',
'GI.GtkSource.Objects.MarkAttributes.markAttributesSetIconName' or
'GI.GtkSource.Objects.MarkAttributes.markAttributesSetStockId'. /@size@/ cannot be lower than 1.
-}
markAttributesRenderIcon ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a, Gtk.Widget.IsWidget b) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> b
    {- ^ /@widget@/: widget of which style settings may be used. -}
    -> Int32
    {- ^ /@size@/: size of the rendered icon. -}
    -> m GdkPixbuf.Pixbuf.Pixbuf
    {- ^ __Returns:__ A rendered pixbuf. The pixbuf belongs to /@attributes@/
and should not be unreffed. -}
markAttributesRenderIcon attributes widget size = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    widget' <- unsafeManagedPtrCastPtr widget
    result <- gtk_source_mark_attributes_render_icon attributes' widget' size
    checkUnexpectedReturnNULL "markAttributesRenderIcon" result
    result' <- (newObject GdkPixbuf.Pixbuf.Pixbuf) result
    touchManagedPtr attributes
    touchManagedPtr widget
    return result'

data MarkAttributesRenderIconMethodInfo
instance (signature ~ (b -> Int32 -> m GdkPixbuf.Pixbuf.Pixbuf), MonadIO m, IsMarkAttributes a, Gtk.Widget.IsWidget b) => O.MethodInfo MarkAttributesRenderIconMethodInfo a signature where
    overloadedMethod _ = markAttributesRenderIcon

-- method MarkAttributes::set_background
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "attributes", argType = TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMarkAttributes.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "background", argType = TInterface (Name {namespace = "Gdk", name = "RGBA"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkRGBA.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_mark_attributes_set_background" gtk_source_mark_attributes_set_background :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    Ptr Gdk.RGBA.RGBA ->                    -- background : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

{- |
Sets background color to the one given in /@background@/.
-}
markAttributesSetBackground ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> Gdk.RGBA.RGBA
    {- ^ /@background@/: a 'GI.Gdk.Structs.RGBA.RGBA'. -}
    -> m ()
markAttributesSetBackground attributes background = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    background' <- unsafeManagedPtrGetPtr background
    gtk_source_mark_attributes_set_background attributes' background'
    touchManagedPtr attributes
    touchManagedPtr background
    return ()

data MarkAttributesSetBackgroundMethodInfo
instance (signature ~ (Gdk.RGBA.RGBA -> m ()), MonadIO m, IsMarkAttributes a) => O.MethodInfo MarkAttributesSetBackgroundMethodInfo a signature where
    overloadedMethod _ = markAttributesSetBackground

-- method MarkAttributes::set_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "attributes", argType = TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMarkAttributes.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "gicon", argType = TInterface (Name {namespace = "Gio", name = "Icon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIcon to be used.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_mark_attributes_set_gicon" gtk_source_mark_attributes_set_gicon :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    Ptr Gio.Icon.Icon ->                    -- gicon : TInterface (Name {namespace = "Gio", name = "Icon"})
    IO ()

{- |
Sets an icon to be used as a base for rendered icon.
-}
markAttributesSetGicon ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a, Gio.Icon.IsIcon b) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> b
    {- ^ /@gicon@/: a 'GI.Gio.Interfaces.Icon.Icon' to be used. -}
    -> m ()
markAttributesSetGicon attributes gicon = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    gicon' <- unsafeManagedPtrCastPtr gicon
    gtk_source_mark_attributes_set_gicon attributes' gicon'
    touchManagedPtr attributes
    touchManagedPtr gicon
    return ()

data MarkAttributesSetGiconMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsMarkAttributes a, Gio.Icon.IsIcon b) => O.MethodInfo MarkAttributesSetGiconMethodInfo a signature where
    overloadedMethod _ = markAttributesSetGicon

-- method MarkAttributes::set_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "attributes", argType = TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMarkAttributes.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "name of an icon to be used.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_mark_attributes_set_icon_name" gtk_source_mark_attributes_set_icon_name :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()

{- |
Sets a name of an icon to be used as a base for rendered icon.
-}
markAttributesSetIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> T.Text
    {- ^ /@iconName@/: name of an icon to be used. -}
    -> m ()
markAttributesSetIconName attributes iconName = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    iconName' <- textToCString iconName
    gtk_source_mark_attributes_set_icon_name attributes' iconName'
    touchManagedPtr attributes
    freeMem iconName'
    return ()

data MarkAttributesSetIconNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsMarkAttributes a) => O.MethodInfo MarkAttributesSetIconNameMethodInfo a signature where
    overloadedMethod _ = markAttributesSetIconName

-- method MarkAttributes::set_pixbuf
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "attributes", argType = TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceMarkAttributes.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pixbuf", argType = TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkPixbuf to be used.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_mark_attributes_set_pixbuf" gtk_source_mark_attributes_set_pixbuf :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    Ptr GdkPixbuf.Pixbuf.Pixbuf ->          -- pixbuf : TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"})
    IO ()

{- |
Sets a pixbuf to be used as a base for rendered icon.
-}
markAttributesSetPixbuf ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a, GdkPixbuf.Pixbuf.IsPixbuf b) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> b
    {- ^ /@pixbuf@/: a 'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf' to be used. -}
    -> m ()
markAttributesSetPixbuf attributes pixbuf = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    pixbuf' <- unsafeManagedPtrCastPtr pixbuf
    gtk_source_mark_attributes_set_pixbuf attributes' pixbuf'
    touchManagedPtr attributes
    touchManagedPtr pixbuf
    return ()

data MarkAttributesSetPixbufMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsMarkAttributes a, GdkPixbuf.Pixbuf.IsPixbuf b) => O.MethodInfo MarkAttributesSetPixbufMethodInfo a signature where
    overloadedMethod _ = markAttributesSetPixbuf

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

foreign import ccall "gtk_source_mark_attributes_set_stock_id" gtk_source_mark_attributes_set_stock_id :: 
    Ptr MarkAttributes ->                   -- attributes : TInterface (Name {namespace = "GtkSource", name = "MarkAttributes"})
    CString ->                              -- stock_id : TBasicType TUTF8
    IO ()

{-# DEPRECATED markAttributesSetStockId ["(Since version 3.10)","Don\\'t use this function."] #-}
{- |
Sets stock id to be used as a base for rendered icon.
-}
markAttributesSetStockId ::
    (B.CallStack.HasCallStack, MonadIO m, IsMarkAttributes a) =>
    a
    {- ^ /@attributes@/: a 'GI.GtkSource.Objects.MarkAttributes.MarkAttributes'. -}
    -> T.Text
    {- ^ /@stockId@/: a stock id. -}
    -> m ()
markAttributesSetStockId attributes stockId = liftIO $ do
    attributes' <- unsafeManagedPtrCastPtr attributes
    stockId' <- textToCString stockId
    gtk_source_mark_attributes_set_stock_id attributes' stockId'
    touchManagedPtr attributes
    freeMem stockId'
    return ()

data MarkAttributesSetStockIdMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsMarkAttributes a) => O.MethodInfo MarkAttributesSetStockIdMethodInfo a signature where
    overloadedMethod _ = markAttributesSetStockId