{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) /No description available in the introspection data./ -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.GtkSource.Objects.CompletionItem ( -- * Exported types CompletionItem(..) , IsCompletionItem , toCompletionItem , noCompletionItem , -- * Methods -- ** new #method:new# completionItemNew , -- ** new2 #method:new2# completionItemNew2 , -- ** newFromStock #method:newFromStock# completionItemNewFromStock , -- ** newWithMarkup #method:newWithMarkup# completionItemNewWithMarkup , -- ** setGicon #method:setGicon# #if ENABLE_OVERLOADING CompletionItemSetGiconMethodInfo , #endif completionItemSetGicon , -- ** setIcon #method:setIcon# #if ENABLE_OVERLOADING CompletionItemSetIconMethodInfo , #endif completionItemSetIcon , -- ** setIconName #method:setIconName# #if ENABLE_OVERLOADING CompletionItemSetIconNameMethodInfo , #endif completionItemSetIconName , -- ** setInfo #method:setInfo# #if ENABLE_OVERLOADING CompletionItemSetInfoMethodInfo , #endif completionItemSetInfo , -- ** setLabel #method:setLabel# #if ENABLE_OVERLOADING CompletionItemSetLabelMethodInfo , #endif completionItemSetLabel , -- ** setMarkup #method:setMarkup# #if ENABLE_OVERLOADING CompletionItemSetMarkupMethodInfo , #endif completionItemSetMarkup , -- ** setText #method:setText# #if ENABLE_OVERLOADING CompletionItemSetTextMethodInfo , #endif completionItemSetText , -- * Properties -- ** gicon #attr:gicon# {- | The 'GI.Gio.Interfaces.Icon.Icon' for the icon to be shown for this proposal. /Since: 3.18/ -} #if ENABLE_OVERLOADING CompletionItemGiconPropertyInfo , #endif clearCompletionItemGicon , #if ENABLE_OVERLOADING completionItemGicon , #endif constructCompletionItemGicon , getCompletionItemGicon , setCompletionItemGicon , -- ** icon #attr:icon# {- | The 'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf' for the icon to be shown for this proposal. -} #if ENABLE_OVERLOADING CompletionItemIconPropertyInfo , #endif clearCompletionItemIcon , #if 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 ENABLE_OVERLOADING CompletionItemIconNamePropertyInfo , #endif clearCompletionItemIconName , #if ENABLE_OVERLOADING completionItemIconName , #endif constructCompletionItemIconName , getCompletionItemIconName , setCompletionItemIconName , -- ** info #attr:info# {- | Optional extra information to be shown for this proposal. -} #if ENABLE_OVERLOADING CompletionItemInfoPropertyInfo , #endif clearCompletionItemInfo , #if ENABLE_OVERLOADING completionItemInfo , #endif constructCompletionItemInfo , getCompletionItemInfo , setCompletionItemInfo , -- ** label #attr:label# {- | Label to be shown for this proposal. -} #if ENABLE_OVERLOADING CompletionItemLabelPropertyInfo , #endif clearCompletionItemLabel , #if ENABLE_OVERLOADING completionItemLabel , #endif constructCompletionItemLabel , getCompletionItemLabel , setCompletionItemLabel , -- ** markup #attr:markup# {- | Label with markup to be shown for this proposal. -} #if ENABLE_OVERLOADING CompletionItemMarkupPropertyInfo , #endif clearCompletionItemMarkup , #if ENABLE_OVERLOADING completionItemMarkup , #endif constructCompletionItemMarkup , getCompletionItemMarkup , setCompletionItemMarkup , -- ** text #attr:text# {- | Proposal text. -} #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 -- | Memory-managed wrapper type. 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 -- | 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 = liftIO . unsafeCastTo CompletionItem -- | A convenience alias for `Nothing` :: `Maybe` `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 -- 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 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 obj = liftIO $ B.Properties.getObjectPropertyObject obj "gicon" Gio.Icon.Icon {- | Set the value of the “@gicon@” property. When 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 obj val = liftIO $ B.Properties.setObjectPropertyObject obj "gicon" (Just 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 val = B.Properties.constructObjectPropertyObject "gicon" (Just val) {- | Set the value of the “@gicon@” property to `Nothing`. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.clear' #gicon @ -} 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 -- 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 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 obj = liftIO $ B.Properties.getObjectPropertyObject obj "icon" GdkPixbuf.Pixbuf.Pixbuf {- | Set the value of the “@icon@” property. When 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 obj val = liftIO $ B.Properties.setObjectPropertyObject obj "icon" (Just 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 val = B.Properties.constructObjectPropertyObject "icon" (Just val) {- | Set the value of the “@icon@” property to `Nothing`. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.clear' #icon @ -} 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 -- VVV Prop "icon-name" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Nothing,Just True) {- | Get the value of the “@icon-name@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' completionItem #iconName @ -} getCompletionItemIconName :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text) getCompletionItemIconName obj = liftIO $ B.Properties.getObjectPropertyString obj "icon-name" {- | Set the value of the “@icon-name@” property. When 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 obj val = liftIO $ B.Properties.setObjectPropertyString obj "icon-name" (Just 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 val = B.Properties.constructObjectPropertyString "icon-name" (Just val) {- | Set the value of the “@icon-name@” property to `Nothing`. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.clear' #iconName @ -} 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 -- VVV Prop "info" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Nothing,Just True) {- | Get the value of the “@info@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' completionItem #info @ -} getCompletionItemInfo :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text) getCompletionItemInfo obj = liftIO $ B.Properties.getObjectPropertyString obj "info" {- | Set the value of the “@info@” property. When 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 obj val = liftIO $ B.Properties.setObjectPropertyString obj "info" (Just 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 val = B.Properties.constructObjectPropertyString "info" (Just val) {- | Set the value of the “@info@” property to `Nothing`. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.clear' #info @ -} 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 -- VVV Prop "label" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Nothing,Just True) {- | Get the value of the “@label@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' completionItem #label @ -} getCompletionItemLabel :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text) getCompletionItemLabel obj = liftIO $ B.Properties.getObjectPropertyString obj "label" {- | Set the value of the “@label@” property. When 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 obj val = liftIO $ B.Properties.setObjectPropertyString obj "label" (Just 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 val = B.Properties.constructObjectPropertyString "label" (Just val) {- | Set the value of the “@label@” property to `Nothing`. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.clear' #label @ -} 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 -- VVV Prop "markup" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Nothing,Just True) {- | Get the value of the “@markup@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' completionItem #markup @ -} getCompletionItemMarkup :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text) getCompletionItemMarkup obj = liftIO $ B.Properties.getObjectPropertyString obj "markup" {- | Set the value of the “@markup@” property. When 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 obj val = liftIO $ B.Properties.setObjectPropertyString obj "markup" (Just 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 val = B.Properties.constructObjectPropertyString "markup" (Just val) {- | Set the value of the “@markup@” property to `Nothing`. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.clear' #markup @ -} 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 -- VVV Prop "text" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Nothing,Just True) {- | Get the value of the “@text@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' completionItem #text @ -} getCompletionItemText :: (MonadIO m, IsCompletionItem o) => o -> m (Maybe T.Text) getCompletionItemText obj = liftIO $ B.Properties.getObjectPropertyString obj "text" {- | Set the value of the “@text@” property. When 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 obj val = liftIO $ B.Properties.setObjectPropertyString obj "text" (Just 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 val = B.Properties.constructObjectPropertyString "text" (Just val) {- | Set the value of the “@text@” property to `Nothing`. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.clear' #text @ -} 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 -- 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 'GI.GtkSource.Objects.CompletionItem.CompletionItem' with label /@label@/, icon /@icon@/ and extra information /@info@/. Both /@icon@/ and /@info@/ can be '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 'GI.GtkSource.Objects.CompletionItem.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 -- 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 'GI.GtkSource.Objects.CompletionItem.CompletionItem' from a stock item. If /@label@/ is '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 'GI.GtkSource.Objects.CompletionItem.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 -- 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 'GI.GtkSource.Objects.CompletionItem.CompletionItem' with markup label /@markup@/, icon /@icon@/ and extra information /@info@/. Both /@icon@/ and /@info@/ can be '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 'GI.GtkSource.Objects.CompletionItem.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 -- 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 'GI.GtkSource.Objects.CompletionItem.CompletionItem'. -} -> Maybe (b) {- ^ /@gicon@/: the 'GI.Gio.Interfaces.Icon.Icon', or 'Nothing'. -} -> 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 -- 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 'GI.GtkSource.Objects.CompletionItem.CompletionItem'. -} -> Maybe (b) {- ^ /@icon@/: the 'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf', or 'Nothing'. -} -> 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 -- 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 'GI.GtkSource.Objects.CompletionItem.CompletionItem'. -} -> Maybe (T.Text) {- ^ /@iconName@/: the icon name, or 'Nothing'. -} -> 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 -- 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 'GI.GtkSource.Objects.CompletionItem.CompletionItem'. -} -> Maybe (T.Text) {- ^ /@info@/: the info, or 'Nothing'. -} -> 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 -- 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 'GI.GtkSource.Objects.CompletionItem.CompletionItem'. -} -> Maybe (T.Text) {- ^ /@label@/: the label, or 'Nothing'. -} -> 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 -- 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 'GI.GtkSource.Objects.CompletionItem.CompletionItem'. -} -> Maybe (T.Text) {- ^ /@markup@/: the markup, or 'Nothing'. -} -> 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 -- 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 'GI.GtkSource.Objects.CompletionItem.CompletionItem'. -} -> Maybe (T.Text) {- ^ /@text@/: the text, or 'Nothing'. -} -> 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 -- 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 '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 'GI.GtkSource.Objects.CompletionItem.CompletionItem'. -} completionItemNew2 = liftIO $ do result <- gtk_source_completion_item_new2 checkUnexpectedReturnNULL "completionItemNew2" result result' <- (wrapObject CompletionItem) result return result' #if ENABLE_OVERLOADING #endif