#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GtkSource.Objects.CompletionItem
(
CompletionItem(..) ,
IsCompletionItem ,
toCompletionItem ,
noCompletionItem ,
completionItemNew ,
completionItemNew2 ,
completionItemNewFromStock ,
completionItemNewWithMarkup ,
#if ENABLE_OVERLOADING
CompletionItemSetGiconMethodInfo ,
#endif
completionItemSetGicon ,
#if ENABLE_OVERLOADING
CompletionItemSetIconMethodInfo ,
#endif
completionItemSetIcon ,
#if ENABLE_OVERLOADING
CompletionItemSetIconNameMethodInfo ,
#endif
completionItemSetIconName ,
#if ENABLE_OVERLOADING
CompletionItemSetInfoMethodInfo ,
#endif
completionItemSetInfo ,
#if ENABLE_OVERLOADING
CompletionItemSetLabelMethodInfo ,
#endif
completionItemSetLabel ,
#if ENABLE_OVERLOADING
CompletionItemSetMarkupMethodInfo ,
#endif
completionItemSetMarkup ,
#if ENABLE_OVERLOADING
CompletionItemSetTextMethodInfo ,
#endif
completionItemSetText ,
#if ENABLE_OVERLOADING
CompletionItemGiconPropertyInfo ,
#endif
clearCompletionItemGicon ,
#if ENABLE_OVERLOADING
completionItemGicon ,
#endif
constructCompletionItemGicon ,
getCompletionItemGicon ,
setCompletionItemGicon ,
#if ENABLE_OVERLOADING
CompletionItemIconPropertyInfo ,
#endif
clearCompletionItemIcon ,
#if ENABLE_OVERLOADING
completionItemIcon ,
#endif
constructCompletionItemIcon ,
getCompletionItemIcon ,
setCompletionItemIcon ,
#if ENABLE_OVERLOADING
CompletionItemIconNamePropertyInfo ,
#endif
clearCompletionItemIconName ,
#if ENABLE_OVERLOADING
completionItemIconName ,
#endif
constructCompletionItemIconName ,
getCompletionItemIconName ,
setCompletionItemIconName ,
#if ENABLE_OVERLOADING
CompletionItemInfoPropertyInfo ,
#endif
clearCompletionItemInfo ,
#if ENABLE_OVERLOADING
completionItemInfo ,
#endif
constructCompletionItemInfo ,
getCompletionItemInfo ,
setCompletionItemInfo ,
#if ENABLE_OVERLOADING
CompletionItemLabelPropertyInfo ,
#endif
clearCompletionItemLabel ,
#if ENABLE_OVERLOADING
completionItemLabel ,
#endif
constructCompletionItemLabel ,
getCompletionItemLabel ,
setCompletionItemLabel ,
#if ENABLE_OVERLOADING
CompletionItemMarkupPropertyInfo ,
#endif
clearCompletionItemMarkup ,
#if ENABLE_OVERLOADING
completionItemMarkup ,
#endif
constructCompletionItemMarkup ,
getCompletionItemMarkup ,
setCompletionItemMarkup ,
#if ENABLE_OVERLOADING
CompletionItemTextPropertyInfo ,
#endif
clearCompletionItemText ,
#if 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.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
newtype CompletionItem = CompletionItem (ManagedPtr CompletionItem)
foreign import ccall "gtk_source_completion_item_get_type"
c_gtk_source_completion_item_get_type :: IO GType
instance GObject CompletionItem where
gobjectType = c_gtk_source_completion_item_get_type
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]
toCompletionItem :: (MonadIO m, IsCompletionItem o) => o -> m CompletionItem
toCompletionItem = liftIO . unsafeCastTo CompletionItem
noCompletionItem :: Maybe CompletionItem
noCompletionItem = Nothing
#if 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 "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 (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
getCompletionItemGicon :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe Gio.Icon.Icon)
getCompletionItemGicon obj = liftIO $ B.Properties.getObjectPropertyObject obj "gicon" Gio.Icon.Icon
setCompletionItemGicon :: (MonadIO m, IsCompletionItem o, Gio.Icon.IsIcon a) => o -> a -> m ()
setCompletionItemGicon obj val = liftIO $ B.Properties.setObjectPropertyObject obj "gicon" (Just val)
constructCompletionItemGicon :: (IsCompletionItem o, Gio.Icon.IsIcon a) => a -> IO (GValueConstruct o)
constructCompletionItemGicon val = B.Properties.constructObjectPropertyObject "gicon" (Just val)
clearCompletionItemGicon :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemGicon obj = liftIO $ B.Properties.setObjectPropertyObject obj "gicon" (Nothing :: Maybe Gio.Icon.Icon)
#if ENABLE_OVERLOADING
data CompletionItemGiconPropertyInfo
instance AttrInfo CompletionItemGiconPropertyInfo where
type AttrAllowedOps CompletionItemGiconPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionItemGiconPropertyInfo = Gio.Icon.IsIcon
type AttrBaseTypeConstraint CompletionItemGiconPropertyInfo = IsCompletionItem
type AttrGetType CompletionItemGiconPropertyInfo = (Maybe Gio.Icon.Icon)
type AttrLabel CompletionItemGiconPropertyInfo = "gicon"
type AttrOrigin CompletionItemGiconPropertyInfo = CompletionItem
attrGet _ = getCompletionItemGicon
attrSet _ = setCompletionItemGicon
attrConstruct _ = constructCompletionItemGicon
attrClear _ = clearCompletionItemGicon
#endif
getCompletionItemIcon :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe GdkPixbuf.Pixbuf.Pixbuf)
getCompletionItemIcon obj = liftIO $ B.Properties.getObjectPropertyObject obj "icon" GdkPixbuf.Pixbuf.Pixbuf
setCompletionItemIcon :: (MonadIO m, IsCompletionItem o, GdkPixbuf.Pixbuf.IsPixbuf a) => o -> a -> m ()
setCompletionItemIcon obj val = liftIO $ B.Properties.setObjectPropertyObject obj "icon" (Just val)
constructCompletionItemIcon :: (IsCompletionItem o, GdkPixbuf.Pixbuf.IsPixbuf a) => a -> IO (GValueConstruct o)
constructCompletionItemIcon val = B.Properties.constructObjectPropertyObject "icon" (Just val)
clearCompletionItemIcon :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemIcon obj = liftIO $ B.Properties.setObjectPropertyObject obj "icon" (Nothing :: Maybe GdkPixbuf.Pixbuf.Pixbuf)
#if ENABLE_OVERLOADING
data CompletionItemIconPropertyInfo
instance AttrInfo CompletionItemIconPropertyInfo where
type AttrAllowedOps CompletionItemIconPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionItemIconPropertyInfo = GdkPixbuf.Pixbuf.IsPixbuf
type AttrBaseTypeConstraint CompletionItemIconPropertyInfo = IsCompletionItem
type AttrGetType CompletionItemIconPropertyInfo = (Maybe GdkPixbuf.Pixbuf.Pixbuf)
type AttrLabel CompletionItemIconPropertyInfo = "icon"
type AttrOrigin CompletionItemIconPropertyInfo = CompletionItem
attrGet _ = getCompletionItemIcon
attrSet _ = setCompletionItemIcon
attrConstruct _ = constructCompletionItemIcon
attrClear _ = clearCompletionItemIcon
#endif
getCompletionItemIconName :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text)
getCompletionItemIconName obj = liftIO $ B.Properties.getObjectPropertyString obj "icon-name"
setCompletionItemIconName :: (MonadIO m, IsCompletionItem o) => o -> T.Text -> m ()
setCompletionItemIconName obj val = liftIO $ B.Properties.setObjectPropertyString obj "icon-name" (Just val)
constructCompletionItemIconName :: (IsCompletionItem o) => T.Text -> IO (GValueConstruct o)
constructCompletionItemIconName val = B.Properties.constructObjectPropertyString "icon-name" (Just val)
clearCompletionItemIconName :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemIconName obj = liftIO $ B.Properties.setObjectPropertyString obj "icon-name" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data CompletionItemIconNamePropertyInfo
instance AttrInfo CompletionItemIconNamePropertyInfo where
type AttrAllowedOps CompletionItemIconNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionItemIconNamePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint CompletionItemIconNamePropertyInfo = IsCompletionItem
type AttrGetType CompletionItemIconNamePropertyInfo = (Maybe T.Text)
type AttrLabel CompletionItemIconNamePropertyInfo = "icon-name"
type AttrOrigin CompletionItemIconNamePropertyInfo = CompletionItem
attrGet _ = getCompletionItemIconName
attrSet _ = setCompletionItemIconName
attrConstruct _ = constructCompletionItemIconName
attrClear _ = clearCompletionItemIconName
#endif
getCompletionItemInfo :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text)
getCompletionItemInfo obj = liftIO $ B.Properties.getObjectPropertyString obj "info"
setCompletionItemInfo :: (MonadIO m, IsCompletionItem o) => o -> T.Text -> m ()
setCompletionItemInfo obj val = liftIO $ B.Properties.setObjectPropertyString obj "info" (Just val)
constructCompletionItemInfo :: (IsCompletionItem o) => T.Text -> IO (GValueConstruct o)
constructCompletionItemInfo val = B.Properties.constructObjectPropertyString "info" (Just val)
clearCompletionItemInfo :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemInfo obj = liftIO $ B.Properties.setObjectPropertyString obj "info" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data CompletionItemInfoPropertyInfo
instance AttrInfo CompletionItemInfoPropertyInfo where
type AttrAllowedOps CompletionItemInfoPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionItemInfoPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint CompletionItemInfoPropertyInfo = IsCompletionItem
type AttrGetType CompletionItemInfoPropertyInfo = (Maybe T.Text)
type AttrLabel CompletionItemInfoPropertyInfo = "info"
type AttrOrigin CompletionItemInfoPropertyInfo = CompletionItem
attrGet _ = getCompletionItemInfo
attrSet _ = setCompletionItemInfo
attrConstruct _ = constructCompletionItemInfo
attrClear _ = clearCompletionItemInfo
#endif
getCompletionItemLabel :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text)
getCompletionItemLabel obj = liftIO $ B.Properties.getObjectPropertyString obj "label"
setCompletionItemLabel :: (MonadIO m, IsCompletionItem o) => o -> T.Text -> m ()
setCompletionItemLabel obj val = liftIO $ B.Properties.setObjectPropertyString obj "label" (Just val)
constructCompletionItemLabel :: (IsCompletionItem o) => T.Text -> IO (GValueConstruct o)
constructCompletionItemLabel val = B.Properties.constructObjectPropertyString "label" (Just val)
clearCompletionItemLabel :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemLabel obj = liftIO $ B.Properties.setObjectPropertyString obj "label" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data CompletionItemLabelPropertyInfo
instance AttrInfo CompletionItemLabelPropertyInfo where
type AttrAllowedOps CompletionItemLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionItemLabelPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint CompletionItemLabelPropertyInfo = IsCompletionItem
type AttrGetType CompletionItemLabelPropertyInfo = (Maybe T.Text)
type AttrLabel CompletionItemLabelPropertyInfo = "label"
type AttrOrigin CompletionItemLabelPropertyInfo = CompletionItem
attrGet _ = getCompletionItemLabel
attrSet _ = setCompletionItemLabel
attrConstruct _ = constructCompletionItemLabel
attrClear _ = clearCompletionItemLabel
#endif
getCompletionItemMarkup :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text)
getCompletionItemMarkup obj = liftIO $ B.Properties.getObjectPropertyString obj "markup"
setCompletionItemMarkup :: (MonadIO m, IsCompletionItem o) => o -> T.Text -> m ()
setCompletionItemMarkup obj val = liftIO $ B.Properties.setObjectPropertyString obj "markup" (Just val)
constructCompletionItemMarkup :: (IsCompletionItem o) => T.Text -> IO (GValueConstruct o)
constructCompletionItemMarkup val = B.Properties.constructObjectPropertyString "markup" (Just val)
clearCompletionItemMarkup :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemMarkup obj = liftIO $ B.Properties.setObjectPropertyString obj "markup" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data CompletionItemMarkupPropertyInfo
instance AttrInfo CompletionItemMarkupPropertyInfo where
type AttrAllowedOps CompletionItemMarkupPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionItemMarkupPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint CompletionItemMarkupPropertyInfo = IsCompletionItem
type AttrGetType CompletionItemMarkupPropertyInfo = (Maybe T.Text)
type AttrLabel CompletionItemMarkupPropertyInfo = "markup"
type AttrOrigin CompletionItemMarkupPropertyInfo = CompletionItem
attrGet _ = getCompletionItemMarkup
attrSet _ = setCompletionItemMarkup
attrConstruct _ = constructCompletionItemMarkup
attrClear _ = clearCompletionItemMarkup
#endif
getCompletionItemText :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text)
getCompletionItemText obj = liftIO $ B.Properties.getObjectPropertyString obj "text"
setCompletionItemText :: (MonadIO m, IsCompletionItem o) => o -> T.Text -> m ()
setCompletionItemText obj val = liftIO $ B.Properties.setObjectPropertyString obj "text" (Just val)
constructCompletionItemText :: (IsCompletionItem o) => T.Text -> IO (GValueConstruct o)
constructCompletionItemText val = B.Properties.constructObjectPropertyString "text" (Just val)
clearCompletionItemText :: (MonadIO m, IsCompletionItem o) => o -> m ()
clearCompletionItemText obj = liftIO $ B.Properties.setObjectPropertyString obj "text" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data CompletionItemTextPropertyInfo
instance AttrInfo CompletionItemTextPropertyInfo where
type AttrAllowedOps CompletionItemTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionItemTextPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint CompletionItemTextPropertyInfo = IsCompletionItem
type AttrGetType CompletionItemTextPropertyInfo = (Maybe T.Text)
type AttrLabel CompletionItemTextPropertyInfo = "text"
type AttrOrigin CompletionItemTextPropertyInfo = CompletionItem
attrGet _ = getCompletionItemText
attrSet _ = setCompletionItemText
attrConstruct _ = constructCompletionItemText
attrClear _ = clearCompletionItemText
#endif
#if 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 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 ENABLE_OVERLOADING
type instance O.SignalList CompletionItem = CompletionItemSignalList
type CompletionItemSignalList = ('[ '("changed", GtkSource.CompletionProposal.CompletionProposalChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_source_completion_item_new" gtk_source_completion_item_new ::
CString ->
CString ->
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
CString ->
IO (Ptr CompletionItem)
{-# DEPRECATED completionItemNew ["(Since version 3.24)","Use 'GI.GtkSource.Objects.CompletionItem.completionItemNew2' instead."] #-}
completionItemNew ::
(B.CallStack.HasCallStack, MonadIO m, GdkPixbuf.Pixbuf.IsPixbuf a) =>
T.Text
-> T.Text
-> Maybe (a)
-> Maybe (T.Text)
-> m CompletionItem
completionItemNew label text icon info = liftIO $ do
label' <- textToCString label
text' <- textToCString text
maybeIcon <- case icon of
Nothing -> return nullPtr
Just jIcon -> do
jIcon' <- unsafeManagedPtrCastPtr jIcon
return jIcon'
maybeInfo <- case info of
Nothing -> return nullPtr
Just jInfo -> do
jInfo' <- textToCString jInfo
return jInfo'
result <- gtk_source_completion_item_new label' text' maybeIcon maybeInfo
checkUnexpectedReturnNULL "completionItemNew" result
result' <- (wrapObject CompletionItem) result
whenJust icon touchManagedPtr
freeMem label'
freeMem text'
freeMem maybeInfo
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gtk_source_completion_item_new_from_stock" gtk_source_completion_item_new_from_stock ::
CString ->
CString ->
CString ->
CString ->
IO (Ptr CompletionItem)
{-# DEPRECATED completionItemNewFromStock ["(Since version 3.10)","Use 'GI.GtkSource.Objects.CompletionItem.completionItemNew2' instead."] #-}
completionItemNewFromStock ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe (T.Text)
-> T.Text
-> T.Text
-> Maybe (T.Text)
-> m CompletionItem
completionItemNewFromStock label text stock info = liftIO $ do
maybeLabel <- case label of
Nothing -> return nullPtr
Just jLabel -> do
jLabel' <- textToCString jLabel
return jLabel'
text' <- textToCString text
stock' <- textToCString stock
maybeInfo <- case info of
Nothing -> return nullPtr
Just jInfo -> do
jInfo' <- textToCString jInfo
return jInfo'
result <- gtk_source_completion_item_new_from_stock maybeLabel text' stock' maybeInfo
checkUnexpectedReturnNULL "completionItemNewFromStock" result
result' <- (wrapObject CompletionItem) result
freeMem maybeLabel
freeMem text'
freeMem stock'
freeMem maybeInfo
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gtk_source_completion_item_new_with_markup" gtk_source_completion_item_new_with_markup ::
CString ->
CString ->
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
CString ->
IO (Ptr CompletionItem)
{-# DEPRECATED completionItemNewWithMarkup ["(Since version 3.24)","Use 'GI.GtkSource.Objects.CompletionItem.completionItemNew2' instead."] #-}
completionItemNewWithMarkup ::
(B.CallStack.HasCallStack, MonadIO m, GdkPixbuf.Pixbuf.IsPixbuf a) =>
T.Text
-> T.Text
-> Maybe (a)
-> Maybe (T.Text)
-> m CompletionItem
completionItemNewWithMarkup markup text icon info = liftIO $ do
markup' <- textToCString markup
text' <- textToCString text
maybeIcon <- case icon of
Nothing -> return nullPtr
Just jIcon -> do
jIcon' <- unsafeManagedPtrCastPtr jIcon
return jIcon'
maybeInfo <- case info of
Nothing -> return nullPtr
Just jInfo -> do
jInfo' <- textToCString jInfo
return jInfo'
result <- gtk_source_completion_item_new_with_markup markup' text' maybeIcon maybeInfo
checkUnexpectedReturnNULL "completionItemNewWithMarkup" result
result' <- (wrapObject CompletionItem) result
whenJust icon touchManagedPtr
freeMem markup'
freeMem text'
freeMem maybeInfo
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gtk_source_completion_item_set_gicon" gtk_source_completion_item_set_gicon ::
Ptr CompletionItem ->
Ptr Gio.Icon.Icon ->
IO ()
completionItemSetGicon ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a, Gio.Icon.IsIcon b) =>
a
-> Maybe (b)
-> m ()
completionItemSetGicon item gicon = liftIO $ do
item' <- unsafeManagedPtrCastPtr item
maybeGicon <- case gicon of
Nothing -> return nullPtr
Just jGicon -> do
jGicon' <- unsafeManagedPtrCastPtr jGicon
return jGicon'
gtk_source_completion_item_set_gicon item' maybeGicon
touchManagedPtr item
whenJust gicon touchManagedPtr
return ()
#if 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
foreign import ccall "gtk_source_completion_item_set_icon" gtk_source_completion_item_set_icon ::
Ptr CompletionItem ->
Ptr GdkPixbuf.Pixbuf.Pixbuf ->
IO ()
completionItemSetIcon ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a, GdkPixbuf.Pixbuf.IsPixbuf b) =>
a
-> Maybe (b)
-> m ()
completionItemSetIcon item icon = liftIO $ do
item' <- unsafeManagedPtrCastPtr item
maybeIcon <- case icon of
Nothing -> return nullPtr
Just jIcon -> do
jIcon' <- unsafeManagedPtrCastPtr jIcon
return jIcon'
gtk_source_completion_item_set_icon item' maybeIcon
touchManagedPtr item
whenJust icon touchManagedPtr
return ()
#if 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
foreign import ccall "gtk_source_completion_item_set_icon_name" gtk_source_completion_item_set_icon_name ::
Ptr CompletionItem ->
CString ->
IO ()
completionItemSetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a) =>
a
-> Maybe (T.Text)
-> m ()
completionItemSetIconName item iconName = liftIO $ do
item' <- unsafeManagedPtrCastPtr item
maybeIconName <- case iconName of
Nothing -> return nullPtr
Just jIconName -> do
jIconName' <- textToCString jIconName
return jIconName'
gtk_source_completion_item_set_icon_name item' maybeIconName
touchManagedPtr item
freeMem maybeIconName
return ()
#if ENABLE_OVERLOADING
data CompletionItemSetIconNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsCompletionItem a) => O.MethodInfo CompletionItemSetIconNameMethodInfo a signature where
overloadedMethod _ = completionItemSetIconName
#endif
foreign import ccall "gtk_source_completion_item_set_info" gtk_source_completion_item_set_info ::
Ptr CompletionItem ->
CString ->
IO ()
completionItemSetInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a) =>
a
-> Maybe (T.Text)
-> m ()
completionItemSetInfo item info = liftIO $ do
item' <- unsafeManagedPtrCastPtr item
maybeInfo <- case info of
Nothing -> return nullPtr
Just jInfo -> do
jInfo' <- textToCString jInfo
return jInfo'
gtk_source_completion_item_set_info item' maybeInfo
touchManagedPtr item
freeMem maybeInfo
return ()
#if ENABLE_OVERLOADING
data CompletionItemSetInfoMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsCompletionItem a) => O.MethodInfo CompletionItemSetInfoMethodInfo a signature where
overloadedMethod _ = completionItemSetInfo
#endif
foreign import ccall "gtk_source_completion_item_set_label" gtk_source_completion_item_set_label ::
Ptr CompletionItem ->
CString ->
IO ()
completionItemSetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a) =>
a
-> Maybe (T.Text)
-> m ()
completionItemSetLabel item label = liftIO $ do
item' <- unsafeManagedPtrCastPtr item
maybeLabel <- case label of
Nothing -> return nullPtr
Just jLabel -> do
jLabel' <- textToCString jLabel
return jLabel'
gtk_source_completion_item_set_label item' maybeLabel
touchManagedPtr item
freeMem maybeLabel
return ()
#if ENABLE_OVERLOADING
data CompletionItemSetLabelMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsCompletionItem a) => O.MethodInfo CompletionItemSetLabelMethodInfo a signature where
overloadedMethod _ = completionItemSetLabel
#endif
foreign import ccall "gtk_source_completion_item_set_markup" gtk_source_completion_item_set_markup ::
Ptr CompletionItem ->
CString ->
IO ()
completionItemSetMarkup ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a) =>
a
-> Maybe (T.Text)
-> m ()
completionItemSetMarkup item markup = liftIO $ do
item' <- unsafeManagedPtrCastPtr item
maybeMarkup <- case markup of
Nothing -> return nullPtr
Just jMarkup -> do
jMarkup' <- textToCString jMarkup
return jMarkup'
gtk_source_completion_item_set_markup item' maybeMarkup
touchManagedPtr item
freeMem maybeMarkup
return ()
#if ENABLE_OVERLOADING
data CompletionItemSetMarkupMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsCompletionItem a) => O.MethodInfo CompletionItemSetMarkupMethodInfo a signature where
overloadedMethod _ = completionItemSetMarkup
#endif
foreign import ccall "gtk_source_completion_item_set_text" gtk_source_completion_item_set_text ::
Ptr CompletionItem ->
CString ->
IO ()
completionItemSetText ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionItem a) =>
a
-> Maybe (T.Text)
-> m ()
completionItemSetText item text = liftIO $ do
item' <- unsafeManagedPtrCastPtr item
maybeText <- case text of
Nothing -> return nullPtr
Just jText -> do
jText' <- textToCString jText
return jText'
gtk_source_completion_item_set_text item' maybeText
touchManagedPtr item
freeMem maybeText
return ()
#if ENABLE_OVERLOADING
data CompletionItemSetTextMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsCompletionItem a) => O.MethodInfo CompletionItemSetTextMethodInfo a signature where
overloadedMethod _ = completionItemSetText
#endif
foreign import ccall "gtk_source_completion_item_new2" gtk_source_completion_item_new2 ::
IO (Ptr CompletionItem)
completionItemNew2 ::
(B.CallStack.HasCallStack, MonadIO m) =>
m CompletionItem
completionItemNew2 = liftIO $ do
result <- gtk_source_completion_item_new2
checkUnexpectedReturnNULL "completionItemNew2" result
result' <- (wrapObject CompletionItem) result
return result'
#if ENABLE_OVERLOADING
#endif