#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GtkSource.Interfaces.CompletionProposal
(
CompletionProposal(..) ,
noCompletionProposal ,
IsCompletionProposal ,
toCompletionProposal ,
#if ENABLE_OVERLOADING
CompletionProposalChangedMethodInfo ,
#endif
completionProposalChanged ,
#if ENABLE_OVERLOADING
CompletionProposalEqualMethodInfo ,
#endif
completionProposalEqual ,
#if ENABLE_OVERLOADING
CompletionProposalGetGiconMethodInfo ,
#endif
completionProposalGetGicon ,
#if ENABLE_OVERLOADING
CompletionProposalGetIconMethodInfo ,
#endif
completionProposalGetIcon ,
#if ENABLE_OVERLOADING
CompletionProposalGetIconNameMethodInfo ,
#endif
completionProposalGetIconName ,
#if ENABLE_OVERLOADING
CompletionProposalGetInfoMethodInfo ,
#endif
completionProposalGetInfo ,
#if ENABLE_OVERLOADING
CompletionProposalGetLabelMethodInfo ,
#endif
completionProposalGetLabel ,
#if ENABLE_OVERLOADING
CompletionProposalGetMarkupMethodInfo ,
#endif
completionProposalGetMarkup ,
#if ENABLE_OVERLOADING
CompletionProposalGetTextMethodInfo ,
#endif
completionProposalGetText ,
#if ENABLE_OVERLOADING
CompletionProposalHashMethodInfo ,
#endif
completionProposalHash ,
C_CompletionProposalChangedCallback ,
CompletionProposalChangedCallback ,
#if ENABLE_OVERLOADING
CompletionProposalChangedSignalInfo ,
#endif
afterCompletionProposalChanged ,
genClosure_CompletionProposalChanged ,
mk_CompletionProposalChangedCallback ,
noCompletionProposalChangedCallback ,
onCompletionProposalChanged ,
wrap_CompletionProposalChangedCallback ,
) 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
newtype CompletionProposal = CompletionProposal (ManagedPtr CompletionProposal)
noCompletionProposal :: Maybe CompletionProposal
noCompletionProposal = Nothing
type CompletionProposalChangedCallback =
IO ()
noCompletionProposalChangedCallback :: Maybe CompletionProposalChangedCallback
noCompletionProposalChangedCallback = Nothing
type C_CompletionProposalChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_CompletionProposalChangedCallback :: C_CompletionProposalChangedCallback -> IO (FunPtr C_CompletionProposalChangedCallback)
genClosure_CompletionProposalChanged :: MonadIO m => CompletionProposalChangedCallback -> m (GClosure C_CompletionProposalChangedCallback)
genClosure_CompletionProposalChanged cb = liftIO $ do
let cb' = wrap_CompletionProposalChangedCallback cb
mk_CompletionProposalChangedCallback cb' >>= B.GClosure.newGClosure
wrap_CompletionProposalChangedCallback ::
CompletionProposalChangedCallback ->
C_CompletionProposalChangedCallback
wrap_CompletionProposalChangedCallback _cb _ _ = do
_cb
onCompletionProposalChanged :: (IsCompletionProposal a, MonadIO m) => a -> CompletionProposalChangedCallback -> m SignalHandlerId
onCompletionProposalChanged obj cb = liftIO $ do
let cb' = wrap_CompletionProposalChangedCallback cb
cb'' <- mk_CompletionProposalChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' SignalConnectBefore
afterCompletionProposalChanged :: (IsCompletionProposal a, MonadIO m) => a -> CompletionProposalChangedCallback -> m SignalHandlerId
afterCompletionProposalChanged obj cb = liftIO $ do
let cb' = wrap_CompletionProposalChangedCallback cb
cb'' <- mk_CompletionProposalChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' SignalConnectAfter
#if ENABLE_OVERLOADING
data CompletionProposalChangedSignalInfo
instance SignalInfo CompletionProposalChangedSignalInfo where
type HaskellCallbackType CompletionProposalChangedSignalInfo = CompletionProposalChangedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_CompletionProposalChangedCallback cb
cb'' <- mk_CompletionProposalChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' connectMode
type instance O.SignalList CompletionProposal = CompletionProposalSignalList
type CompletionProposalSignalList = ('[ '("changed", CompletionProposalChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_source_completion_proposal_get_type"
c_gtk_source_completion_proposal_get_type :: IO GType
instance GObject CompletionProposal where
gobjectType = c_gtk_source_completion_proposal_get_type
class (GObject o, O.IsDescendantOf CompletionProposal o) => IsCompletionProposal o
instance (GObject o, O.IsDescendantOf CompletionProposal o) => IsCompletionProposal o
instance O.HasParentTypes CompletionProposal
type instance O.ParentTypes CompletionProposal = '[GObject.Object.Object]
toCompletionProposal :: (MonadIO m, IsCompletionProposal o) => o -> m CompletionProposal
toCompletionProposal = liftIO . unsafeCastTo CompletionProposal
#if ENABLE_OVERLOADING
instance O.HasAttributeList CompletionProposal
type instance O.AttributeList CompletionProposal = CompletionProposalAttributeList
type CompletionProposalAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type family ResolveCompletionProposalMethod (t :: Symbol) (o :: *) :: * where
ResolveCompletionProposalMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveCompletionProposalMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveCompletionProposalMethod "changed" o = CompletionProposalChangedMethodInfo
ResolveCompletionProposalMethod "equal" o = CompletionProposalEqualMethodInfo
ResolveCompletionProposalMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveCompletionProposalMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveCompletionProposalMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveCompletionProposalMethod "hash" o = CompletionProposalHashMethodInfo
ResolveCompletionProposalMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveCompletionProposalMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveCompletionProposalMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveCompletionProposalMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveCompletionProposalMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveCompletionProposalMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveCompletionProposalMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveCompletionProposalMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveCompletionProposalMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveCompletionProposalMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveCompletionProposalMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveCompletionProposalMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveCompletionProposalMethod "getGicon" o = CompletionProposalGetGiconMethodInfo
ResolveCompletionProposalMethod "getIcon" o = CompletionProposalGetIconMethodInfo
ResolveCompletionProposalMethod "getIconName" o = CompletionProposalGetIconNameMethodInfo
ResolveCompletionProposalMethod "getInfo" o = CompletionProposalGetInfoMethodInfo
ResolveCompletionProposalMethod "getLabel" o = CompletionProposalGetLabelMethodInfo
ResolveCompletionProposalMethod "getMarkup" o = CompletionProposalGetMarkupMethodInfo
ResolveCompletionProposalMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveCompletionProposalMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveCompletionProposalMethod "getText" o = CompletionProposalGetTextMethodInfo
ResolveCompletionProposalMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveCompletionProposalMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveCompletionProposalMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveCompletionProposalMethod t CompletionProposal, O.MethodInfo info CompletionProposal p) => OL.IsLabel t (CompletionProposal -> 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
foreign import ccall "gtk_source_completion_proposal_changed" gtk_source_completion_proposal_changed ::
Ptr CompletionProposal ->
IO ()
completionProposalChanged ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionProposal a) =>
a
-> m ()
completionProposalChanged proposal = liftIO $ do
proposal' <- unsafeManagedPtrCastPtr proposal
gtk_source_completion_proposal_changed proposal'
touchManagedPtr proposal
return ()
#if ENABLE_OVERLOADING
data CompletionProposalChangedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsCompletionProposal a) => O.MethodInfo CompletionProposalChangedMethodInfo a signature where
overloadedMethod _ = completionProposalChanged
#endif
foreign import ccall "gtk_source_completion_proposal_equal" gtk_source_completion_proposal_equal ::
Ptr CompletionProposal ->
Ptr CompletionProposal ->
IO CInt
completionProposalEqual ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionProposal a, IsCompletionProposal b) =>
a
-> b
-> m Bool
completionProposalEqual proposal other = liftIO $ do
proposal' <- unsafeManagedPtrCastPtr proposal
other' <- unsafeManagedPtrCastPtr other
result <- gtk_source_completion_proposal_equal proposal' other'
let result' = (/= 0) result
touchManagedPtr proposal
touchManagedPtr other
return result'
#if ENABLE_OVERLOADING
data CompletionProposalEqualMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsCompletionProposal a, IsCompletionProposal b) => O.MethodInfo CompletionProposalEqualMethodInfo a signature where
overloadedMethod _ = completionProposalEqual
#endif
foreign import ccall "gtk_source_completion_proposal_get_gicon" gtk_source_completion_proposal_get_gicon ::
Ptr CompletionProposal ->
IO (Ptr Gio.Icon.Icon)
completionProposalGetGicon ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionProposal a) =>
a
-> m (Maybe Gio.Icon.Icon)
completionProposalGetGicon proposal = liftIO $ do
proposal' <- unsafeManagedPtrCastPtr proposal
result <- gtk_source_completion_proposal_get_gicon proposal'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject Gio.Icon.Icon) result'
return result''
touchManagedPtr proposal
return maybeResult
#if ENABLE_OVERLOADING
data CompletionProposalGetGiconMethodInfo
instance (signature ~ (m (Maybe Gio.Icon.Icon)), MonadIO m, IsCompletionProposal a) => O.MethodInfo CompletionProposalGetGiconMethodInfo a signature where
overloadedMethod _ = completionProposalGetGicon
#endif
foreign import ccall "gtk_source_completion_proposal_get_icon" gtk_source_completion_proposal_get_icon ::
Ptr CompletionProposal ->
IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)
completionProposalGetIcon ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionProposal a) =>
a
-> m (Maybe GdkPixbuf.Pixbuf.Pixbuf)
completionProposalGetIcon proposal = liftIO $ do
proposal' <- unsafeManagedPtrCastPtr proposal
result <- gtk_source_completion_proposal_get_icon proposal'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject GdkPixbuf.Pixbuf.Pixbuf) result'
return result''
touchManagedPtr proposal
return maybeResult
#if ENABLE_OVERLOADING
data CompletionProposalGetIconMethodInfo
instance (signature ~ (m (Maybe GdkPixbuf.Pixbuf.Pixbuf)), MonadIO m, IsCompletionProposal a) => O.MethodInfo CompletionProposalGetIconMethodInfo a signature where
overloadedMethod _ = completionProposalGetIcon
#endif
foreign import ccall "gtk_source_completion_proposal_get_icon_name" gtk_source_completion_proposal_get_icon_name ::
Ptr CompletionProposal ->
IO CString
completionProposalGetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionProposal a) =>
a
-> m (Maybe T.Text)
completionProposalGetIconName proposal = liftIO $ do
proposal' <- unsafeManagedPtrCastPtr proposal
result <- gtk_source_completion_proposal_get_icon_name proposal'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
return result''
touchManagedPtr proposal
return maybeResult
#if ENABLE_OVERLOADING
data CompletionProposalGetIconNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsCompletionProposal a) => O.MethodInfo CompletionProposalGetIconNameMethodInfo a signature where
overloadedMethod _ = completionProposalGetIconName
#endif
foreign import ccall "gtk_source_completion_proposal_get_info" gtk_source_completion_proposal_get_info ::
Ptr CompletionProposal ->
IO CString
completionProposalGetInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionProposal a) =>
a
-> m (Maybe T.Text)
completionProposalGetInfo proposal = liftIO $ do
proposal' <- unsafeManagedPtrCastPtr proposal
result <- gtk_source_completion_proposal_get_info proposal'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
freeMem result'
return result''
touchManagedPtr proposal
return maybeResult
#if ENABLE_OVERLOADING
data CompletionProposalGetInfoMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsCompletionProposal a) => O.MethodInfo CompletionProposalGetInfoMethodInfo a signature where
overloadedMethod _ = completionProposalGetInfo
#endif
foreign import ccall "gtk_source_completion_proposal_get_label" gtk_source_completion_proposal_get_label ::
Ptr CompletionProposal ->
IO CString
completionProposalGetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionProposal a) =>
a
-> m T.Text
completionProposalGetLabel proposal = liftIO $ do
proposal' <- unsafeManagedPtrCastPtr proposal
result <- gtk_source_completion_proposal_get_label proposal'
checkUnexpectedReturnNULL "completionProposalGetLabel" result
result' <- cstringToText result
freeMem result
touchManagedPtr proposal
return result'
#if ENABLE_OVERLOADING
data CompletionProposalGetLabelMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsCompletionProposal a) => O.MethodInfo CompletionProposalGetLabelMethodInfo a signature where
overloadedMethod _ = completionProposalGetLabel
#endif
foreign import ccall "gtk_source_completion_proposal_get_markup" gtk_source_completion_proposal_get_markup ::
Ptr CompletionProposal ->
IO CString
completionProposalGetMarkup ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionProposal a) =>
a
-> m T.Text
completionProposalGetMarkup proposal = liftIO $ do
proposal' <- unsafeManagedPtrCastPtr proposal
result <- gtk_source_completion_proposal_get_markup proposal'
checkUnexpectedReturnNULL "completionProposalGetMarkup" result
result' <- cstringToText result
freeMem result
touchManagedPtr proposal
return result'
#if ENABLE_OVERLOADING
data CompletionProposalGetMarkupMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsCompletionProposal a) => O.MethodInfo CompletionProposalGetMarkupMethodInfo a signature where
overloadedMethod _ = completionProposalGetMarkup
#endif
foreign import ccall "gtk_source_completion_proposal_get_text" gtk_source_completion_proposal_get_text ::
Ptr CompletionProposal ->
IO CString
completionProposalGetText ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionProposal a) =>
a
-> m T.Text
completionProposalGetText proposal = liftIO $ do
proposal' <- unsafeManagedPtrCastPtr proposal
result <- gtk_source_completion_proposal_get_text proposal'
checkUnexpectedReturnNULL "completionProposalGetText" result
result' <- cstringToText result
freeMem result
touchManagedPtr proposal
return result'
#if ENABLE_OVERLOADING
data CompletionProposalGetTextMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsCompletionProposal a) => O.MethodInfo CompletionProposalGetTextMethodInfo a signature where
overloadedMethod _ = completionProposalGetText
#endif
foreign import ccall "gtk_source_completion_proposal_hash" gtk_source_completion_proposal_hash ::
Ptr CompletionProposal ->
IO Word32
completionProposalHash ::
(B.CallStack.HasCallStack, MonadIO m, IsCompletionProposal a) =>
a
-> m Word32
completionProposalHash proposal = liftIO $ do
proposal' <- unsafeManagedPtrCastPtr proposal
result <- gtk_source_completion_proposal_hash proposal'
touchManagedPtr proposal
return result
#if ENABLE_OVERLOADING
data CompletionProposalHashMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsCompletionProposal a) => O.MethodInfo CompletionProposalHashMethodInfo a signature where
overloadedMethod _ = completionProposalHash
#endif