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

GtkNumerableIcon is a subclass of 'GI.Gio.Objects.EmblemedIcon.EmblemedIcon' that can
show a number or short string as an emblem. The number can
be overlayed on top of another emblem, if desired.

It supports theming by taking font and color information
from a provided 'GI.Gtk.Objects.StyleContext.StyleContext'; see
'GI.Gtk.Objects.NumerableIcon.numerableIconSetStyleContext'.

Typical numerable icons:
<<https://developer.gnome.org/gtk3/stable/numerableicon.png>>
<<https://developer.gnome.org/gtk3/stable/numerableicon2.png>>
-}

module GI.Gtk.Objects.NumerableIcon
    ( 

-- * Exported types
    NumerableIcon(..)                       ,
    IsNumerableIcon                         ,
    toNumerableIcon                         ,
    noNumerableIcon                         ,


 -- * Methods
-- ** getBackgroundGicon #method:getBackgroundGicon#
    NumerableIconGetBackgroundGiconMethodInfo,
    numerableIconGetBackgroundGicon         ,


-- ** getBackgroundIconName #method:getBackgroundIconName#
    NumerableIconGetBackgroundIconNameMethodInfo,
    numerableIconGetBackgroundIconName      ,


-- ** getCount #method:getCount#
    NumerableIconGetCountMethodInfo         ,
    numerableIconGetCount                   ,


-- ** getLabel #method:getLabel#
    NumerableIconGetLabelMethodInfo         ,
    numerableIconGetLabel                   ,


-- ** getStyleContext #method:getStyleContext#
    NumerableIconGetStyleContextMethodInfo  ,
    numerableIconGetStyleContext            ,


-- ** new #method:new#
    numerableIconNew                        ,


-- ** newWithStyleContext #method:newWithStyleContext#
    numerableIconNewWithStyleContext        ,


-- ** setBackgroundGicon #method:setBackgroundGicon#
    NumerableIconSetBackgroundGiconMethodInfo,
    numerableIconSetBackgroundGicon         ,


-- ** setBackgroundIconName #method:setBackgroundIconName#
    NumerableIconSetBackgroundIconNameMethodInfo,
    numerableIconSetBackgroundIconName      ,


-- ** setCount #method:setCount#
    NumerableIconSetCountMethodInfo         ,
    numerableIconSetCount                   ,


-- ** setLabel #method:setLabel#
    NumerableIconSetLabelMethodInfo         ,
    numerableIconSetLabel                   ,


-- ** setStyleContext #method:setStyleContext#
    NumerableIconSetStyleContextMethodInfo  ,
    numerableIconSetStyleContext            ,




 -- * Properties
-- ** backgroundIcon #attr:backgroundIcon#
    NumerableIconBackgroundIconPropertyInfo ,
    clearNumerableIconBackgroundIcon        ,
    constructNumerableIconBackgroundIcon    ,
    getNumerableIconBackgroundIcon          ,
    numerableIconBackgroundIcon             ,
    setNumerableIconBackgroundIcon          ,


-- ** backgroundIconName #attr:backgroundIconName#
    NumerableIconBackgroundIconNamePropertyInfo,
    clearNumerableIconBackgroundIconName    ,
    constructNumerableIconBackgroundIconName,
    getNumerableIconBackgroundIconName      ,
    numerableIconBackgroundIconName         ,
    setNumerableIconBackgroundIconName      ,


-- ** count #attr:count#
    NumerableIconCountPropertyInfo          ,
    constructNumerableIconCount             ,
    getNumerableIconCount                   ,
    numerableIconCount                      ,
    setNumerableIconCount                   ,


-- ** label #attr:label#
    NumerableIconLabelPropertyInfo          ,
    clearNumerableIconLabel                 ,
    constructNumerableIconLabel             ,
    getNumerableIconLabel                   ,
    numerableIconLabel                      ,
    setNumerableIconLabel                   ,


-- ** styleContext #attr:styleContext#
    NumerableIconStyleContextPropertyInfo   ,
    constructNumerableIconStyleContext      ,
    getNumerableIconStyleContext            ,
    numerableIconStyleContext               ,
    setNumerableIconStyleContext            ,




    ) 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.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Objects.EmblemedIcon as Gio.EmblemedIcon
import {-# SOURCE #-} qualified GI.Gtk.Objects.StyleContext as Gtk.StyleContext

newtype NumerableIcon = NumerableIcon (ManagedPtr NumerableIcon)
foreign import ccall "gtk_numerable_icon_get_type"
    c_gtk_numerable_icon_get_type :: IO GType

instance GObject NumerableIcon where
    gobjectType _ = c_gtk_numerable_icon_get_type
    

class GObject o => IsNumerableIcon o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError NumerableIcon a) =>
    IsNumerableIcon a
#endif
instance IsNumerableIcon NumerableIcon
instance Gio.EmblemedIcon.IsEmblemedIcon NumerableIcon
instance GObject.Object.IsObject NumerableIcon
instance Gio.Icon.IsIcon NumerableIcon

toNumerableIcon :: IsNumerableIcon o => o -> IO NumerableIcon
toNumerableIcon = unsafeCastTo NumerableIcon

noNumerableIcon :: Maybe NumerableIcon
noNumerableIcon = Nothing

type family ResolveNumerableIconMethod (t :: Symbol) (o :: *) :: * where
    ResolveNumerableIconMethod "addEmblem" o = Gio.EmblemedIcon.EmblemedIconAddEmblemMethodInfo
    ResolveNumerableIconMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveNumerableIconMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveNumerableIconMethod "clearEmblems" o = Gio.EmblemedIcon.EmblemedIconClearEmblemsMethodInfo
    ResolveNumerableIconMethod "equal" o = Gio.Icon.IconEqualMethodInfo
    ResolveNumerableIconMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveNumerableIconMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveNumerableIconMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveNumerableIconMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveNumerableIconMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveNumerableIconMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveNumerableIconMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveNumerableIconMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveNumerableIconMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveNumerableIconMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveNumerableIconMethod "serialize" o = Gio.Icon.IconSerializeMethodInfo
    ResolveNumerableIconMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveNumerableIconMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveNumerableIconMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveNumerableIconMethod "toString" o = Gio.Icon.IconToStringMethodInfo
    ResolveNumerableIconMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveNumerableIconMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveNumerableIconMethod "getBackgroundGicon" o = NumerableIconGetBackgroundGiconMethodInfo
    ResolveNumerableIconMethod "getBackgroundIconName" o = NumerableIconGetBackgroundIconNameMethodInfo
    ResolveNumerableIconMethod "getCount" o = NumerableIconGetCountMethodInfo
    ResolveNumerableIconMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveNumerableIconMethod "getEmblems" o = Gio.EmblemedIcon.EmblemedIconGetEmblemsMethodInfo
    ResolveNumerableIconMethod "getIcon" o = Gio.EmblemedIcon.EmblemedIconGetIconMethodInfo
    ResolveNumerableIconMethod "getLabel" o = NumerableIconGetLabelMethodInfo
    ResolveNumerableIconMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveNumerableIconMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveNumerableIconMethod "getStyleContext" o = NumerableIconGetStyleContextMethodInfo
    ResolveNumerableIconMethod "setBackgroundGicon" o = NumerableIconSetBackgroundGiconMethodInfo
    ResolveNumerableIconMethod "setBackgroundIconName" o = NumerableIconSetBackgroundIconNameMethodInfo
    ResolveNumerableIconMethod "setCount" o = NumerableIconSetCountMethodInfo
    ResolveNumerableIconMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveNumerableIconMethod "setLabel" o = NumerableIconSetLabelMethodInfo
    ResolveNumerableIconMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveNumerableIconMethod "setStyleContext" o = NumerableIconSetStyleContextMethodInfo
    ResolveNumerableIconMethod l o = O.MethodResolutionFailed l o

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

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

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

getNumerableIconBackgroundIcon :: (MonadIO m, IsNumerableIcon o) => o -> m (Maybe Gio.Icon.Icon)
getNumerableIconBackgroundIcon obj = liftIO $ getObjectPropertyObject obj "background-icon" Gio.Icon.Icon

setNumerableIconBackgroundIcon :: (MonadIO m, IsNumerableIcon o, Gio.Icon.IsIcon a) => o -> a -> m ()
setNumerableIconBackgroundIcon obj val = liftIO $ setObjectPropertyObject obj "background-icon" (Just val)

constructNumerableIconBackgroundIcon :: (IsNumerableIcon o, Gio.Icon.IsIcon a) => a -> IO (GValueConstruct o)
constructNumerableIconBackgroundIcon val = constructObjectPropertyObject "background-icon" (Just val)

clearNumerableIconBackgroundIcon :: (MonadIO m, IsNumerableIcon o) => o -> m ()
clearNumerableIconBackgroundIcon obj = liftIO $ setObjectPropertyObject obj "background-icon" (Nothing :: Maybe Gio.Icon.Icon)

data NumerableIconBackgroundIconPropertyInfo
instance AttrInfo NumerableIconBackgroundIconPropertyInfo where
    type AttrAllowedOps NumerableIconBackgroundIconPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint NumerableIconBackgroundIconPropertyInfo = Gio.Icon.IsIcon
    type AttrBaseTypeConstraint NumerableIconBackgroundIconPropertyInfo = IsNumerableIcon
    type AttrGetType NumerableIconBackgroundIconPropertyInfo = (Maybe Gio.Icon.Icon)
    type AttrLabel NumerableIconBackgroundIconPropertyInfo = "background-icon"
    type AttrOrigin NumerableIconBackgroundIconPropertyInfo = NumerableIcon
    attrGet _ = getNumerableIconBackgroundIcon
    attrSet _ = setNumerableIconBackgroundIcon
    attrConstruct _ = constructNumerableIconBackgroundIcon
    attrClear _ = clearNumerableIconBackgroundIcon

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

getNumerableIconBackgroundIconName :: (MonadIO m, IsNumerableIcon o) => o -> m (Maybe T.Text)
getNumerableIconBackgroundIconName obj = liftIO $ getObjectPropertyString obj "background-icon-name"

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

constructNumerableIconBackgroundIconName :: (IsNumerableIcon o) => T.Text -> IO (GValueConstruct o)
constructNumerableIconBackgroundIconName val = constructObjectPropertyString "background-icon-name" (Just val)

clearNumerableIconBackgroundIconName :: (MonadIO m, IsNumerableIcon o) => o -> m ()
clearNumerableIconBackgroundIconName obj = liftIO $ setObjectPropertyString obj "background-icon-name" (Nothing :: Maybe T.Text)

data NumerableIconBackgroundIconNamePropertyInfo
instance AttrInfo NumerableIconBackgroundIconNamePropertyInfo where
    type AttrAllowedOps NumerableIconBackgroundIconNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint NumerableIconBackgroundIconNamePropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint NumerableIconBackgroundIconNamePropertyInfo = IsNumerableIcon
    type AttrGetType NumerableIconBackgroundIconNamePropertyInfo = (Maybe T.Text)
    type AttrLabel NumerableIconBackgroundIconNamePropertyInfo = "background-icon-name"
    type AttrOrigin NumerableIconBackgroundIconNamePropertyInfo = NumerableIcon
    attrGet _ = getNumerableIconBackgroundIconName
    attrSet _ = setNumerableIconBackgroundIconName
    attrConstruct _ = constructNumerableIconBackgroundIconName
    attrClear _ = clearNumerableIconBackgroundIconName

-- VVV Prop "count"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

getNumerableIconCount :: (MonadIO m, IsNumerableIcon o) => o -> m Int32
getNumerableIconCount obj = liftIO $ getObjectPropertyInt32 obj "count"

setNumerableIconCount :: (MonadIO m, IsNumerableIcon o) => o -> Int32 -> m ()
setNumerableIconCount obj val = liftIO $ setObjectPropertyInt32 obj "count" val

constructNumerableIconCount :: (IsNumerableIcon o) => Int32 -> IO (GValueConstruct o)
constructNumerableIconCount val = constructObjectPropertyInt32 "count" val

data NumerableIconCountPropertyInfo
instance AttrInfo NumerableIconCountPropertyInfo where
    type AttrAllowedOps NumerableIconCountPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint NumerableIconCountPropertyInfo = (~) Int32
    type AttrBaseTypeConstraint NumerableIconCountPropertyInfo = IsNumerableIcon
    type AttrGetType NumerableIconCountPropertyInfo = Int32
    type AttrLabel NumerableIconCountPropertyInfo = "count"
    type AttrOrigin NumerableIconCountPropertyInfo = NumerableIcon
    attrGet _ = getNumerableIconCount
    attrSet _ = setNumerableIconCount
    attrConstruct _ = constructNumerableIconCount
    attrClear _ = undefined

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

getNumerableIconLabel :: (MonadIO m, IsNumerableIcon o) => o -> m (Maybe T.Text)
getNumerableIconLabel obj = liftIO $ getObjectPropertyString obj "label"

setNumerableIconLabel :: (MonadIO m, IsNumerableIcon o) => o -> T.Text -> m ()
setNumerableIconLabel obj val = liftIO $ setObjectPropertyString obj "label" (Just val)

constructNumerableIconLabel :: (IsNumerableIcon o) => T.Text -> IO (GValueConstruct o)
constructNumerableIconLabel val = constructObjectPropertyString "label" (Just val)

clearNumerableIconLabel :: (MonadIO m, IsNumerableIcon o) => o -> m ()
clearNumerableIconLabel obj = liftIO $ setObjectPropertyString obj "label" (Nothing :: Maybe T.Text)

data NumerableIconLabelPropertyInfo
instance AttrInfo NumerableIconLabelPropertyInfo where
    type AttrAllowedOps NumerableIconLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint NumerableIconLabelPropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint NumerableIconLabelPropertyInfo = IsNumerableIcon
    type AttrGetType NumerableIconLabelPropertyInfo = (Maybe T.Text)
    type AttrLabel NumerableIconLabelPropertyInfo = "label"
    type AttrOrigin NumerableIconLabelPropertyInfo = NumerableIcon
    attrGet _ = getNumerableIconLabel
    attrSet _ = setNumerableIconLabel
    attrConstruct _ = constructNumerableIconLabel
    attrClear _ = clearNumerableIconLabel

-- VVV Prop "style-context"
   -- Type: TInterface (Name {namespace = "Gtk", name = "StyleContext"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Just False)

getNumerableIconStyleContext :: (MonadIO m, IsNumerableIcon o) => o -> m (Maybe Gtk.StyleContext.StyleContext)
getNumerableIconStyleContext obj = liftIO $ getObjectPropertyObject obj "style-context" Gtk.StyleContext.StyleContext

setNumerableIconStyleContext :: (MonadIO m, IsNumerableIcon o, Gtk.StyleContext.IsStyleContext a) => o -> a -> m ()
setNumerableIconStyleContext obj val = liftIO $ setObjectPropertyObject obj "style-context" (Just val)

constructNumerableIconStyleContext :: (IsNumerableIcon o, Gtk.StyleContext.IsStyleContext a) => a -> IO (GValueConstruct o)
constructNumerableIconStyleContext val = constructObjectPropertyObject "style-context" (Just val)

data NumerableIconStyleContextPropertyInfo
instance AttrInfo NumerableIconStyleContextPropertyInfo where
    type AttrAllowedOps NumerableIconStyleContextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint NumerableIconStyleContextPropertyInfo = Gtk.StyleContext.IsStyleContext
    type AttrBaseTypeConstraint NumerableIconStyleContextPropertyInfo = IsNumerableIcon
    type AttrGetType NumerableIconStyleContextPropertyInfo = (Maybe Gtk.StyleContext.StyleContext)
    type AttrLabel NumerableIconStyleContextPropertyInfo = "style-context"
    type AttrOrigin NumerableIconStyleContextPropertyInfo = NumerableIcon
    attrGet _ = getNumerableIconStyleContext
    attrSet _ = setNumerableIconStyleContext
    attrConstruct _ = constructNumerableIconStyleContext
    attrClear _ = undefined

instance O.HasAttributeList NumerableIcon
type instance O.AttributeList NumerableIcon = NumerableIconAttributeList
type NumerableIconAttributeList = ('[ '("backgroundIcon", NumerableIconBackgroundIconPropertyInfo), '("backgroundIconName", NumerableIconBackgroundIconNamePropertyInfo), '("count", NumerableIconCountPropertyInfo), '("gicon", Gio.EmblemedIcon.EmblemedIconGiconPropertyInfo), '("label", NumerableIconLabelPropertyInfo), '("styleContext", NumerableIconStyleContextPropertyInfo)] :: [(Symbol, *)])

numerableIconBackgroundIcon :: AttrLabelProxy "backgroundIcon"
numerableIconBackgroundIcon = AttrLabelProxy

numerableIconBackgroundIconName :: AttrLabelProxy "backgroundIconName"
numerableIconBackgroundIconName = AttrLabelProxy

numerableIconCount :: AttrLabelProxy "count"
numerableIconCount = AttrLabelProxy

numerableIconLabel :: AttrLabelProxy "label"
numerableIconLabel = AttrLabelProxy

numerableIconStyleContext :: AttrLabelProxy "styleContext"
numerableIconStyleContext = AttrLabelProxy

type instance O.SignalList NumerableIcon = NumerableIconSignalList
type NumerableIconSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method NumerableIcon::get_background_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Gtk", name = "NumerableIcon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkNumerableIcon", 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_numerable_icon_get_background_gicon" gtk_numerable_icon_get_background_gicon :: 
    Ptr NumerableIcon ->                    -- self : TInterface (Name {namespace = "Gtk", name = "NumerableIcon"})
    IO (Ptr Gio.Icon.Icon)

{-# DEPRECATED numerableIconGetBackgroundGicon ["(Since version 3.14)"] #-}
{- |
Returns the 'GI.Gio.Interfaces.Icon.Icon' that was set as the base background image, or
'Nothing' if there’s none. The caller of this function does not own
a reference to the returned 'GI.Gio.Interfaces.Icon.Icon'.

@since 3.0
-}
numerableIconGetBackgroundGicon ::
    (B.CallStack.HasCallStack, MonadIO m, IsNumerableIcon a) =>
    a
    {- ^ /@self@/: a 'GI.Gtk.Objects.NumerableIcon.NumerableIcon' -}
    -> m (Maybe Gio.Icon.Icon)
    {- ^ __Returns:__ a 'GI.Gio.Interfaces.Icon.Icon', or 'Nothing' -}
numerableIconGetBackgroundGicon self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- gtk_numerable_icon_get_background_gicon self'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (newObject Gio.Icon.Icon) result'
        return result''
    touchManagedPtr self
    return maybeResult

data NumerableIconGetBackgroundGiconMethodInfo
instance (signature ~ (m (Maybe Gio.Icon.Icon)), MonadIO m, IsNumerableIcon a) => O.MethodInfo NumerableIconGetBackgroundGiconMethodInfo a signature where
    overloadedMethod _ = numerableIconGetBackgroundGicon

-- method NumerableIcon::get_background_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Gtk", name = "NumerableIcon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkNumerableIcon", 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_numerable_icon_get_background_icon_name" gtk_numerable_icon_get_background_icon_name :: 
    Ptr NumerableIcon ->                    -- self : TInterface (Name {namespace = "Gtk", name = "NumerableIcon"})
    IO CString

{-# DEPRECATED numerableIconGetBackgroundIconName ["(Since version 3.14)"] #-}
{- |
Returns the icon name used as the base background image,
or 'Nothing' if there’s none.

@since 3.0
-}
numerableIconGetBackgroundIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsNumerableIcon a) =>
    a
    {- ^ /@self@/: a 'GI.Gtk.Objects.NumerableIcon.NumerableIcon' -}
    -> m (Maybe T.Text)
    {- ^ __Returns:__ an icon name, or 'Nothing' -}
numerableIconGetBackgroundIconName self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- gtk_numerable_icon_get_background_icon_name self'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- cstringToText result'
        return result''
    touchManagedPtr self
    return maybeResult

data NumerableIconGetBackgroundIconNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsNumerableIcon a) => O.MethodInfo NumerableIconGetBackgroundIconNameMethodInfo a signature where
    overloadedMethod _ = numerableIconGetBackgroundIconName

-- method NumerableIcon::get_count
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Gtk", name = "NumerableIcon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkNumerableIcon", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_get_count" gtk_numerable_icon_get_count :: 
    Ptr NumerableIcon ->                    -- self : TInterface (Name {namespace = "Gtk", name = "NumerableIcon"})
    IO Int32

{-# DEPRECATED numerableIconGetCount ["(Since version 3.14)"] #-}
{- |
Returns the value currently displayed by /@self@/.

@since 3.0
-}
numerableIconGetCount ::
    (B.CallStack.HasCallStack, MonadIO m, IsNumerableIcon a) =>
    a
    {- ^ /@self@/: a 'GI.Gtk.Objects.NumerableIcon.NumerableIcon' -}
    -> m Int32
    {- ^ __Returns:__ the currently displayed value -}
numerableIconGetCount self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- gtk_numerable_icon_get_count self'
    touchManagedPtr self
    return result

data NumerableIconGetCountMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsNumerableIcon a) => O.MethodInfo NumerableIconGetCountMethodInfo a signature where
    overloadedMethod _ = numerableIconGetCount

-- method NumerableIcon::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Gtk", name = "NumerableIcon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkNumerableIcon", 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_numerable_icon_get_label" gtk_numerable_icon_get_label :: 
    Ptr NumerableIcon ->                    -- self : TInterface (Name {namespace = "Gtk", name = "NumerableIcon"})
    IO CString

{-# DEPRECATED numerableIconGetLabel ["(Since version 3.14)"] #-}
{- |
Returns the currently displayed label of the icon, or 'Nothing'.

@since 3.0
-}
numerableIconGetLabel ::
    (B.CallStack.HasCallStack, MonadIO m, IsNumerableIcon a) =>
    a
    {- ^ /@self@/: a 'GI.Gtk.Objects.NumerableIcon.NumerableIcon' -}
    -> m (Maybe T.Text)
    {- ^ __Returns:__ the currently displayed label -}
numerableIconGetLabel self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- gtk_numerable_icon_get_label self'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- cstringToText result'
        return result''
    touchManagedPtr self
    return maybeResult

data NumerableIconGetLabelMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsNumerableIcon a) => O.MethodInfo NumerableIconGetLabelMethodInfo a signature where
    overloadedMethod _ = numerableIconGetLabel

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

foreign import ccall "gtk_numerable_icon_get_style_context" gtk_numerable_icon_get_style_context :: 
    Ptr NumerableIcon ->                    -- self : TInterface (Name {namespace = "Gtk", name = "NumerableIcon"})
    IO (Ptr Gtk.StyleContext.StyleContext)

{-# DEPRECATED numerableIconGetStyleContext ["(Since version 3.14)"] #-}
{- |
Returns the 'GI.Gtk.Objects.StyleContext.StyleContext' used by the icon for theming,
or 'Nothing' if there’s none.

@since 3.0
-}
numerableIconGetStyleContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsNumerableIcon a) =>
    a
    {- ^ /@self@/: a 'GI.Gtk.Objects.NumerableIcon.NumerableIcon' -}
    -> m (Maybe Gtk.StyleContext.StyleContext)
    {- ^ __Returns:__ a 'GI.Gtk.Objects.StyleContext.StyleContext', or 'Nothing'.
    This object is internal to GTK+ and should not be unreffed.
    Use 'GI.GObject.Objects.Object.objectRef' if you want to keep it around -}
numerableIconGetStyleContext self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- gtk_numerable_icon_get_style_context self'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (newObject Gtk.StyleContext.StyleContext) result'
        return result''
    touchManagedPtr self
    return maybeResult

data NumerableIconGetStyleContextMethodInfo
instance (signature ~ (m (Maybe Gtk.StyleContext.StyleContext)), MonadIO m, IsNumerableIcon a) => O.MethodInfo NumerableIconGetStyleContextMethodInfo a signature where
    overloadedMethod _ = numerableIconGetStyleContext

-- method NumerableIcon::set_background_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Gtk", name = "NumerableIcon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkNumerableIcon", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "icon", argType = TInterface (Name {namespace = "Gio", name = "Icon"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GIcon, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_set_background_gicon" gtk_numerable_icon_set_background_gicon :: 
    Ptr NumerableIcon ->                    -- self : TInterface (Name {namespace = "Gtk", name = "NumerableIcon"})
    Ptr Gio.Icon.Icon ->                    -- icon : TInterface (Name {namespace = "Gio", name = "Icon"})
    IO ()

{-# DEPRECATED numerableIconSetBackgroundGicon ["(Since version 3.14)"] #-}
{- |
Updates the icon to use /@icon@/ as the base background image.
If /@icon@/ is 'Nothing', /@self@/ will go back using style information
or default theming for its background image.

If this method is called and an icon name was already set as
background for the icon, /@icon@/ will be used, i.e. the last method
called between 'GI.Gtk.Objects.NumerableIcon.numerableIconSetBackgroundGicon' and
'GI.Gtk.Objects.NumerableIcon.numerableIconSetBackgroundIconName' has always priority.

@since 3.0
-}
numerableIconSetBackgroundGicon ::
    (B.CallStack.HasCallStack, MonadIO m, IsNumerableIcon a, Gio.Icon.IsIcon b) =>
    a
    {- ^ /@self@/: a 'GI.Gtk.Objects.NumerableIcon.NumerableIcon' -}
    -> Maybe (b)
    {- ^ /@icon@/: a 'GI.Gio.Interfaces.Icon.Icon', or 'Nothing' -}
    -> m ()
numerableIconSetBackgroundGicon self icon = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    maybeIcon <- case icon of
        Nothing -> return nullPtr
        Just jIcon -> do
            jIcon' <- unsafeManagedPtrCastPtr jIcon
            return jIcon'
    gtk_numerable_icon_set_background_gicon self' maybeIcon
    touchManagedPtr self
    whenJust icon touchManagedPtr
    return ()

data NumerableIconSetBackgroundGiconMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsNumerableIcon a, Gio.Icon.IsIcon b) => O.MethodInfo NumerableIconSetBackgroundGiconMethodInfo a signature where
    overloadedMethod _ = numerableIconSetBackgroundGicon

-- method NumerableIcon::set_background_icon_name
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Gtk", name = "NumerableIcon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkNumerableIcon", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "icon_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "an icon name, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_set_background_icon_name" gtk_numerable_icon_set_background_icon_name :: 
    Ptr NumerableIcon ->                    -- self : TInterface (Name {namespace = "Gtk", name = "NumerableIcon"})
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()

{-# DEPRECATED numerableIconSetBackgroundIconName ["(Since version 3.14)"] #-}
{- |
Updates the icon to use the icon named /@iconName@/ from the
current icon theme as the base background image. If /@iconName@/
is 'Nothing', /@self@/ will go back using style information or default
theming for its background image.

If this method is called and a 'GI.Gio.Interfaces.Icon.Icon' was already set as
background for the icon, /@iconName@/ will be used, i.e. the
last method called between 'GI.Gtk.Objects.NumerableIcon.numerableIconSetBackgroundIconName'
and 'GI.Gtk.Objects.NumerableIcon.numerableIconSetBackgroundGicon' has always priority.

@since 3.0
-}
numerableIconSetBackgroundIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsNumerableIcon a) =>
    a
    {- ^ /@self@/: a 'GI.Gtk.Objects.NumerableIcon.NumerableIcon' -}
    -> Maybe (T.Text)
    {- ^ /@iconName@/: an icon name, or 'Nothing' -}
    -> m ()
numerableIconSetBackgroundIconName self iconName = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    maybeIconName <- case iconName of
        Nothing -> return nullPtr
        Just jIconName -> do
            jIconName' <- textToCString jIconName
            return jIconName'
    gtk_numerable_icon_set_background_icon_name self' maybeIconName
    touchManagedPtr self
    freeMem maybeIconName
    return ()

data NumerableIconSetBackgroundIconNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsNumerableIcon a) => O.MethodInfo NumerableIconSetBackgroundIconNameMethodInfo a signature where
    overloadedMethod _ = numerableIconSetBackgroundIconName

-- method NumerableIcon::set_count
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Gtk", name = "NumerableIcon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkNumerableIcon", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "count", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a number between -99 and 99", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_set_count" gtk_numerable_icon_set_count :: 
    Ptr NumerableIcon ->                    -- self : TInterface (Name {namespace = "Gtk", name = "NumerableIcon"})
    Int32 ->                                -- count : TBasicType TInt
    IO ()

{-# DEPRECATED numerableIconSetCount ["(Since version 3.14)"] #-}
{- |
Sets the currently displayed value of /@self@/ to /@count@/.

The numeric value is always clamped to make it two digits, i.e.
between -99 and 99. Setting a count of zero removes the emblem.
If this method is called, and a label was already set on the icon,
it will automatically be reset to 'Nothing' before rendering the number,
i.e. the last method called between 'GI.Gtk.Objects.NumerableIcon.numerableIconSetCount'
and 'GI.Gtk.Objects.NumerableIcon.numerableIconSetLabel' has always priority.

@since 3.0
-}
numerableIconSetCount ::
    (B.CallStack.HasCallStack, MonadIO m, IsNumerableIcon a) =>
    a
    {- ^ /@self@/: a 'GI.Gtk.Objects.NumerableIcon.NumerableIcon' -}
    -> Int32
    {- ^ /@count@/: a number between -99 and 99 -}
    -> m ()
numerableIconSetCount self count = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    gtk_numerable_icon_set_count self' count
    touchManagedPtr self
    return ()

data NumerableIconSetCountMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsNumerableIcon a) => O.MethodInfo NumerableIconSetCountMethodInfo a signature where
    overloadedMethod _ = numerableIconSetCount

-- method NumerableIcon::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Gtk", name = "NumerableIcon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkNumerableIcon", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a short label, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_set_label" gtk_numerable_icon_set_label :: 
    Ptr NumerableIcon ->                    -- self : TInterface (Name {namespace = "Gtk", name = "NumerableIcon"})
    CString ->                              -- label : TBasicType TUTF8
    IO ()

{-# DEPRECATED numerableIconSetLabel ["(Since version 3.14)"] #-}
{- |
Sets the currently displayed value of /@self@/ to the string
in /@label@/. Setting an empty label removes the emblem.

Note that this is meant for displaying short labels, such as
roman numbers, or single letters. For roman numbers, consider
using the Unicode characters U+2160 - U+217F. Strings longer
than two characters will likely not be rendered very well.

If this method is called, and a number was already set on the
icon, it will automatically be reset to zero before rendering
the label, i.e. the last method called between
'GI.Gtk.Objects.NumerableIcon.numerableIconSetLabel' and 'GI.Gtk.Objects.NumerableIcon.numerableIconSetCount'
has always priority.

@since 3.0
-}
numerableIconSetLabel ::
    (B.CallStack.HasCallStack, MonadIO m, IsNumerableIcon a) =>
    a
    {- ^ /@self@/: a 'GI.Gtk.Objects.NumerableIcon.NumerableIcon' -}
    -> Maybe (T.Text)
    {- ^ /@label@/: a short label, or 'Nothing' -}
    -> m ()
numerableIconSetLabel self label = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    maybeLabel <- case label of
        Nothing -> return nullPtr
        Just jLabel -> do
            jLabel' <- textToCString jLabel
            return jLabel'
    gtk_numerable_icon_set_label self' maybeLabel
    touchManagedPtr self
    freeMem maybeLabel
    return ()

data NumerableIconSetLabelMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsNumerableIcon a) => O.MethodInfo NumerableIconSetLabelMethodInfo a signature where
    overloadedMethod _ = numerableIconSetLabel

-- method NumerableIcon::set_style_context
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Gtk", name = "NumerableIcon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkNumerableIcon", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "style", argType = TInterface (Name {namespace = "Gtk", name = "StyleContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkStyleContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_numerable_icon_set_style_context" gtk_numerable_icon_set_style_context :: 
    Ptr NumerableIcon ->                    -- self : TInterface (Name {namespace = "Gtk", name = "NumerableIcon"})
    Ptr Gtk.StyleContext.StyleContext ->    -- style : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO ()

{-# DEPRECATED numerableIconSetStyleContext ["(Since version 3.14)"] #-}
{- |
Updates the icon to fetch theme information from the
given 'GI.Gtk.Objects.StyleContext.StyleContext'.

@since 3.0
-}
numerableIconSetStyleContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsNumerableIcon a, Gtk.StyleContext.IsStyleContext b) =>
    a
    {- ^ /@self@/: a 'GI.Gtk.Objects.NumerableIcon.NumerableIcon' -}
    -> b
    {- ^ /@style@/: a 'GI.Gtk.Objects.StyleContext.StyleContext' -}
    -> m ()
numerableIconSetStyleContext self style = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    style' <- unsafeManagedPtrCastPtr style
    gtk_numerable_icon_set_style_context self' style'
    touchManagedPtr self
    touchManagedPtr style
    return ()

data NumerableIconSetStyleContextMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsNumerableIcon a, Gtk.StyleContext.IsStyleContext b) => O.MethodInfo NumerableIconSetStyleContextMethodInfo a signature where
    overloadedMethod _ = numerableIconSetStyleContext

-- method NumerableIcon::new
-- method type : MemberFunction
-- Args : [Arg {argCName = "base_icon", argType = TInterface (Name {namespace = "Gio", name = "Icon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIcon to overlay on", 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_numerable_icon_new" gtk_numerable_icon_new :: 
    Ptr Gio.Icon.Icon ->                    -- base_icon : TInterface (Name {namespace = "Gio", name = "Icon"})
    IO (Ptr Gio.Icon.Icon)

{-# DEPRECATED numerableIconNew ["(Since version 3.14)"] #-}
{- |
Creates a new unthemed 'GI.Gtk.Objects.NumerableIcon.NumerableIcon'.

@since 3.0
-}
numerableIconNew ::
    (B.CallStack.HasCallStack, MonadIO m, Gio.Icon.IsIcon a) =>
    a
    {- ^ /@baseIcon@/: a 'GI.Gio.Interfaces.Icon.Icon' to overlay on -}
    -> m Gio.Icon.Icon
    {- ^ __Returns:__ a new 'GI.Gio.Interfaces.Icon.Icon' -}
numerableIconNew baseIcon = liftIO $ do
    baseIcon' <- unsafeManagedPtrCastPtr baseIcon
    result <- gtk_numerable_icon_new baseIcon'
    checkUnexpectedReturnNULL "numerableIconNew" result
    result' <- (wrapObject Gio.Icon.Icon) result
    touchManagedPtr baseIcon
    return result'

-- method NumerableIcon::new_with_style_context
-- method type : MemberFunction
-- Args : [Arg {argCName = "base_icon", argType = TInterface (Name {namespace = "Gio", name = "Icon"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GIcon to overlay on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "StyleContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkStyleContext", 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_numerable_icon_new_with_style_context" gtk_numerable_icon_new_with_style_context :: 
    Ptr Gio.Icon.Icon ->                    -- base_icon : TInterface (Name {namespace = "Gio", name = "Icon"})
    Ptr Gtk.StyleContext.StyleContext ->    -- context : TInterface (Name {namespace = "Gtk", name = "StyleContext"})
    IO (Ptr Gio.Icon.Icon)

{-# DEPRECATED numerableIconNewWithStyleContext ["(Since version 3.14)"] #-}
{- |
Creates a new 'GI.Gtk.Objects.NumerableIcon.NumerableIcon' which will themed according
to the passed 'GI.Gtk.Objects.StyleContext.StyleContext'. This is a convenience constructor
that calls 'GI.Gtk.Objects.NumerableIcon.numerableIconSetStyleContext' internally.

@since 3.0
-}
numerableIconNewWithStyleContext ::
    (B.CallStack.HasCallStack, MonadIO m, Gio.Icon.IsIcon a, Gtk.StyleContext.IsStyleContext b) =>
    a
    {- ^ /@baseIcon@/: a 'GI.Gio.Interfaces.Icon.Icon' to overlay on -}
    -> b
    {- ^ /@context@/: a 'GI.Gtk.Objects.StyleContext.StyleContext' -}
    -> m Gio.Icon.Icon
    {- ^ __Returns:__ a new 'GI.Gio.Interfaces.Icon.Icon' -}
numerableIconNewWithStyleContext baseIcon context = liftIO $ do
    baseIcon' <- unsafeManagedPtrCastPtr baseIcon
    context' <- unsafeManagedPtrCastPtr context
    result <- gtk_numerable_icon_new_with_style_context baseIcon' context'
    checkUnexpectedReturnNULL "numerableIconNewWithStyleContext" result
    result' <- (wrapObject Gio.Icon.Icon) result
    touchManagedPtr baseIcon
    touchManagedPtr context
    return result'