{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

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

module GI.GtkSource.Objects.CompletionItem
    ( 

-- * Exported types
    CompletionItem(..)                      ,
    IsCompletionItem                        ,
    toCompletionItem                        ,
    noCompletionItem                        ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveCompletionItemMethod             ,
#endif


-- ** new #method:new#

    completionItemNew                       ,


-- ** new2 #method:new2#

    completionItemNew2                      ,


-- ** newFromStock #method:newFromStock#

    completionItemNewFromStock              ,


-- ** newWithMarkup #method:newWithMarkup#

    completionItemNewWithMarkup             ,


-- ** setGicon #method:setGicon#

#if defined(ENABLE_OVERLOADING)
    CompletionItemSetGiconMethodInfo        ,
#endif
    completionItemSetGicon                  ,


-- ** setIcon #method:setIcon#

#if defined(ENABLE_OVERLOADING)
    CompletionItemSetIconMethodInfo         ,
#endif
    completionItemSetIcon                   ,


-- ** setIconName #method:setIconName#

#if defined(ENABLE_OVERLOADING)
    CompletionItemSetIconNameMethodInfo     ,
#endif
    completionItemSetIconName               ,


-- ** setInfo #method:setInfo#

#if defined(ENABLE_OVERLOADING)
    CompletionItemSetInfoMethodInfo         ,
#endif
    completionItemSetInfo                   ,


-- ** setLabel #method:setLabel#

#if defined(ENABLE_OVERLOADING)
    CompletionItemSetLabelMethodInfo        ,
#endif
    completionItemSetLabel                  ,


-- ** setMarkup #method:setMarkup#

#if defined(ENABLE_OVERLOADING)
    CompletionItemSetMarkupMethodInfo       ,
#endif
    completionItemSetMarkup                 ,


-- ** setText #method:setText#

#if defined(ENABLE_OVERLOADING)
    CompletionItemSetTextMethodInfo         ,
#endif
    completionItemSetText                   ,




 -- * Properties
-- ** gicon #attr:gicon#
-- | The t'GI.Gio.Interfaces.Icon.Icon' for the icon to be shown for this proposal.
-- 
-- /Since: 3.18/

#if defined(ENABLE_OVERLOADING)
    CompletionItemGiconPropertyInfo         ,
#endif
    clearCompletionItemGicon                ,
#if defined(ENABLE_OVERLOADING)
    completionItemGicon                     ,
#endif
    constructCompletionItemGicon            ,
    getCompletionItemGicon                  ,
    setCompletionItemGicon                  ,


-- ** icon #attr:icon#
-- | The t'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf' for the icon to be shown for this proposal.

#if defined(ENABLE_OVERLOADING)
    CompletionItemIconPropertyInfo          ,
#endif
    clearCompletionItemIcon                 ,
#if defined(ENABLE_OVERLOADING)
    completionItemIcon                      ,
#endif
    constructCompletionItemIcon             ,
    getCompletionItemIcon                   ,
    setCompletionItemIcon                   ,


-- ** iconName #attr:iconName#
-- | The icon name for the icon to be shown for this proposal.
-- 
-- /Since: 3.18/

#if defined(ENABLE_OVERLOADING)
    CompletionItemIconNamePropertyInfo      ,
#endif
    clearCompletionItemIconName             ,
#if defined(ENABLE_OVERLOADING)
    completionItemIconName                  ,
#endif
    constructCompletionItemIconName         ,
    getCompletionItemIconName               ,
    setCompletionItemIconName               ,


-- ** info #attr:info#
-- | Optional extra information to be shown for this proposal.

#if defined(ENABLE_OVERLOADING)
    CompletionItemInfoPropertyInfo          ,
#endif
    clearCompletionItemInfo                 ,
#if defined(ENABLE_OVERLOADING)
    completionItemInfo                      ,
#endif
    constructCompletionItemInfo             ,
    getCompletionItemInfo                   ,
    setCompletionItemInfo                   ,


-- ** label #attr:label#
-- | Label to be shown for this proposal.

#if defined(ENABLE_OVERLOADING)
    CompletionItemLabelPropertyInfo         ,
#endif
    clearCompletionItemLabel                ,
#if defined(ENABLE_OVERLOADING)
    completionItemLabel                     ,
#endif
    constructCompletionItemLabel            ,
    getCompletionItemLabel                  ,
    setCompletionItemLabel                  ,


-- ** markup #attr:markup#
-- | Label with markup to be shown for this proposal.

#if defined(ENABLE_OVERLOADING)
    CompletionItemMarkupPropertyInfo        ,
#endif
    clearCompletionItemMarkup               ,
#if defined(ENABLE_OVERLOADING)
    completionItemMarkup                    ,
#endif
    constructCompletionItemMarkup           ,
    getCompletionItemMarkup                 ,
    setCompletionItemMarkup                 ,


-- ** text #attr:text#
-- | Proposal text.

#if defined(ENABLE_OVERLOADING)
    CompletionItemTextPropertyInfo          ,
#endif
    clearCompletionItemText                 ,
#if defined(ENABLE_OVERLOADING)
    completionItemText                      ,
#endif
    constructCompletionItemText             ,
    getCompletionItemText                   ,
    setCompletionItemText                   ,




    ) where

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

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

import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import {-# SOURCE #-} qualified GI.GtkSource.Interfaces.CompletionProposal as GtkSource.CompletionProposal

-- | Memory-managed wrapper type.
newtype CompletionItem = CompletionItem (ManagedPtr CompletionItem)
    deriving (CompletionItem -> CompletionItem -> Bool
(CompletionItem -> CompletionItem -> Bool)
-> (CompletionItem -> CompletionItem -> Bool) -> Eq CompletionItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompletionItem -> CompletionItem -> Bool
$c/= :: CompletionItem -> CompletionItem -> Bool
== :: CompletionItem -> CompletionItem -> Bool
$c== :: CompletionItem -> CompletionItem -> Bool
Eq)
foreign import ccall "gtk_source_completion_item_get_type"
    c_gtk_source_completion_item_get_type :: IO GType

instance GObject CompletionItem where
    gobjectType :: IO GType
gobjectType = IO GType
c_gtk_source_completion_item_get_type
    

-- | Convert 'CompletionItem' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue CompletionItem where
    toGValue :: CompletionItem -> IO GValue
toGValue o :: CompletionItem
o = do
        GType
gtype <- IO GType
c_gtk_source_completion_item_get_type
        CompletionItem -> (Ptr CompletionItem -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr CompletionItem
o (GType
-> (GValue -> Ptr CompletionItem -> IO ())
-> Ptr CompletionItem
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr CompletionItem -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO CompletionItem
fromGValue gv :: GValue
gv = do
        Ptr CompletionItem
ptr <- GValue -> IO (Ptr CompletionItem)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr CompletionItem)
        (ManagedPtr CompletionItem -> CompletionItem)
-> Ptr CompletionItem -> IO CompletionItem
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr CompletionItem -> CompletionItem
CompletionItem Ptr CompletionItem
ptr
        
    

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

instance O.HasParentTypes CompletionItem
type instance O.ParentTypes CompletionItem = '[GObject.Object.Object, GtkSource.CompletionProposal.CompletionProposal]

-- | Cast to `CompletionItem`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toCompletionItem :: (MonadIO m, IsCompletionItem o) => o -> m CompletionItem
toCompletionItem :: o -> m CompletionItem
toCompletionItem = IO CompletionItem -> m CompletionItem
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CompletionItem -> m CompletionItem)
-> (o -> IO CompletionItem) -> o -> m CompletionItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr CompletionItem -> CompletionItem)
-> o -> IO CompletionItem
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr CompletionItem -> CompletionItem
CompletionItem

-- | A convenience alias for `Nothing` :: `Maybe` `CompletionItem`.
noCompletionItem :: Maybe CompletionItem
noCompletionItem :: Maybe CompletionItem
noCompletionItem = Maybe CompletionItem
forall a. Maybe a
Nothing

#if defined(ENABLE_OVERLOADING)
type family ResolveCompletionItemMethod (t :: Symbol) (o :: *) :: * where
    ResolveCompletionItemMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveCompletionItemMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveCompletionItemMethod "changed" o = GtkSource.CompletionProposal.CompletionProposalChangedMethodInfo
    ResolveCompletionItemMethod "equal" o = GtkSource.CompletionProposal.CompletionProposalEqualMethodInfo
    ResolveCompletionItemMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveCompletionItemMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveCompletionItemMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveCompletionItemMethod "hash" o = GtkSource.CompletionProposal.CompletionProposalHashMethodInfo
    ResolveCompletionItemMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveCompletionItemMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveCompletionItemMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveCompletionItemMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveCompletionItemMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveCompletionItemMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveCompletionItemMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveCompletionItemMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveCompletionItemMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveCompletionItemMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveCompletionItemMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveCompletionItemMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveCompletionItemMethod "getGicon" o = GtkSource.CompletionProposal.CompletionProposalGetGiconMethodInfo
    ResolveCompletionItemMethod "getIcon" o = GtkSource.CompletionProposal.CompletionProposalGetIconMethodInfo
    ResolveCompletionItemMethod "getIconName" o = GtkSource.CompletionProposal.CompletionProposalGetIconNameMethodInfo
    ResolveCompletionItemMethod "getInfo" o = GtkSource.CompletionProposal.CompletionProposalGetInfoMethodInfo
    ResolveCompletionItemMethod "getLabel" o = GtkSource.CompletionProposal.CompletionProposalGetLabelMethodInfo
    ResolveCompletionItemMethod "getMarkup" o = GtkSource.CompletionProposal.CompletionProposalGetMarkupMethodInfo
    ResolveCompletionItemMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveCompletionItemMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveCompletionItemMethod "getText" o = GtkSource.CompletionProposal.CompletionProposalGetTextMethodInfo
    ResolveCompletionItemMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveCompletionItemMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveCompletionItemMethod "setGicon" o = CompletionItemSetGiconMethodInfo
    ResolveCompletionItemMethod "setIcon" o = CompletionItemSetIconMethodInfo
    ResolveCompletionItemMethod "setIconName" o = CompletionItemSetIconNameMethodInfo
    ResolveCompletionItemMethod "setInfo" o = CompletionItemSetInfoMethodInfo
    ResolveCompletionItemMethod "setLabel" o = CompletionItemSetLabelMethodInfo
    ResolveCompletionItemMethod "setMarkup" o = CompletionItemSetMarkupMethodInfo
    ResolveCompletionItemMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveCompletionItemMethod "setText" o = CompletionItemSetTextMethodInfo
    ResolveCompletionItemMethod l o = O.MethodResolutionFailed l o

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

#endif

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

-- | Get the value of the “@gicon@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' completionItem #gicon
-- @
getCompletionItemGicon :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe Gio.Icon.Icon)
getCompletionItemGicon :: o -> m (Maybe Icon)
getCompletionItemGicon obj :: o
obj = IO (Maybe Icon) -> m (Maybe Icon)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Icon) -> m (Maybe Icon))
-> IO (Maybe Icon) -> m (Maybe Icon)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Icon -> Icon) -> IO (Maybe Icon)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "gicon" ManagedPtr Icon -> Icon
Gio.Icon.Icon

-- | Set the value of the “@gicon@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' completionItem [ #gicon 'Data.GI.Base.Attributes.:=' value ]
-- @
setCompletionItemGicon :: (MonadIO m, IsCompletionItem o, Gio.Icon.IsIcon a) => o -> a -> m ()
setCompletionItemGicon :: o -> a -> m ()
setCompletionItemGicon obj :: o
obj val :: a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "gicon" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@gicon@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCompletionItemGicon :: (IsCompletionItem o, Gio.Icon.IsIcon a) => a -> IO (GValueConstruct o)
constructCompletionItemGicon :: a -> IO (GValueConstruct o)
constructCompletionItemGicon val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "gicon" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Set the value of the “@gicon@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #gicon
-- @
clearCompletionItemGicon :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemGicon :: o -> m ()
clearCompletionItemGicon obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Icon -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "gicon" (Maybe Icon
forall a. Maybe a
Nothing :: Maybe Gio.Icon.Icon)

#if defined(ENABLE_OVERLOADING)
data CompletionItemGiconPropertyInfo
instance AttrInfo CompletionItemGiconPropertyInfo where
    type AttrAllowedOps CompletionItemGiconPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint CompletionItemGiconPropertyInfo = IsCompletionItem
    type AttrSetTypeConstraint CompletionItemGiconPropertyInfo = Gio.Icon.IsIcon
    type AttrTransferTypeConstraint CompletionItemGiconPropertyInfo = Gio.Icon.IsIcon
    type AttrTransferType CompletionItemGiconPropertyInfo = Gio.Icon.Icon
    type AttrGetType CompletionItemGiconPropertyInfo = (Maybe Gio.Icon.Icon)
    type AttrLabel CompletionItemGiconPropertyInfo = "gicon"
    type AttrOrigin CompletionItemGiconPropertyInfo = CompletionItem
    attrGet = getCompletionItemGicon
    attrSet = setCompletionItemGicon
    attrTransfer _ v = do
        unsafeCastTo Gio.Icon.Icon v
    attrConstruct = constructCompletionItemGicon
    attrClear = clearCompletionItemGicon
#endif

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

-- | Get the value of the “@icon@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' completionItem #icon
-- @
getCompletionItemIcon :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe GdkPixbuf.Pixbuf.Pixbuf)
getCompletionItemIcon :: o -> m (Maybe Pixbuf)
getCompletionItemIcon obj :: o
obj = IO (Maybe Pixbuf) -> m (Maybe Pixbuf)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Pixbuf) -> m (Maybe Pixbuf))
-> IO (Maybe Pixbuf) -> m (Maybe Pixbuf)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Pixbuf -> Pixbuf) -> IO (Maybe Pixbuf)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "icon" ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf

-- | Set the value of the “@icon@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' completionItem [ #icon 'Data.GI.Base.Attributes.:=' value ]
-- @
setCompletionItemIcon :: (MonadIO m, IsCompletionItem o, GdkPixbuf.Pixbuf.IsPixbuf a) => o -> a -> m ()
setCompletionItemIcon :: o -> a -> m ()
setCompletionItemIcon obj :: o
obj val :: a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "icon" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@icon@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCompletionItemIcon :: (IsCompletionItem o, GdkPixbuf.Pixbuf.IsPixbuf a) => a -> IO (GValueConstruct o)
constructCompletionItemIcon :: a -> IO (GValueConstruct o)
constructCompletionItemIcon val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "icon" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Set the value of the “@icon@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #icon
-- @
clearCompletionItemIcon :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemIcon :: o -> m ()
clearCompletionItemIcon obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Pixbuf -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "icon" (Maybe Pixbuf
forall a. Maybe a
Nothing :: Maybe GdkPixbuf.Pixbuf.Pixbuf)

#if defined(ENABLE_OVERLOADING)
data CompletionItemIconPropertyInfo
instance AttrInfo CompletionItemIconPropertyInfo where
    type AttrAllowedOps CompletionItemIconPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint CompletionItemIconPropertyInfo = IsCompletionItem
    type AttrSetTypeConstraint CompletionItemIconPropertyInfo = GdkPixbuf.Pixbuf.IsPixbuf
    type AttrTransferTypeConstraint CompletionItemIconPropertyInfo = GdkPixbuf.Pixbuf.IsPixbuf
    type AttrTransferType CompletionItemIconPropertyInfo = GdkPixbuf.Pixbuf.Pixbuf
    type AttrGetType CompletionItemIconPropertyInfo = (Maybe GdkPixbuf.Pixbuf.Pixbuf)
    type AttrLabel CompletionItemIconPropertyInfo = "icon"
    type AttrOrigin CompletionItemIconPropertyInfo = CompletionItem
    attrGet = getCompletionItemIcon
    attrSet = setCompletionItemIcon
    attrTransfer _ v = do
        unsafeCastTo GdkPixbuf.Pixbuf.Pixbuf v
    attrConstruct = constructCompletionItemIcon
    attrClear = clearCompletionItemIcon
#endif

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

-- | Get the value of the “@icon-name@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' completionItem #iconName
-- @
getCompletionItemIconName :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text)
getCompletionItemIconName :: o -> m (Maybe Text)
getCompletionItemIconName obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "icon-name"

-- | Set the value of the “@icon-name@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' completionItem [ #iconName 'Data.GI.Base.Attributes.:=' value ]
-- @
setCompletionItemIconName :: (MonadIO m, IsCompletionItem o) => o -> T.Text -> m ()
setCompletionItemIconName :: o -> Text -> m ()
setCompletionItemIconName obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Construct a `GValueConstruct` with valid value for the “@icon-name@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCompletionItemIconName :: (IsCompletionItem o) => T.Text -> IO (GValueConstruct o)
constructCompletionItemIconName :: Text -> IO (GValueConstruct o)
constructCompletionItemIconName val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Set the value of the “@icon-name@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #iconName
-- @
clearCompletionItemIconName :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemIconName :: o -> m ()
clearCompletionItemIconName obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "icon-name" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data CompletionItemIconNamePropertyInfo
instance AttrInfo CompletionItemIconNamePropertyInfo where
    type AttrAllowedOps CompletionItemIconNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint CompletionItemIconNamePropertyInfo = IsCompletionItem
    type AttrSetTypeConstraint CompletionItemIconNamePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint CompletionItemIconNamePropertyInfo = (~) T.Text
    type AttrTransferType CompletionItemIconNamePropertyInfo = T.Text
    type AttrGetType CompletionItemIconNamePropertyInfo = (Maybe T.Text)
    type AttrLabel CompletionItemIconNamePropertyInfo = "icon-name"
    type AttrOrigin CompletionItemIconNamePropertyInfo = CompletionItem
    attrGet = getCompletionItemIconName
    attrSet = setCompletionItemIconName
    attrTransfer _ v = do
        return v
    attrConstruct = constructCompletionItemIconName
    attrClear = clearCompletionItemIconName
#endif

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

-- | Get the value of the “@info@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' completionItem #info
-- @
getCompletionItemInfo :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text)
getCompletionItemInfo :: o -> m (Maybe Text)
getCompletionItemInfo obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "info"

-- | Set the value of the “@info@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' completionItem [ #info 'Data.GI.Base.Attributes.:=' value ]
-- @
setCompletionItemInfo :: (MonadIO m, IsCompletionItem o) => o -> T.Text -> m ()
setCompletionItemInfo :: o -> Text -> m ()
setCompletionItemInfo obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "info" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

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

-- | Set the value of the “@info@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #info
-- @
clearCompletionItemInfo :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemInfo :: o -> m ()
clearCompletionItemInfo obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "info" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data CompletionItemInfoPropertyInfo
instance AttrInfo CompletionItemInfoPropertyInfo where
    type AttrAllowedOps CompletionItemInfoPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint CompletionItemInfoPropertyInfo = IsCompletionItem
    type AttrSetTypeConstraint CompletionItemInfoPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint CompletionItemInfoPropertyInfo = (~) T.Text
    type AttrTransferType CompletionItemInfoPropertyInfo = T.Text
    type AttrGetType CompletionItemInfoPropertyInfo = (Maybe T.Text)
    type AttrLabel CompletionItemInfoPropertyInfo = "info"
    type AttrOrigin CompletionItemInfoPropertyInfo = CompletionItem
    attrGet = getCompletionItemInfo
    attrSet = setCompletionItemInfo
    attrTransfer _ v = do
        return v
    attrConstruct = constructCompletionItemInfo
    attrClear = clearCompletionItemInfo
#endif

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

-- | Get the value of the “@label@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' completionItem #label
-- @
getCompletionItemLabel :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text)
getCompletionItemLabel :: o -> m (Maybe Text)
getCompletionItemLabel obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "label"

-- | Set the value of the “@label@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' completionItem [ #label 'Data.GI.Base.Attributes.:=' value ]
-- @
setCompletionItemLabel :: (MonadIO m, IsCompletionItem o) => o -> T.Text -> m ()
setCompletionItemLabel :: o -> Text -> m ()
setCompletionItemLabel obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "label" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

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

-- | Set the value of the “@label@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #label
-- @
clearCompletionItemLabel :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemLabel :: o -> m ()
clearCompletionItemLabel obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "label" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data CompletionItemLabelPropertyInfo
instance AttrInfo CompletionItemLabelPropertyInfo where
    type AttrAllowedOps CompletionItemLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint CompletionItemLabelPropertyInfo = IsCompletionItem
    type AttrSetTypeConstraint CompletionItemLabelPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint CompletionItemLabelPropertyInfo = (~) T.Text
    type AttrTransferType CompletionItemLabelPropertyInfo = T.Text
    type AttrGetType CompletionItemLabelPropertyInfo = (Maybe T.Text)
    type AttrLabel CompletionItemLabelPropertyInfo = "label"
    type AttrOrigin CompletionItemLabelPropertyInfo = CompletionItem
    attrGet = getCompletionItemLabel
    attrSet = setCompletionItemLabel
    attrTransfer _ v = do
        return v
    attrConstruct = constructCompletionItemLabel
    attrClear = clearCompletionItemLabel
#endif

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

-- | Get the value of the “@markup@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' completionItem #markup
-- @
getCompletionItemMarkup :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text)
getCompletionItemMarkup :: o -> m (Maybe Text)
getCompletionItemMarkup obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "markup"

-- | Set the value of the “@markup@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' completionItem [ #markup 'Data.GI.Base.Attributes.:=' value ]
-- @
setCompletionItemMarkup :: (MonadIO m, IsCompletionItem o) => o -> T.Text -> m ()
setCompletionItemMarkup :: o -> Text -> m ()
setCompletionItemMarkup obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "markup" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

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

-- | Set the value of the “@markup@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #markup
-- @
clearCompletionItemMarkup :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemMarkup :: o -> m ()
clearCompletionItemMarkup obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "markup" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data CompletionItemMarkupPropertyInfo
instance AttrInfo CompletionItemMarkupPropertyInfo where
    type AttrAllowedOps CompletionItemMarkupPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint CompletionItemMarkupPropertyInfo = IsCompletionItem
    type AttrSetTypeConstraint CompletionItemMarkupPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint CompletionItemMarkupPropertyInfo = (~) T.Text
    type AttrTransferType CompletionItemMarkupPropertyInfo = T.Text
    type AttrGetType CompletionItemMarkupPropertyInfo = (Maybe T.Text)
    type AttrLabel CompletionItemMarkupPropertyInfo = "markup"
    type AttrOrigin CompletionItemMarkupPropertyInfo = CompletionItem
    attrGet = getCompletionItemMarkup
    attrSet = setCompletionItemMarkup
    attrTransfer _ v = do
        return v
    attrConstruct = constructCompletionItemMarkup
    attrClear = clearCompletionItemMarkup
#endif

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

-- | Get the value of the “@text@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' completionItem #text
-- @
getCompletionItemText :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text)
getCompletionItemText :: o -> m (Maybe Text)
getCompletionItemText obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "text"

-- | Set the value of the “@text@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' completionItem [ #text 'Data.GI.Base.Attributes.:=' value ]
-- @
setCompletionItemText :: (MonadIO m, IsCompletionItem o) => o -> T.Text -> m ()
setCompletionItemText :: o -> Text -> m ()
setCompletionItemText obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "text" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

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

-- | Set the value of the “@text@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #text
-- @
clearCompletionItemText :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemText :: o -> m ()
clearCompletionItemText obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "text" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data CompletionItemTextPropertyInfo
instance AttrInfo CompletionItemTextPropertyInfo where
    type AttrAllowedOps CompletionItemTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint CompletionItemTextPropertyInfo = IsCompletionItem
    type AttrSetTypeConstraint CompletionItemTextPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint CompletionItemTextPropertyInfo = (~) T.Text
    type AttrTransferType CompletionItemTextPropertyInfo = T.Text
    type AttrGetType CompletionItemTextPropertyInfo = (Maybe T.Text)
    type AttrLabel CompletionItemTextPropertyInfo = "text"
    type AttrOrigin CompletionItemTextPropertyInfo = CompletionItem
    attrGet = getCompletionItemText
    attrSet = setCompletionItemText
    attrTransfer _ v = do
        return v
    attrConstruct = constructCompletionItemText
    attrClear = clearCompletionItemText
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList CompletionItem
type instance O.AttributeList CompletionItem = CompletionItemAttributeList
type CompletionItemAttributeList = ('[ '("gicon", CompletionItemGiconPropertyInfo), '("icon", CompletionItemIconPropertyInfo), '("iconName", CompletionItemIconNamePropertyInfo), '("info", CompletionItemInfoPropertyInfo), '("label", CompletionItemLabelPropertyInfo), '("markup", CompletionItemMarkupPropertyInfo), '("text", CompletionItemTextPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
completionItemGicon :: AttrLabelProxy "gicon"
completionItemGicon = AttrLabelProxy

completionItemIcon :: AttrLabelProxy "icon"
completionItemIcon = AttrLabelProxy

completionItemIconName :: AttrLabelProxy "iconName"
completionItemIconName = AttrLabelProxy

completionItemInfo :: AttrLabelProxy "info"
completionItemInfo = AttrLabelProxy

completionItemLabel :: AttrLabelProxy "label"
completionItemLabel = AttrLabelProxy

completionItemMarkup :: AttrLabelProxy "markup"
completionItemMarkup = AttrLabelProxy

completionItemText :: AttrLabelProxy "text"
completionItemText = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList CompletionItem = CompletionItemSignalList
type CompletionItemSignalList = ('[ '("changed", GtkSource.CompletionProposal.CompletionProposalChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method CompletionItem::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "label"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item label." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item text." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "icon"
--           , argType =
--               TInterface Name { namespace = "GdkPixbuf" , name = "Pixbuf" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item icon." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "info"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item extra information."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "GtkSource" , name = "CompletionItem" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_completion_item_new" gtk_source_completion_item_new :: 
    CString ->                              -- label : TBasicType TUTF8
    CString ->                              -- text : TBasicType TUTF8
    Ptr GdkPixbuf.Pixbuf.Pixbuf ->          -- icon : TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"})
    CString ->                              -- info : TBasicType TUTF8
    IO (Ptr CompletionItem)

{-# DEPRECATED completionItemNew ["(Since version 3.24)","Use 'GI.GtkSource.Objects.CompletionItem.completionItemNew2' instead."] #-}
-- | Create a new t'GI.GtkSource.Objects.CompletionItem.CompletionItem' with label /@label@/, icon /@icon@/ and
-- extra information /@info@/. Both /@icon@/ and /@info@/ can be 'P.Nothing' in which case
-- there will be no icon shown and no extra information available.
completionItemNew ::
    (B.CallStack.HasCallStack, MonadIO m, GdkPixbuf.Pixbuf.IsPixbuf a) =>
    T.Text
    -- ^ /@label@/: The item label.
    -> T.Text
    -- ^ /@text@/: The item text.
    -> Maybe (a)
    -- ^ /@icon@/: The item icon.
    -> Maybe (T.Text)
    -- ^ /@info@/: The item extra information.
    -> m CompletionItem
    -- ^ __Returns:__ a new t'GI.GtkSource.Objects.CompletionItem.CompletionItem'.
completionItemNew :: Text -> Text -> Maybe a -> Maybe Text -> m CompletionItem
completionItemNew label :: Text
label text :: Text
text icon :: Maybe a
icon info :: Maybe Text
info = IO CompletionItem -> m CompletionItem
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CompletionItem -> m CompletionItem)
-> IO CompletionItem -> m CompletionItem
forall a b. (a -> b) -> a -> b
$ do
    CString
label' <- Text -> IO CString
textToCString Text
label
    CString
text' <- Text -> IO CString
textToCString Text
text
    Ptr Pixbuf
maybeIcon <- case Maybe a
icon of
        Nothing -> Ptr Pixbuf -> IO (Ptr Pixbuf)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
forall a. Ptr a
nullPtr
        Just jIcon :: a
jIcon -> do
            Ptr Pixbuf
jIcon' <- a -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jIcon
            Ptr Pixbuf -> IO (Ptr Pixbuf)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
jIcon'
    CString
maybeInfo <- case Maybe Text
info of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jInfo :: Text
jInfo -> do
            CString
jInfo' <- Text -> IO CString
textToCString Text
jInfo
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jInfo'
    Ptr CompletionItem
result <- CString
-> CString -> Ptr Pixbuf -> CString -> IO (Ptr CompletionItem)
gtk_source_completion_item_new CString
label' CString
text' Ptr Pixbuf
maybeIcon CString
maybeInfo
    Text -> Ptr CompletionItem -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "completionItemNew" Ptr CompletionItem
result
    CompletionItem
result' <- ((ManagedPtr CompletionItem -> CompletionItem)
-> Ptr CompletionItem -> IO CompletionItem
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr CompletionItem -> CompletionItem
CompletionItem) Ptr CompletionItem
result
    Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
icon a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
label'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
text'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeInfo
    CompletionItem -> IO CompletionItem
forall (m :: * -> *) a. Monad m => a -> m a
return CompletionItem
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method CompletionItem::new_from_stock
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "label"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item label." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item text." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "stock"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The stock icon." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "info"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item extra information."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "GtkSource" , name = "CompletionItem" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_completion_item_new_from_stock" gtk_source_completion_item_new_from_stock :: 
    CString ->                              -- label : TBasicType TUTF8
    CString ->                              -- text : TBasicType TUTF8
    CString ->                              -- stock : TBasicType TUTF8
    CString ->                              -- info : TBasicType TUTF8
    IO (Ptr CompletionItem)

{-# DEPRECATED completionItemNewFromStock ["(Since version 3.10)","Use 'GI.GtkSource.Objects.CompletionItem.completionItemNew2' instead."] #-}
-- | Creates a new t'GI.GtkSource.Objects.CompletionItem.CompletionItem' from a stock item. If /@label@/ is 'P.Nothing',
-- the stock label will be used.
completionItemNewFromStock ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Maybe (T.Text)
    -- ^ /@label@/: The item label.
    -> T.Text
    -- ^ /@text@/: The item text.
    -> T.Text
    -- ^ /@stock@/: The stock icon.
    -> Maybe (T.Text)
    -- ^ /@info@/: The item extra information.
    -> m CompletionItem
    -- ^ __Returns:__ a new t'GI.GtkSource.Objects.CompletionItem.CompletionItem'.
completionItemNewFromStock :: Maybe Text -> Text -> Text -> Maybe Text -> m CompletionItem
completionItemNewFromStock label :: Maybe Text
label text :: Text
text stock :: Text
stock info :: Maybe Text
info = IO CompletionItem -> m CompletionItem
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CompletionItem -> m CompletionItem)
-> IO CompletionItem -> m CompletionItem
forall a b. (a -> b) -> a -> b
$ do
    CString
maybeLabel <- case Maybe Text
label of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jLabel :: Text
jLabel -> do
            CString
jLabel' <- Text -> IO CString
textToCString Text
jLabel
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jLabel'
    CString
text' <- Text -> IO CString
textToCString Text
text
    CString
stock' <- Text -> IO CString
textToCString Text
stock
    CString
maybeInfo <- case Maybe Text
info of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jInfo :: Text
jInfo -> do
            CString
jInfo' <- Text -> IO CString
textToCString Text
jInfo
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jInfo'
    Ptr CompletionItem
result <- CString -> CString -> CString -> CString -> IO (Ptr CompletionItem)
gtk_source_completion_item_new_from_stock CString
maybeLabel CString
text' CString
stock' CString
maybeInfo
    Text -> Ptr CompletionItem -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "completionItemNewFromStock" Ptr CompletionItem
result
    CompletionItem
result' <- ((ManagedPtr CompletionItem -> CompletionItem)
-> Ptr CompletionItem -> IO CompletionItem
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr CompletionItem -> CompletionItem
CompletionItem) Ptr CompletionItem
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeLabel
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
text'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
stock'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeInfo
    CompletionItem -> IO CompletionItem
forall (m :: * -> *) a. Monad m => a -> m a
return CompletionItem
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method CompletionItem::new_with_markup
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "markup"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item markup label."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item text." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "icon"
--           , argType =
--               TInterface Name { namespace = "GdkPixbuf" , name = "Pixbuf" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item icon." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "info"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item extra information."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "GtkSource" , name = "CompletionItem" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_source_completion_item_new_with_markup" gtk_source_completion_item_new_with_markup :: 
    CString ->                              -- markup : TBasicType TUTF8
    CString ->                              -- text : TBasicType TUTF8
    Ptr GdkPixbuf.Pixbuf.Pixbuf ->          -- icon : TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"})
    CString ->                              -- info : TBasicType TUTF8
    IO (Ptr CompletionItem)

{-# DEPRECATED completionItemNewWithMarkup ["(Since version 3.24)","Use 'GI.GtkSource.Objects.CompletionItem.completionItemNew2' instead."] #-}
-- | Create a new t'GI.GtkSource.Objects.CompletionItem.CompletionItem' with markup label /@markup@/, icon
-- /@icon@/ and extra information /@info@/. Both /@icon@/ and /@info@/ can be 'P.Nothing' in
-- which case there will be no icon shown and no extra information available.
completionItemNewWithMarkup ::
    (B.CallStack.HasCallStack, MonadIO m, GdkPixbuf.Pixbuf.IsPixbuf a) =>
    T.Text
    -- ^ /@markup@/: The item markup label.
    -> T.Text
    -- ^ /@text@/: The item text.
    -> Maybe (a)
    -- ^ /@icon@/: The item icon.
    -> Maybe (T.Text)
    -- ^ /@info@/: The item extra information.
    -> m CompletionItem
    -- ^ __Returns:__ a new t'GI.GtkSource.Objects.CompletionItem.CompletionItem'.
completionItemNewWithMarkup :: Text -> Text -> Maybe a -> Maybe Text -> m CompletionItem
completionItemNewWithMarkup markup :: Text
markup text :: Text
text icon :: Maybe a
icon info :: Maybe Text
info = IO CompletionItem -> m CompletionItem
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CompletionItem -> m CompletionItem)
-> IO CompletionItem -> m CompletionItem
forall a b. (a -> b) -> a -> b
$ do
    CString
markup' <- Text -> IO CString
textToCString Text
markup
    CString
text' <- Text -> IO CString
textToCString Text
text
    Ptr Pixbuf
maybeIcon <- case Maybe a
icon of
        Nothing -> Ptr Pixbuf -> IO (Ptr Pixbuf)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
forall a. Ptr a
nullPtr
        Just jIcon :: a
jIcon -> do
            Ptr Pixbuf
jIcon' <- a -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jIcon
            Ptr Pixbuf -> IO (Ptr Pixbuf)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
jIcon'
    CString
maybeInfo <- case Maybe Text
info of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jInfo :: Text
jInfo -> do
            CString
jInfo' <- Text -> IO CString
textToCString Text
jInfo
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jInfo'
    Ptr CompletionItem
result <- CString
-> CString -> Ptr Pixbuf -> CString -> IO (Ptr CompletionItem)
gtk_source_completion_item_new_with_markup CString
markup' CString
text' Ptr Pixbuf
maybeIcon CString
maybeInfo
    Text -> Ptr CompletionItem -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "completionItemNewWithMarkup" Ptr CompletionItem
result
    CompletionItem
result' <- ((ManagedPtr CompletionItem -> CompletionItem)
-> Ptr CompletionItem -> IO CompletionItem
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr CompletionItem -> CompletionItem
CompletionItem) Ptr CompletionItem
result
    Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
icon a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
markup'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
text'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeInfo
    CompletionItem -> IO CompletionItem
forall (m :: * -> *) a. Monad m => a -> m a
return CompletionItem
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method CompletionItem::set_gicon
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "item"
--           , argType =
--               TInterface
--                 Name { namespace = "GtkSource" , name = "CompletionItem" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceCompletionItem."
--                 , 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 = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #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_source_completion_item_set_gicon" gtk_source_completion_item_set_gicon :: 
    Ptr CompletionItem ->                   -- item : TInterface (Name {namespace = "GtkSource", name = "CompletionItem"})
    Ptr Gio.Icon.Icon ->                    -- gicon : TInterface (Name {namespace = "Gio", name = "Icon"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 3.24/
completionItemSetGicon ::
    (B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a, Gio.Icon.IsIcon b) =>
    a
    -- ^ /@item@/: a t'GI.GtkSource.Objects.CompletionItem.CompletionItem'.
    -> Maybe (b)
    -- ^ /@gicon@/: the t'GI.Gio.Interfaces.Icon.Icon', or 'P.Nothing'.
    -> m ()
completionItemSetGicon :: a -> Maybe b -> m ()
completionItemSetGicon item :: a
item gicon :: Maybe b
gicon = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr CompletionItem
item' <- a -> IO (Ptr CompletionItem)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
item
    Ptr Icon
maybeGicon <- case Maybe b
gicon of
        Nothing -> Ptr Icon -> IO (Ptr Icon)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Icon
forall a. Ptr a
nullPtr
        Just jGicon :: b
jGicon -> do
            Ptr Icon
jGicon' <- b -> IO (Ptr Icon)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jGicon
            Ptr Icon -> IO (Ptr Icon)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Icon
jGicon'
    Ptr CompletionItem -> Ptr Icon -> IO ()
gtk_source_completion_item_set_gicon Ptr CompletionItem
item' Ptr Icon
maybeGicon
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
item
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
gicon b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CompletionItemSetGiconMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsCompletionItem a, Gio.Icon.IsIcon b) => O.MethodInfo CompletionItemSetGiconMethodInfo a signature where
    overloadedMethod = completionItemSetGicon

#endif

-- method CompletionItem::set_icon
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "item"
--           , argType =
--               TInterface
--                 Name { namespace = "GtkSource" , name = "CompletionItem" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceCompletionItem."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "icon"
--           , argType =
--               TInterface Name { namespace = "GdkPixbuf" , name = "Pixbuf" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GdkPixbuf, 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_source_completion_item_set_icon" gtk_source_completion_item_set_icon :: 
    Ptr CompletionItem ->                   -- item : TInterface (Name {namespace = "GtkSource", name = "CompletionItem"})
    Ptr GdkPixbuf.Pixbuf.Pixbuf ->          -- icon : TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"})
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 3.24/
completionItemSetIcon ::
    (B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a, GdkPixbuf.Pixbuf.IsPixbuf b) =>
    a
    -- ^ /@item@/: a t'GI.GtkSource.Objects.CompletionItem.CompletionItem'.
    -> Maybe (b)
    -- ^ /@icon@/: the t'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf', or 'P.Nothing'.
    -> m ()
completionItemSetIcon :: a -> Maybe b -> m ()
completionItemSetIcon item :: a
item icon :: Maybe b
icon = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr CompletionItem
item' <- a -> IO (Ptr CompletionItem)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
item
    Ptr Pixbuf
maybeIcon <- case Maybe b
icon of
        Nothing -> Ptr Pixbuf -> IO (Ptr Pixbuf)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
forall a. Ptr a
nullPtr
        Just jIcon :: b
jIcon -> do
            Ptr Pixbuf
jIcon' <- b -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jIcon
            Ptr Pixbuf -> IO (Ptr Pixbuf)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pixbuf
jIcon'
    Ptr CompletionItem -> Ptr Pixbuf -> IO ()
gtk_source_completion_item_set_icon Ptr CompletionItem
item' Ptr Pixbuf
maybeIcon
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
item
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
icon b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CompletionItemSetIconMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsCompletionItem a, GdkPixbuf.Pixbuf.IsPixbuf b) => O.MethodInfo CompletionItemSetIconMethodInfo a signature where
    overloadedMethod = completionItemSetIcon

#endif

-- method CompletionItem::set_icon_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "item"
--           , argType =
--               TInterface
--                 Name { namespace = "GtkSource" , name = "CompletionItem" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceCompletionItem."
--                 , 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 "the 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_source_completion_item_set_icon_name" gtk_source_completion_item_set_icon_name :: 
    Ptr CompletionItem ->                   -- item : TInterface (Name {namespace = "GtkSource", name = "CompletionItem"})
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 3.24/
completionItemSetIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a) =>
    a
    -- ^ /@item@/: a t'GI.GtkSource.Objects.CompletionItem.CompletionItem'.
    -> Maybe (T.Text)
    -- ^ /@iconName@/: the icon name, or 'P.Nothing'.
    -> m ()
completionItemSetIconName :: a -> Maybe Text -> m ()
completionItemSetIconName item :: a
item iconName :: Maybe Text
iconName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr CompletionItem
item' <- a -> IO (Ptr CompletionItem)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
item
    CString
maybeIconName <- case Maybe Text
iconName of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jIconName :: Text
jIconName -> do
            CString
jIconName' <- Text -> IO CString
textToCString Text
jIconName
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jIconName'
    Ptr CompletionItem -> CString -> IO ()
gtk_source_completion_item_set_icon_name Ptr CompletionItem
item' CString
maybeIconName
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
item
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeIconName
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CompletionItemSetIconNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsCompletionItem a) => O.MethodInfo CompletionItemSetIconNameMethodInfo a signature where
    overloadedMethod = completionItemSetIconName

#endif

-- method CompletionItem::set_info
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "item"
--           , argType =
--               TInterface
--                 Name { namespace = "GtkSource" , name = "CompletionItem" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceCompletionItem."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "info"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the info, 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_source_completion_item_set_info" gtk_source_completion_item_set_info :: 
    Ptr CompletionItem ->                   -- item : TInterface (Name {namespace = "GtkSource", name = "CompletionItem"})
    CString ->                              -- info : TBasicType TUTF8
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 3.24/
completionItemSetInfo ::
    (B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a) =>
    a
    -- ^ /@item@/: a t'GI.GtkSource.Objects.CompletionItem.CompletionItem'.
    -> Maybe (T.Text)
    -- ^ /@info@/: the info, or 'P.Nothing'.
    -> m ()
completionItemSetInfo :: a -> Maybe Text -> m ()
completionItemSetInfo item :: a
item info :: Maybe Text
info = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr CompletionItem
item' <- a -> IO (Ptr CompletionItem)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
item
    CString
maybeInfo <- case Maybe Text
info of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jInfo :: Text
jInfo -> do
            CString
jInfo' <- Text -> IO CString
textToCString Text
jInfo
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jInfo'
    Ptr CompletionItem -> CString -> IO ()
gtk_source_completion_item_set_info Ptr CompletionItem
item' CString
maybeInfo
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
item
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeInfo
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CompletionItemSetInfoMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsCompletionItem a) => O.MethodInfo CompletionItemSetInfoMethodInfo a signature where
    overloadedMethod = completionItemSetInfo

#endif

-- method CompletionItem::set_label
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "item"
--           , argType =
--               TInterface
--                 Name { namespace = "GtkSource" , name = "CompletionItem" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceCompletionItem."
--                 , 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 "the 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_source_completion_item_set_label" gtk_source_completion_item_set_label :: 
    Ptr CompletionItem ->                   -- item : TInterface (Name {namespace = "GtkSource", name = "CompletionItem"})
    CString ->                              -- label : TBasicType TUTF8
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 3.24/
completionItemSetLabel ::
    (B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a) =>
    a
    -- ^ /@item@/: a t'GI.GtkSource.Objects.CompletionItem.CompletionItem'.
    -> Maybe (T.Text)
    -- ^ /@label@/: the label, or 'P.Nothing'.
    -> m ()
completionItemSetLabel :: a -> Maybe Text -> m ()
completionItemSetLabel item :: a
item label :: Maybe Text
label = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr CompletionItem
item' <- a -> IO (Ptr CompletionItem)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
item
    CString
maybeLabel <- case Maybe Text
label of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jLabel :: Text
jLabel -> do
            CString
jLabel' <- Text -> IO CString
textToCString Text
jLabel
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jLabel'
    Ptr CompletionItem -> CString -> IO ()
gtk_source_completion_item_set_label Ptr CompletionItem
item' CString
maybeLabel
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
item
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeLabel
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CompletionItemSetLabelMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsCompletionItem a) => O.MethodInfo CompletionItemSetLabelMethodInfo a signature where
    overloadedMethod = completionItemSetLabel

#endif

-- method CompletionItem::set_markup
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "item"
--           , argType =
--               TInterface
--                 Name { namespace = "GtkSource" , name = "CompletionItem" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceCompletionItem."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "markup"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the markup, 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_source_completion_item_set_markup" gtk_source_completion_item_set_markup :: 
    Ptr CompletionItem ->                   -- item : TInterface (Name {namespace = "GtkSource", name = "CompletionItem"})
    CString ->                              -- markup : TBasicType TUTF8
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 3.24/
completionItemSetMarkup ::
    (B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a) =>
    a
    -- ^ /@item@/: a t'GI.GtkSource.Objects.CompletionItem.CompletionItem'.
    -> Maybe (T.Text)
    -- ^ /@markup@/: the markup, or 'P.Nothing'.
    -> m ()
completionItemSetMarkup :: a -> Maybe Text -> m ()
completionItemSetMarkup item :: a
item markup :: Maybe Text
markup = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr CompletionItem
item' <- a -> IO (Ptr CompletionItem)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
item
    CString
maybeMarkup <- case Maybe Text
markup of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jMarkup :: Text
jMarkup -> do
            CString
jMarkup' <- Text -> IO CString
textToCString Text
jMarkup
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jMarkup'
    Ptr CompletionItem -> CString -> IO ()
gtk_source_completion_item_set_markup Ptr CompletionItem
item' CString
maybeMarkup
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
item
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMarkup
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CompletionItemSetMarkupMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsCompletionItem a) => O.MethodInfo CompletionItemSetMarkupMethodInfo a signature where
    overloadedMethod = completionItemSetMarkup

#endif

-- method CompletionItem::set_text
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "item"
--           , argType =
--               TInterface
--                 Name { namespace = "GtkSource" , name = "CompletionItem" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkSourceCompletionItem."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the text, 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_source_completion_item_set_text" gtk_source_completion_item_set_text :: 
    Ptr CompletionItem ->                   -- item : TInterface (Name {namespace = "GtkSource", name = "CompletionItem"})
    CString ->                              -- text : TBasicType TUTF8
    IO ()

-- | /No description available in the introspection data./
-- 
-- /Since: 3.24/
completionItemSetText ::
    (B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a) =>
    a
    -- ^ /@item@/: a t'GI.GtkSource.Objects.CompletionItem.CompletionItem'.
    -> Maybe (T.Text)
    -- ^ /@text@/: the text, or 'P.Nothing'.
    -> m ()
completionItemSetText :: a -> Maybe Text -> m ()
completionItemSetText item :: a
item text :: Maybe Text
text = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr CompletionItem
item' <- a -> IO (Ptr CompletionItem)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
item
    CString
maybeText <- case Maybe Text
text of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jText :: Text
jText -> do
            CString
jText' <- Text -> IO CString
textToCString Text
jText
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jText'
    Ptr CompletionItem -> CString -> IO ()
gtk_source_completion_item_set_text Ptr CompletionItem
item' CString
maybeText
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
item
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeText
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CompletionItemSetTextMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsCompletionItem a) => O.MethodInfo CompletionItemSetTextMethodInfo a signature where
    overloadedMethod = completionItemSetText

#endif

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

foreign import ccall "gtk_source_completion_item_new2" gtk_source_completion_item_new2 :: 
    IO (Ptr CompletionItem)

-- | Creates a new t'GI.GtkSource.Objects.CompletionItem.CompletionItem'. The desired properties need to be set
-- afterwards.
-- 
-- /Since: 3.24/
completionItemNew2 ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m CompletionItem
    -- ^ __Returns:__ a new t'GI.GtkSource.Objects.CompletionItem.CompletionItem'.
completionItemNew2 :: m CompletionItem
completionItemNew2  = IO CompletionItem -> m CompletionItem
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CompletionItem -> m CompletionItem)
-> IO CompletionItem -> m CompletionItem
forall a b. (a -> b) -> a -> b
$ do
    Ptr CompletionItem
result <- IO (Ptr CompletionItem)
gtk_source_completion_item_new2
    Text -> Ptr CompletionItem -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "completionItemNew2" Ptr CompletionItem
result
    CompletionItem
result' <- ((ManagedPtr CompletionItem -> CompletionItem)
-> Ptr CompletionItem -> IO CompletionItem
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr CompletionItem -> CompletionItem
CompletionItem) Ptr CompletionItem
result
    CompletionItem -> IO CompletionItem
forall (m :: * -> *) a. Monad m => a -> m a
return CompletionItem
result'

#if defined(ENABLE_OVERLOADING)
#endif